Skip to content

Commit

Permalink
[S390] smp: setup smp_processor_id early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 13, 2010
1 parent a58c26b commit 02beacc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,6 @@ setup_arch(char **cmdline_p)
setup_lowcore();

cpu_init();
__cpu_logical_map[0] = stap();
s390_init_cpu_topology();

/*
Expand Down
6 changes: 6 additions & 0 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 02beacc

Please sign in to comment.