ia64/xen-unstable

view linux-2.4.27-xen-sparse/include/asm-xen/irq.h @ 2991:00823b8a8bfb

bitkeeper revision 1.1159.170.30 (419a2863WX3YLZ5KVCew4n2UgbIs-g)

make 2.4 build again
author smh22@tempest.cl.cam.ac.uk
date Tue Nov 16 16:18:43 2004 +0000 (2004-11-16)
parents 11be1dfb262b
children f0fe276ae088
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 */