summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/irq.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /arch/i386/kernel/irq.h
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'arch/i386/kernel/irq.h')
-rw-r--r--arch/i386/kernel/irq.h47
1 files changed, 44 insertions, 3 deletions
diff --git a/arch/i386/kernel/irq.h b/arch/i386/kernel/irq.h
index db70872f1..6404bc9e3 100644
--- a/arch/i386/kernel/irq.h
+++ b/arch/i386/kernel/irq.h
@@ -7,9 +7,42 @@
* Interrupt entry/exit code at both C and assembly level
*/
+#define IO_APIC_GATE_OFFSET 0x51
+
+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 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);
+void make_8259A_irq (unsigned int irq);
+
+extern unsigned int io_apic_irqs;
+
+#define MAX_IRQ_SOURCES 128
+#define MAX_MP_BUSSES 32
+enum mp_bustype {
+ MP_BUS_ISA,
+ MP_BUS_PCI
+};
+extern int mp_bus_id_to_type [MAX_MP_BUSSES];
+extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
+extern char ioapic_OEM_ID [16];
+extern char ioapic_Product_ID [16];
+
+extern spinlock_t irq_controller_lock; /*
+ * Protects both the 8259 and the
+ * IO-APIC
+ */
+
#ifdef __SMP__
-static inline void irq_enter(int cpu, int irq)
+#include <asm/atomic.h>
+
+static inline void irq_enter(int cpu, unsigned int irq)
{
hardirq_enter(cpu);
while (test_bit(0,&global_irq_lock)) {
@@ -17,17 +50,25 @@ static inline void irq_enter(int cpu, int irq)
}
}
-static inline void irq_exit(int cpu, int irq)
+static inline void irq_exit(int cpu, unsigned int irq)
{
hardirq_exit(cpu);
release_irqlock(cpu);
}
+#define IO_APIC_IRQ(x) ((1<<x) & io_apic_irqs)
+
#else
#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
#define __STR(x) #x
@@ -94,7 +135,7 @@ __asm__( \
"pushl $ret_from_intr\n\t" \
"jmp "SYMBOL_NAME_STR(do_IRQ));
-#define BUILD_IRQ(chip,nr,mask) \
+#define BUILD_IRQ(nr) \
asmlinkage void IRQ_NAME(nr); \
__asm__( \
"\n"__ALIGN_STR"\n" \