Skip to contentSkip to conversation

linux-next arch/ia64/kernel/setup.c: Fix setup_per_cpu_areas() compilation error

PATCH In review Fenghua Yu 2 participants 2 messages Jul 13, 2009 – Jul 15, 2009 1 message not in the archive Linux-next tree

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): A6AD88C3F2289247BE726C37303E1EB8B06CB5E9@orsmsx505.amr.corp.intel.com

Fenghua Yu

author
#1 lore raw

PATCH 1/1 linux-next arch/ia64/kernel/setup.c: Fix setup_per_cpu_areas() compilation error

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

---

The commit e74e396204bfcb67570ba4517b08f5918e69afea in linux-next causes this build issue.

 setup.c |    6 ++++++
 1 file changed, 6 insertions(+)
arch/ia64/kernel/setup.c +6 -0
index 1b23ec1..1de86c9 100644
@@ -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:
#2 lore raw

Re: [PATCH] linux-next arch/ia64/kernel/setup.c: Fix setup_per_cpu_areas()

Quoted 11 lines · Fenghua Yu

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

Committed to percpu#for-next. Thanks.

Signature · 1 line
tejun