Changeset f6cf76f in mainline for kernel/genarch/src


Ignore:
Timestamp:
2019-04-05T18:30:19Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
29beac8
Parents:
f4bb404
Message:

Move PIC spurious IRQ handling into arch code

As each architecture or even machine does IRQs differently, the genarch
i8259 driver cannot register the PIC spurious IRQ interrupt itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/i8259/i8259.c

    rf4bb404 rf6cf76f  
    4343#include <interrupt.h>
    4444
    45 static void pic_spurious(unsigned int n, istate_t *istate);
    46 
    4745// XXX: need to change pic_* API to get rid of these
    4846static i8259_t *saved_pic0;
     
    7876        /* ICW4: i8086 mode */
    7977        pio_write_8(&pic1->port2, 1);
    80 
    81         /*
    82          * Register interrupt handler for the PIC spurious interrupt.
    83          *
    84          * XXX: This is currently broken. Both IRQ 7 and IRQ 15 can be spurious
    85          *      or can be actual interrupts. This needs to be detected when
    86          *      the interrupt happens by inspecting ISR.
    87          */
    88         exc_register(irq0_int + 7, "pic_spurious", false,
    89             (iroutine_t) pic_spurious);
    9078
    9179        pic_disable_irqs(0xffff);               /* disable all irq's */
     
    130118}
    131119
    132 void pic_spurious(unsigned int n __attribute__((unused)), istate_t *istate __attribute__((unused)))
    133 {
    134 #ifdef CONFIG_DEBUG
    135         log(LF_ARCH, LVL_DEBUG, "cpu%u: PIC spurious interrupt", CPU->id);
    136 #endif
    137 }
    138 
    139120/** @}
    140121 */
Note: See TracChangeset for help on using the changeset viewer.