summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGregory Price <gourry@gourry.net>2026-07-12 11:45:02 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-07-25 21:50:30 -0700
commit5f50b085d42731c9daec3958f8ab27ba049d0d98 (patch)
tree776345f13bc9be9e6d1cfd69349eccaa96cfc93a /tools
parent8375f982503bc3b8fbf4cf4a90b08b98150c8253 (diff)
downloadlinux-next-5f50b085d42731c9daec3958f8ab27ba049d0d98.tar.gz
linux-next-5f50b085d42731c9daec3958f8ab27ba049d0d98.zip
dax/kmem: extract hotplug/hotremove helper functions
Refactor kmem _probe() _remove() by extracting init, cleanup, hotplug, and hot-remove logic into separate helper functions: - dax_kmem_init_resources: inits IO_RESOURCE w/ request_mem_region - dax_kmem_cleanup_resources: cleans up initialized IO_RESOURCE - dax_kmem_do_hotplug: handles memory region reservation and adding - dax_kmem_do_hotremove: handles memory removal and resource cleanup This is a pure refactoring with no functional change. The helpers will enable future extensions to support more granular control over memory hotplug operations. We need to split hotplug/hotunplug and init/cleanup in order to have the resources available for hot-add. Otherwise, when probe occurs, the dax devices are never added to sysfs because the resources are never registered. Detaching hotunplug/cleanup allows us to re-use the hotunplug code without destroying the underlying resources. Link: https://lore.kernel.org/20260712154505.3564379-9-gourry@gourry.net Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Gregory Price <gourry@gourry.net> Cc: Alison Schofield <alison.schofield@intel.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: David Hildenbrand (Arm) <david@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hannes Reinecke <hare@suse.de> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Oscar Salvador <osalvador@suse.de> Cc: Pankaj Gupta <pankaj.gupta@amd.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions