Skip to contentSkip to conversation

cpu_callout_map cleanups

PATCH In review Adrian Bunk 2 participants 2 messages Jul 7, 2007 – Jul 9, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpu_callout_map cleanups

This patch contains the following cleanups regarding cpu_callout_map:
- i386/x86_64: removed unused EXPORT_SYMBOL's
- m32r: made static
- mips: removed extern for non-existing variable from header

---

 arch/i386/kernel/smpboot.c           |    1 -
 arch/i386/mach-voyager/voyager_smp.c |    1 -
 arch/m32r/kernel/smpboot.c           |    3 +--
 arch/x86_64/kernel/smpboot.c         |    2 --
 include/asm-m32r/smp.h               |    6 ------
 include/asm-mips/smp.h               |    7 -------
 6 files changed, 1 insertion(+), 19 deletions(-)
arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c.old +0 -1
@@ -83,7 +83,6 @@
 
 cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
-EXPORT_SYMBOL(cpu_callout_map);
 cpumask_t cpu_possible_map;
 EXPORT_SYMBOL(cpu_possible_map);
 static cpumask_t smp_commenced_mask;
arch/i386/mach-voyager/voyager_smp.c renamed from arch/i386/mach-voyager/voyager_smp.c.old +0 -1
@@ -235,7 +235,6 @@
 /* This is for the new dynamic CPU boot code */
 cpumask_t cpu_callin_map = CPU_MASK_NONE;
 cpumask_t cpu_callout_map = CPU_MASK_NONE;
-EXPORT_SYMBOL(cpu_callout_map);
 cpumask_t cpu_possible_map = CPU_MASK_NONE;
 EXPORT_SYMBOL(cpu_possible_map);
 
include/asm-m32r/smp.h renamed from include/asm-m32r/smp.h.old +0 -6
@@ -62,7 +62,6 @@
 
 #define raw_smp_processor_id()	(current_thread_info()->cpu)
 
-extern cpumask_t cpu_callout_map;
 extern cpumask_t cpu_possible_map;
 extern cpumask_t cpu_present_map;
 
@@ -81,11 +80,6 @@
 	return cpu;
 }
 
-static __inline__ unsigned int num_booting_cpus(void)
-{
-	return cpus_weight(cpu_callout_map);
-}
-
 extern void smp_send_timer(void);
 extern unsigned long send_IPI_mask_phys(cpumask_t, int, int);
 
arch/m32r/kernel/smpboot.c renamed from arch/m32r/kernel/smpboot.c.old +1 -2
@@ -77,8 +77,7 @@
 cpumask_t cpu_bootout_map;
 cpumask_t cpu_bootin_map;
 static cpumask_t cpu_callin_map;
-cpumask_t cpu_callout_map;
-EXPORT_SYMBOL(cpu_callout_map);
+static cpumask_t cpu_callout_map;
 cpumask_t cpu_possible_map = CPU_MASK_ALL;
 EXPORT_SYMBOL(cpu_possible_map);
 
include/asm-mips/smp.h renamed from include/asm-mips/smp.h.old +0 -7
@@ -49,13 +49,6 @@
 extern cpumask_t phys_cpu_present_map;
 #define cpu_possible_map	phys_cpu_present_map
 
-extern cpumask_t cpu_callout_map;
-/* We don't mark CPUs online until __cpu_up(), so we need another measure */
-static inline int num_booting_cpus(void)
-{
-	return cpus_weight(cpu_callout_map);
-}
-
 /*
  * These are defined by the board-specific code.
  */
arch/x86_64/kernel/smpboot.c renamed from arch/x86_64/kernel/smpboot.c.old +0 -2
@@ -78,8 +78,6 @@
  */
 cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
-EXPORT_SYMBOL(cpu_callout_map);
-
 cpumask_t cpu_possible_map;
 EXPORT_SYMBOL(cpu_possible_map);
 
#1 lore raw
Quoted 1 line · Adrian Bunk

- mips: removed extern for non-existing variable from header

There also is

include/linux/smp.h:#define num_booting_cpus() 1

but num_booting_cpus() is only ever being used in i386-specific code.

I'm going to merge the MIPS bits of your patch.

Ralf