Skip to contentSkip to conversation

irq handling code consolidation (i386 part)

RFC PATCH New Andrey Panin 1 participant 1 message Jun 26, 2003

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 irq handling code consolidation (i386 part)

Hi all,

this patch (against 2.5.73) contains i386 part of my irq handling code consolidation work.

Please take a look.

Best regards.

Signature · 2 lines
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net
arch/i386/Kconfig +4 -0
diff --minimal -urN -X /usr/share/dontdiff linux-2.5.72.vanilla/arch/i386/Kconfig linux-2.5.72/arch/i386/Kconfig
@@ -18,6 +18,10 @@
 	bool
 	default y
 
+config GENERIC_IRQ
+	bool
+	default y
+
 config SBUS
 	bool
 
arch/i386/kernel/irq.c +3 -869

912 lines not on this page · raw message

Двоичные файлы linux-2.5.72.vanilla/arch/i386/kernel/vsyscall-int80.so и linux-2.5.72/arch/i386/kernel/vsyscall-int80.so различаются Двоичные файлы linux-2.5.72.vanilla/arch/i386/kernel/vsyscall-sysenter.so и linux-2.5.72/arch/i386/kernel/vsyscall-sysenter.so различаются

include/asm-i386/hw_irq.h +36 -0
diff --minimal -urN -X /usr/share/dontdiff linux-2.5.72.vanilla/include/asm-i386/hw_irq.h linux-2.5.72/include/asm-i386/hw_irq.h
@@ -16,6 +16,7 @@
 #include <linux/profile.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
+#include <asm/apic.h>
 
 /*
  * Various low-level irq details needed by irq.c, process.c,
@@ -117,4 +118,39 @@
 static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
 #endif
 
+extern irq_desc_t irq_desc[NR_IRQS];
+
+/*
+ * Currently unexpected vectors happen only on SMP and APIC.
+ * We _must_ ack these because every local APIC has only N
+ * irq slots per priority level, and a 'hanging, unacked' IRQ
+ * holds up an irq slot - in excessive cases (when multiple
+ * unexpected vectors occur) that might lock up the APIC
+ * completely.
+ */
+#ifdef CONFIG_X86_LOCAL_APIC
+#define arch_ack_bad_irq(irq) ack_APIC_irq()
+#else
+#define arch_ack_bad_irq(irq) do { } while (0)
+#endif
+
+/* Return a pointer to the irq descriptor for IRQ.  */
+#define irq_desc(irq) (irq_desc + (irq))
+
+/* Check irq number */
+#define irq_valid(irq) ((irq) < NR_IRQS)
+
+/* Arch specific hook for setup_irq() */
+#define arch_setup_irq(irq, desc, irqaction) do { } while (0)
+
+/* Used in setup_irq() */
+#define ARCH_NONSHARED_IRQ_MASK \
+	~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS)
+
+#define ARCH_AFFINITY_WIDTH	8
+
+#define ARCH_DEFAULT_IRQ_AFFINITY	~0UL
+
+#define arch_can_create_irq_proc() (1)
+
 #endif /* _ASM_HW_IRQ_H */