ia64/xen-unstable

view xen/include/asm-x86/irq.h @ 15314:35e38c9048c8

Add suspend/resume to devices owned by Xen.

Signed-off-by: Ke Yu <ke.yu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Jun 11 15:44:48 2007 +0100 (2007-06-11)
parents 1a500cc4fcd5
children 6ea3db7ae24d
line source
1 #ifndef _ASM_HW_IRQ_H
2 #define _ASM_HW_IRQ_H
4 /* (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar */
6 #include <xen/config.h>
7 #include <asm/atomic.h>
8 #include <irq_vectors.h>
10 #define IO_APIC_IRQ(irq) (((irq) >= 16) || ((1<<(irq)) & io_apic_irqs))
11 #define IO_APIC_VECTOR(irq) (irq_vector[irq])
13 #define LEGACY_VECTOR(irq) ((irq) + FIRST_LEGACY_VECTOR)
14 #define LEGACY_IRQ_FROM_VECTOR(vec) ((vec) - FIRST_LEGACY_VECTOR)
16 #define irq_to_vector(irq) \
17 (IO_APIC_IRQ(irq) ? IO_APIC_VECTOR(irq) : LEGACY_VECTOR(irq))
18 #define vector_to_irq(vec) (vector_irq[vec])
20 extern int vector_irq[NR_VECTORS];
21 extern u8 irq_vector[NR_IRQ_VECTORS];
22 #define AUTO_ASSIGN -1
24 #define platform_legacy_irq(irq) ((irq) < 16)
26 fastcall void event_check_interrupt(void);
27 fastcall void invalidate_interrupt(void);
28 fastcall void call_function_interrupt(void);
29 fastcall void apic_timer_interrupt(void);
30 fastcall void error_interrupt(void);
31 fastcall void spurious_interrupt(void);
32 fastcall void thermal_interrupt(void);
34 void disable_8259A_irq(unsigned int irq);
35 void enable_8259A_irq(unsigned int irq);
36 int i8259A_irq_pending(unsigned int irq);
37 void init_8259A(int aeoi);
38 int i8259A_suspend(void);
39 int i8259A_resume(void);
41 void setup_IO_APIC(void);
42 void disable_IO_APIC(void);
43 void print_IO_APIC(void);
44 void setup_ioapic_dest(void);
46 extern unsigned long io_apic_irqs;
48 extern atomic_t irq_err_count;
49 extern atomic_t irq_mis_count;
51 int pirq_acktype(int irq);
52 int pirq_shared(int irq);
54 #endif /* _ASM_HW_IRQ_H */