lkml.org 
[lkml]   [2008]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: next-20081106: undefined reference to `__per_cpu_start'
On Fri, 7 Nov 2008, Stephen Rothwell wrote:

> > Or did you use generic percpu support and set
> > CONFIG_HAVE_ZERO_BASED_PER_CPU?
>
> Also a avr32 allnoconfig
> (http://kisskb.ellerman.id.au/kisskb/buildresult/53233/) gets:
>
> backing-dev.c:(.init.text+0xc4c): undefined reference to `__per_cpu_start'
> backing-dev.c:(.init.text+0xc50): undefined reference to `__per_cpu_end'
>
> and avr32 defconfig
> (http://kisskb.ellerman.id.au/kisskb/buildresult/53225/) gets:
>
> vmstat.c:(.init.text+0xff0): undefined reference to `__per_cpu_start'
> vmstat.c:(.init.text+0xff4): undefined reference to `__per_cpu_end'

All of these have no invocation of the PERCPU macro from
asm-generic/vmlinus.lds.h in their arch vmlinux.lds.S. Thus the symbols
are missing. They are kind of irrelevant since we are only interested in
the difference between those...

Either we add the PERCPU() macro invocations to each arches vmlinux.lds.S
file or we need to special case each time __per_cpu_end/__start is used.
The only use added for the cpu allocator is in include/linux/percpu.h

Make it conditional on CONFIG_SMP

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>

Index: linux-next/include/linux/percpu.h
===================================================================
--- linux-next.orig/include/linux/percpu.h 2008-11-06 10:03:22.985665656 -0600
+++ linux-next/include/linux/percpu.h 2008-11-07 12:38:06.223165740 -0600
@@ -61,8 +61,13 @@
#ifndef PERCPU_AREA_SIZE
#define PERCPU_RESERVE_SIZE 8192

+#ifdef CONFIG_SMP
#define PERCPU_AREA_SIZE \
(__per_cpu_end - __per_cpu_start + percpu_reserve)
+#else
+#define PERCPU_AREA_SIZE percpu_reserve
+#endif
+
#endif /* PERCPU_AREA_SIZE */

/*


\
 
 \ /
  Last update: 2008-11-07 19:43    [W:0.068 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site