Re: [PATCH 08/42] introduce nr_irqs

From: Yinghai Lu
Date: Sat Aug 09 2008 - 17:38:11 EST


On Sat, Aug 9, 2008 at 8:46 AM, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
> "Yinghai Lu" <yhlu.kernel@xxxxxxxxx> 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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/