diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-16 20:05:00 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 18:43:51 -0400 |
commit | cf6567fe40c55e9cffca7355cd34e50fb2871e4e (patch) | |
tree | c05d4bdfa91a5c9ad35e9b6b1a06d9188ed7800f /arch/x86/kernel | |
parent | 7c6d9f9785d156d0438401ef270322da3d5247db (diff) |
x86, x2apic: fix clear_local_APIC() in the presence of x2apic
Impact: cleanup, paranoia
We were not clearing the local APIC in clear_local_APIC() in the
presence of x2apic. Fix it.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 30909a258d0f..699f8cf76bbb 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -809,7 +809,7 @@ void clear_local_APIC(void) | |||
809 | u32 v; | 809 | u32 v; |
810 | 810 | ||
811 | /* APIC hasn't been mapped yet */ | 811 | /* APIC hasn't been mapped yet */ |
812 | if (!apic_phys) | 812 | if (!x2apic && !apic_phys) |
813 | return; | 813 | return; |
814 | 814 | ||
815 | maxlvt = lapic_get_maxlvt(); | 815 | maxlvt = lapic_get_maxlvt(); |
@@ -1523,12 +1523,10 @@ void __init early_init_lapic_mapping(void) | |||
1523 | */ | 1523 | */ |
1524 | void __init init_apic_mappings(void) | 1524 | void __init init_apic_mappings(void) |
1525 | { | 1525 | { |
1526 | #ifdef CONFIG_X86_X2APIC | ||
1527 | if (x2apic) { | 1526 | if (x2apic) { |
1528 | boot_cpu_physical_apicid = read_apic_id(); | 1527 | boot_cpu_physical_apicid = read_apic_id(); |
1529 | return; | 1528 | return; |
1530 | } | 1529 | } |
1531 | #endif | ||
1532 | 1530 | ||
1533 | /* | 1531 | /* |
1534 | * If no local APIC can be found then set up a fake all | 1532 | * If no local APIC can be found then set up a fake all |
@@ -1972,12 +1970,9 @@ static int lapic_resume(struct sys_device *dev) | |||
1972 | 1970 | ||
1973 | local_irq_save(flags); | 1971 | local_irq_save(flags); |
1974 | 1972 | ||
1975 | #ifdef CONFIG_X86_X2APIC | ||
1976 | if (x2apic) | 1973 | if (x2apic) |
1977 | enable_x2apic(); | 1974 | enable_x2apic(); |
1978 | else | 1975 | else { |
1979 | #endif | ||
1980 | { | ||
1981 | /* | 1976 | /* |
1982 | * Make sure the APICBASE points to the right address | 1977 | * Make sure the APICBASE points to the right address |
1983 | * | 1978 | * |