/xen/common/event_channel.c
656 int send_guest_pirq(struct domain *d, int pirq)
657 {
658 int port = d->pirq_to_evtchn[pirq];
659 struct evtchn *chn;
660
661 /*
662 * It should not be possible to race with __evtchn_close():
663 * The caller of this function must synchronise with pirq_guest_unbind( ).
664 */
665 ASSERT(port != 0);
666
667 chn = evtchn_from_port(d, port);
668 return evtchn_set_pending(d->vcpu[chn->notify_vcpu_id], port);
669 }
/linux-2.6.18-xen.hg/kernel/irq/handle.c
157 /**
158 * __do_IRQ - original all in one highlevel IRQ handler
159 * @irq: the interrupt number
160 * @regs: pointer to a register structure
161 *
162 * __do_IRQ handles all normal device IRQ's (the special
163 * SMP cross-CPU interrupts have their own specific
164 * handlers).
165 *
166 * This is the original x86 implementation which is used for every
167 * interrupt type.
168 */
169 fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs)
170 {
..................
176 if (CHECK_IRQ_PER_CPU(desc->status)) {
177 irqreturn_t action_ret;
178
179 /*
180 * No locking required for CPU-local interrupts:
181 */
182 if (desc->chip->ack)
183 desc->chip->ack(irq);
184 action_ret =handle_IRQ_event(irq, regs, desc->action);
185 desc->chip->end(irq);
186 return 1;
187 }
...................
230 for (;;) {
231 irqreturn_t action_ret;
232
233 spin_unlock(&desc->lock);
234
235 action_ret =handle_IRQ_event(irq, regs, action);
236
237 spin_lock(&desc->lock);
238 if (!noirqdebug)
239 note_interrupt(irq, desc, action_ret, regs);
240 if (likely(!(desc->status & IRQ_PENDING)))
241 break;
242 desc->status &= ~IRQ_PENDING;
243 }
244 desc->status &= ~IRQ_INPROGRESS;
..................
254 return 1;
255 }
/linux-2.6.18-xen.hg/kernel/irq/handle.c
123 /**
124 * handle_IRQ_event - irq action chain handler
125 * @irq: the interrupt number
126 * @regs: pointer to a register structure
127 * @action: the interrupt action chain for this irq
128 *
129 * Handles the action chain of an irq event
130 */
131 irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
132 struct irqaction *action)
133 {
..................
142 do {
143 ret =action->handler(irq, action->dev_id, regs);
144 if (ret == IRQ_HANDLED)
145 status |= action->flags;
146 retval |= ret;
147 action = action->next;
148 } while (action);
...................
155 }