Messages in this thread Patch in this message | | | Date | Sat, 9 Aug 2008 14:37:53 -0700 | From | "Yinghai Lu" <> | Subject | Re: [PATCH 08/42] introduce nr_irqs |
| |
On Sat, Aug 9, 2008 at 8:46 AM, Eric W. Biederman <ebiederm@xmission.com> wrote: > "Yinghai Lu" <yhlu.kernel@gmail.com> writes: > > >> ok, will move to that file. > > ???? If you introduce a new concept like valid_irq that is fine. > interrupt.h is the interface to drivers! > > Let me say this clearly. > > DO NOT CHANGE THE INTERFACE TO DEVICE DRIVERS! > please check
Index: linux-2.6/include/linux/interrupt.h =================================================================== --- linux-2.6.orig/include/linux/interrupt.h +++ linux-2.6/include/linux/interrupt.h @@ -15,6 +15,8 @@ #include <asm/ptrace.h> #include <asm/system.h>
+extern int nr_irqs; + /* * These correspond to the IORESOURCE_IRQ_* defines in * linux/ioport.h to select the interrupt line behaviour. When Index: linux-2.6/arch/m68k/kernel/ints.c =================================================================== --- linux-2.6.orig/arch/m68k/kernel/ints.c +++ linux-2.6/arch/m68k/kernel/ints.c @@ -46,6 +46,8 @@ #include <asm/q40ints.h> #endif
+int nr_irqs = NR_IRQS; + extern u32 auto_irqhandler_fixup[]; extern u32 user_irqhandler_fixup[]; extern u16 user_irqvec_fixup[]; Index: linux-2.6/arch/s390/kernel/irq.c =================================================================== --- linux-2.6.orig/arch/s390/kernel/irq.c +++ linux-2.6/arch/s390/kernel/irq.c @@ -17,6 +17,8 @@ #include <linux/proc_fs.h> #include <linux/profile.h>
+int nr_irqs = NR_IRQS; + /* * show_interrupts is needed by /proc/interrupts. */ Index: linux-2.6/arch/sparc/kernel/irq.c =================================================================== --- linux-2.6.orig/arch/sparc/kernel/irq.c +++ linux-2.6/arch/sparc/kernel/irq.c @@ -55,6 +55,9 @@ #define SMP_NOP2 #define SMP_NOP3 #endif /* SMP */ + +int nr_irqs = NR_IRQS; + unsigned long __raw_local_irq_save(void) { unsigned long retval; Index: linux-2.6/kernel/irq/handle.c =================================================================== --- linux-2.6.orig/kernel/irq/handle.c +++ linux-2.6/kernel/irq/handle.c @@ -47,6 +47,7 @@ handle_bad_irq(unsigned int irq, struct * * Controller mappings for all interrupt sources: */ +int nr_irqs = NR_IRQS; struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { [0 ... NR_IRQS-1] = { .status = IRQ_DISABLED,
| |