1. 17 4月, 2008 24 次提交
  2. 16 4月, 2008 1 次提交
  3. 11 4月, 2008 2 次提交
    • R
      asmlinkage_protect replaces prevent_tail_call · 54a01510
      Roland McGrath 提交于
      The prevent_tail_call() macro works around the problem of the compiler
      clobbering argument words on the stack, which for asmlinkage functions
      is the caller's (user's) struct pt_regs.  The tail/sibling-call
      optimization is not the only way that the compiler can decide to use
      stack argument words as scratch space, which we have to prevent.
      Other optimizations can do it too.
      
      Until we have new compiler support to make "asmlinkage" binding on the
      compiler's own use of the stack argument frame, we have work around all
      the manifestations of this issue that crop up.
      
      More cases seem to be prevented by also keeping the incoming argument
      variables live at the end of the function.  This makes their original
      stack slots attractive places to leave those variables, so the compiler
      tends not clobber them for something else.  It's still no guarantee, but
      it handles some observed cases that prevent_tail_call() did not.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      54a01510
    • V
      x86: Simplify cpu_idle_wait · 783e391b
      Venki Pallipadi 提交于
      This patch also resolves hangs on boot:
      	http://lkml.org/lkml/2008/2/23/263
      	http://bugzilla.kernel.org/show_bug.cgi?id=10093
      
      The bug was causing once-in-few-reboots 10-15 sec wait during boot on
      certain laptops.
      
      Earlier commit 40d6a146 added
      smp_call_function in cpu_idle_wait() to kick cpus that are in tickless
      idle.  Looking at cpu_idle_wait code at that time, code seemed to be
      over-engineered for a case which is rarely used (while changing idle
      handler).
      
      Below is a simplified version of cpu_idle_wait, which just makes a dummy
      smp_call_function to all cpus, to make them come out of old idle handler
      and start using the new idle handler.  It eliminates code in the idle
      loop to handle cpu_idle_wait.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      783e391b
  4. 10 4月, 2008 1 次提交
    • S
      pop previous section in alternative.c · f4be31ec
      Steven Rostedt 提交于
      gcc expects all toplevel assembly to return to the original section type.
      The code in alteranative.c does not do this. This caused some strange bugs
      in sched-devel where code would end up in the .rodata section and when
      the kernel sets the NX bit on all .rodata, the kernel would crash when
      executing this code.
      
      This patch adds a .previous marker to return the code back to the
      original section.
      
      Credit goes to Andrew Pinski for telling me it wasn't a gcc bug but a
      bug in the toplevel asm code in the kernel.  ;-)
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f4be31ec
  5. 08 4月, 2008 2 次提交
  6. 07 4月, 2008 1 次提交
  7. 05 4月, 2008 8 次提交
    • T
      x86: revert assign IRQs to hpet timer · 5761d64b
      Thomas Gleixner 提交于
      The commits:
      
      commit 37a47db8
      Author: Balaji Rao <balajirrao@gmail.com>
      Date:   Wed Jan 30 13:30:03 2008 +0100
      
          x86: assign IRQs to HPET timers, fix
      
      and
      
      commit e3f37a54
      Author: Balaji Rao <balajirrao@gmail.com>
      Date:   Wed Jan 30 13:30:03 2008 +0100
      
          x86: assign IRQs to HPET timers
      
      have been identified to cause a regression on some platforms due to
      the assignement of legacy IRQs which makes the legacy devices
      connected to those IRQs disfunctional.
      
      Revert them.
      
      This fixes http://bugzilla.kernel.org/show_bug.cgi?id=10382Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5761d64b
    • T
      x86: tsc prevent time going backwards · 47001d60
      Thomas Gleixner 提交于
      We already catch most of the TSC problems by sanity checks, but there
      is a subtle bug which has been in the code for ever. This can cause
      time jumps in the range of hours.
      
      This was reported in:
           http://lkml.org/lkml/2007/8/23/96
      and
           http://lkml.org/lkml/2008/3/31/23
      
      I was able to reproduce the problem with a gettimeofday loop test on a
      dual core and a quad core machine which both have sychronized
      TSCs. The TSCs seems not to be perfectly in sync though, but the
      kernel is not able to detect the slight delta in the sync check. Still
      there exists an extremly small window where this delta can be observed
      with a real big time jump. So far I was only able to reproduce this
      with the vsyscall gettimeofday implementation, but in theory this
      might be observable with the syscall based version as well.
      
      CPU 0 updates the clock source variables under xtime/vyscall lock and
      CPU1, where the TSC is slighty behind CPU0, is reading the time right
      after the seqlock was unlocked.
      
      The clocksource reference data was updated with the TSC from CPU0 and
      the value which is read from TSC on CPU1 is less than the reference
      data. This results in a huge delta value due to the unsigned
      subtraction of the TSC value and the reference value. This algorithm
      can not be changed due to the support of wrapping clock sources like
      pm timer.
      
      The huge delta is converted to nanoseconds and added to xtime, which
      is then observable by the caller. The next gettimeofday call on CPU1
      will show the correct time again as now the TSC has advanced above the
      reference value.
      
      To prevent this TSC specific wreckage we need to compare the TSC value
      against the reference value and return the latter when it is larger
      than the actual TSC value.
      
      I pondered to mark the TSC unstable when the readout is smaller than
      the reference value, but this would render an otherwise good and fast
      clocksource unusable without a real good reason.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      47001d60
    • M
      xen: Clear PG_pinned in release_{pt,pd}() · c946c7de
      Mark McLoughlin 提交于
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: xen-devel@lists.xensource.com
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c946c7de
    • M
      xen: Do not pin/unpin PMD pages · a684d69d
      Mark McLoughlin 提交于
      i.e. with this simple test case:
      
          int fd = open("/dev/zero", O_RDONLY);
          munmap(mmap((void *)0x40000000, 0x1000_LEN, PROT_READ, MAP_PRIVATE, fd, 0), 0x1000);
          close(fd);
      
      we currently get:
      
         kernel BUG at arch/x86/xen/enlighten.c:678!
         ...
         EIP is at xen_release_pt+0x79/0xa9
         ...
         Call Trace:
          [<c041da25>] ? __pmd_free_tlb+0x1a/0x75
          [<c047a192>] ? free_pgd_range+0x1d2/0x2b5
          [<c047a2f3>] ? free_pgtables+0x7e/0x93
          [<c047b272>] ? unmap_region+0xb9/0xf5
          [<c047c1bd>] ? do_munmap+0x193/0x1f5
          [<c047c24f>] ? sys_munmap+0x30/0x3f
          [<c0408cce>] ? syscall_call+0x7/0xb
          =======================
      
      and xen complains:
      
        (XEN) mm.c:2241:d4 Mfn 1cc37 not pinned
      
      Further details at:
      
        https://bugzilla.redhat.com/436453Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: xen-devel@lists.xensource.com
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a684d69d
    • M
      xen: refactor xen_{alloc,release}_{pt,pd}() · f6433706
      Mark McLoughlin 提交于
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: xen-devel@lists.xensource.com
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f6433706
    • P
      x86, agpgart: scary messages are fortunately obsolete · 8f59610d
      Pavel Machek 提交于
      Fix obsolete printks in aperture-64. We used not to handle missing
      agpgart, but we handle it okay now.
      Signed-off-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8f59610d
    • I
      x86: print message if nmi_watchdog=2 cannot be enabled · 9c9b81f7
      Ingo Molnar 提交于
      right now if there's no CPU support for nmi_watchdog=2 we'll just
      refuse it silently.
      
      print a useful warning.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9c9b81f7
    • I
      x86: fix nmi_watchdog=2 on Pentium-D CPUs · 4f14bdef
      Ingo Molnar 提交于
      implement nmi_watchdog=2 on this class of CPUs:
      
        cpu family      : 15
        model           : 6
        model name      : Intel(R) Pentium(R) D CPU 3.00GHz
      
      the watchdog's ->setup() method is safe anyway, so if the CPU
      cannot support it we'll bail out safely.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4f14bdef
  8. 04 4月, 2008 1 次提交
    • R
      x86 ptrace: avoid unnecessary wrmsr · 4ba51fd7
      Roland McGrath 提交于
      This avoids using wrmsr on MSR_IA32_DEBUGCTLMSR when it's not needed.
      No wrmsr ever needs to be done if noone has ever used block stepping.
      
      Without this change, using ptrace on 2.6.25 on an x86 KVM guest
      will tickle KVM's missing support for the MSR and crash the guest
      kernel.  Though host KVM is the buggy one, this makes for a regression
      in the guest behavior from 2.6.24->2.6.25 that we can easily avoid.
      
      I also corrected some bad whitespace.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4ba51fd7