ia64/xen-unstable

view linux-2.4.29-xen-sparse/include/asm-xen/irq.h @ 3887:4385894c52ae

bitkeeper revision 1.1230.2.4 (421a95cepOZORm0EbZfqBeZ6PZ8MwA)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xen-unstable.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Tue Feb 22 02:15:42 2005 +0000 (2005-02-22)
parents 0a4b76b6b5a0
children
line source
1 #ifndef _ASM_IRQ_H
2 #define _ASM_IRQ_H
4 /*
5 * linux/include/asm/irq.h
6 *
7 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
8 *
9 * IRQ/IPI changes taken from work by Thomas Radke
10 * <tomsoft@informatik.tu-chemnitz.de>
11 */
13 #include <linux/config.h>
14 #include <asm/hypervisor.h>
15 #include <asm/ptrace.h>
17 /*
18 * The flat IRQ space is divided into two regions:
19 * 1. A one-to-one mapping of real physical IRQs. This space is only used
20 * if we have physical device-access privilege. This region is at the
21 * start of the IRQ space so that existing device drivers do not need
22 * to be modified to translate physical IRQ numbers into our IRQ space.
23 * 3. A dynamic mapping of inter-domain and Xen-sourced virtual IRQs. These
24 * are bound using the provided bind/unbind functions.
25 */
27 #define PIRQ_BASE 0
28 #define NR_PIRQS 128
30 #define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
31 #define NR_DYNIRQS 128
33 #define NR_IRQS (NR_PIRQS + NR_DYNIRQS)
35 #define pirq_to_irq(_x) ((_x) + PIRQ_BASE)
36 #define irq_to_pirq(_x) ((_x) - PIRQ_BASE)
38 #define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE)
39 #define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE)
41 /* Dynamic binding of event channels and VIRQ sources to Linux IRQ space. */
42 extern int bind_virq_to_irq(int virq);
43 extern void unbind_virq_from_irq(int virq);
44 extern int bind_evtchn_to_irq(int evtchn);
45 extern void unbind_evtchn_from_irq(int evtchn);
47 static __inline__ int irq_cannonicalize(int irq)
48 {
49 return (irq == 2) ? 9 : irq;
50 }
52 extern void disable_irq(unsigned int);
53 extern void disable_irq_nosync(unsigned int);
54 extern void enable_irq(unsigned int);
56 extern void irq_suspend(void);
57 extern void irq_resume(void);
60 #define CPU_MASK_NONE 0
62 /* XXX SMH: no-op for compat w/ 2.6 shared files */
63 #define irq_ctx_init(cpu) do { ; } while (0)
65 #endif /* _ASM_IRQ_H */