linux-stable/arch/powerpc
Michael Ellerman 0b94d83801 powerpc/prom_init: Fixup missing powermac #size-cells
[ Upstream commit cf89c9434a ]

On some powermacs `escc` nodes are missing `#size-cells` properties,
which is deprecated and now triggers a warning at boot since commit
045b14ca5c ("of: WARN on deprecated #address-cells/#size-cells
handling").

For example:

  Missing '#size-cells' in /pci@f2000000/mac-io@c/escc@13000
  WARNING: CPU: 0 PID: 0 at drivers/of/base.c:133 of_bus_n_size_cells+0x98/0x108
  Hardware name: PowerMac3,1 7400 0xc0209 PowerMac
  ...
  Call Trace:
    of_bus_n_size_cells+0x98/0x108 (unreliable)
    of_bus_default_count_cells+0x40/0x60
    __of_get_address+0xc8/0x21c
    __of_address_to_resource+0x5c/0x228
    pmz_init_port+0x5c/0x2ec
    pmz_probe.isra.0+0x144/0x1e4
    pmz_console_init+0x10/0x48
    console_init+0xcc/0x138
    start_kernel+0x5c4/0x694

As powermacs boot via prom_init it's possible to add the missing
properties to the device tree during boot, avoiding the warning. Note
that `escc-legacy` nodes are also missing `#size-cells` properties, but
they are skipped by the macio driver, so leave them alone.

Depends-on: 045b14ca5c ("of: WARN on deprecated #address-cells/#size-cells handling")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20241126025710.591683-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 19:44:54 +01:00
..
boot powerpc/boot: Only free if realloc() succeeds 2024-09-04 13:14:56 +02:00
configs Remove DECnet support from kernel 2023-06-21 15:44:10 +02:00
crypto treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
include powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static 2024-12-14 19:44:30 +01:00
kernel powerpc/prom_init: Fixup missing powermac #size-cells 2024-12-14 19:44:54 +01:00
kvm powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-08-19 05:33:42 +02:00
lib powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static 2024-12-14 19:44:30 +01:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 13:22:44 +02:00
mm powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE 2024-02-23 08:24:53 +01:00
net powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC 2021-11-17 09:48:49 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-03-26 18:22:22 -04:00
platforms powerpc/powernv: Free name on error in opal_event_init() 2024-11-17 14:58:53 +01:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-21 15:44:10 +02:00
sysdev powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2024-09-04 13:14:54 +02:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: Fix disassembly CPU feature checks 2024-08-19 05:33:33 +02:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration 2021-05-14 09:44:26 +02:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-27 08:37:23 +02:00
Makefile powerpc: Fail build if using recordmcount with binutils v2.37 2023-07-27 08:37:34 +02:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00