diff options
| -rw-r--r-- | arch/x86/include/asm/xen/events.h | 6 | ||||
| -rw-r--r-- | arch/x86/xen/irq.c | 17 | ||||
| -rw-r--r-- | drivers/xen/events.c | 22 |
3 files changed, 21 insertions, 24 deletions
diff --git a/arch/x86/include/asm/xen/events.h b/arch/x86/include/asm/xen/events.h index 19144184983a..1df35417c412 100644 --- a/arch/x86/include/asm/xen/events.h +++ b/arch/x86/include/asm/xen/events.h | |||
| @@ -15,10 +15,4 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) | |||
| 15 | return raw_irqs_disabled_flags(regs->flags); | 15 | return raw_irqs_disabled_flags(regs->flags); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | static inline void xen_do_IRQ(int irq, struct pt_regs *regs) | ||
| 19 | { | ||
| 20 | regs->orig_ax = ~irq; | ||
| 21 | do_IRQ(regs); | ||
| 22 | } | ||
| 23 | |||
| 24 | #endif /* _ASM_X86_XEN_EVENTS_H */ | 18 | #endif /* _ASM_X86_XEN_EVENTS_H */ |
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 5a070900ad35..cfd17799bd6d 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c | |||
| @@ -19,21 +19,6 @@ void xen_force_evtchn_callback(void) | |||
| 19 | (void)HYPERVISOR_xen_version(0, NULL); | 19 | (void)HYPERVISOR_xen_version(0, NULL); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | static void __init __xen_init_IRQ(void) | ||
| 23 | { | ||
| 24 | int i; | ||
| 25 | |||
| 26 | /* Create identity vector->irq map */ | ||
| 27 | for(i = 0; i < NR_VECTORS; i++) { | ||
| 28 | int cpu; | ||
| 29 | |||
| 30 | for_each_possible_cpu(cpu) | ||
| 31 | per_cpu(vector_irq, cpu)[i] = i; | ||
| 32 | } | ||
| 33 | |||
| 34 | xen_init_IRQ(); | ||
| 35 | } | ||
| 36 | |||
| 37 | static unsigned long xen_save_fl(void) | 22 | static unsigned long xen_save_fl(void) |
| 38 | { | 23 | { |
| 39 | struct vcpu_info *vcpu; | 24 | struct vcpu_info *vcpu; |
| @@ -127,7 +112,7 @@ static void xen_halt(void) | |||
| 127 | } | 112 | } |
| 128 | 113 | ||
| 129 | static const struct pv_irq_ops xen_irq_ops __initdata = { | 114 | static const struct pv_irq_ops xen_irq_ops __initdata = { |
| 130 | .init_IRQ = __xen_init_IRQ, | 115 | .init_IRQ = xen_init_IRQ, |
| 131 | 116 | ||
| 132 | .save_fl = PV_CALLEE_SAVE(xen_save_fl), | 117 | .save_fl = PV_CALLEE_SAVE(xen_save_fl), |
| 133 | .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), | 118 | .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), |
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 | ||
| 521 | static 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 | ||
