aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index dd72bebd708a..668aa4791fd7 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -347,45 +347,45 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
347#endif 347#endif
348 } 348 }
349 349
350 if (found >= 0) { 350 /* Not the boot CPU */
351 DBG("boot cpu: logical %d physical %d\n", found, 351 if (found < 0)
352 be32_to_cpu(intserv[found_thread])); 352 return 0;
353 boot_cpuid = found;
354 set_hard_smp_processor_id(found,
355 be32_to_cpu(intserv[found_thread]));
356 353
357 /* 354 DBG("boot cpu: logical %d physical %d\n", found,
358 * PAPR defines "logical" PVR values for cpus that 355 be32_to_cpu(intserv[found_thread]));
359 * meet various levels of the architecture: 356 boot_cpuid = found;
360 * 0x0f000001 Architecture version 2.04 357 set_hard_smp_processor_id(found, be32_to_cpu(intserv[found_thread]));
361 * 0x0f000002 Architecture version 2.05
362 * If the cpu-version property in the cpu node contains
363 * such a value, we call identify_cpu again with the
364 * logical PVR value in order to use the cpu feature
365 * bits appropriate for the architecture level.
366 *
367 * A POWER6 partition in "POWER6 architected" mode
368 * uses the 0x0f000002 PVR value; in POWER5+ mode
369 * it uses 0x0f000001.
370 */
371 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
372 if (prop && (be32_to_cpup(prop) & 0xff000000) == 0x0f000000)
373 identify_cpu(0, be32_to_cpup(prop));
374 358
375 identical_pvr_fixup(node); 359 /*
376 } 360 * PAPR defines "logical" PVR values for cpus that
361 * meet various levels of the architecture:
362 * 0x0f000001 Architecture version 2.04
363 * 0x0f000002 Architecture version 2.05
364 * If the cpu-version property in the cpu node contains
365 * such a value, we call identify_cpu again with the
366 * logical PVR value in order to use the cpu feature
367 * bits appropriate for the architecture level.
368 *
369 * A POWER6 partition in "POWER6 architected" mode
370 * uses the 0x0f000002 PVR value; in POWER5+ mode
371 * it uses 0x0f000001.
372 */
373 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
374 if (prop && (be32_to_cpup(prop) & 0xff000000) == 0x0f000000)
375 identify_cpu(0, be32_to_cpup(prop));
376
377 identical_pvr_fixup(node);
377 378
378 check_cpu_feature_properties(node); 379 check_cpu_feature_properties(node);
379 check_cpu_pa_features(node); 380 check_cpu_pa_features(node);
380 check_cpu_slb_size(node); 381 check_cpu_slb_size(node);
381 382
382#ifdef CONFIG_PPC_PSERIES 383#ifdef CONFIG_PPC64
383 if (nthreads > 1) 384 if (nthreads > 1)
384 cur_cpu_spec->cpu_features |= CPU_FTR_SMT; 385 cur_cpu_spec->cpu_features |= CPU_FTR_SMT;
385 else 386 else
386 cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; 387 cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT;
387#endif 388#endif
388
389 return 0; 389 return 0;
390} 390}
391 391
@@ -747,6 +747,10 @@ void __init early_init_devtree(void *params)
747 * (altivec support, boot CPU ID, ...) 747 * (altivec support, boot CPU ID, ...)
748 */ 748 */
749 of_scan_flat_dt(early_init_dt_scan_cpus, NULL); 749 of_scan_flat_dt(early_init_dt_scan_cpus, NULL);
750 if (boot_cpuid < 0) {
751 printk("Failed to indentify boot CPU !\n");
752 BUG();
753 }
750 754
751#if defined(CONFIG_SMP) && defined(CONFIG_PPC64) 755#if defined(CONFIG_SMP) && defined(CONFIG_PPC64)
752 /* We'll later wait for secondaries to check in; there are 756 /* We'll later wait for secondaries to check in; there are