Re: [PATCH v1 2/4] memblock: allow to specify flags with memblock_add_node()

2021-09-27 Thread Geert Uytterhoeven
On Mon, Sep 27, 2021 at 5:05 PM David Hildenbrand wrote: > We want to specify flags when hotplugging memory. Let's prepare to pass > flags to memblock_add_node() by adjusting all existing users. > > Note that when hotplugging memory the system is already up and running > and we don't want to add

Re: [PATCH v1 0/4] mm/memory_hotplug: full support for

2021-09-27 Thread David Hildenbrand
Intended subject was "[PATCH v1 0/4] mm/memory_hotplug: full support for add_memory_driver_managed() with CONFIG_ARCH_KEEP_MEMBLOCK" -- Thanks, David / dhildenb ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org

[PATCH v1 4/4] mm/memory_hotplug: indicate MEMBLOCK_DRIVER_MANAGED with IORESOURCE_SYSRAM_DRIVER_MANAGED

2021-09-27 Thread David Hildenbrand
Let's communicate driver-managed regions to memblock, to properly teach kexec_file with CONFIG_ARCH_KEEP_MEMBLOCK to not place images on these memory regions. Signed-off-by: David Hildenbrand --- mm/memory_hotplug.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v1 3/4] memblock: add MEMBLOCK_DRIVER_MANAGED to mimic IORESOURCE_SYSRAM_DRIVER_MANAGED

2021-09-27 Thread David Hildenbrand
Let's add a flag that corresponds to IORESOURCE_SYSRAM_DRIVER_MANAGED. Similar to MEMBLOCK_HOTPLUG, most infrastructure has to treat such memory like ordinary MEMBLOCK_NONE memory -- for example, when selecting memory regions to add to the vmcore for dumping in the crashkernel via

[PATCH v1 2/4] memblock: allow to specify flags with memblock_add_node()

2021-09-27 Thread David Hildenbrand
We want to specify flags when hotplugging memory. Let's prepare to pass flags to memblock_add_node() by adjusting all existing users. Note that when hotplugging memory the system is already up and running and we don't want to add the memory first and apply flags later: it should happen within one

[PATCH v1 1/4] mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource()

2021-09-27 Thread David Hildenbrand
If memblock_add_node() fails, we're most probably running out of memory. While this is unlikely to happen, it can happen and having memory added without a memblock can be problematic for architectures that use memblock to detect valid memory. Let's fail in a nice way instead of silently ignoring

[PATCH v1 0/4] mm/memory_hotplug: full support for

2021-09-27 Thread David Hildenbrand
Architectures that require CONFIG_ARCH_KEEP_MEMBLOCK=y, such as arm64, don't cleanly support add_memory_driver_managed() yet. Most prominently, kexec_file can still end up placing images on such driver-managed memory, resulting in undesired behavior. Teaching kexec to not place images on