2.6.0-test3-bk1 -- include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)

3 messages, 2 authors, 2003-08-10 · open the first message on its own page

2.6.0-test3-bk1 -- include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)

From: Miles Lane <hidden>
Date: 2003-08-10 18:42:16

  CC      kernel/timer.o
In file included from include/linux/smp.h:17,
                 from include/linux/kernel_stat.h:6,
                 from kernel/timer.c:22:
include/asm/smp.h: In function `any_online_cpu':
include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)
include/asm/smp.h:61: error: (Each undeclared identifier is reported only once
include/asm/smp.h:61: error: for each function it appears in.)
make[1]: *** [kernel/timer.o] Error 1

CONFIG_PPC=y
CONFIG_PPC32=y
CONFIG_6xx=y

CONFIG_PM=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_MULTIPLATFORM=y

CONFIG_PPC_CHRP=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PREP=y
CONFIG_PPC_OF=y
CONFIG_SMP=y
CONFIG_NR_CPUS=2
CONFIG_ALTIVEC=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_PROC_INTF=y
CONFIG_CPU_FREQ_24_API=y
CONFIG_CPU_FREQ_PMAC=y


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: 2.6.0-test3-bk1 -- include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)

From: Christoph Hellwig <hch@lst.de>
Date: 2003-08-10 19:09:54

On Sun, Aug 10, 2003 at 11:42:16AM -0700, Miles Lane wrote:
  CC      kernel/timer.o
In file included from include/linux/smp.h:17,
                 from include/linux/kernel_stat.h:6,
                 from kernel/timer.c:22:
include/asm/smp.h: In function `any_online_cpu':
include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)
include/asm/smp.h:61: error: (Each undeclared identifier is reported only once
include/asm/smp.h:61: error: for each function it appears in.)
make[1]: *** [kernel/timer.o] Error 1
I had that for a while now.  Including <linux/threads.h> in <asm/smp.h>
fixes it.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

PATCH -- Re: 2.6.0-test3-bk1 -- include/asm/smp.h:61: error: `NR_CPUS' undeclared (first use in this function)

From: Miles Lane <hidden>
Date: 2003-08-10 19:34:45

For Linus:
--- include/asm-ppc/smp.h~      2003-07-27 09:57:50.000000000 -0700
+++ include/asm-ppc/smp.h       2003-08-10 12:30:14.000000000 -0700
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/bitops.h>
 #include <linux/errno.h>
+#include <linux/threads.h>

 #ifdef CONFIG_SMP

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help