summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/irq.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-08-25 09:12:35 +0000
commitc7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch)
tree3682407a599b8f9f03fc096298134cafba1c9b2f /arch/i386/kernel/irq.h
parent1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff)
o Merge with Linux 2.1.116.
o New Newport console code. o New G364 console code.
Diffstat (limited to 'arch/i386/kernel/irq.h')
-rw-r--r--arch/i386/kernel/irq.h64
1 files changed, 52 insertions, 12 deletions
diff --git a/arch/i386/kernel/irq.h b/arch/i386/kernel/irq.h
index a769369c2..fedfdbc97 100644
--- a/arch/i386/kernel/irq.h
+++ b/arch/i386/kernel/irq.h
@@ -1,6 +1,52 @@
#ifndef __irq_h
#define __irq_h
+#include <asm/irq.h>
+
+/*
+ * Interrupt controller descriptor. This is all we need
+ * to describe about the low-level hardware.
+ */
+struct hw_interrupt_type {
+ const char * typename;
+ void (*handle)(unsigned int irq, int cpu, struct pt_regs * regs);
+ void (*enable)(unsigned int irq);
+ void (*disable)(unsigned int irq);
+};
+
+
+/*
+ * Status: reason for being disabled: somebody has
+ * done a "disable_irq()" or we must not re-enter the
+ * already executing irq..
+ */
+#define IRQ_INPROGRESS 1
+#define IRQ_DISABLED 2
+
+/*
+ * This is the "IRQ descriptor", which contains various information
+ * about the irq, including what kind of hardware handling it has,
+ * whether it is disabled etc etc.
+ *
+ * Pad this out to 32 bytes for cache and indexing reasons.
+ */
+typedef struct {
+ unsigned int status; /* IRQ status - IRQ_INPROGRESS, IRQ_DISABLED */
+ unsigned int events; /* Do we have any pending events? */
+ unsigned int ipi; /* Have we sent off the pending IPI? */
+ struct hw_interrupt_type *handler; /* handle/enable/disable functions */
+ struct irqaction *action; /* IRQ action list */
+ unsigned int unused[3];
+} irq_desc_t;
+
+#define IRQ0_TRAP_VECTOR 0x51
+
+extern irq_desc_t irq_desc[NR_IRQS];
+extern int irq_vector[NR_IRQS];
+
+extern void init_IRQ_SMP(void);
+extern int handle_IRQ_event(unsigned int, struct pt_regs *);
+
/*
* Various low-level irq details needed by irq.c, process.c,
* time.c, io_apic.c and smp.c
@@ -10,21 +56,19 @@
void mask_irq(unsigned int irq);
void unmask_irq(unsigned int irq);
-void enable_IO_APIC_irq (unsigned int irq);
-void disable_IO_APIC_irq (unsigned int irq);
-void set_8259A_irq_mask(unsigned int irq);
+void disable_8259A_irq(unsigned int irq);
+int i8259A_irq_pending (unsigned int irq);
void ack_APIC_irq (void);
void setup_IO_APIC (void);
-void init_IO_APIC_traps(void);
int IO_APIC_get_PCI_irq_vector (int bus, int slot, int fn);
-int IO_APIC_irq_trigger (int irq);
void make_8259A_irq (unsigned int irq);
void send_IPI (int dest, int vector);
void init_pic_mode (void);
+void print_IO_APIC (void);
-extern unsigned int io_apic_irqs;
+extern unsigned long long io_apic_irqs;
-#define IO_APIC_VECTOR(irq) (0x51+((irq)<<3))
+#define IO_APIC_VECTOR(irq) irq_vector[irq]
#define MAX_IRQ_SOURCES 128
#define MAX_MP_BUSSES 32
@@ -68,10 +112,6 @@ static inline void irq_exit(int cpu, unsigned int irq)
#define irq_enter(cpu, irq) (++local_irq_count[cpu])
#define irq_exit(cpu, irq) (--local_irq_count[cpu])
-/* Make these no-ops when not using SMP */
-#define enable_IO_APIC_irq(x) do { } while (0)
-#define disable_IO_APIC_irq(x) do { } while (0)
-
#define IO_APIC_IRQ(x) (0)
#endif
@@ -159,7 +199,7 @@ static inline void x86_do_profile (unsigned long eip)
eip -= (unsigned long) &_stext;
eip >>= prof_shift;
/*
- * Dont ignore out-of-bounds EIP values silently,
+ * Don't ignore out-of-bounds EIP values silently,
* put them into the last histogram slot, so if
* present, they will show up as a sharp peak.
*/