Messages in this thread Patch in this message | | | Date | Wed, 02 Jun 1999 14:48:06 +0200 | From | Manfred Spraul <> | Subject | [PATCH] move initialize_secondary() from start_kernel() into arch/i386/... |
| |
initialize_secondary() is only required by i386, the other architectures do not need this function. (actually, they complain about the function, see linux/arch/*/kernel/smp.c)
This patch moves the call from linux/init/main.c:start_kernel() into arch/i386/kernel/head.S.
* tested on dual-PII * I did not remove the initialize_secondary() functions from arch/{alpha, ppc, sparc, sparc64} because I've heard that the most up to date versions are maintained in individual CVS trees. -- Manfred// $Header: /pub/cvs/ms/patches/patch-SMPCLEANUP-2.3.4,v 1.1 1999/06/02 12:31:59 ms Exp $ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 3 // SUBLEVEL = 4 // EXTRAVERSION = diff -r -u -P -x CVS -x *,v 2.3/arch/i386/kernel/head.S build-2.3/arch/i386/kernel/head.S --- 2.3/arch/i386/kernel/head.S Fri Jan 15 07:57:25 1999 +++ build-2.3/arch/i386/kernel/head.S Wed Jun 2 14:24:36 1999 @@ -242,6 +242,14 @@ xorl %eax,%eax lldt %ax cld # gcc2 wants the direction flag cleared at all times +#ifdef __SMP__ + movb ready, %cl + cmpb $1,%cl + je 1f + call SYMBOL_NAME(initialize_secondary) + jmp L6 +1: +#endif call SYMBOL_NAME(start_kernel) L6: jmp L6 # main should never return here, but diff -r -u -P -x CVS -x *,v 2.3/init/main.c build-2.3/init/main.c --- 2.3/init/main.c Wed May 19 14:20:14 1999 +++ build-2.3/init/main.c Wed Jun 2 14:24:36 1999 @@ -1116,8 +1116,6 @@ #endif -extern void initialize_secondary(void); - /* * Activate the first processor. */ @@ -1125,14 +1123,6 @@ asmlinkage void __init start_kernel(void) { char * command_line; - -#ifdef __SMP__ - static int boot_cpu = 1; - /* "current" has been set up, we need to load it now */ - if (!boot_cpu) - initialize_secondary(); - boot_cpu = 0; -#endif /* * Interrupts are still disabled. Do necessary setups, then
| |