]> www.infradead.org Git - users/jedix/linux-maple.git/commit
acpi/hmat / cxl: Add extended linear cache support for CXL
authorDave Jiang <dave.jiang@intel.com>
Wed, 26 Feb 2025 16:21:19 +0000 (09:21 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 26 Feb 2025 20:45:22 +0000 (13:45 -0700)
commit0ec9849b63338da7883440ed3f52757cd8c847b1
treeebfd914c44b027a5595bcd8f3bddf1e041179a97
parent84b25926fa7abb5b634d4af9544f47ab0aabc399
acpi/hmat / cxl: Add extended linear cache support for CXL

The current cxl region size only indicates the size of the CXL memory
region without accounting for the extended linear cache size. Retrieve the
cache size from HMAT and append that to the cxl region size for the cxl
region range that matches the SRAT range that has extended linear cache
enabled.

The SRAT defines the whole memory range that includes the extended linear
cache and the CXL memory region. The new HMAT ECN/ECR to the Memory Side
Cache Information Structure defines the size of the extended linear cache
size and matches to the SRAT Memory Affinity Structure by the memory
proxmity domain. Add a helper to match the cxl range to the SRAT memory
range in order to retrieve the cache size.

There are several places that checks the cxl region range against the
decoder range. Use new helper to check between the two ranges and address
the new cache size.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20250226162224.3633792-3-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/acpi/numa/hmat.c
drivers/cxl/core/Makefile
drivers/cxl/core/acpi.c [new file with mode: 0644]
drivers/cxl/core/core.h
drivers/cxl/core/region.c
drivers/cxl/cxl.h
include/linux/acpi.h
tools/testing/cxl/Kbuild