提交 e8fc96ed 编写于 作者: H H. Peter Anvin 提交者: Ingo Molnar

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: NH. Peter Anvin <hpa@zytor.com>
上级 1c7d1bca
...@@ -91,6 +91,7 @@ unsigned long __init per_cpu_dyn_array_size(unsigned long *align) ...@@ -91,6 +91,7 @@ unsigned long __init per_cpu_dyn_array_size(unsigned long *align)
return total_size; return total_size;
} }
#ifdef CONFIG_SMP
void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) void __init per_cpu_alloc_dyn_array(int cpu, char *ptr)
{ {
#ifdef CONFIG_HAVE_DYN_ARRAY #ifdef CONFIG_HAVE_DYN_ARRAY
...@@ -122,3 +123,4 @@ void __init per_cpu_alloc_dyn_array(int cpu, char *ptr) ...@@ -122,3 +123,4 @@ void __init per_cpu_alloc_dyn_array(int cpu, char *ptr)
} }
#endif #endif
} }
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册