From: Jan Beulich Date: Mon, 12 Sep 2005 16:49:24 +0000 (+0200) Subject: [PATCH] x86-64: Declare NMI_VECTOR and handle it in the IPI sending code. X-Git-Tag: v2.6.14-rc1~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a426cb76443f5b0a021a9df57d3446d14763c21;p=linux-2.6 [PATCH] x86-64: Declare NMI_VECTOR and handle it in the IPI sending code. Signed-off-by: Jan Beulich Signed-off-by: Linus Torvalds --- diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index d9212eb4e8..dc97668ea0 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 7ba668f43c..022e9d340a 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; }