summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich2005-09-12 18:49:24 +0200
committerLinus Torvalds2005-09-12 19:50:57 +0200
commit1a426cb76443f5b0a021a9df57d3446d14763c21 (patch)
tree261e71e142f5978f60907a3e432d6eadd3cd2fb7
parent[PATCH] x86-64: Remove unused vxtime.hz field (diff)
downloadkernel-qcow2-linux-1a426cb76443f5b0a021a9df57d3446d14763c21.tar.gz
kernel-qcow2-linux-1a426cb76443f5b0a021a9df57d3446d14763c21.tar.xz
kernel-qcow2-linux-1a426cb76443f5b0a021a9df57d3446d14763c21.zip
[PATCH] x86-64: Declare NMI_VECTOR and handle it in the IPI sending code.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-x86_64/hw_irq.h1
-rw-r--r--include/asm-x86_64/ipi.h17
2 files changed, 15 insertions, 3 deletions
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h
index d9212eb4e894..dc97668ea0f9 100644
--- a/include/asm-x86_64/hw_irq.h
+++ b/include/asm-x86_64/hw_irq.h
@@ -26,6 +26,7 @@
struct hw_interrupt_type;
#endif
+#define NMI_VECTOR 0x02
/*
* IDT vectors usable for external interrupt sources start
* at 0x20:
diff --git a/include/asm-x86_64/ipi.h b/include/asm-x86_64/ipi.h
index 7ba668f43c59..022e9d340ad7 100644
--- a/include/asm-x86_64/ipi.h
+++ b/include/asm-x86_64/ipi.h
@@ -31,9 +31,20 @@
static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest)
{
- unsigned int icr = APIC_DM_FIXED | shortcut | vector | dest;
- if (vector == KDB_VECTOR)
- icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
+ unsigned int icr = shortcut | dest;
+
+ switch (vector) {
+ default:
+ icr |= APIC_DM_FIXED | vector;
+ break;
+ case NMI_VECTOR:
+ /*
+ * Setup KDB IPI to be delivered as an NMI
+ */
+ case KDB_VECTOR:
+ icr |= APIC_DM_NMI;
+ break;
+ }
return icr;
}