]> err.no Git - linux-2.6/commitdiff
x86: don't set up early exception handlers for external interrupts
authorAndi Kleen <andi@firstfloor.org>
Tue, 11 Mar 2008 01:23:20 +0000 (02:23 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:41:29 +0000 (17:41 +0200)
All of early setup runs with interrupts disabled, so there is no
need to set up early exception handlers for vectors >= 32

This saves some minor text size.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S
include/asm-x86/segment.h

index 48be76cda93b2aceab42d1a838c83c3d30619683..d6d54faa84dfb1020ea838896a2aca8ee18bda06 100644 (file)
@@ -127,7 +127,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
        /* Cleanup the over mapped high alias */
        cleanup_highmap();
 
-       for (i = 0; i < IDT_ENTRIES; i++) {
+       for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
 #ifdef CONFIG_EARLY_PRINTK
                set_intr_gate(i, &early_idt_handlers[i]);
 #else
index 017216916dff6699e78ee66570c1629ff7ebf220..2c0abe0e3c687b5200dc01e4c9b98689938f8822 100644 (file)
@@ -278,10 +278,8 @@ bad_address:
 
        .globl early_idt_handlers
 early_idt_handlers:
-       early_idt_tramp 0, 63
-       early_idt_tramp 64, 127
-       early_idt_tramp 128, 191
-       early_idt_tramp 192, 255
+       .set maxe, NUM_EXCEPTION_VECTORS-1
+       early_idt_tramp 0, maxe
 #endif
 
 ENTRY(early_idt_handler)
index 23f0535fec618beb3c909924ff82d8c4b063b0ca..ed5131dd7d92af9980f34341aed73bbe2eaa340d 100644 (file)
 #define SEGMENT_TI_MASK                0x4
 
 #define IDT_ENTRIES 256
+#define NUM_EXCEPTION_VECTORS 32
 #define GDT_SIZE (GDT_ENTRIES * 8)
 #define GDT_ENTRY_TLS_ENTRIES 3
 #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
-extern const char early_idt_handlers[IDT_ENTRIES][10];
+extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10];
 #endif
 #endif