linux/drivers/of
Rob Herring b30be4dc73 of: Add a common kexec FDT setup function
Both arm64 and powerpc do essentially the same FDT /chosen setup for
kexec.  The differences are either omissions that arm64 should have
or additional properties that will be ignored.  The setup code can be
combined and shared by both powerpc and arm64.

The differences relative to the arm64 version:
 - If /chosen doesn't exist, it will be created (should never happen).
 - Any old dtb and initrd reserved memory will be released.
 - The new initrd and elfcorehdr are marked reserved.
 - "linux,booted-from-kexec" is set.

The differences relative to the powerpc version:
 - "kaslr-seed" and "rng-seed" may be set.
 - "linux,elfcorehdr" is set.
 - Any existing "linux,usable-memory-range" is removed.

Combine the code for setting up the /chosen node in the FDT and updating
the memory reservation for kexec, for powerpc and arm64, in
of_kexec_alloc_and_setup_fdt() and move it to "drivers/of/kexec.c".

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210221174930.27324-6-nramas@linux.microsoft.com
2021-03-08 12:06:29 -07:00
..
unittest-data of: unittest: Use bigger address cells to catch parser regressions 2020-08-03 16:24:49 -06:00
address.c arm64 updates for 5.11: 2020-12-14 16:24:30 -08:00
base.c of: base: improve error msg in of_phandle_iterator_next() 2021-01-15 11:26:09 -06:00
device.c Devicetree updates for v5.12: 2021-02-22 10:05:12 -08:00
dynamic.c driver core: Add fwnode link support 2020-12-09 19:10:21 +01:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
fdt.c of/fdt: Make sure no-map does not remove already reserved regions 2021-01-15 11:30:14 -06:00
irq.c of/irq: Make of_msi_map_rid() PCI bus agnostic 2020-07-28 15:51:32 +01:00
Kconfig net: phy: Move of_mdio from drivers/of to drivers/net/mdio 2020-10-10 10:55:05 -07:00
kexec.c of: Add a common kexec FDT setup function 2021-03-08 12:06:29 -07:00
kobj.c of: Fix a refcounting bug in __of_attach_node_sysfs() 2020-05-27 19:30:25 -06:00
Makefile of: Add a common kexec FDT setup function 2021-03-08 12:06:29 -07:00
of_net.c net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
of_numa.c of, numa: Validate some distance map rules 2018-11-08 12:44:34 -06:00
of_private.h dma-mapping: introduce DMA range map, supplanting dma_pfn_offset 2020-09-17 18:43:56 +02:00
of_reserved_mem.c of: Fix reserved-memory overlap detection 2020-10-25 20:37:55 -05:00
overlay.c of: overlay: kmemleak in dup_and_fixup_symbol_prop() 2020-04-17 08:31:34 -05:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
property.c of: property: fw_devlink: Ignore interrupts property for some configs 2021-02-19 08:51:01 +01:00
resolver.c of: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c of: Remove of_dev_{get,put}() 2021-02-12 19:23:39 -06:00