On Thu, Sep 08, 2005 at 06:07:56PM +0200, Jan Beulich wrote:
> (Note: Patch also attached because the inline version is certain to get
> line wrapped.)
> 
> Declare NMI_VECTOR and handle it in the IPI sending code.

The earlier consensus was to just rename KDB_VECTOR to NMI vector.

I added the following patch.

-Andi


Rename KDB_VECTOR to NMI_VECTOR

As a generic NMI IPI vector to be used by debuggers.

And clean up the ICR setup for that slightly (code is equivalent, but cleaner 
now)

Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>

Index: linux/include/asm-x86_64/hw_irq.h
===================================================================
--- linux.orig/include/asm-x86_64/hw_irq.h
+++ linux/include/asm-x86_64/hw_irq.h
@@ -52,7 +52,7 @@ struct hw_interrupt_type;
 #define ERROR_APIC_VECTOR      0xfe
 #define RESCHEDULE_VECTOR      0xfd
 #define CALL_FUNCTION_VECTOR   0xfc
-#define KDB_VECTOR             0xfb    /* reserved for KDB */
+#define NMI_VECTOR             0xfb    /* IPI NMIs for debugging */
 #define THERMAL_APIC_VECTOR    0xfa
 /* 0xf9 free */
 #define INVALIDATE_TLB_VECTOR_END      0xf8
Index: linux/include/asm-x86_64/ipi.h
===================================================================
--- linux.orig/include/asm-x86_64/ipi.h
+++ linux/include/asm-x86_64/ipi.h
@@ -29,11 +29,14 @@
  * We use 'broadcast', CPU->CPU IPIs and self-IPIs too.
  */
 
-static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, 
unsigned int dest)
+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;
+       if (vector == NMI_VECTOR)
+               icr |= APIC_DM_DMI;
+       else
+               icr |= APIC_DM_FIXED | vector;
        return icr;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to