From: H. Peter Anvin Date: Thu, 4 Sep 2008 16:56:10 +0000 (-0700) Subject: dyn_array: don't break compiling for !CONFIG_SMP X-Git-Tag: v2.6.28-rc1~80^2~63 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8fc96ed3603924e7aa09fd5e4dbd289b7e69907;p=linux-2.6-omap-h63xx.git dyn_array: don't break compiling for !CONFIG_SMP Impact: build failure on uniprocessor When compiling for !CONFIG_SMP, per_cpu_alloc_dyn_array() would fail to compile, since it uses per_cpu_offset, which is not defined for uniprocessor builds. Hence, do not compile per_cpu_alloc_dyn_array() for !CONFIG_SMP. Attempting to call this function in a uniprocessor configuration would be simply wrong in the first place. Signed-off-by: H. Peter Anvin --- diff --git a/init/dyn_array.c b/init/dyn_array.c index c4cd902a118..1dc08140f3c 100644 --- a/init/dyn_array.c +++ b/init/dyn_array.c @@ -91,6 +91,7 @@ unsigned long __init per_cpu_dyn_array_size(unsigned long *align) return total_size; } +#ifdef CONFIG_SMP void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) { #ifdef CONFIG_HAVE_DYN_ARRAY @@ -122,3 +123,4 @@ void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) } #endif } +#endif