[PATCH] x86_64: Remove useless KDB vector

It was set as an NMI, but the NMI bit always forces an interrupt
to end up at vector 2. So it was never used. Remove.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andi Kleen and committed by
Linus Torvalds
915f34e2 e080e9d6

+3 -22
-3
arch/x86_64/kernel/entry.S
··· 1040 CFI_ENDPROC 1041 #endif 1042 1043 - ENTRY(call_debug) 1044 - zeroentry do_call_debug 1045 - 1046 ENTRY(call_softirq) 1047 CFI_STARTPROC 1048 movq %gs:pda_irqstackptr,%rax
··· 1040 CFI_ENDPROC 1041 #endif 1042 1043 ENTRY(call_softirq) 1044 CFI_STARTPROC 1045 movq %gs:pda_irqstackptr,%rax
+1 -2
arch/x86_64/kernel/i8259.c
··· 549 int vector = FIRST_EXTERNAL_VECTOR + i; 550 if (i >= NR_IRQS) 551 break; 552 - if (vector != IA32_SYSCALL_VECTOR && vector != KDB_VECTOR) { 553 set_intr_gate(vector, interrupt[i]); 554 - } 555 } 556 557 #ifdef CONFIG_SMP
··· 549 int vector = FIRST_EXTERNAL_VECTOR + i; 550 if (i >= NR_IRQS) 551 break; 552 + if (vector != IA32_SYSCALL_VECTOR) 553 set_intr_gate(vector, interrupt[i]); 554 } 555 556 #ifdef CONFIG_SMP
-5
arch/x86_64/kernel/smp.c
··· 281 on_each_cpu(do_flush_tlb_all, NULL, 1, 1); 282 } 283 284 - void smp_kdb_stop(void) 285 - { 286 - send_IPI_allbutself(KDB_VECTOR); 287 - } 288 - 289 /* 290 * this function sends a 'reschedule' IPI to another CPU. 291 * it goes straight through and wastes no time serializing
··· 281 on_each_cpu(do_flush_tlb_all, NULL, 1, 1); 282 } 283 284 /* 285 * this function sends a 'reschedule' IPI to another CPU. 286 * it goes straight through and wastes no time serializing
-7
arch/x86_64/kernel/traps.c
··· 910 me->thread_info->status |= TS_USEDFPU; 911 } 912 913 - void do_call_debug(struct pt_regs *regs) 914 - { 915 - notify_die(DIE_CALL, "debug call", regs, 0, 255, SIGINT); 916 - } 917 - 918 void __init trap_init(void) 919 { 920 set_intr_gate(0,&divide_error); ··· 938 #ifdef CONFIG_IA32_EMULATION 939 set_system_gate(IA32_SYSCALL_VECTOR, ia32_syscall); 940 #endif 941 - 942 - set_intr_gate(KDB_VECTOR, call_debug); 943 944 /* 945 * Should be a barrier for any external CPU state.
··· 910 me->thread_info->status |= TS_USEDFPU; 911 } 912 913 void __init trap_init(void) 914 { 915 set_intr_gate(0,&divide_error); ··· 943 #ifdef CONFIG_IA32_EMULATION 944 set_system_gate(IA32_SYSCALL_VECTOR, ia32_syscall); 945 #endif 946 947 /* 948 * Should be a barrier for any external CPU state.
+2 -1
include/asm-x86_64/hw_irq.h
··· 51 #define ERROR_APIC_VECTOR 0xfe 52 #define RESCHEDULE_VECTOR 0xfd 53 #define CALL_FUNCTION_VECTOR 0xfc 54 - #define KDB_VECTOR 0xfb /* reserved for KDB */ 55 #define THERMAL_APIC_VECTOR 0xfa 56 #define THRESHOLD_APIC_VECTOR 0xf9 57 /* f8 free */
··· 51 #define ERROR_APIC_VECTOR 0xfe 52 #define RESCHEDULE_VECTOR 0xfd 53 #define CALL_FUNCTION_VECTOR 0xfc 54 + /* fb free - please don't readd KDB here because it's useless 55 + (hint - think what a NMI bit does to a vector) */ 56 #define THERMAL_APIC_VECTOR 0xfa 57 #define THRESHOLD_APIC_VECTOR 0xf9 58 /* f8 free */
-4
include/asm-x86_64/ipi.h
··· 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 }
··· 38 icr |= APIC_DM_FIXED | vector; 39 break; 40 case NMI_VECTOR: 41 icr |= APIC_DM_NMI; 42 break; 43 }