aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/xen/events.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-04-02 13:53:56 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-24 17:57:32 -0400
commite849c3e9e0b786619c451d89ef0c47ac9a28fbc1 (patch)
treebc3500d40095c2f868e2efca4918b73a6b0a1090 /include/asm-x86/xen/events.h
parente04d0d0767a9c272d3c7300fb7a5221c5e3a71eb (diff)
Xen: make events.c portable for ia64/xen support
Remove x86 dependency in drivers/xen/events.c for ia64/xen support introducing include/asm/xen/events.h. Introduce xen_irqs_disabled() to hide regs->flags Introduce xen_do_IRQ() to hide regs->orig_ax. make enum ipi_vector definition arch specific. ia64/xen needs four vectors. Add one rmb() because on ia64 xchg() isn't barrier. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/xen/events.h')
-rw-r--r--include/asm-x86/xen/events.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-x86/xen/events.h b/include/asm-x86/xen/events.h
new file mode 100644
index 000000000000..596312a7bfc9
--- /dev/null
+++ b/include/asm-x86/xen/events.h
@@ -0,0 +1,22 @@
1#ifndef __XEN_EVENTS_H
2#define __XEN_EVENTS_H
3
4enum ipi_vector {
5 XEN_RESCHEDULE_VECTOR,
6 XEN_CALL_FUNCTION_VECTOR,
7
8 XEN_NR_IPIS,
9};
10
11static inline int xen_irqs_disabled(struct pt_regs *regs)
12{
13 return raw_irqs_disabled_flags(regs->flags);
14}
15
16static inline void xen_do_IRQ(int irq, struct pt_regs *regs)
17{
18 regs->orig_ax = ~irq;
19 do_IRQ(regs);
20}
21
22#endif /* __XEN_EVENTS_H */