]> git.ipfire.org Git - thirdparty/linux.git/commit
dax/hmem: Fix singleton confusion between dax_hmem_work and hmem devices
authorDan Williams <dan.j.williams@intel.com>
Fri, 27 Mar 2026 05:28:18 +0000 (22:28 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 1 Apr 2026 15:12:18 +0000 (08:12 -0700)
commitf8dc1bde187310e0345beb08df949e0c2a4c86ce
tree8257762b0dfc56083f56a43c8542a6572fb14047
parent3cba30eed56df3af80ae8d4fde9cf4039eace82a
dax/hmem: Fix singleton confusion between dax_hmem_work and hmem devices

dax_hmem (ab)uses a platform device to allow for a module to autoload in
the presence of "Soft Reserved" resources. The dax_hmem driver had no
dependencies on the "hmem_platform" device being a singleton until the
recent "dax_hmem vs dax_cxl" takeover solution.

Replace the layering violation of dax_hmem_work assuming that there will
never be more than one "hmem_platform" device associated with a global work
item with a dax_hmem local workqueue that can theoretically support any
number of hmem_platform devices.

Fixup the reference counting to only pin the device while it is live in the
queue.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260327052821.440749-7-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/dax/bus.h
drivers/dax/hmem/device.c
drivers/dax/hmem/hmem.c