blob: ea88054e03f373a3a909c1c697c6e4d5fa61d9de [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#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
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <linux/profile.h>
16#include <asm/atomic.h>
17#include <asm/irq.h>
18#include <asm/sections.h>
19
Keith Owens45486f82006-06-26 13:59:41 +020020#define NMI_VECTOR 0x02
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022/*
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
Jan Beulich3e7622f2008-01-30 13:31:23 +010029extern void (*const interrupt[NR_IRQS])(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
31#ifdef CONFIG_SMP
Harvey Harrison341d8852008-01-30 13:31:17 +010032void reschedule_interrupt(void);
33void invalidate_interrupt(void);
34void call_function_interrupt(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035#endif
36
37#ifdef CONFIG_X86_LOCAL_APIC
Harvey Harrison341d8852008-01-30 13:31:17 +010038void apic_timer_interrupt(void);
39void error_interrupt(void);
40void spurious_interrupt(void);
41void thermal_interrupt(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070042#define platform_legacy_irq(irq) ((irq) < 16)
43#endif
44
45void disable_8259A_irq(unsigned int irq);
46void enable_8259A_irq(unsigned int irq);
47int i8259A_irq_pending(unsigned int irq);
48void make_8259A_irq(unsigned int irq);
49void init_8259A(int aeoi);
Harvey Harrison599db4f2008-02-04 16:48:03 +010050void send_IPI_self(int vector);
Linus Torvalds1da177e2005-04-16 15:20:36 -070051void init_VISWS_APIC_irqs(void);
52void setup_IO_APIC(void);
53void disable_IO_APIC(void);
54void print_IO_APIC(void);
55int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
56void send_IPI(int dest, int vector);
57void setup_ioapic_dest(void);
58
59extern unsigned long io_apic_irqs;
60
61extern atomic_t irq_err_count;
62extern atomic_t irq_mis_count;
63
64#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
65
Linus Torvalds1da177e2005-04-16 15:20:36 -070066#endif /* _ASM_HW_IRQ_H */