diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-04 12:56:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:53:05 -0400 |
commit | e8fc96ed3603924e7aa09fd5e4dbd289b7e69907 (patch) | |
tree | c47cdebc69bc90c8123807607a8996656def710d | |
parent | 1c7d1bcad218808a4f67a4492a5e1d920e85c239 (diff) |
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 <hpa@zytor.com>
-rw-r--r-- | init/dyn_array.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init/dyn_array.c b/init/dyn_array.c index c4cd902a1180..1dc08140f3cb 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) | |||
91 | return total_size; | 91 | return total_size; |
92 | } | 92 | } |
93 | 93 | ||
94 | #ifdef CONFIG_SMP | ||
94 | void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) | 95 | void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) |
95 | { | 96 | { |
96 | #ifdef CONFIG_HAVE_DYN_ARRAY | 97 | #ifdef CONFIG_HAVE_DYN_ARRAY |
@@ -122,3 +123,4 @@ void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) | |||
122 | } | 123 | } |
123 | #endif | 124 | #endif |
124 | } | 125 | } |
126 | #endif | ||