Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93170
b: refs/heads/master
c: e849c3e
h: refs/heads/master
v: v3
  • Loading branch information
Isaku Yamahata authored and Ingo Molnar committed Apr 24, 2008
1 parent 3a9cc6c commit e32ca19
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 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: e04d0d0767a9c272d3c7300fb7a5221c5e3a71eb
refs/heads/master: e849c3e9e0b786619c451d89ef0c47ac9a28fbc1
13 changes: 7 additions & 6 deletions trunk/drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id)
for_each_online_cpu(i) {
struct vcpu_info *v = per_cpu(xen_vcpu, i);
printk("%d: masked=%d pending=%d event_sel %08lx\n ", i,
(get_irq_regs() && i == cpu) ? !(get_irq_regs()->flags & X86_EFLAGS_IF) : v->evtchn_upcall_mask,
(get_irq_regs() && i == cpu) ? xen_irqs_disabled(get_irq_regs()) : v->evtchn_upcall_mask,
v->evtchn_upcall_pending,
v->evtchn_pending_sel);
}
Expand Down Expand Up @@ -527,7 +527,10 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
if (__get_cpu_var(nesting_count)++)
goto out;

/* NB. No need for a barrier here -- XCHG is a barrier on x86. */
#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */
/* Clear master flag /before/ clearing selector flag. */
rmb();
#endif
pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0);
while (pending_words != 0) {
unsigned long pending_bits;
Expand All @@ -539,10 +542,8 @@ 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) {
regs->orig_ax = ~irq;
do_IRQ(regs);
}
if (irq != -1)
xen_do_IRQ(irq, regs);
}
}

Expand Down
22 changes: 22 additions & 0 deletions trunk/include/asm-x86/xen/events.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef __XEN_EVENTS_H
#define __XEN_EVENTS_H

enum ipi_vector {
XEN_RESCHEDULE_VECTOR,
XEN_CALL_FUNCTION_VECTOR,

XEN_NR_IPIS,
};

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 /* __XEN_EVENTS_H */
8 changes: 1 addition & 7 deletions trunk/include/xen/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

#include <xen/interface/event_channel.h>
#include <asm/xen/hypercall.h>

enum ipi_vector {
XEN_RESCHEDULE_VECTOR,
XEN_CALL_FUNCTION_VECTOR,

XEN_NR_IPIS,
};
#include <asm/xen/events.h>

int bind_evtchn_to_irq(unsigned int evtchn);
int bind_evtchn_to_irqhandler(unsigned int evtchn,
Expand Down

0 comments on commit e32ca19

Please sign in to comment.