spurious and error interrupt apic handlers
- fixed spurious and error interrupt handlers - not to hog the system the warning isn't reported every time, just once every 100 times, similarly for the spurious PIC interrupts
This commit is contained in:
parent
f42b90806a
commit
ebbc730fc3
3 changed files with 21 additions and 6 deletions
|
@ -715,16 +715,23 @@ PUBLIC int lapic_enable(unsigned cpu)
|
|||
return 1;
|
||||
}
|
||||
|
||||
PRIVATE void apic_spurios_intr(void)
|
||||
PUBLIC void apic_spurios_intr_handler(void)
|
||||
{
|
||||
printf("WARNING spurious interrupt\n");
|
||||
for(;;);
|
||||
static unsigned x;
|
||||
|
||||
x++;
|
||||
if (x == 1 || (x % 100) == 0)
|
||||
printf("WARNING spurious interrupt(s) %d on cpu %d\n", x, cpuid);
|
||||
}
|
||||
|
||||
PRIVATE void apic_error_intr(void)
|
||||
PUBLIC void apic_error_intr_handler(void)
|
||||
{
|
||||
printf("WARNING local apic error interrupt\n");
|
||||
for(;;);
|
||||
static unsigned x;
|
||||
|
||||
x++;
|
||||
if (x == 1 || (x % 100) == 0)
|
||||
printf("WARNING apic error (0x%x) interrupt(s) %d on cpu %d\n",
|
||||
lapic_errstatus(), x, cpuid);
|
||||
}
|
||||
|
||||
PRIVATE struct gate_table_s gate_table_ioapic[] = {
|
||||
|
|
|
@ -67,6 +67,12 @@ ENTRY(apic_hwint##irq) \
|
|||
ENTRY(lapic_timer_int_handler)
|
||||
lapic_intr(_C_LABEL(timer_int_handler))
|
||||
|
||||
ENTRY(apic_spurios_intr)
|
||||
lapic_intr(_C_LABEL(apic_spurios_intr_handler))
|
||||
|
||||
ENTRY(apic_error_intr)
|
||||
lapic_intr(_C_LABEL(apic_error_intr_handler))
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
ENTRY(apic_ipi_sched_intr)
|
||||
|
|
|
@ -72,6 +72,8 @@ _PROTOTYPE( void apic_hwint63, (void) );
|
|||
|
||||
/* The local APIC timer tick handlers */
|
||||
_PROTOTYPE(void lapic_timer_int_handler, (void));
|
||||
_PROTOTYPE(void apic_spurios_intr, (void));
|
||||
_PROTOTYPE(void apic_error_intr, (void));
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue