Subject: Re: linux-next: sparc build failure

From: Ingo Molnar <[email-masked]>
Date: Thu, 28 Aug 2008 08:57:54 +0200

* Stephen Rothwell <[email-masked]> wrote:

> Hi Dave,
> 
> The sparc32 allmodconfig build of linux-next (next-20080827) failed like
> this (among other things):
> 
> ERROR: "nr_irqs" [drivers/net/hamradio/baycom_ser_fdx.ko] undefined!
> ERROR: "nr_irqs" [drivers/net/3c59x.ko] undefined!
> 
> Introduced by the sparseirq tree.
> 
> nr_irqs is not exported for sparc.  I will add a patch to add the export
> to linux-next today.

thanks - the patch below should fix all those architectures. (there's 
also s390)

	Ingo

---------->
>>From 3af7043c57080f1ae7cd80c661d3e1308f164e1b Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email-masked]>
Date: Thu, 28 Aug 2008 08:56:33 +0200
Subject: [PATCH] sparseirq: export nr_irqs on m68k/sparc/s390

Stephen Rothwell reported such build failures on m68k/sparc/s390:

> ERROR: "nr_irqs" [drivers/net/hamradio/baycom_ser_fdx.ko] undefined!
> ERROR: "nr_irqs" [drivers/net/3c59x.ko] undefined!

export nr_irqs on these architectures too.

Reported-by: Stephen Rothwell <[email-masked]>
Signed-off-by: Ingo Molnar <[email-masked]>
---
 arch/m68k/kernel/ints.c |    1 +
 arch/s390/kernel/irq.c  |    1 +
 arch/sparc/kernel/irq.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index d8aebfc..8dd5591 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -47,6 +47,7 @@
 #endif
 
 int nr_irqs = NR_IRQS;
+EXPORT_SYMBOL(nr_irqs);
 
 extern u32 auto_irqhandler_fixup[];
 extern u32 user_irqhandler_fixup[];
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index 14eb549..3624c4a 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -18,6 +18,7 @@
 #include <linux/profile.h>
 
 int nr_irqs = NR_IRQS;
+EXPORT_SYMBOL(nr_irqs);
 
 /*
  * show_interrupts is needed by /proc/interrupts.
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 059598b..4b99e3c 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -57,6 +57,7 @@
 #endif /* SMP */
 
 int nr_irqs = NR_IRQS;
+EXPORT_SYMBOL(nr_irqs);
 
 unsigned long __raw_local_irq_save(void)
 {