diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-16 20:04:59 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 18:42:28 -0400 |
commit | 7c6d9f9785d156d0438401ef270322da3d5247db (patch) | |
tree | 43836c9bbce7ad270b3e5e34cf469e0210c5d2a9 /arch/x86/kernel | |
parent | 2e93456f5c069cf889c0c3acd1246ee88c49ae5c (diff) |
x86, x2apic: use virtual wire A mode in disable_IO_APIC() with interrupt-remapping
Impact: make kexec work with x2apic
disable_IO_APIC() gets called during crashdump aswell, which configures the
IO-APIC/LAPIC so that legacy interrupts can be delivered for the kexec'd kernel.
In the presence of interrupt-remapping, we need to change the
interrupt-remapping configuration aswell as modifying IO-APIC for virtual wire
B mode.
To keep things simple during the crash, use virtual wire A mode
(for which we don't need to touch io-apic and interrupt-remapping tables).
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index b18a7734d689..4d975d0e3588 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2040,8 +2040,13 @@ void disable_IO_APIC(void) | |||
2040 | * If the i8259 is routed through an IOAPIC | 2040 | * If the i8259 is routed through an IOAPIC |
2041 | * Put that IOAPIC in virtual wire mode | 2041 | * Put that IOAPIC in virtual wire mode |
2042 | * so legacy interrupts can be delivered. | 2042 | * so legacy interrupts can be delivered. |
2043 | * | ||
2044 | * With interrupt-remapping, for now we will use virtual wire A mode, | ||
2045 | * as virtual wire B is little complex (need to configure both | ||
2046 | * IOAPIC RTE aswell as interrupt-remapping table entry). | ||
2047 | * As this gets called during crash dump, keep this simple for now. | ||
2043 | */ | 2048 | */ |
2044 | if (ioapic_i8259.pin != -1) { | 2049 | if (ioapic_i8259.pin != -1 && !intr_remapping_enabled) { |
2045 | struct IO_APIC_route_entry entry; | 2050 | struct IO_APIC_route_entry entry; |
2046 | 2051 | ||
2047 | memset(&entry, 0, sizeof(entry)); | 2052 | memset(&entry, 0, sizeof(entry)); |
@@ -2061,7 +2066,10 @@ void disable_IO_APIC(void) | |||
2061 | ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); | 2066 | ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); |
2062 | } | 2067 | } |
2063 | 2068 | ||
2064 | disconnect_bsp_APIC(ioapic_i8259.pin != -1); | 2069 | /* |
2070 | * Use virtual wire A mode when interrupt remapping is enabled. | ||
2071 | */ | ||
2072 | disconnect_bsp_APIC(!intr_remapping_enabled && ioapic_i8259.pin != -1); | ||
2065 | } | 2073 | } |
2066 | 2074 | ||
2067 | #ifdef CONFIG_X86_32 | 2075 | #ifdef CONFIG_X86_32 |