Commit 5524ea32 authored by Andi Kleen's avatar Andi Kleen Committed by Ingo Molnar

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: default avatarAndi Kleen <ak@suse.de>
Cc: mingo@elte.hu
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 366932de
...@@ -127,7 +127,7 @@ void __init x86_64_start_kernel(char * real_mode_data) ...@@ -127,7 +127,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
/* Cleanup the over mapped high alias */ /* Cleanup the over mapped high alias */
cleanup_highmap(); cleanup_highmap();
for (i = 0; i < IDT_ENTRIES; i++) { for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
#ifdef CONFIG_EARLY_PRINTK #ifdef CONFIG_EARLY_PRINTK
set_intr_gate(i, &early_idt_handlers[i]); set_intr_gate(i, &early_idt_handlers[i]);
#else #else
......
...@@ -278,10 +278,8 @@ bad_address: ...@@ -278,10 +278,8 @@ bad_address:
.globl early_idt_handlers .globl early_idt_handlers
early_idt_handlers: early_idt_handlers:
early_idt_tramp 0, 63 .set maxe, NUM_EXCEPTION_VECTORS-1
early_idt_tramp 64, 127 early_idt_tramp 0, maxe
early_idt_tramp 128, 191
early_idt_tramp 192, 255
#endif #endif
ENTRY(early_idt_handler) ENTRY(early_idt_handler)
......
...@@ -191,13 +191,14 @@ ...@@ -191,13 +191,14 @@
#define SEGMENT_TI_MASK 0x4 #define SEGMENT_TI_MASK 0x4
#define IDT_ENTRIES 256 #define IDT_ENTRIES 256
#define NUM_EXCEPTION_VECTORS 32
#define GDT_SIZE (GDT_ENTRIES * 8) #define GDT_SIZE (GDT_ENTRIES * 8)
#define GDT_ENTRY_TLS_ENTRIES 3 #define GDT_ENTRY_TLS_ENTRIES 3
#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
extern const char early_idt_handlers[IDT_ENTRIES][10]; extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][10];
#endif #endif
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment