diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 14:09:43 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 12:17:30 +0100 |
commit | 792dc4f6cdacf50d3f2b93756d282fc04ee34bd5 (patch) | |
tree | c65e8bc1324e5ba62b268bcd1fbe1b4b90342ecd /drivers/xen | |
parent | eca217b36e5d7d4377493d5cedd89105e66a5a72 (diff) | |
download | op-kernel-dev-792dc4f6cdacf50d3f2b93756d282fc04ee34bd5.zip op-kernel-dev-792dc4f6cdacf50d3f2b93756d282fc04ee34bd5.tar.gz |
xen: use our own eventchannel->irq path
Rather than overloading vectors for event channels, take full
responsibility for mapping an event channel to irq directly. With
this patch Xen has its own irq allocator.
When the kernel gets an event channel upcall, it maps the event
channel number to an irq and injects it into the normal interrupt
path.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/events.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 7c37054..2c8d710 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -30,6 +30,7 @@ #include <asm/ptrace.h> #include <asm/irq.h> +#include <asm/idle.h> #include <asm/sync_bitops.h> #include <asm/xen/hypercall.h> #include <asm/xen/hypervisor.h> @@ -517,6 +518,24 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id) } +static void xen_do_irq(unsigned irq, struct pt_regs *regs) +{ + struct pt_regs *old_regs = set_irq_regs(regs); + + if (WARN_ON(irq == -1)) + return; + + exit_idle(); + irq_enter(); + + //printk("cpu %d handling irq %d\n", smp_processor_id(), info->irq); + handle_irq(irq, regs); + + irq_exit(); + + set_irq_regs(old_regs); +} + /* * Search the CPUs pending events bitmasks. For each one found, map * the event number to an irq, and feed it into do_IRQ() for @@ -557,8 +576,7 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) int port = (word_idx * BITS_PER_LONG) + bit_idx; int irq = evtchn_to_irq[port]; - if (irq != -1) - xen_do_IRQ(irq, regs); + xen_do_irq(irq, regs); } } |