On 22/08/2025 11:41, Smita Koralahalli wrote:
> Update Kconfig and runtime checks to better coordinate dax_cxl and dax_hmem
> registration.
>
> Add explicit Kconfig ordering so that CXL_ACPI and CXL_PCI must be
> initialized before DEV_DAX_HMEM.
Is this dependency statement fully accurate? To clarify, another prerequisite
for
this ordering to work correctly is that dax_hmem must explicitly call
`request_module("cxl_acpi")` and `request_module("cxl_pci")` during its
initialization.
Therefore, I recommend consolidating the following patches into a single commit
to ensure atomic handling of the initialization order:
- [PATCH 2/6] dax/hmem: Request cxl_acpi and cxl_pci before walking Soft
Reserved ranges
- [PATCH 3/6] dax/hmem, cxl: Tighten dependencies on DEV_DAX_CXL and dax_hmem
Thanks
Zhijian
> This prevents dax_hmem from consuming
> Soft Reserved ranges before CXL drivers have had a chance to claim them.
>
> Replace IS_ENABLED(CONFIG_CXL_REGION) with IS_ENABLED(CONFIG_DEV_DAX_CXL)
> so the code more precisely reflects when CXL-specific DAX coordination is
> expected.
>
> This ensures that ownership of Soft Reserved ranges is consistently
> handed off to the CXL stack when DEV_DAX_CXL is configured.