summaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-08-22 12:53:30 +0200
committerTony Luck <tony.luck@intel.com>2007-08-29 01:03:06 +0200
commitf740e6c9c55cac6ab0a7d44a464b54467cca4f4f (patch)
tree915ce6c71163623ddb5dbbb09133e126007e6dfd /arch/ia64
parent[IA64] Fix unexpected interrupt vector handling (diff)
downloadlinux-f740e6c9c55cac6ab0a7d44a464b54467cca4f4f.tar.xz
linux-f740e6c9c55cac6ab0a7d44a464b54467cca4f4f.zip
[IA64] Clear pending interrupts at CPU boot up time
The pending interrupts can be remaining at boot up time on some platform. This will cause spurious interrupts when interrupt is enabled for the first time. This patch clears IVR at the CPU initialization to eliminate such spurious interrupts. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 407efea04bf5..1f9b1d818dcd 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -960,6 +960,11 @@ cpu_init (void)
/* clear TPR & XTP to enable all interrupt classes: */
ia64_setreg(_IA64_REG_CR_TPR, 0);
+
+ /* Clear any pending interrupts left by SAL/EFI */
+ while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
+ ia64_eoi();
+
#ifdef CONFIG_SMP
normal_xtp();
#endif