diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2010-12-01 01:22:28 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-12-13 19:53:32 -0500 |
commit | 7f7fbf45c6b748074546f7f16b9488ca71de99c1 (patch) | |
tree | 43f3a4c4bc487be87342967271cc258502da2092 /arch/x86/kernel/apic/apic.c | |
parent | 086e8ced65d9bcc4a8e8f1cd39b09640f2883f90 (diff) |
x86: Enable the intr-remap fault handling after local APIC setup
Interrupt-remapping gets enabled very early in the boot, as it determines the
apic mode that the processor can use. And the current code enables the vt-d
fault handling before the setup_local_APIC(). And hence the APIC LDR registers
and data structure in the memory may not be initialized. So the vt-d fault
handling in logical xapic/x2apic modes were broken.
Fix this by enabling the vt-d fault handling in the end_local_APIC_setup()
A cleaner fix of enabling fault handling while enabling intr-remapping
will be addressed for v2.6.38. [ Enabling intr-remapping determines the
usage of x2apic mode and the apic mode determines the fault-handling
configuration. ]
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
LKML-Reference: <20101201062244.541996375@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: stable@kernel.org [v2.6.32+]
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 3f838d537392..78218135b48e 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1389,6 +1389,14 @@ void __cpuinit end_local_APIC_setup(void) | |||
1389 | 1389 | ||
1390 | setup_apic_nmi_watchdog(NULL); | 1390 | setup_apic_nmi_watchdog(NULL); |
1391 | apic_pm_activate(); | 1391 | apic_pm_activate(); |
1392 | |||
1393 | /* | ||
1394 | * Now that local APIC setup is completed for BP, configure the fault | ||
1395 | * handling for interrupt remapping. | ||
1396 | */ | ||
1397 | if (!smp_processor_id() && intr_remapping_enabled) | ||
1398 | enable_drhd_fault_handling(); | ||
1399 | |||
1392 | } | 1400 | } |
1393 | 1401 | ||
1394 | #ifdef CONFIG_X86_X2APIC | 1402 | #ifdef CONFIG_X86_X2APIC |