]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64: x86_64 write apic id fix
authorVivek Goyal <vgoyal@in.ibm.com>
Wed, 11 Jan 2006 21:45:09 +0000 (22:45 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 03:04:57 +0000 (19:04 -0800)
o Apic id is in most significant 8 bits of APIC_ID register. Current code
  is trying to write apic id to least significant 8 bits. This patch fixes
  it.

o This fix enables booting uni kdump capture kernel on a cpu with non-zero
  apic id.

Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/apic.c
include/asm-x86_64/apicdef.h

index 628aebf9f9aa2f72c70b3d6191b5e62da1fd2a4a..c3239f6c22be3fc9b1f72bb7cb5bf9f95338e990 100644 (file)
@@ -1066,7 +1066,7 @@ int __init APIC_init_uniprocessor (void)
        connect_bsp_APIC();
 
        phys_cpu_present_map = physid_mask_of_physid(boot_cpu_id);
-       apic_write_around(APIC_ID, boot_cpu_id);
+       apic_write_around(APIC_ID, SET_APIC_ID(boot_cpu_id));
 
        setup_local_APIC();
 
index fb1c99ac669fda16727616a5172aac3c44de2c51..decaa2d540e86b03dd4ae67e4dd3c1f851685c8e 100644 (file)
@@ -13,6 +13,7 @@
 #define                APIC_ID         0x20
 #define                        APIC_ID_MASK            (0xFFu<<24)
 #define                        GET_APIC_ID(x)          (((x)>>24)&0xFFu)
+#define                        SET_APIC_ID(x)          (((x)<<24))
 #define                APIC_LVR        0x30
 #define                        APIC_LVR_MASK           0xFF00FF
 #define                        GET_APIC_VERSION(x)     ((x)&0xFFu)