提交 1a426cb7 编写于 作者: J Jan Beulich 提交者: Linus Torvalds

[PATCH] x86-64: Declare NMI_VECTOR and handle it in the IPI sending code.

Signed-off-by: NJan Beulich <jbeulich@novell.com>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a2a0c992
......@@ -26,6 +26,7 @@
struct hw_interrupt_type;
#endif
#define NMI_VECTOR 0x02
/*
* IDT vectors usable for external interrupt sources start
* at 0x20:
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册