Skip to content

Commit

Permalink
[PATCH] x86-64: Declare NMI_VECTOR and handle it in the IPI sending c…
Browse files Browse the repository at this point in the history
…ode.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jan Beulich authored and Linus Torvalds committed Sep 12, 2005
1 parent a2a0c99 commit 1a426cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/asm-x86_64/hw_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
struct hw_interrupt_type;
#endif

#define NMI_VECTOR 0x02
/*
* IDT vectors usable for external interrupt sources start
* at 0x20:
Expand Down
17 changes: 14 additions & 3 deletions include/asm-x86_64/ipi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1a426cb

Please sign in to comment.