]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl_test: Limit location for fake CFMWS to mappable range
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 27 May 2025 15:34:51 +0000 (16:34 +0100)
committerDave Jiang <dave.jiang@intel.com>
Mon, 30 Jun 2025 23:36:06 +0000 (16:36 -0700)
commit60da1f685a94bc9bd94caf46d953cfa43468c29e
treef7976fe7bcc6085ea8a7a4bb06e427e781c33378
parent38b502e0a65215ddefaf84b672ec3908af97bacf
cxl_test: Limit location for fake CFMWS to mappable range

Some architectures (e.g. arm64) only support memory hotplug operations on
a restricted set of physical addresses. This applies even when we are
faking some CXL fixed memory windows for the purposes of cxl_test.
That range can be queried with mhp_get_pluggable_range(true). Use the
minimum of that the top of that range and iomem_resource.end to establish
the 64GiB region used by cxl_test.

From thread #2 which was related to the issue in #1.

[ dj: Add CONFIG_MEMORY_HOTPLUG config check, from Alison ]

Link: https://lore.kernel.org/linux-cxl/20250522145622.00002633@huawei.com/
Reported-by: Itaru Kitayama <itaru.kitayama@linux.dev>
Closes: https://github.com/pmem/ndctl/issues/278 #1
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Itaru Kitayama <itaru.kitayama@fujitsu.com <mailto:itaru.kitayama@fujitsu.com>
Tested-by: Marc Herbert <marc.herbert@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20250527153451.82858-1-Jonathan.Cameron@huawei.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
tools/testing/cxl/config_check.c
tools/testing/cxl/test/cxl.c