]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dyn_array: don't break compiling for !CONFIG_SMP
authorH. Peter Anvin <hpa@zytor.com>
Thu, 4 Sep 2008 16:56:10 +0000 (09:56 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:53:05 +0000 (16:53 +0200)
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 <hpa@zytor.com>
init/dyn_array.c

index c4cd902a1180ef233aad21eb25e235e39c526d52..1dc08140f3cba6ff36a62f7ed93ac20a97eeef26 100644 (file)
@@ -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