Ignore:
Timestamp:
2019-04-06T08:10:27Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
534bcdf
Parents:
ef56a43
Message:

Handle PIC spurious IRQs with care

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mach/malta/malta.c

    ref56a43 rfd67c9f  
    7474{
    7575        uint8_t isa_irq = host2uint32_t_le(pio_read_32(GT64120_PCI0_INTACK));
    76         if (isa_irq == PIC0_SPURIOUS_IRQ || isa_irq == PIC1_SPURIOUS_IRQ) {
    77                 /*
    78                  * XXX: Examine ISR to figure out whether this is indeed a
    79                  *      spurious or actual IRQ.
    80                  */
     76        if (pic_is_spurious(isa_irq)) {
     77                pic_handle_spurious(isa_irq);
    8178#ifdef CONFIG_DEBUG
    82                 log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt",
    83                     CPU->id);
     79                log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt %u",
     80                    CPU->id, isa_irq);
    8481                return;
    8582#endif
     
    9188        } else {
    9289#ifdef CONFIG_DEBUG
    93                 log(LF_ARCH, LVL_DEBUG, "cpu%u: spurious IRQ (irq=%u)",
     90                log(LF_ARCH, LVL_DEBUG, "cpu%u: unhandled IRQ (irq=%u)",
    9491                    CPU->id, isa_irq);
    9592#endif
Note: See TracChangeset for help on using the changeset viewer.