diff options
| author | Dan Williams <djbw@kernel.org> | 2026-05-19 14:01:58 -0700 |
|---|---|---|
| committer | Dave Jiang <dave.jiang@intel.com> | 2026-06-12 13:47:30 -0700 |
| commit | d8dcb0b74b045e36d627935a959c3cf4c8cb2f7c (patch) | |
| tree | 7cbc745a96846eafbbad4438361fd826ba3a1aa6 /drivers/phy/spacemit/git@git.tavy.me:linux.git | |
| parent | 2ed519c21bb4fbac5d544ef4b1f98d515b18036d (diff) | |
cxl/region: Introduce devm_cxl_probe_mem()
To date, platform firmware maps accelerator memory and accelerator drivers
simply want an address range that they can map themselves. This typically
results in a single region being auto-assembled upon registration of a
memory device. Use the @attach mechanism of devm_cxl_add_memdev()
parameter to retrieve that region while also adhering to CXL subsystem
locking and lifetime rules. As part of adhering to current object lifetime
rules, if the region or the CXL port topology is invalidated, the CXL core
arranges for the accelertor driver to be detached as well.
The locking and lifetime rules were validated with Dave's work-in-progress
cxl-type-2 support for cxl_test.
devm_cxl_add_classdev() supports the general memory expansion flow where
region assembly is optional, dynamic, and user controlled.
Cc: Alejandro Lucero <alucerop@amd.com>
Signed-off-by: Dan Williams <djbw@kernel.org>
Reviewed-by: Alejandro Lucero <alucerop@amd.com>
Tested-by: Alejandro Lucero <alucerop@amd.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260519210158.1499795-6-djbw@kernel.org
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/phy/spacemit/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
