aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r--drivers/xen/events.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 7c3705479ea1..2c8d710713f5 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -30,6 +30,7 @@
30 30
31#include <asm/ptrace.h> 31#include <asm/ptrace.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/idle.h>
33#include <asm/sync_bitops.h> 34#include <asm/sync_bitops.h>
34#include <asm/xen/hypercall.h> 35#include <asm/xen/hypercall.h>
35#include <asm/xen/hypervisor.h> 36#include <asm/xen/hypervisor.h>
@@ -517,6 +518,24 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id)
517} 518}
518 519
519 520
521static void xen_do_irq(unsigned irq, struct pt_regs *regs)
522{
523 struct pt_regs *old_regs = set_irq_regs(regs);
524
525 if (WARN_ON(irq == -1))
526 return;
527
528 exit_idle();
529 irq_enter();
530
531 //printk("cpu %d handling irq %d\n", smp_processor_id(), info->irq);
532 handle_irq(irq, regs);
533
534 irq_exit();
535
536 set_irq_regs(old_regs);
537}
538
520/* 539/*
521 * Search the CPUs pending events bitmasks. For each one found, map 540 * Search the CPUs pending events bitmasks. For each one found, map
522 * the event number to an irq, and feed it into do_IRQ() for 541 * 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)
557 int port = (word_idx * BITS_PER_LONG) + bit_idx; 576 int port = (word_idx * BITS_PER_LONG) + bit_idx;
558 int irq = evtchn_to_irq[port]; 577 int irq = evtchn_to_irq[port];
559 578
560 if (irq != -1) 579 xen_do_irq(irq, regs);
561 xen_do_IRQ(irq, regs);
562 } 580 }
563 } 581 }
564 582