summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-01-13 20:44:34 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-13 20:44:45 +0100
commit02beaccc901b7a28ac1de79f3ed122f5fda220b1 (patch)
tree77c36cd14b9ce1324ff6127a4bdb19e312fef7e2 /arch/s390/kernel/smp.c
parent[S390] use helpers for rlimits (diff)
downloadlinux-02beaccc901b7a28ac1de79f3ed122f5fda220b1.tar.xz
linux-02beaccc901b7a28ac1de79f3ed122f5fda220b1.zip
[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 <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 93e52039321b..eebce7fdc97c 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.