KernelIRQReporting: Change reserved IRQ reporting

Reserved IRQ reporting would print on every received reserved IRQ. This
feature is supposed to report spurious interrupts, yet most cases
reserved IRQs are not spurious. We change the printing to only print if
the reserved IRQ was unhandled. The intention is to allow more app
configurations to leave this feature enabled in development builds.
This commit is contained in:
Kent McLeod 2019-09-18 19:34:00 +10:00
parent b0f974c4a2
commit ef8b01390d
4 changed files with 9 additions and 12 deletions

View file

@ -23,10 +23,6 @@ exception_t Arch_decodeIRQControlInvocation(word_t invLabel, word_t length,
/* Handle a platform-reserved IRQ. */
static inline void handleReservedIRQ(irq_t irq)
{
#ifdef CONFIG_IRQ_REPORTING
printf("Received reserved IRQ: %d\n", (int)irq);
#endif
#ifdef CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT
if (irq == KERNEL_PMU_IRQ) {
handleOverflowIRQ();
@ -47,6 +43,10 @@ static inline void handleReservedIRQ(irq_t irq)
return;
}
#endif
#ifdef CONFIG_IRQ_REPORTING
printf("Received unhandled reserved IRQ: %d\n", (int)irq);
#endif
}

View file

@ -18,7 +18,7 @@
static inline void handleReservedIRQ(irq_t irq)
{
#ifdef CONFIG_IRQ_REPORTING
printf("Received reserved IRQ: %d\n", (int)irq);
printf("Received unhandled reserved IRQ: %d\n", (int)irq);
#endif
}

View file

@ -25,16 +25,16 @@
static inline void handleReservedIRQ(irq_t irq)
{
#ifdef CONFIG_IRQ_REPORTING
printf("Received reserved IRQ: %d\n", (int)irq);
#endif
#ifdef CONFIG_IOMMU
if (irq == irq_iommu) {
vtd_handle_fault();
return;
}
#endif
#ifdef CONFIG_IRQ_REPORTING
printf("Received unhandled reserved IRQ: %d\n", (int)irq);
#endif
}
static inline void receivePendingIRQ(void)

View file

@ -235,9 +235,6 @@ void handleInterrupt(irq_t irq)
#endif /* ENABLE_SMP_SUPPORT */
case IRQReserved:
#ifdef CONFIG_IRQ_REPORTING
printf("Received reserved IRQ: %d", (int)irq);
#endif
handleReservedIRQ(irq);
break;