From: Heiko Carstens Date: Wed, 13 Jan 2010 19:44:34 +0000 (+0100) Subject: [S390] smp: setup smp_processor_id early X-Git-Tag: v2.6.33-rc5~70^2~10 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=02beaccc901b7a28ac1de79f3ed122f5fda220b1;p=net-next-2.6.git [S390] smp: setup smp_processor_id early smp_processor_id() is supposed to work before setup_arch() gets called. Before that smp_processor_id() may return just an arbitrary value that is contained in the uninitialized boot lowcore. So provide the arch function which will override the weak function in init/main.c. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 2148ad3d490..2d6a265b014 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -849,7 +849,6 @@ setup_arch(char **cmdline_p) setup_lowcore(); cpu_init(); - __cpu_logical_map[0] = stap(); s390_init_cpu_topology(); /* diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 93e52039321..eebce7fdc97 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -717,6 +717,12 @@ void __init smp_cpus_done(unsigned int max_cpus) { } +void __init smp_setup_processor_id(void) +{ + S390_lowcore.cpu_nr = 0; + __cpu_logical_map[0] = stap(); +} + /* * the frequency of the profiling timer can be changed * by writing a multiplier value into /proc/profile.