diff options
-rw-r--r-- | arch/powerpc/kernel/prom.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index ea50a7ecd81b..668aa4791fd7 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -347,33 +347,34 @@ 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); |
@@ -385,7 +386,6 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
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 | ||