]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .26 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Oct 2008 23:58:41 +0000 (16:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Oct 2008 23:58:41 +0000 (16:58 -0700)
queue-2.6.26/acpi-avoid-bogus-ec-timeout-when-ec-is-in-polling-mode.patch [new file with mode: 0644]
queue-2.6.26/mm-dirty-page-tracking-race-fix.patch [new file with mode: 0644]
queue-2.6.26/rtc-fix-deadlock.patch [new file with mode: 0644]
queue-2.6.26/series
queue-2.6.26/x86-64-fix-overlap-of-modules-and-fixmap-areas.patch [new file with mode: 0644]
queue-2.6.26/x86-add-io-delay-quirk-for-presario-f700.patch [new file with mode: 0644]
queue-2.6.26/x86-fdiv-bug-detection-fix.patch [new file with mode: 0644]
queue-2.6.26/x86-fix-memmap-exactmap-boot-argument.patch [new file with mode: 0644]
queue-2.6.26/x86-fix-oprofile-hibernation-badness.patch [new file with mode: 0644]
queue-2.6.26/x86-fix-smp-alternatives-use-mutex-instead-of-spinlock-text_poke-is-sleepable.patch [new file with mode: 0644]
queue-2.6.26/x86-pat-proper-tracking-of-set_memory_uc-and-friends.patch [new file with mode: 0644]

diff --git a/queue-2.6.26/acpi-avoid-bogus-ec-timeout-when-ec-is-in-polling-mode.patch b/queue-2.6.26/acpi-avoid-bogus-ec-timeout-when-ec-is-in-polling-mode.patch
new file mode 100644 (file)
index 0000000..cc037c0
--- /dev/null
@@ -0,0 +1,63 @@
+From yakui.zhao@intel.com  Wed Oct  1 16:54:01 2008
+From: Zhao Yakui <yakui.zhao@intel.com>
+Date: Tue, 23 Sep 2008 13:38:13 +0800
+Subject: ACPI: Avoid bogus EC timeout when EC is in Polling mode
+To: stable@kernel.org
+Cc: epprecht@solnet.ch
+Message-ID: <1222148293.3999.168.camel@yakui_zhao.sh.intel.com>
+
+From : Zhao Yakui <yakui.zhao@intel.com>
+
+commit 9d699ed92a459cb408e2577e8bbeabc8ec3989e1 upstream
+
+When EC is in Polling mode, OS will check the EC status continually by using
+the following source code:
+       clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
+       while (time_before(jiffies, delay)) {
+               if (acpi_ec_check_status(ec, event))
+                           return 0;
+               msleep(1);
+       }
+But msleep is realized by the function of schedule_timeout. At the same time
+although one process is already waken up by some events, it won't be scheduled
+immediately. So maybe there exists the following phenomena:
+     a. The current jiffies is already after the predefined jiffies.
+       But before timeout happens, OS has no chance to check the EC
+       status again.
+     b. If preemptible schedule is enabled, maybe preempt schedule will happen
+       before checking loop. When the process is resumed again, maybe
+       timeout already happens, which means that OS has no chance to check
+       the EC status.
+
+In such case maybe EC status is already what OS expects when timeout happens.
+But OS has no chance to check the EC status and regards it as AE_TIME.
+
+So it will be more appropriate that OS will try to check the EC status again
+when timeout happens. If the EC status is what we expect, it won't be regarded
+as timeout. Only when the EC status is not what we expect, it will be regarded
+as timeout, which means that EC controller can't give a response in time.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=9823
+http://bugzilla.kernel.org/show_bug.cgi?id=11141
+
+Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
+Signed-off-by: Zhang Rui  <rui.zhang@intel.com>
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/acpi/ec.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -196,6 +196,8 @@ static int acpi_ec_wait(struct acpi_ec *
+                               return 0;
+                       msleep(1);
+               }
++              if (acpi_ec_check_status(ec,event))
++                      return 0;
+       }
+       pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n",
+               acpi_ec_read_status(ec),
diff --git a/queue-2.6.26/mm-dirty-page-tracking-race-fix.patch b/queue-2.6.26/mm-dirty-page-tracking-race-fix.patch
new file mode 100644 (file)
index 0000000..e6b6f33
--- /dev/null
@@ -0,0 +1,132 @@
+From cebbert@redhat.com  Wed Oct  1 16:48:46 2008
+Date: Wed, 3 Sep 2008 20:27:35 -0400
+Subject: mm: dirty page tracking race fix
+To: stable@kernel.org
+Cc: Nick Piggin <npiggin@suse.de>
+Message-ID: <20080903202735.41809dfd@redhat.com>
+
+
+From: Nick Piggin <npiggin@suse.de>
+
+commit 479db0bf408e65baa14d2a9821abfcbc0804b847 upstream
+
+There is a race with dirty page accounting where a page may not properly
+be accounted for.
+
+clear_page_dirty_for_io() calls page_mkclean; then TestClearPageDirty.
+
+page_mkclean walks the rmaps for that page, and for each one it cleans and
+write protects the pte if it was dirty.  It uses page_check_address to
+find the pte.  That function has a shortcut to avoid the ptl if the pte is
+not present.  Unfortunately, the pte can be switched to not-present then
+back to present by other code while holding the page table lock -- this
+should not be a signal for page_mkclean to ignore that pte, because it may
+be dirty.
+
+For example, powerpc64's set_pte_at will clear a previously present pte
+before setting it to the desired value.  There may also be other code in
+core mm or in arch which do similar things.
+
+The consequence of the bug is loss of data integrity due to msync, and
+loss of dirty page accounting accuracy.  XIP's __xip_unmap could easily
+also be unreliable (depending on the exact XIP locking scheme), which can
+lead to data corruption.
+
+Fix this by having an option to always take ptl to check the pte in
+page_check_address.
+
+It's possible to retain this optimization for page_referenced and
+try_to_unmap.
+
+Signed-off-by: Nick Piggin <npiggin@suse.de>
+Cc: Jared Hulbert <jaredeh@gmail.com>
+Cc: Carsten Otte <cotte@freenet.de>
+Cc: Hugh Dickins <hugh@veritas.com>
+Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/rmap.h |    2 +-
+ mm/filemap_xip.c     |    2 +-
+ mm/rmap.c            |   14 +++++++++-----
+ 3 files changed, 11 insertions(+), 7 deletions(-)
+
+--- a/include/linux/rmap.h
++++ b/include/linux/rmap.h
+@@ -94,7 +94,7 @@ int try_to_unmap(struct page *, int igno
+  * Called from mm/filemap_xip.c to unmap empty zero page
+  */
+ pte_t *page_check_address(struct page *, struct mm_struct *,
+-                              unsigned long, spinlock_t **);
++                              unsigned long, spinlock_t **, int);
+ /*
+  * Used by swapoff to help locate where page is expected in vma.
+--- a/mm/filemap_xip.c
++++ b/mm/filemap_xip.c
+@@ -184,7 +184,7 @@ __xip_unmap (struct address_space * mapp
+               address = vma->vm_start +
+                       ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
+               BUG_ON(address < vma->vm_start || address >= vma->vm_end);
+-              pte = page_check_address(page, mm, address, &ptl);
++              pte = page_check_address(page, mm, address, &ptl, 1);
+               if (pte) {
+                       /* Nuke the page table entry. */
+                       flush_cache_page(vma, address, pte_pfn(*pte));
+--- a/mm/rmap.c
++++ b/mm/rmap.c
+@@ -223,10 +223,14 @@ unsigned long page_address_in_vma(struct
+ /*
+  * Check that @page is mapped at @address into @mm.
+  *
++ * If @sync is false, page_check_address may perform a racy check to avoid
++ * the page table lock when the pte is not present (helpful when reclaiming
++ * highly shared pages).
++ *
+  * On success returns with pte mapped and locked.
+  */
+ pte_t *page_check_address(struct page *page, struct mm_struct *mm,
+-                        unsigned long address, spinlock_t **ptlp)
++                        unsigned long address, spinlock_t **ptlp, int sync)
+ {
+       pgd_t *pgd;
+       pud_t *pud;
+@@ -248,7 +252,7 @@ pte_t *page_check_address(struct page *p
+       pte = pte_offset_map(pmd, address);
+       /* Make a quick check before getting the lock */
+-      if (!pte_present(*pte)) {
++      if (!sync && !pte_present(*pte)) {
+               pte_unmap(pte);
+               return NULL;
+       }
+@@ -280,7 +284,7 @@ static int page_referenced_one(struct pa
+       if (address == -EFAULT)
+               goto out;
+-      pte = page_check_address(page, mm, address, &ptl);
++      pte = page_check_address(page, mm, address, &ptl, 0);
+       if (!pte)
+               goto out;
+@@ -449,7 +453,7 @@ static int page_mkclean_one(struct page 
+       if (address == -EFAULT)
+               goto out;
+-      pte = page_check_address(page, mm, address, &ptl);
++      pte = page_check_address(page, mm, address, &ptl, 1);
+       if (!pte)
+               goto out;
+@@ -707,7 +711,7 @@ static int try_to_unmap_one(struct page 
+       if (address == -EFAULT)
+               goto out;
+-      pte = page_check_address(page, mm, address, &ptl);
++      pte = page_check_address(page, mm, address, &ptl, 0);
+       if (!pte)
+               goto out;
diff --git a/queue-2.6.26/rtc-fix-deadlock.patch b/queue-2.6.26/rtc-fix-deadlock.patch
new file mode 100644 (file)
index 0000000..7b4cf38
--- /dev/null
@@ -0,0 +1,66 @@
+From 38c052f8cff1bd323ccfa968136a9556652ee420 Mon Sep 17 00:00:00 2001
+From: Ingo Molnar <mingo@elte.hu>
+Date: Sat, 23 Aug 2008 17:59:07 +0200
+Subject: rtc: fix deadlock
+
+From: Ingo Molnar <mingo@elte.hu>
+
+commit 38c052f8cff1bd323ccfa968136a9556652ee420 upstream
+
+if get_rtc_time() is _ever_ called with IRQs off, we deadlock badly
+in it, waiting for jiffies to increment.
+
+So make the code more robust by doing an explicit mdelay(20).
+
+This solves a very hard to reproduce/debug hard lockup reported
+by Mikael Pettersson.
+
+Reported-by: Mikael Pettersson <mikpe@it.uu.se>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/asm-generic/rtc.h |   12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+--- a/include/asm-generic/rtc.h
++++ b/include/asm-generic/rtc.h
+@@ -15,6 +15,7 @@
+ #include <linux/mc146818rtc.h>
+ #include <linux/rtc.h>
+ #include <linux/bcd.h>
++#include <linux/delay.h>
+ #define RTC_PIE 0x40          /* periodic interrupt enable */
+ #define RTC_AIE 0x20          /* alarm interrupt enable */
+@@ -43,7 +44,6 @@ static inline unsigned char rtc_is_updat
+ static inline unsigned int get_rtc_time(struct rtc_time *time)
+ {
+-      unsigned long uip_watchdog = jiffies;
+       unsigned char ctrl;
+       unsigned long flags;
+@@ -53,19 +53,15 @@ static inline unsigned int get_rtc_time(
+       /*
+        * read RTC once any update in progress is done. The update
+-       * can take just over 2ms. We wait 10 to 20ms. There is no need to
++       * can take just over 2ms. We wait 20ms. There is no need to
+        * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.
+        * If you need to know *exactly* when a second has started, enable
+        * periodic update complete interrupts, (via ioctl) and then 
+        * immediately read /dev/rtc which will block until you get the IRQ.
+        * Once the read clears, read the RTC time (again via ioctl). Easy.
+        */
+-
+-      if (rtc_is_updating() != 0)
+-              while (jiffies - uip_watchdog < 2*HZ/100) {
+-                      barrier();
+-                      cpu_relax();
+-              }
++      if (rtc_is_updating())
++              mdelay(20);
+       /*
+        * Only the values that we read from the RTC are set. We leave
index 2f57a2e2b1275a35a51ecec410d31093b6c36d6e..bd4f093edac19ea2f35bba83502c7f69da808531 100644 (file)
@@ -27,3 +27,13 @@ ocfs2-increment-the-reference-count-of-an-already-active-stack.patch
 sg-disable-interrupts-inside-sg_copy_buffer.patch
 x86-fix-27-rc-crash-on-vsmp-due-to-paravirt-during-module-load.patch
 rt2x00-use-ieee80211_hw-workqueue-again.patch
+x86-fdiv-bug-detection-fix.patch
+x86-fix-oprofile-hibernation-badness.patch
+x86-pat-proper-tracking-of-set_memory_uc-and-friends.patch
+x86-64-fix-overlap-of-modules-and-fixmap-areas.patch
+mm-dirty-page-tracking-race-fix.patch
+rtc-fix-deadlock.patch
+x86-fix-smp-alternatives-use-mutex-instead-of-spinlock-text_poke-is-sleepable.patch
+acpi-avoid-bogus-ec-timeout-when-ec-is-in-polling-mode.patch
+x86-add-io-delay-quirk-for-presario-f700.patch
+x86-fix-memmap-exactmap-boot-argument.patch
diff --git a/queue-2.6.26/x86-64-fix-overlap-of-modules-and-fixmap-areas.patch b/queue-2.6.26/x86-64-fix-overlap-of-modules-and-fixmap-areas.patch
new file mode 100644 (file)
index 0000000..8f240c3
--- /dev/null
@@ -0,0 +1,46 @@
+From cebbert@redhat.com  Wed Oct  1 16:47:38 2008
+From: Jan Beulich <jbeulich@novell.com>
+Date: Wed, 3 Sep 2008 20:25:24 -0400
+Subject: x86-64: fix overlap of modules and fixmap areas
+To: stable@kernel.org
+Cc: Ingo Molnar <mingo@elte.hu>, Jan Beulich <jbeulich@novell.com>
+Message-ID: <20080903202524.26d90b6f@redhat.com>
+
+
+From: Jan Beulich <jbeulich@novell.com>
+
+commit 66d4bdf22b8652cda215e2653c8bbec7a767ed57 upstream
+
+Plus add a build time check so this doesn't go unnoticed again.
+
+Signed-off-by: Jan Beulich <jbeulich@novell.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/head64.c     |    1 +
+ include/asm-x86/pgtable_64.h |    2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/head64.c
++++ b/arch/x86/kernel/head64.c
+@@ -135,6 +135,7 @@ void __init x86_64_start_kernel(char * r
+       BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));
+       BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) ==
+                               (__START_KERNEL & PGDIR_MASK)));
++      BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) <= MODULES_END);
+       /* clear bss before set_intr_gate with early_idt_handler */
+       clear_bss();
+--- a/include/asm-x86/pgtable_64.h
++++ b/include/asm-x86/pgtable_64.h
+@@ -146,7 +146,7 @@ static inline void native_pgd_clear(pgd_
+ #define VMALLOC_END      _AC(0xffffe1ffffffffff, UL)
+ #define VMEMMAP_START  _AC(0xffffe20000000000, UL)
+ #define MODULES_VADDR    _AC(0xffffffffa0000000, UL)
+-#define MODULES_END      _AC(0xfffffffffff00000, UL)
++#define MODULES_END      _AC(0xffffffffff000000, UL)
+ #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
+ #ifndef __ASSEMBLY__
diff --git a/queue-2.6.26/x86-add-io-delay-quirk-for-presario-f700.patch b/queue-2.6.26/x86-add-io-delay-quirk-for-presario-f700.patch
new file mode 100644 (file)
index 0000000..a767395
--- /dev/null
@@ -0,0 +1,52 @@
+From cebbert@redhat.com  Wed Oct  1 16:54:55 2008
+From: Chuck Ebbert <cebbert@redhat.com>
+Date: Wed, 24 Sep 2008 19:26:04 -0400
+Subject: x86: add io delay quirk for Presario F700
+To: stable@kernel.org
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Message-ID: <20080924192604.090ffc03@redhat.com>
+
+
+From: Chuck Ebbert <cebbert@redhat.com>
+
+commit e6a5652fd156a286faadbf7a4062b5354d4e346e upstream
+
+Manually adding "io_delay=0xed" fixes system lockups in ioapic
+mode on this machine.
+
+System Information
+       Manufacturer: Hewlett-Packard
+       Product Name: Presario F700 (KA695EA#ABF)
+
+Base Board Information
+       Manufacturer: Quanta
+       Product Name: 30D3
+
+Reference:
+https://bugzilla.redhat.com/show_bug.cgi?id=459546
+
+Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: H. Peter Anvin <hpa@zytor.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/io_delay.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/x86/kernel/io_delay.c
++++ b/arch/x86/kernel/io_delay.c
+@@ -92,6 +92,14 @@ static struct dmi_system_id __initdata i
+                       DMI_MATCH(DMI_BOARD_NAME, "30BF")
+               }
+       },
++      {
++              .callback       = dmi_io_delay_0xed_port,
++              .ident          = "Presario F700",
++              .matches        = {
++                      DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"),
++                      DMI_MATCH(DMI_BOARD_NAME, "30D3")
++              }
++      },
+       { }
+ };
diff --git a/queue-2.6.26/x86-fdiv-bug-detection-fix.patch b/queue-2.6.26/x86-fdiv-bug-detection-fix.patch
new file mode 100644 (file)
index 0000000..bb77b0c
--- /dev/null
@@ -0,0 +1,58 @@
+From cebbert@redhat.com  Wed Oct  1 16:43:20 2008
+From: Krzysztof Helt <krzysztof.h1@wp.pl>
+Date: Wed, 3 Sep 2008 19:44:55 -0400
+Subject: x86: fdiv bug detection fix
+To: stable@kernel.org
+Cc: Ingo Molnar <mingo@elte.hu>
+Message-ID: <20080903194455.0b27a033@redhat.com>
+
+
+From: Krzysztof Helt <krzysztof.h1@wp.pl>
+
+commit e0d22d03c06c4e2c194d7010bc1e4a972199f156 upstream
+
+The fdiv detection code writes s32 integer into
+the boot_cpu_data.fdiv_bug.
+However, the boot_cpu_data.fdiv_bug is only char (s8)
+field so the detection overwrites already set fields for
+other bugs, e.g. the f00f bug field.
+
+Use local s32 variable to receive result.
+
+This is a partial fix to Bugzilla #9928  - fixes wrong
+information about the f00f bug (tested) and probably
+for coma bug (I have no cpu to test this).
+
+Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/cpu/bugs.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/bugs.c
++++ b/arch/x86/kernel/cpu/bugs.c
+@@ -50,6 +50,8 @@ static double __initdata y = 3145727.0;
+  */
+ static void __init check_fpu(void)
+ {
++      s32 fdiv_bug;
++
+       if (!boot_cpu_data.hard_math) {
+ #ifndef CONFIG_MATH_EMULATION
+               printk(KERN_EMERG "No coprocessor found and no math emulation present.\n");
+@@ -70,8 +72,10 @@ static void __init check_fpu(void)
+               "fistpl %0\n\t"
+               "fwait\n\t"
+               "fninit"
+-              : "=m" (*&boot_cpu_data.fdiv_bug)
++              : "=m" (*&fdiv_bug)
+               : "m" (*&x), "m" (*&y));
++
++      boot_cpu_data.fdiv_bug = fdiv_bug;
+       if (boot_cpu_data.fdiv_bug)
+               printk("Hmm, FPU with FDIV bug.\n");
+ }
diff --git a/queue-2.6.26/x86-fix-memmap-exactmap-boot-argument.patch b/queue-2.6.26/x86-fix-memmap-exactmap-boot-argument.patch
new file mode 100644 (file)
index 0000000..49ff52b
--- /dev/null
@@ -0,0 +1,93 @@
+From cebbert@redhat.com  Wed Oct  1 16:56:05 2008
+From: Prarit Bhargava <prarit@redhat.com>
+Date: Wed, 24 Sep 2008 20:27:49 -0400
+Subject: x86: fix memmap=exactmap boot argument
+To: stable@kernel.org
+Cc: Ingo Molnar <mingo@elte.hu>
+Message-ID: <20080924202749.09d3b5f8@redhat.com>
+
+
+From: Prarit Bhargava <prarit@redhat.com>
+
+Backport of d6be118a97ce51ca84035270f91c2bccecbfac5f by Chuck Ebbert
+
+When using kdump modifying the e820 map is yielding strange results.
+
+For example starting with
+
+ BIOS-provided physical RAM map:
+ BIOS-e820: 0000000000000100 - 0000000000093400 (usable)
+ BIOS-e820: 0000000000093400 - 00000000000a0000 (reserved)
+ BIOS-e820: 0000000000100000 - 000000003fee0000 (usable)
+ BIOS-e820: 000000003fee0000 - 000000003fef3000 (ACPI data)
+ BIOS-e820: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
+ BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)
+ BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
+ BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
+ BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
+ BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
+
+and booting with args
+
+memmap=exactmap memmap=640K@0K memmap=5228K@16384K memmap=125188K@22252K memmap=76K#1047424K memmap=564K#1047500K
+
+resulted in:
+
+ user-defined physical RAM map:
+ user: 0000000000000000 - 0000000000093400 (usable)
+ user: 0000000000093400 - 00000000000a0000 (reserved)
+ user: 0000000000100000 - 000000003fee0000 (usable)
+ user: 000000003fee0000 - 000000003fef3000 (ACPI data)
+ user: 000000003fef3000 - 000000003ff80000 (ACPI NVS)
+ user: 000000003ff80000 - 0000000040000000 (reserved)
+ user: 00000000e0000000 - 00000000f0000000 (reserved)
+ user: 00000000fec00000 - 00000000fec10000 (reserved)
+ user: 00000000fee00000 - 00000000fee01000 (reserved)
+ user: 00000000ff000000 - 0000000100000000 (reserved)
+
+But should have resulted in:
+
+ user-defined physical RAM map:
+ user: 0000000000000000 - 00000000000a0000 (usable)
+ user: 0000000001000000 - 000000000151b000 (usable)
+ user: 00000000015bb000 - 0000000008ffc000 (usable)
+ user: 000000003fee0000 - 000000003ff80000 (ACPI data)
+
+This is happening because of an improper usage of strcmp() in the
+e820 parsing code.  The strcmp() always returns !0 and never resets the
+value for e820.nr_map and returns an incorrect user-defined map.
+
+This patch fixes the problem.
+
+Signed-off-by: Prarit Bhargava <prarit@redhat.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/e820_32.c |    2 +-
+ arch/x86/kernel/e820_64.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/kernel/e820_32.c
++++ b/arch/x86/kernel/e820_32.c
+@@ -697,7 +697,7 @@ static int __init parse_memmap(char *arg
+       if (!arg)
+               return -EINVAL;
+-      if (strcmp(arg, "exactmap") == 0) {
++      if (strncmp(arg, "exactmap", 8) == 0) {
+ #ifdef CONFIG_CRASH_DUMP
+               /* If we are doing a crash dump, we
+                * still need to know the real mem
+--- a/arch/x86/kernel/e820_64.c
++++ b/arch/x86/kernel/e820_64.c
+@@ -776,7 +776,7 @@ static int __init parse_memmap_opt(char 
+       char *oldp;
+       unsigned long long start_at, mem_size;
+-      if (!strcmp(p, "exactmap")) {
++      if (!strncmp(p, "exactmap", 8)) {
+ #ifdef CONFIG_CRASH_DUMP
+               /*
+                * If we are doing a crash dump, we still need to know
diff --git a/queue-2.6.26/x86-fix-oprofile-hibernation-badness.patch b/queue-2.6.26/x86-fix-oprofile-hibernation-badness.patch
new file mode 100644 (file)
index 0000000..c3d0269
--- /dev/null
@@ -0,0 +1,126 @@
+From cebbert@redhat.com  Wed Oct  1 16:44:45 2008
+From: Andi Kleen <ak@linux.intel.com>
+Date: Wed, 3 Sep 2008 19:47:05 -0400
+Subject: x86: fix oprofile + hibernation badness
+To: stable@kernel.org
+Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <ak@linux.intel.com>
+Message-ID: <20080903194705.54119f36@redhat.com>
+
+
+From: Andi Kleen <ak@linux.intel.com>
+
+commit 80a8c9fffa78f57d7d4351af2f15a56386805ceb upstream
+
+Vegard Nossum reported oprofile + hibernation problems:
+
+> Now some warnings:
+>
+> ------------[ cut here ]------------
+> WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s
+> mp_call_function_mask+0x194/0x1a0()
+
+The usual problem: the suspend function when interrupts are
+already disabled calls smp_call_function which is not allowed with
+interrupt off. But at this point all the other CPUs should be already
+down anyways, so it should be enough to just drop that.
+
+This patch should fix that problem at least by fixing cpu hotplug&
+suspend support.
+
+[ mingo@elte.hu: fixed 5 coding style errors. ]
+
+Backported by Chuck Ebbert
+
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/oprofile/nmi_int.c |   39 ++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 36 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/oprofile/nmi_int.c
++++ b/arch/x86/oprofile/nmi_int.c
+@@ -15,6 +15,7 @@
+ #include <linux/slab.h>
+ #include <linux/moduleparam.h>
+ #include <linux/kdebug.h>
++#include <linux/cpu.h>
+ #include <asm/nmi.h>
+ #include <asm/msr.h>
+ #include <asm/apic.h>
+@@ -28,23 +29,48 @@ static DEFINE_PER_CPU(unsigned long, sav
+ static int nmi_start(void);
+ static void nmi_stop(void);
++static void nmi_cpu_start(void *dummy);
++static void nmi_cpu_stop(void *dummy);
+ /* 0 == registered but off, 1 == registered and on */
+ static int nmi_enabled = 0;
++#ifdef CONFIG_SMP
++static int oprofile_cpu_notifier(struct notifier_block *b, unsigned long action,
++                               void *data)
++{
++      int cpu = (unsigned long)data;
++      switch (action) {
++      case CPU_DOWN_FAILED:
++      case CPU_ONLINE:
++              smp_call_function_single(cpu, nmi_cpu_start, NULL, 0, 0);
++              break;
++      case CPU_DOWN_PREPARE:
++              smp_call_function_single(cpu, nmi_cpu_stop, NULL, 0, 1);
++              break;
++      }
++      return NOTIFY_DONE;
++}
++
++static struct notifier_block oprofile_cpu_nb = {
++      .notifier_call = oprofile_cpu_notifier
++};
++#endif
++
+ #ifdef CONFIG_PM
+ static int nmi_suspend(struct sys_device *dev, pm_message_t state)
+ {
++      /* Only one CPU left, just stop that one */
+       if (nmi_enabled == 1)
+-              nmi_stop();
++              nmi_cpu_stop(NULL);
+       return 0;
+ }
+ static int nmi_resume(struct sys_device *dev)
+ {
+       if (nmi_enabled == 1)
+-              nmi_start();
++              nmi_cpu_start(NULL);
+       return 0;
+ }
+@@ -448,6 +474,9 @@ int __init op_nmi_init(struct oprofile_o
+       }
+       init_sysfs();
++#ifdef CONFIG_SMP
++      register_cpu_notifier(&oprofile_cpu_nb);
++#endif
+       using_nmi = 1;
+       ops->create_files = nmi_create_files;
+       ops->setup = nmi_setup;
+@@ -461,6 +490,10 @@ int __init op_nmi_init(struct oprofile_o
+ void op_nmi_exit(void)
+ {
+-      if (using_nmi)
++      if (using_nmi) {
+               exit_sysfs();
++#ifdef CONFIG_SMP
++              unregister_cpu_notifier(&oprofile_cpu_nb);
++#endif
++      }
+ }
diff --git a/queue-2.6.26/x86-fix-smp-alternatives-use-mutex-instead-of-spinlock-text_poke-is-sleepable.patch b/queue-2.6.26/x86-fix-smp-alternatives-use-mutex-instead-of-spinlock-text_poke-is-sleepable.patch
new file mode 100644 (file)
index 0000000..6f6a5a9
--- /dev/null
@@ -0,0 +1,98 @@
+From mingo@elte.hu  Wed Oct  1 16:51:38 2008
+From: Pekka Paalanen <pq@iki.fi>
+Date: Mon, 12 May 2008 21:21:01 +0200
+Subject: x86: fix SMP alternatives: use mutex instead of spinlock, text_poke is sleepable
+To: Raz <raziebe@gmail.com>, stable@kernel.org
+Cc: the arch/x86 maintainers <x86@kernel.org>, Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>, Vegard Nossum <vegard.nossum@gmail.com>, carlos@strangeworlds.co.uk, Pekka Paalanen <pq@iki.fi>, Linux Kernel <linux-kernel@vger.kernel.org>, linux-acpi@vger.kernel.org
+Message-ID: <20080914134233.GE554@elte.hu>
+Content-Disposition: inline
+
+From: Pekka Paalanen <pq@iki.fi>
+
+commit 2f1dafe50cc4e58a239fd81bd47f87f32042a1ee upstream
+
+text_poke is sleepable.
+The original fix by Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>.
+
+Signed-off-by: Pekka Paalanen <pq@iki.fi>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/alternative.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/arch/x86/kernel/alternative.c
++++ b/arch/x86/kernel/alternative.c
+@@ -1,6 +1,6 @@
+ #include <linux/module.h>
+ #include <linux/sched.h>
+-#include <linux/spinlock.h>
++#include <linux/mutex.h>
+ #include <linux/list.h>
+ #include <linux/kprobes.h>
+ #include <linux/mm.h>
+@@ -279,7 +279,7 @@ struct smp_alt_module {
+       struct list_head next;
+ };
+ static LIST_HEAD(smp_alt_modules);
+-static DEFINE_SPINLOCK(smp_alt);
++static DEFINE_MUTEX(smp_alt);
+ static int smp_mode = 1;      /* protected by smp_alt */
+ void alternatives_smp_module_add(struct module *mod, char *name,
+@@ -312,12 +312,12 @@ void alternatives_smp_module_add(struct 
+               __func__, smp->locks, smp->locks_end,
+               smp->text, smp->text_end, smp->name);
+-      spin_lock(&smp_alt);
++      mutex_lock(&smp_alt);
+       list_add_tail(&smp->next, &smp_alt_modules);
+       if (boot_cpu_has(X86_FEATURE_UP))
+               alternatives_smp_unlock(smp->locks, smp->locks_end,
+                                       smp->text, smp->text_end);
+-      spin_unlock(&smp_alt);
++      mutex_unlock(&smp_alt);
+ }
+ void alternatives_smp_module_del(struct module *mod)
+@@ -327,17 +327,17 @@ void alternatives_smp_module_del(struct 
+       if (smp_alt_once || noreplace_smp)
+               return;
+-      spin_lock(&smp_alt);
++      mutex_lock(&smp_alt);
+       list_for_each_entry(item, &smp_alt_modules, next) {
+               if (mod != item->mod)
+                       continue;
+               list_del(&item->next);
+-              spin_unlock(&smp_alt);
++              mutex_unlock(&smp_alt);
+               DPRINTK("%s: %s\n", __func__, item->name);
+               kfree(item);
+               return;
+       }
+-      spin_unlock(&smp_alt);
++      mutex_unlock(&smp_alt);
+ }
+ void alternatives_smp_switch(int smp)
+@@ -359,7 +359,7 @@ void alternatives_smp_switch(int smp)
+               return;
+       BUG_ON(!smp && (num_online_cpus() > 1));
+-      spin_lock(&smp_alt);
++      mutex_lock(&smp_alt);
+       /*
+        * Avoid unnecessary switches because it forces JIT based VMs to
+@@ -383,7 +383,7 @@ void alternatives_smp_switch(int smp)
+                                               mod->text, mod->text_end);
+       }
+       smp_mode = smp;
+-      spin_unlock(&smp_alt);
++      mutex_unlock(&smp_alt);
+ }
+ #endif
diff --git a/queue-2.6.26/x86-pat-proper-tracking-of-set_memory_uc-and-friends.patch b/queue-2.6.26/x86-pat-proper-tracking-of-set_memory_uc-and-friends.patch
new file mode 100644 (file)
index 0000000..d1339dd
--- /dev/null
@@ -0,0 +1,54 @@
+From cebbert@redhat.com  Wed Oct  1 16:46:14 2008
+From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+Date: Wed, 3 Sep 2008 19:54:55 -0400
+Subject: x86: PAT proper tracking of set_memory_uc and friends
+To: stable@kernel.org
+Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+Message-ID: <20080903195455.0a55f90d@redhat.com>
+
+From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+
+commit c15238df3b65e34fadb1021b0fb0d5aebc7c42c6 upstream
+
+Big thinko in pat memtype tracking code. reserve_memtype should be called
+with physical address and not virtual address.
+
+Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/mm/pageattr.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/mm/pageattr.c
++++ b/arch/x86/mm/pageattr.c
+@@ -789,7 +789,7 @@ int set_memory_uc(unsigned long addr, in
+       /*
+        * for now UC MINUS. see comments in ioremap_nocache()
+        */
+-      if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
++      if (reserve_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE,
+                           _PAGE_CACHE_UC_MINUS, NULL))
+               return -EINVAL;
+@@ -808,7 +808,7 @@ int set_memory_wc(unsigned long addr, in
+       if (!pat_wc_enabled)
+               return set_memory_uc(addr, numpages);
+-      if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
++      if (reserve_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE,
+               _PAGE_CACHE_WC, NULL))
+               return -EINVAL;
+@@ -824,7 +824,7 @@ int _set_memory_wb(unsigned long addr, i
+ int set_memory_wb(unsigned long addr, int numpages)
+ {
+-      free_memtype(addr, addr + numpages * PAGE_SIZE);
++      free_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE);
+       return _set_memory_wb(addr, numpages);
+ }