File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,25 @@ void __init idt_setup_debugidt_traps(void)
286
286
*/
287
287
void __init idt_setup_apic_and_irq_gates (void )
288
288
{
289
+ int i = FIRST_EXTERNAL_VECTOR ;
290
+ void * entry ;
291
+
289
292
idt_setup_from_table (idt_table , apic_idts , ARRAY_SIZE (apic_idts ));
293
+
294
+ for_each_clear_bit_from (i , used_vectors , FIRST_SYSTEM_VECTOR ) {
295
+ entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR );
296
+ set_intr_gate (i , entry );
297
+ }
298
+
299
+ for_each_clear_bit_from (i , used_vectors , NR_VECTORS ) {
300
+ #ifdef CONFIG_X86_LOCAL_APIC
301
+ set_bit (i , used_vectors );
302
+ set_intr_gate (i , spurious_interrupt );
303
+ #else
304
+ entry = irq_entries_start + 8 * (i - FIRST_EXTERNAL_VECTOR );
305
+ set_intr_gate (i , entry );
306
+ #endif
307
+ }
290
308
}
291
309
292
310
/**
Original file line number Diff line number Diff line change @@ -89,29 +89,11 @@ void __init init_IRQ(void)
89
89
90
90
void __init native_init_IRQ (void )
91
91
{
92
- int i ;
93
-
94
92
/* Execute any quirks before the call gates are initialised: */
95
93
x86_init .irqs .pre_vector_init ();
96
94
97
95
idt_setup_apic_and_irq_gates ();
98
96
99
- /*
100
- * Cover the whole vector space, no vector can escape
101
- * us. (some of these will be overridden and become
102
- * 'special' SMP interrupts)
103
- */
104
- i = FIRST_EXTERNAL_VECTOR ;
105
- for_each_clear_bit_from (i , used_vectors , FIRST_SYSTEM_VECTOR ) {
106
- /* IA32_SYSCALL_VECTOR could be used in trap_init already. */
107
- set_intr_gate (i , irq_entries_start +
108
- 8 * (i - FIRST_EXTERNAL_VECTOR ));
109
- }
110
- #ifdef CONFIG_X86_LOCAL_APIC
111
- for_each_clear_bit_from (i , used_vectors , NR_VECTORS )
112
- set_intr_gate (i , spurious_interrupt );
113
- #endif
114
-
115
97
if (!acpi_ioapic && !of_ioapic && nr_legacy_irqs ())
116
98
setup_irq (2 , & irq2 );
117
99
You can’t perform that action at this time.
0 commit comments