x86: add lapic_shutdown for x86_64
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Sat, 20 Oct 2007 01:21:11 +0000 (18:21 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 23 Oct 2007 20:37:22 +0000 (22:37 +0200)
Preperatory patch to allow crash_32/64.c merging

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/apic_64.c
include/asm-x86/apic_64.h

index f47bc493dba94fbbb4dd8b8ee68bbf3f445109b0..f28ccb588fbab8996cd76512d2c1bae24e4b1a2c 100644 (file)
@@ -287,6 +287,20 @@ void disable_local_APIC(void)
        apic_write(APIC_SPIV, value);
 }
 
+void lapic_shutdown(void)
+{
+       unsigned long flags;
+
+       if (!cpu_has_apic)
+               return;
+
+       local_irq_save(flags);
+
+       disable_local_APIC();
+
+       local_irq_restore(flags);
+}
+
 /*
  * This is to verify that we're looking at a real local APIC.
  * Check these against your board if the CPUs aren't getting
index 3c8f21eef0be4837be2c99dc96b7269eb086b086..2747a11a2b1914e45b9a1a3cec5b563c4daa8a8e 100644 (file)
@@ -69,6 +69,7 @@ extern void clear_local_APIC (void);
 extern void connect_bsp_APIC (void);
 extern void disconnect_bsp_APIC (int virt_wire_setup);
 extern void disable_local_APIC (void);
+extern void lapic_shutdown (void);
 extern int verify_local_APIC (void);
 extern void cache_APIC_registers (void);
 extern void sync_Arb_IDs (void);