Changeset 7bcfbbc in mainline for kernel/arch/ia32xen/src/interrupt.c


Ignore:
Timestamp:
2007-04-07T23:30:59Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ac88c93
Parents:
7e58979
Message:

support the possibility to send EOI or Interrupt Acknowledgement
prior to processing the interrupt
(this is essential on some architectures to prevent preemption deadlock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32xen/src/interrupt.c

    r7e58979 r7bcfbbc  
    177177       
    178178        int inum = n - IVT_IRQBASE;
     179        bool ack = false;
    179180        ASSERT(inum < IRQ_COUNT);
    180181        ASSERT((inum != IRQ_PIC_SPUR) && (inum != IRQ_PIC1));
    181 
     182       
    182183        irq_t *irq = irq_dispatch_and_lock(inum);
    183184        if (irq) {
     
    185186                 * The IRQ handler was found.
    186187                 */
     188                 
     189                if (irq->preack) {
     190                        /* Send EOI before processing the interrupt */
     191                        trap_virtual_eoi();
     192                        ack = true;
     193                }
    187194                irq->handler(irq, irq->arg);
    188195                spinlock_unlock(&irq->lock);
     
    195202#endif
    196203        }
    197         trap_virtual_eoi();
     204       
     205        if (!ack)
     206                trap_virtual_eoi();
    198207}
    199208
Note: See TracChangeset for help on using the changeset viewer.