summaryrefslogtreecommitdiff
path: root/tools/testing/cxl/test/mock.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2025-11-17 11:05:47 -0700
committerDave Jiang <dave.jiang@intel.com>2025-11-17 11:05:47 -0700
commit7ec9db66cc552f2f8a6779c16d01a2a01eccedde (patch)
tree3ae5aeff00d4915cd99e9614407cb4c91dd63dec /tools/testing/cxl/test/mock.c
parent33bedb92d26b746f00269fd5d04aab74480d2a06 (diff)
parent68f4a852e18329e84bb5d36168a45b0a52cdf236 (diff)
Merge branch 'for-6.19/cxl-elc-test' into cxl-for-next
Extended linear cache unit testing support - Standardize CXL auto region size - Add cxl_test CFMWS support for extended linear cache - Add support for acpi extended linear cache
Diffstat (limited to 'tools/testing/cxl/test/mock.c')
-rw-r--r--tools/testing/cxl/test/mock.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/testing/cxl/test/mock.c b/tools/testing/cxl/test/mock.c
index 6fd4edb9215c..6eb15991a414 100644
--- a/tools/testing/cxl/test/mock.c
+++ b/tools/testing/cxl/test/mock.c
@@ -111,6 +111,26 @@ acpi_status __wrap_acpi_evaluate_integer(acpi_handle handle,
}
EXPORT_SYMBOL(__wrap_acpi_evaluate_integer);
+int __wrap_hmat_get_extended_linear_cache_size(struct resource *backing_res,
+ int nid,
+ resource_size_t *cache_size)
+{
+ int index, rc;
+ struct cxl_mock_ops *ops = get_cxl_mock_ops(&index);
+
+ if (ops)
+ rc = ops->hmat_get_extended_linear_cache_size(backing_res, nid,
+ cache_size);
+ else
+ rc = hmat_get_extended_linear_cache_size(backing_res, nid,
+ cache_size);
+
+ put_cxl_mock_ops(index);
+
+ return rc;
+}
+EXPORT_SYMBOL_GPL(__wrap_hmat_get_extended_linear_cache_size);
+
struct acpi_pci_root *__wrap_acpi_pci_find_root(acpi_handle handle)
{
int index;