ia64: Fix setup_per_cpu_areas() compilation error
authorFenghua Yu <fenghua.yu@intel.com>
Mon, 13 Jul 2009 20:09:43 +0000 (13:09 -0700)
committerTejun Heo <tj@kernel.org>
Wed, 15 Jul 2009 02:46:34 +0000 (11:46 +0900)
Fix ia64 build setup_per_cpu_areas() redifinition issue in UP
configuration.  When compiling ia64 kernel in UP configuration, the
following compilation errors are reported:

arch/ia64/kernel/setup.c:860: error: redefinition of 'setup_per_cpu_areas'
include/linux/percpu.h:185: error: previous definition of 'setup_per_cpu_areas' was here

The patch fixes the issue in arch/ia64/kernel/setup.c

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/ia64/kernel/setup.c

index 1b23ec126b637b204a4e43fd559ba7825cb14152..1de86c96801d60fe81ae2d6fc4930bdfdc190c45 100644 (file)
@@ -855,11 +855,17 @@ identify_cpu (struct cpuinfo_ia64 *c)
        c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1));
 }
 
+/*
+ * In UP configuration, setup_per_cpu_areas() is defined in
+ * include/linux/percpu.h
+ */
+#ifdef CONFIG_SMP
 void __init
 setup_per_cpu_areas (void)
 {
        /* start_kernel() requires this... */
 }
+#endif
 
 /*
  * Do the following calculations: