Skip to content

Commit 6055f6c

Browse files
committed
x86/smpboot: Make error message actually useful
"smpboot: native_kick_ap: bad cpu 33" is absolutely useless information. Replace it with something meaningful which allows to decode the failure condition. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Michael Kelley <[email protected]> Tested-by: Sohil Mehta <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7253046 commit 6055f6c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,13 @@ int native_kick_ap(unsigned int cpu, struct task_struct *tidle)
10721072

10731073
pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu);
10741074

1075-
if (apicid == BAD_APICID || !test_bit(apicid, phys_cpu_present_map) ||
1076-
!apic_id_valid(apicid)) {
1077-
pr_err("%s: bad cpu %d\n", __func__, cpu);
1075+
if (apicid == BAD_APICID || !apic_id_valid(apicid)) {
1076+
pr_err("CPU %u has invalid APIC ID %x. Aborting bringup\n", cpu, apicid);
1077+
return -EINVAL;
1078+
}
1079+
1080+
if (!test_bit(apicid, phys_cpu_present_map)) {
1081+
pr_err("CPU %u APIC ID %x is not present. Aborting bringup\n", cpu, apicid);
10781082
return -EINVAL;
10791083
}
10801084

0 commit comments

Comments
 (0)