One part of this patch got included into 2.2.8, there is a repost of the
second part of the patch vs. 2.3.0.
Manfred Spraul wrote:
> [...]
> * initialize_secondary() is only required for
> the i386 architecture, but it's called from /init/main.c:start_kernel()
> I've removed that call and moved it into arch/i386/kernel/head.S
> (check for 'initialize_secondary' in arch/*/kernel/smp.c: all other
> smp implementations complain about this function)
>
> The changes were tested on SMP, UP - i386.
Regards,
Manfred
diff -r -u -P -x CVS -x *,v 2.3.0/arch/i386/kernel/head.S
build-2.3/arch/i386/kernel/head.S
--- 2.3.0/arch/i386/kernel/head.S Fri Jan 15 07:57:25 1999
+++ build-2.3/arch/i386/kernel/head.S Thu May 13 13:57:58 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.0/init/main.c build-2.3/init/main.c
--- 2.3.0/init/main.c Wed May 12 19:39:24 1999
+++ build-2.3/init/main.c Thu May 13 13:59:07 1999
@@ -1108,8 +1108,6 @@
#endif
-extern void initialize_secondary(void);
-
/*
* Activate the first processor.
*/
@@ -1117,14 +1115,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