x86: Enable the intr-remap fault handling after local APIC setup
commit7f7fbf45c6b748074546f7f16b9488ca71de99c1
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Wed, 1 Dec 2010 06:22:28 +0000 (30 22:22 -0800)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 14 Dec 2010 00:53:32 +0000 (13 16:53 -0800)
tree43f3a4c4bc487be87342967271cc258502da2092
parent086e8ced65d9bcc4a8e8f1cd39b09640f2883f90
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>
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/probe_64.c