I've noticed several hacks in the SMP startup:

* arch/i386/kernel/smp.c:
- the file contains a "extern unsigned long start_kernel"
start_kernel is a function, and not an 'unsigned long'.
additionally, the extern is superfluous.
* setup_arch():
the function contains a static variable 'smp_trap',
and it returns immediately if the function is called
for the second time.
This is superfluous, the function is only called once.
(even without the my patch)
* 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.

patch against 2.2.7, tested with egcs (Redhat removed gcc2.7)
Regard,
        Manfred

patch-SMPCLEANUP-2.2.7

Reply via email to