diff options
author | Andi Kleen <andi@firstfloor.org> | 2008-03-10 21:23:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:29 -0400 |
commit | 5524ea320d80e3ac6aeeec44216660831c76da08 (patch) | |
tree | c4215dbc41cedac15838ff5110958fa7ed8e9a67 | |
parent | 366932deb335f0b84a08463c5c912bd42ac3397a (diff) |
x86: don't set up early exception handlers for external interrupts
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>
-rw-r--r-- | arch/x86/kernel/head64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/head_64.S | 6 | ||||
-rw-r--r-- | include/asm-x86/segment.h | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 48be76cda93b..d6d54faa84df 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -127,7 +127,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
127 | /* Cleanup the over mapped high alias */ | 127 | /* Cleanup the over mapped high alias */ |
128 | cleanup_highmap(); | 128 | cleanup_highmap(); |
129 | 129 | ||
130 | for (i = 0; i < IDT_ENTRIES; i++) { | 130 | for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) { |
131 | #ifdef CONFIG_EARLY_PRINTK | 131 | #ifdef CONFIG_EARLY_PRINTK |
132 | set_intr_gate(i, &early_idt_handlers[i]); | 132 | set_intr_gate(i, &early_idt_handlers[i]); |
133 | #else | 133 | #else |
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 017216916dff..2c0abe0e3c68 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -278,10 +278,8 @@ bad_address: | |||
278 | 278 | ||
279 | .globl early_idt_handlers | 279 | .globl early_idt_handlers |
280 | early_idt_handlers: | 280 | early_idt_handlers: |
281 | early_idt_tramp 0, 63 | 281 | .set maxe, NUM_EXCEPTION_VECTORS-1 |
282 | early_idt_tramp 64, 127 | 282 | early_idt_tramp 0, maxe |
283 | early_idt_tramp 128, 191 | ||
284 | early_idt_tramp 192, 255 | ||
285 | #endif | 283 | #endif |
286 | 284 | ||
287 | ENTRY(early_idt_handler) | 285 | ENTRY(early_idt_handler) |
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h index 23f0535fec61..ed5131dd7d92 100644 --- a/include/asm-x86/segment.h +++ b/include/asm-x86/segment.h | |||
@@ -191,13 +191,14 @@ | |||
191 | #define SEGMENT_TI_MASK 0x4 | 191 | #define SEGMENT_TI_MASK 0x4 |
192 | 192 | ||
193 | #define IDT_ENTRIES 256 | 193 | #define IDT_ENTRIES 256 |
194 | #define NUM_EXCEPTION_VECTORS 32 | ||
194 | #define GDT_SIZE (GDT_ENTRIES * 8) | 195 | #define GDT_SIZE (GDT_ENTRIES * 8) |
195 | #define GDT_ENTRY_TLS_ENTRIES 3 | 196 | #define GDT_ENTRY_TLS_ENTRIES 3 |
196 | #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) | 197 | #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) |
197 | 198 | ||
198 | #ifdef __KERNEL__ | 199 | #ifdef __KERNEL__ |
199 | #ifndef __ASSEMBLY__ | 200 | #ifndef __ASSEMBLY__ |
200 | extern const char early_idt_handlers[IDT_ENTRIES][10]; | 201 | extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10]; |
201 | #endif | 202 | #endif |
202 | #endif | 203 | #endif |
203 | 204 | ||