Browse Source

x86: smp.h move prefill_possible_map declartion to cpu.h

Impact: cleanup, moving NON-SMP stuff from smp.h

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Jaswinder Singh Rajput 16 years ago
parent
commit
6e5385d44b
4 changed files with 11 additions and 8 deletions
  1. 10 0
      arch/x86/include/asm/cpu.h
  2. 0 6
      arch/x86/include/asm/smp.h
  3. 1 1
      arch/x86/kernel/setup.c
  4. 0 1
      arch/x86/kernel/smpboot.c

+ 10 - 0
arch/x86/include/asm/cpu.h

@@ -7,6 +7,16 @@
 #include <linux/nodemask.h>
 #include <linux/nodemask.h>
 #include <linux/percpu.h>
 #include <linux/percpu.h>
 
 
+#ifdef CONFIG_SMP
+
+extern void prefill_possible_map(void);
+
+#else /* CONFIG_SMP */
+
+static inline void prefill_possible_map(void) {}
+
+#endif /* CONFIG_SMP */
+
 struct x86_cpu {
 struct x86_cpu {
 	struct cpu cpu;
 	struct cpu cpu;
 };
 };

+ 0 - 6
arch/x86/include/asm/smp.h

@@ -138,8 +138,6 @@ void play_dead_common(void);
 void native_send_call_func_ipi(const struct cpumask *mask);
 void native_send_call_func_ipi(const struct cpumask *mask);
 void native_send_call_func_single_ipi(int cpu);
 void native_send_call_func_single_ipi(int cpu);
 
 
-extern void prefill_possible_map(void);
-
 void smp_store_cpu_info(int id);
 void smp_store_cpu_info(int id);
 #define cpu_physical_id(cpu)	per_cpu(x86_cpu_to_apicid, cpu)
 #define cpu_physical_id(cpu)	per_cpu(x86_cpu_to_apicid, cpu)
 
 
@@ -148,10 +146,6 @@ static inline int num_booting_cpus(void)
 {
 {
 	return cpus_weight(cpu_callout_map);
 	return cpus_weight(cpu_callout_map);
 }
 }
-#else
-static inline void prefill_possible_map(void)
-{
-}
 #endif /* CONFIG_SMP */
 #endif /* CONFIG_SMP */
 
 
 extern unsigned disabled_cpus __cpuinitdata;
 extern unsigned disabled_cpus __cpuinitdata;

+ 1 - 1
arch/x86/kernel/setup.c

@@ -89,7 +89,7 @@
 
 
 #include <asm/system.h>
 #include <asm/system.h>
 #include <asm/vsyscall.h>
 #include <asm/vsyscall.h>
-#include <asm/smp.h>
+#include <asm/cpu.h>
 #include <asm/desc.h>
 #include <asm/desc.h>
 #include <asm/dma.h>
 #include <asm/dma.h>
 #include <asm/iommu.h>
 #include <asm/iommu.h>

+ 0 - 1
arch/x86/kernel/smpboot.c

@@ -53,7 +53,6 @@
 #include <asm/nmi.h>
 #include <asm/nmi.h>
 #include <asm/irq.h>
 #include <asm/irq.h>
 #include <asm/idle.h>
 #include <asm/idle.h>
-#include <asm/smp.h>
 #include <asm/trampoline.h>
 #include <asm/trampoline.h>
 #include <asm/cpu.h>
 #include <asm/cpu.h>
 #include <asm/numa.h>
 #include <asm/numa.h>