Commit b9d1e4bd authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds

[PATCH] x86_64: x86_64 write apic id fix

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: default avatarVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent aea9fca1
...@@ -1066,7 +1066,7 @@ int __init APIC_init_uniprocessor (void) ...@@ -1066,7 +1066,7 @@ int __init APIC_init_uniprocessor (void)
connect_bsp_APIC(); connect_bsp_APIC();
phys_cpu_present_map = physid_mask_of_physid(boot_cpu_id); 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(); setup_local_APIC();
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define APIC_ID 0x20 #define APIC_ID 0x20
#define APIC_ID_MASK (0xFFu<<24) #define APIC_ID_MASK (0xFFu<<24)
#define GET_APIC_ID(x) (((x)>>24)&0xFFu) #define GET_APIC_ID(x) (((x)>>24)&0xFFu)
#define SET_APIC_ID(x) (((x)<<24))
#define APIC_LVR 0x30 #define APIC_LVR 0x30
#define APIC_LVR_MASK 0xFF00FF #define APIC_LVR_MASK 0xFF00FF
#define GET_APIC_VERSION(x) ((x)&0xFFu) #define GET_APIC_VERSION(x) ((x)&0xFFu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment