[PATCH] minor cleanup in arch/i386/kernel/

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Tue Apr 25 2000 - 18:55:51 EST


arch/i386/kernel/setup.c increments a counter cpus_initialized
for each new cpu which is initialized. However, this variable
is never actually _used_ for anything.

setup.c also maintains a bitmask of all initialized cpus in
cpu_initialized. This variable should be declared static and
__initdata since it's only referenced from cpu_init(), which
is declared __init.

The patch below (against 2.3.99-pre5) cleans up these little uglies.

/Mikael

--- linux-2.3.99-pre5/arch/i386/kernel/process.c.~1~ Sat Mar 11 16:01:20 2000
+++ linux-2.3.99-pre5/arch/i386/kernel/process.c Sat Apr 15 13:46:20 2000
@@ -589,7 +589,6 @@
  * More important, however, is the fact that this allows us much
  * more flexibility.
  */
-extern int cpus_initialized;
 void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
 {
         struct thread_struct *prev = &prev_p->thread,
--- linux-2.3.99-pre5/arch/i386/kernel/setup.c.~1~ Wed Apr 12 22:00:57 2000
+++ linux-2.3.99-pre5/arch/i386/kernel/setup.c Sat Apr 15 13:46:20 2000
@@ -1531,8 +1531,7 @@
         return p - buffer;
 }
 
-int cpus_initialized = 0;
-unsigned long cpu_initialized = 0;
+static unsigned long cpu_initialized __initdata = 0;
 
 /*
  * cpu_init() initializes state that is per-CPU. Some data is already
@@ -1549,7 +1548,6 @@
                 printk("CPU#%d already initialized!\n", nr);
                 for (;;) __sti();
         }
- cpus_initialized++;
         printk("Initializing CPU#%d\n", nr);
 
         if (cpu_has_vme || cpu_has_tsc || cpu_has_de)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:10 EST