mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
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>
This commit is contained in:
+4
-2
@@ -32,6 +32,9 @@ config DEV_DAX_HMEM
|
||||
depends on EFI_SOFT_RESERVE
|
||||
select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
|
||||
default DEV_DAX
|
||||
depends on CXL_ACPI || !CXL_ACPI
|
||||
depends on CXL_PCI || !CXL_PCI
|
||||
depends on CXL_BUS || !CXL_BUS
|
||||
help
|
||||
EFI 2.8 platforms, and others, may advertise 'specific purpose'
|
||||
memory. For example, a high bandwidth memory pool. The
|
||||
@@ -48,8 +51,7 @@ config DEV_DAX_CXL
|
||||
tristate "CXL DAX: direct access to CXL RAM regions"
|
||||
depends on CXL_BUS && CXL_REGION && DEV_DAX
|
||||
default CXL_REGION && DEV_DAX
|
||||
depends on CXL_ACPI >= DEV_DAX_HMEM
|
||||
depends on CXL_PCI >= DEV_DAX_HMEM
|
||||
depends on DEV_DAX_HMEM || !DEV_DAX_HMEM
|
||||
help
|
||||
CXL RAM regions are either mapped by platform-firmware
|
||||
and published in the initial system-memory map as "System RAM", mapped
|
||||
|
||||
Reference in New Issue
Block a user