Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147207
b: refs/heads/master
c: bb3f0b5
h: refs/heads/master
i:
  147205: 1d6e245
  147203: 72062ca
  147199: dd9b477
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jan 26, 2009
1 parent 35831be commit c24fd6d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3415dd9146c574bffe8f012c096bfc2bc62b9508
refs/heads/master: bb3f0b59ad005d2d2ecbbe9bd048eab6d1ecbd31
56 changes: 33 additions & 23 deletions trunk/arch/x86/kernel/irqinit_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,28 +120,8 @@ int vector_used_by_percpu_irq(unsigned int vector)
return 0;
}

/* Overridden in paravirt.c */
void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));

void __init native_init_IRQ(void)
static void __init smp_intr_init(void)
{
int i;

/* all the set up before the call gates are initialised */
pre_intr_init_hook();

/*
* Cover the whole vector space, no vector can escape
* us. (some of these will be overridden and become
* 'special' SMP interrupts)
*/
for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) {
/* SYSCALL_VECTOR was reserved in trap_init. */
if (i != SYSCALL_VECTOR)
set_intr_gate(i, interrupt[i-FIRST_EXTERNAL_VECTOR]);
}


#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_SMP)
/*
* The reschedule interrupt is a CPU-to-CPU reschedule-helper
Expand Down Expand Up @@ -170,8 +150,13 @@ void __init native_init_IRQ(void)
set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
set_bit(IRQ_MOVE_CLEANUP_VECTOR, used_vectors);
#endif
}

static void __init apic_intr_init(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
smp_intr_init();

/* self generated IPI for local APIC timer */
alloc_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);

Expand All @@ -181,12 +166,37 @@ void __init native_init_IRQ(void)
# ifdef CONFIG_PERF_COUNTERS
alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
# endif
#endif

#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_MCE_P4THERMAL)
# ifdef CONFIG_X86_MCE_P4THERMAL
/* thermal monitor LVT interrupt */
alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
# endif
#endif
}

/* Overridden in paravirt.c */
void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));

void __init native_init_IRQ(void)
{
int i;

/* all the set up before the call gates are initialised */
pre_intr_init_hook();

apic_intr_init();

/*
* Cover the whole vector space, no vector can escape
* us. (some of these will be overridden and become
* 'special' SMP interrupts)
*/
for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
int vector = FIRST_EXTERNAL_VECTOR + i;
/* SYSCALL_VECTOR was reserved in trap_init. */
if (!test_bit(vector, used_vectors))
set_intr_gate(vector, interrupt[i]);
}

if (!acpi_ioapic)
setup_irq(2, &irq2);
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/x86/kernel/irqinit_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,20 @@ void __init native_init_IRQ(void)
int i;

init_ISA_irqs();

apic_intr_init();

/*
* Cover the whole vector space, no vector can escape
* us. (some of these will be overridden and become
* 'special' SMP interrupts)
*/
for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
int vector = FIRST_EXTERNAL_VECTOR + i;
if (vector != IA32_SYSCALL_VECTOR)
if (!test_bit(vector, used_vectors))
set_intr_gate(vector, interrupt[i]);
}

apic_intr_init();

if (!acpi_ioapic)
setup_irq(2, &irq2);
}
15 changes: 6 additions & 9 deletions trunk/arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,13 @@ void __init trap_init(void)
#endif
set_intr_gate(19, &simd_coprocessor_error);

/* Reserve all the builtin and the syscall vector: */
for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++)
set_bit(i, used_vectors);

#ifdef CONFIG_IA32_EMULATION
set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall);
set_bit(IA32_SYSCALL_VECTOR, used_vectors);
#endif

#ifdef CONFIG_X86_32
Expand All @@ -997,17 +1002,9 @@ void __init trap_init(void)
}

set_system_trap_gate(SYSCALL_VECTOR, &system_call);
#endif

/* Reserve all the builtin and the syscall vector: */
for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++)
set_bit(i, used_vectors);

#ifdef CONFIG_X86_64
set_bit(IA32_SYSCALL_VECTOR, used_vectors);
#else
set_bit(SYSCALL_VECTOR, used_vectors);
#endif

/*
* Should be a barrier for any external CPU state:
*/
Expand Down

0 comments on commit c24fd6d

Please sign in to comment.