diff options
-rw-r--r-- | include/asm-x86_64/hw_irq.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/ipi.h | 17 |
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 @@ | |||
26 | struct hw_interrupt_type; | 26 | struct hw_interrupt_type; |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #define NMI_VECTOR 0x02 | ||
29 | /* | 30 | /* |
30 | * IDT vectors usable for external interrupt sources start | 31 | * IDT vectors usable for external interrupt sources start |
31 | * at 0x20: | 32 | * 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 @@ | |||
31 | 31 | ||
32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) | 32 | static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest) |
33 | { | 33 | { |
34 | unsigned int icr = APIC_DM_FIXED | shortcut | vector | dest; | 34 | unsigned int icr = shortcut | dest; |
35 | if (vector == KDB_VECTOR) | 35 | |
36 | icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI; | 36 | switch (vector) { |
37 | default: | ||
38 | icr |= APIC_DM_FIXED | vector; | ||
39 | break; | ||
40 | case NMI_VECTOR: | ||
41 | /* | ||
42 | * Setup KDB IPI to be delivered as an NMI | ||
43 | */ | ||
44 | case KDB_VECTOR: | ||
45 | icr |= APIC_DM_NMI; | ||
46 | break; | ||
47 | } | ||
37 | return icr; | 48 | return icr; |
38 | } | 49 | } |
39 | 50 | ||