Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/prom: Drop support for old FDT versions

In commit e6a6928c3ea1 ("of/fdt: Convert FDT functions to use
libfdt") (Apr 2014), the generic flat device tree code dropped support
for flat device tree's older than version 0x10 (16).

We still have code in our CPU scanning to cope with flat device tree
versions earlier than 2, which can now never trigger, so drop it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

+4 -19
+4 -19
arch/powerpc/kernel/prom.c
··· 332 332 * NOTE: This must match the parsing done in smp_setup_cpu_maps. 333 333 */ 334 334 for (i = 0; i < nthreads; i++) { 335 - /* 336 - * version 2 of the kexec param format adds the phys cpuid of 337 - * booted proc. 338 - */ 339 - if (fdt_version(initial_boot_params) >= 2) { 340 - if (be32_to_cpu(intserv[i]) == 341 - fdt_boot_cpuid_phys(initial_boot_params)) { 342 - found = boot_cpu_count; 343 - found_thread = i; 344 - } 345 - } else { 346 - /* 347 - * Check if it's the boot-cpu, set it's hw index now, 348 - * unfortunately this format did not support booting 349 - * off secondary threads. 350 - */ 351 - if (of_get_flat_dt_prop(node, 352 - "linux,boot-cpu", NULL) != NULL) 353 - found = boot_cpu_count; 335 + if (be32_to_cpu(intserv[i]) == 336 + fdt_boot_cpuid_phys(initial_boot_params)) { 337 + found = boot_cpu_count; 338 + found_thread = i; 354 339 } 355 340 #ifdef CONFIG_SMP 356 341 /* logical cpu id is always 0 on UP kernels */