aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/prom.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5311a26dcf46..48aeb55faae9 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -278,6 +278,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
278 int i, nthreads; 278 int i, nthreads;
279 unsigned long len; 279 unsigned long len;
280 int found = -1; 280 int found = -1;
281 int found_thread = 0;
281 282
282 /* We are scanning "cpu" nodes only */ 283 /* We are scanning "cpu" nodes only */
283 if (type == NULL || strcmp(type, "cpu") != 0) 284 if (type == NULL || strcmp(type, "cpu") != 0)
@@ -301,9 +302,11 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
301 * version 2 of the kexec param format adds the phys cpuid of 302 * version 2 of the kexec param format adds the phys cpuid of
302 * booted proc. 303 * booted proc.
303 */ 304 */
304 if (initial_boot_params && initial_boot_params->version >= 2) { 305 if (initial_boot_params->version >= 2) {
305 if (intserv[i] == initial_boot_params->boot_cpuid_phys) 306 if (intserv[i] == initial_boot_params->boot_cpuid_phys) {
306 found = boot_cpu_count; 307 found = boot_cpu_count;
308 found_thread = i;
309 }
307 } else { 310 } else {
308 /* 311 /*
309 * Check if it's the boot-cpu, set it's hw index now, 312 * Check if it's the boot-cpu, set it's hw index now,
@@ -322,9 +325,9 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
322 325
323 if (found >= 0) { 326 if (found >= 0) {
324 DBG("boot cpu: logical %d physical %d\n", found, 327 DBG("boot cpu: logical %d physical %d\n", found,
325 intserv[i]); 328 intserv[found_thread]);
326 boot_cpuid = found; 329 boot_cpuid = found;
327 set_hard_smp_processor_id(found, intserv[i]); 330 set_hard_smp_processor_id(found, intserv[found_thread]);
328 331
329 /* 332 /*
330 * PAPR defines "logical" PVR values for cpus that 333 * PAPR defines "logical" PVR values for cpus that