/** * i8159_set_poll() - Override the i8259 polling function * @poll: pointer to platform-specific polling function * * Call this to override the generic i8259 polling function, which directly * accesses i8259 registers, with a platform specific one which may be faster * in cases where hardware provides a more optimal means of polling for an * interrupt.
*/ externvoid i8259_set_poll(int (*poll)(void));
/* * Do the traditional i8259 interrupt polling thing. This is for the few * cases where no better interrupt acknowledge method is available and we * absolutely must touch the i8259.
*/ staticinlineint i8259_irq(void)
{ int irq;
raw_spin_lock(&i8259A_lock);
/* Perform an interrupt acknowledge cycle on controller 1. */
outb(0x0C, PIC_MASTER_CMD); /* prepare for poll */
irq = inb(PIC_MASTER_CMD) & 7; if (irq == PIC_CASCADE_IR) { /* * Interrupt is cascaded so perform interrupt * acknowledge on controller 2.
*/
outb(0x0C, PIC_SLAVE_CMD); /* prepare for poll */
irq = (inb(PIC_SLAVE_CMD) & 7) + 8;
}
if (unlikely(irq == 7)) { /* * This may be a spurious interrupt. * * Read the interrupt status register (ISR). If the most * significant bit is not set then there is no valid * interrupt.
*/
outb(0x0B, PIC_MASTER_ISR); /* ISR register */ if(~inb(PIC_MASTER_ISR) & 0x80)
irq = -1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.