Skip to content

Commit 1c7431b

Browse files
Russell King (Oracle)hdeller
authored andcommitted
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>
1 parent 86bb854 commit 1c7431b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/parisc/kernel/smp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,7 @@ static int smp_boot_one_cpu(int cpuid, struct task_struct *idle)
404404

405405
void __init smp_prepare_boot_cpu(void)
406406
{
407-
int bootstrap_processor = per_cpu(cpu_data, 0).cpuid;
408-
409-
/* Setup BSP mappings */
410-
printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
411-
412-
set_cpu_online(bootstrap_processor, true);
413-
set_cpu_present(bootstrap_processor, true);
407+
pr_info("SMP: bootstrap CPU ID is 0\n");
414408
}
415409

416410

0 commit comments

Comments
 (0)