[PATCH] add and handle NMI_VECTOR

From: Jan Beulich (JBeulich_at_novell.com)
Date: 09/08/05

  • Next message: Horms: "Problems Building Bluetooth with K6 and CONFIG_REGPARM"
    Date:	Thu, 08 Sep 2005 18:07:56 +0200
    To: "Andreas Kleen" <ak@suse.de>
    
    
    

    (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.

    Signed-off-by: Jan Beulich <jbeulich@novell.com>

    diff -Npru 2.6.13/include/asm-x86_64/hw_irq.h
    2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h
    --- 2.6.13/include/asm-x86_64/hw_irq.h 2005-08-29 01:41:01.000000000
    +0200
    +++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h 2005-03-16
    12:24:42.000000000 +0100
    @@ -26,6 +26,7 @@
     struct hw_interrupt_type;
     #endif
     
    +#define NMI_VECTOR 0x02
     /*
      * IDT vectors usable for external interrupt sources start
      * at 0x20:
    diff -Npru 2.6.13/include/asm-x86_64/ipi.h
    2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h
    --- 2.6.13/include/asm-x86_64/ipi.h 2005-08-29 01:41:01.000000000
    +0200
    +++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h 2005-09-01
    11:32:12.000000000 +0200
    @@ -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;
     }
     

    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Horms: "Problems Building Bluetooth with K6 and CONFIG_REGPARM"

    Relevant Pages