]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef _ASM_HW_IRQ_H |
2 | #define _ASM_HW_IRQ_H | |
3 | ||
4 | /* | |
5 | * linux/include/asm/hw_irq.h | |
6 | * | |
7 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar | |
8 | * | |
9 | * moved some of the old arch/i386/kernel/irq.h to here. VY | |
10 | * | |
11 | * IRQ/IPI changes taken from work by Thomas Radke | |
12 | * <tomsoft@informatik.tu-chemnitz.de> | |
13 | */ | |
14 | ||
1da177e4 LT |
15 | #include <linux/profile.h> |
16 | #include <asm/atomic.h> | |
17 | #include <asm/irq.h> | |
18 | #include <asm/sections.h> | |
19 | ||
d96c4e7b AM |
20 | struct hw_interrupt_type; |
21 | ||
1da177e4 LT |
22 | /* |
23 | * Various low-level irq details needed by irq.c, process.c, | |
24 | * time.c, io_apic.c and smp.c | |
25 | * | |
26 | * Interrupt entry/exit code at both C and assembly level | |
27 | */ | |
28 | ||
29 | extern u8 irq_vector[NR_IRQ_VECTORS]; | |
30 | #define IO_APIC_VECTOR(irq) (irq_vector[irq]) | |
31 | #define AUTO_ASSIGN -1 | |
32 | ||
33 | extern void (*interrupt[NR_IRQS])(void); | |
34 | ||
35 | #ifdef CONFIG_SMP | |
36 | fastcall void reschedule_interrupt(void); | |
37 | fastcall void invalidate_interrupt(void); | |
38 | fastcall void call_function_interrupt(void); | |
39 | #endif | |
40 | ||
41 | #ifdef CONFIG_X86_LOCAL_APIC | |
42 | fastcall void apic_timer_interrupt(void); | |
43 | fastcall void error_interrupt(void); | |
44 | fastcall void spurious_interrupt(void); | |
45 | fastcall void thermal_interrupt(struct pt_regs *); | |
46 | #define platform_legacy_irq(irq) ((irq) < 16) | |
47 | #endif | |
48 | ||
49 | void disable_8259A_irq(unsigned int irq); | |
50 | void enable_8259A_irq(unsigned int irq); | |
51 | int i8259A_irq_pending(unsigned int irq); | |
52 | void make_8259A_irq(unsigned int irq); | |
53 | void init_8259A(int aeoi); | |
54 | void FASTCALL(send_IPI_self(int vector)); | |
55 | void init_VISWS_APIC_irqs(void); | |
56 | void setup_IO_APIC(void); | |
57 | void disable_IO_APIC(void); | |
58 | void print_IO_APIC(void); | |
59 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | |
60 | void send_IPI(int dest, int vector); | |
61 | void setup_ioapic_dest(void); | |
62 | ||
63 | extern unsigned long io_apic_irqs; | |
64 | ||
65 | extern atomic_t irq_err_count; | |
66 | extern atomic_t irq_mis_count; | |
67 | ||
68 | #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) | |
69 | ||
70 | #if defined(CONFIG_X86_IO_APIC) | |
71 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | |
72 | { | |
73 | if (IO_APIC_IRQ(i)) | |
74 | send_IPI_self(IO_APIC_VECTOR(i)); | |
75 | } | |
76 | #else | |
77 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | |
78 | #endif | |
79 | ||
80 | #endif /* _ASM_HW_IRQ_H */ |