Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136719
b: refs/heads/master
c: 792dc4f
h: refs/heads/master
i:
  136717: 06da490
  136715: c4009d2
  136711: b47bf45
  136703: 6080cf0
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Feb 9, 2009
1 parent 5486c06 commit 237bb0b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eca217b36e5d7d4377493d5cedd89105e66a5a72
refs/heads/master: 792dc4f6cdacf50d3f2b93756d282fc04ee34bd5
6 changes: 0 additions & 6 deletions trunk/arch/x86/include/asm/xen/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
return raw_irqs_disabled_flags(regs->flags);
}

static inline void xen_do_IRQ(int irq, struct pt_regs *regs)
{
regs->orig_ax = ~irq;
do_IRQ(regs);
}

#endif /* _ASM_X86_XEN_EVENTS_H */
17 changes: 1 addition & 16 deletions trunk/arch/x86/xen/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@ void xen_force_evtchn_callback(void)
(void)HYPERVISOR_xen_version(0, NULL);
}

static void __init __xen_init_IRQ(void)
{
int i;

/* Create identity vector->irq map */
for(i = 0; i < NR_VECTORS; i++) {
int cpu;

for_each_possible_cpu(cpu)
per_cpu(vector_irq, cpu)[i] = i;
}

xen_init_IRQ();
}

static unsigned long xen_save_fl(void)
{
struct vcpu_info *vcpu;
Expand Down Expand Up @@ -127,7 +112,7 @@ static void xen_halt(void)
}

static const struct pv_irq_ops xen_irq_ops __initdata = {
.init_IRQ = __xen_init_IRQ,
.init_IRQ = xen_init_IRQ,

.save_fl = PV_CALLEE_SAVE(xen_save_fl),
.restore_fl = PV_CALLEE_SAVE(xen_restore_fl),
Expand Down
22 changes: 20 additions & 2 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 237bb0b

Please sign in to comment.