Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dax/cxl: Fix HMEM dependencies

The expectation is that DEV_DAX_HMEM=y should be disallowed if any of
CXL_ACPI, or CXL_PCI are set =m. Also DEV_DAX_CXL=y should be disallowed if
DEV_DAX_HMEM=m. Use "$config || !$config" syntax for each dependency.
Otherwise, the invalid DEV_DAX_HMEM=m && DEV_DAX_CXL=y configuration is
allowed.

Lastly, dax_hmem depends on the availability of the
cxl_region_contains_resource() symbol published by the cxl_core.ko module.
So, also prevent DEV_DAX_HMEM from being built-in when the cxl_core module
is not built-in.

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-3-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>

authored by

Dan Williams and committed by
Dave Jiang
1eaef15b 87805c32

+4 -2
+4 -2
drivers/dax/Kconfig
··· 32 32 depends on EFI_SOFT_RESERVE 33 33 select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS 34 34 default DEV_DAX 35 + depends on CXL_ACPI || !CXL_ACPI 36 + depends on CXL_PCI || !CXL_PCI 37 + depends on CXL_BUS || !CXL_BUS 35 38 help 36 39 EFI 2.8 platforms, and others, may advertise 'specific purpose' 37 40 memory. For example, a high bandwidth memory pool. The ··· 51 48 tristate "CXL DAX: direct access to CXL RAM regions" 52 49 depends on CXL_BUS && CXL_REGION && DEV_DAX 53 50 default CXL_REGION && DEV_DAX 54 - depends on CXL_ACPI >= DEV_DAX_HMEM 55 - depends on CXL_PCI >= DEV_DAX_HMEM 51 + depends on DEV_DAX_HMEM || !DEV_DAX_HMEM 56 52 help 57 53 CXL RAM regions are either mapped by platform-firmware 58 54 and published in the initial system-memory map as "System RAM", mapped