Changeset 7bcfbbc in mainline for kernel/arch/ppc32/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/ppc32/src/interrupt.c

    r7e58979 r7bcfbbc  
    6161       
    6262        while ((inum = pic_get_pending()) != -1) {
     63                bool ack = false;
    6364                irq_t *irq = irq_dispatch_and_lock(inum);
    6465                if (irq) {
     
    6667                         * The IRQ handler was found.
    6768                         */
     69                       
     70                        if (irq->preack) {
     71                                /* Acknowledge the interrupt before processing */
     72                                pic_ack_interrupt(inum);
     73                                ack = true;
     74                        }
     75                       
    6876                        irq->handler(irq, irq->arg);
    6977                        spinlock_unlock(&irq->lock);
     
    7684#endif
    7785                }
    78                 pic_ack_interrupt(inum);
     86               
     87                if (!ack)
     88                        pic_ack_interrupt(inum);
    7989        }
    8090}
Note: See TracChangeset for help on using the changeset viewer.