Re: [PATCH v4 1/2] mm/memory_hotplug: Add support to accept memory during hot-add
From: David Hildenbrand (arm)
Date: Wed Feb 04 2026 - 15:01:25 EST
#endif
static inline bool pfn_is_unaccepted_memory(unsigned long pfn)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index a63ec679d861..549ccfd190ee 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1567,6 +1567,8 @@ int add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)
if (!strcmp(res->name, "System RAM"))
firmware_map_add_hotplug(start, start + size, "System RAM");
+ accept_hotplug_memory(start, size);
+
/* device_online() will take the lock when calling online_pages() */
mem_hotplug_done();
I really hate that accepting (and un-accepting) hotplugged memory is different to accepting ordinary boot memory.
Is there really no way we can get a reasonable implementation where we just call a generic accept_memory() and it will know what to do?
--
Cheers,
David