1. 04 Jun, 2008 10 commits
    • Pavel Machek's avatar
      suspend-vs-iommu: prevent suspend if we could not resume · cd76374e
      Pavel Machek authored
      iommu/gart support misses suspend/resume code, which can do bad stuff,
      including memory corruption on resume.  Prevent system suspend in case we
      would be unable to resume.
      Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
      Tested-by: default avatarPatrick <ragamuffin@datacomm.ch>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      cd76374e
    • Andrew Morton's avatar
      x86: section mismatch fix · be524fb9
      Andrew Morton authored
      Fix this:
      
       WARNING: vmlinux.o(.text+0x114bb): Section mismatch in reference from
       the function nopat() to the function .cpuinit.text:pat_disable()
       The function nopat() references
       the function __cpuinit pat_disable().
       This is often because nopat lacks a __cpuinit
       annotation or the annotation of pat_disable is wrong.
      Reported-by: default avatar"Fabio Comolli" <fabio.comolli@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      be524fb9
    • Venki Pallipadi's avatar
      x86: fix Xorg crash with xf86MapVidMem error · 282c454c
      Venki Pallipadi authored
      Clarify the usage of mtrr_lookup() in PAT code, and to make PAT code
      resilient to mtrr lookup problems.
      
      Specifically, pat_x_mtrr_type() is restructured to highlight, under what
      conditions we look for mtrr hint. pat_x_mtrr_type() uses a default type
      when there are any errors in mtrr lookup (still maintaining the pat
      consistency). And, reserve_memtype() highlights its usage ot mtrr_lookup
      for request type of '-1' and also defaults in a sane way on any mtrr
      lookup failure.
      
      pat.c looks at mtrr type of a range to get a hint on what mapping type
      to request when user/API: (1) hasn't specified any type (/dev/mem
      mapping) and we do not want to take performance hit by always mapping
      UC_MINUS. This will be the case for /dev/mem mappings used to map BIOS
      area or ACPI region which are WB'able. In this case, as long as MTRR is
      not WB, PAT will request UC_MINUS for such mappings.
      
      (2) user/API requests WB mapping while in reality MTRR may have UC or
      WC. In this case, PAT can map as WB (without checking MTRR) and still
      effective type will be UC or WC. But, a subsequent request to map same
      region as UC or WC may fail, as the region will get trackked as WB in
      PAT list. Looking at MTRR hint helps us to track based on effective type
      rather than what user requested. Again, here mtrr_lookup is only used as
      hint and we fallback to WB mapping (as requested by user) as default.
      
      In both cases, after using the mtrr hint, we still go through the
      memtype list to make sure there are no inconsistencies among multiple
      users.
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: default avatarRufus &amp; Azrael <rufus-azrael@numericable.fr>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      282c454c
    • Kevin Winchester's avatar
      x86: fix pointer type warning in arch/x86/mm/init_64.c:early_memtest · 51163101
      Kevin Winchester authored
      Changed the call to find_e820_area_size to pass u64 instead of unsigned long.
      Signed-off-by: default avatarKevin Winchester <kjwinchester@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      51163101
    • Hugh Dickins's avatar
      x86: fix bad pmd ffff810000207xxx(9090909090909090) · 2884f110
      Hugh Dickins authored
      OGAWA Hirofumi and Fede have reported rare pmd_ERROR messages:
      mm/memory.c:127: bad pmd ffff810000207xxx(9090909090909090).
      
      Initialization's cleanup_highmap was leaving alignment filler
      behind in the pmd for MODULES_VADDR: when vmalloc's guard page
      would occupy a new page table, it's not allocated, and then
      module unload's vfree hits the bad 9090 pmd entry left over.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2884f110
    • Ingo Molnar's avatar
      x86: ioremap fix failing nesting check · 226e9a93
      Ingo Molnar authored
      Mika Kukkonen noticed that the nesting check in early_iounmap() is not
      actually done.
      Reported-by: default avatarMika Kukkonen <mikukkon@srv1-m700-lanp.koti>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: torvalds@linux-foundation.org
      Cc: arjan@linux.intel.com
      Cc: mikukkon@iki.fi
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      226e9a93
    • Suresh Siddha's avatar
      x86: fix broken math-emu with lazy allocation of fpu area · e8a496ac
      Suresh Siddha authored
      Fix the math emulation that got broken with the recent lazy allocation of FPU
      area. init_fpu() need to be added for the math-emulation path aswell
      for the FPU area allocation.
      
      math emulation enabled kernel booted fine with this, in the presence
      of "no387 nofxsr" boot param.
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: hpa@zytor.com
      Cc: mingo@elte.hu
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e8a496ac
    • Steven Rostedt's avatar
      x86: enable preemption in delay · 5c1ea082
      Steven Rostedt authored
      The RT team has been searching for a nasty latency. This latency shows
      up out of the blue and has been seen to be as big as 5ms!
      
      Using ftrace I found the cause of the latency.
      
         pcscd-2995  3dNh1 52360300us : irq_exit (smp_apic_timer_interrupt)
         pcscd-2995  3dN.2 52360301us : idle_cpu (irq_exit)
         pcscd-2995  3dN.2 52360301us : rcu_irq_exit (irq_exit)
         pcscd-2995  3dN.1 52360771us : smp_apic_timer_interrupt (apic_timer_interrupt
      )
         pcscd-2995  3dN.1 52360771us : exit_idle (smp_apic_timer_interrupt)
      
      Here's an example of a 400 us latency. pcscd took a timer interrupt and
      returned with "need resched" enabled, but did not reschedule until after
      the next interrupt came in at 52360771us 400us later!
      
      At first I thought we somehow missed a preemption check in entry.S. But
      I also noticed that this always seemed to happen during a __delay call.
      
         pcscd-2995  3dN.2 52360836us : rcu_irq_exit (irq_exit)
         pcscd-2995  3.N.. 52361265us : preempt_schedule (__delay)
      
      Looking at the x86 delay, I found my problem.
      
      In git commit 35d5d08a, Andrew Morton
      placed preempt_disable around the entire delay due to TSC's not working
      nicely on SMP.  Unfortunately for those that care about latencies this
      is devastating! Especially when we have callers to mdelay(8).
      
      Here I enable preemption during the loop and account for anytime the task
      migrates to a new CPU. The delay asked for may be extended a bit by
      the migration, but delay only guarantees that it will delay for that minimum
      time. Delaying longer should not be an issue.
      
      [
        Thanks to Thomas Gleixner for spotting that cpu wasn't updated,
          and to place the rep_nop between preempt_enabled/disable.
      ]
      Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
      Cc: akpm@osdl.org
      Cc: Clark Williams <clark.williams@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
      Cc: Gregory Haskins <ghaskins@novell.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andi Kleen <andi-suse@firstfloor.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      5c1ea082
    • Ingo Molnar's avatar
      x86: disable preemption in native_smp_prepare_cpus · deef3250
      Ingo Molnar authored
      Priit Laes reported the following warning:
      
      Call Trace:
       [<ffffffff8022f1e1>] warn_on_slowpath+0x51/0x63
       [<ffffffff80282e48>] sys_ioctl+0x2d/0x5d
       [<ffffffff805185ff>] _spin_lock+0xe/0x24
       [<ffffffff80227459>] task_rq_lock+0x3d/0x73
       [<ffffffff805133c3>] set_cpu_sibling_map+0x336/0x350
       [<ffffffff8021c1b8>] read_apic_id+0x30/0x62
       [<ffffffff806d921d>] verify_local_APIC+0x90/0x138
       [<ffffffff806d84b5>] native_smp_prepare_cpus+0x1f9/0x305
       [<ffffffff806ce7b1>] kernel_init+0x59/0x2d9
       [<ffffffff80518a26>] _spin_unlock_irq+0x11/0x2b
       [<ffffffff8020bf48>] child_rip+0xa/0x12
       [<ffffffff806ce758>] kernel_init+0x0/0x2d9
       [<ffffffff8020bf3e>] child_rip+0x0/0x12
      
      fix this by generally disabling preemption in native_smp_prepare_cpus().
      Reported-and-bisected-by: default avatarPriit Laes <plaes@plaes.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      deef3250
    • Yinghai Lu's avatar
      x86: fix APIC warning on 32bit v2 · fb3bbd6a
      Yinghai Lu authored
      for http://bugzilla.kernel.org/show_bug.cgi?id=10613
      
      BIOS bug, APIC version is 0 for CPU#0! fixing up to 0x10. (tell your hw vendor)
      
      v2: fix 64 bit compilation
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Gabriel C <nix.or.die@googlemail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fb3bbd6a
  2. 02 Jun, 2008 7 commits
  3. 31 May, 2008 8 commits
  4. 30 May, 2008 15 commits