diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-10-20 15:45:30 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-10-30 14:54:41 +0100 |
commit | 1c7431b39a9ca14f7d3d57fce80838c8550b7db3 (patch) | |
tree | 33b7e67626aaff525678fd86e37a9febd070be16 /arch/parisc/kernel | |
parent | 86bb854d134f4429feb35d2e05f55c6e036770d2 (diff) | |
download | lwn-1c7431b39a9ca14f7d3d57fce80838c8550b7db3.tar.gz lwn-1c7431b39a9ca14f7d3d57fce80838c8550b7db3.zip |
parisc: simplify smp_prepare_boot_cpu()
smp_prepare_boot_cpu() reads the cpuid of the first CPU, printing a
message to state which processor booted, and setting it online and
present.
This cpuid is retrieved from per_cpu(cpu_data, 0).cpuid, which is
initialised in arch/parisc/kernel/processor.c:processor_probe() thusly:
p = &per_cpu(cpu_data, cpuid);
...
p->cpuid = cpuid; /* save CPU id */
Consequently, the cpuid retrieved seems to be guaranteed to also be
zero, meaning that the message printed in this boils down to:
pr_info("SMP: bootstrap CPU ID is 0\n");
Moreover, since kernel/cpu.c::boot_cpu_init() already sets CPU 0 to
be present and online, there is no need to do this again in
smp_prepare_boot_cpu().
Remove this code, and simplify the printk().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r-- | arch/parisc/kernel/smp.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 2019c1f04bd0..444154271f23 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -404,13 +404,7 @@ alive: void __init smp_prepare_boot_cpu(void) { - int bootstrap_processor = per_cpu(cpu_data, 0).cpuid; - - /* Setup BSP mappings */ - printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor); - - set_cpu_online(bootstrap_processor, true); - set_cpu_present(bootstrap_processor, true); + pr_info("SMP: bootstrap CPU ID is 0\n"); } |