merge HP boot fix
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 4 Feb 2010 21:53:00 +0000 (21:53 +0000)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Thu, 4 Feb 2010 21:53:00 +0000 (21:53 +0000)
kernel-2.6.spec
linux-2.6-800-fix-4-bit-apicid-assumption.patch [new file with mode: 0644]

index 205a6de..1906557 100644 (file)
@@ -192,6 +192,8 @@ Patch680: linux-2.6-680-htb-hysteresis-tso.patch
 #Patch690: linux-2.6-690-web100.patch
 Patch710: linux-2.6-710-avoid-64bits-addr-pcmcia.patch
 
+Patch800: linux-2.6-800-fix-4-bit-apicid-assumption.patch
+
 # See also the file named 'sources' here for the related checksums
 # NOTE. iwlwifi should be in-kernel starting from 2.6.24
 # see http://bughost.org/bugzilla/show_bug.cgi?id=1584
@@ -411,6 +413,8 @@ KERNEL_PREVIOUS=vanilla
 %ApplyPatch 680
 %ApplyPatch 710
 
+%ApplyPatch 800
+
 
 # NetNS conflict-resolving patch for VINI. Will work with patch vini_pl_patch-1 but may
 # break with later patches.
diff --git a/linux-2.6-800-fix-4-bit-apicid-assumption.patch b/linux-2.6-800-fix-4-bit-apicid-assumption.patch
new file mode 100644 (file)
index 0000000..086470f
--- /dev/null
@@ -0,0 +1,46 @@
+commit 58d5fa7a6a6fc4754d295d0999b284edd67c8620
+Author: Siddha, Suresh B <suresh.b.siddha@intel.com>
+Date:   Wed Oct 17 18:04:33 2007 +0200
+
+    i386: fix 4 bit apicid assumption of mach-default
+    
+    Fix get_apic_id() in mach-default, so that it uses 8 bits incase of
+    xAPIC case and 4 bits for legacy APIC case.
+    
+    This fixes the i386 kernel assumption that apic id is less than 16 for
+    xAPIC platforms with 8 cpus or less and makes the kernel boot on such
+    platforms.
+    
+    [ tglx: arch/x86 adaptation ]
+    
+    Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
+    Signed-off-by: Andi Kleen <ak@suse.de>
+    Cc: Andi Kleen <ak@suse.de>
+    Cc: Andrew Morton <akpm@linux-foundation.org>
+    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+    Signed-off-by: Ingo Molnar <mingo@elte.hu>
+    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+
+diff --git a/include/asm-i386/mach-default/mach_apicdef.h b/include/asm-i386/mach-default/mach_apicdef.h
+index 7bcb350..ae98413 100644
+--- a/include/asm-i386/mach-default/mach_apicdef.h
++++ b/include/asm-i386/mach-default/mach_apicdef.h
+@@ -1,11 +1,17 @@
+ #ifndef __ASM_MACH_APICDEF_H
+ #define __ASM_MACH_APICDEF_H
++#include <asm/apic.h>
++
+ #define               APIC_ID_MASK            (0xF<<24)
+ static inline unsigned get_apic_id(unsigned long x) 
+ { 
+-      return (((x)>>24)&0xF);
++      unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
++      if (APIC_XAPIC(ver))
++              return (((x)>>24)&0xFF);
++      else
++              return (((x)>>24)&0xF);
+ } 
+ #define               GET_APIC_ID(x)  get_apic_id(x)