linux/drivers/cxl
Dave Jiang 84c3b52cf6 cxl: Fix match_region_by_range() to use region_res_match_cxl_range()
[ Upstream commit f4d027921c ]

match_region_by_range() is not using the helper function that also takes
extended linear cache size into account when comparing regions. This
causes a x2 region to show up as 2 partial incomplete regions rather
than a single CXL region with extended linear cache support. Replace
the open coded compare logic with the proper helper function for
comparison. User visible impact is that when 'cxl list' is issued,
no activa CXL region(s) are shown. There may be multiple idle regions
present. No actual active CXL region is present in the kernel.

[dj: Fix stable address]

Fixes: 0ec9849b63 ("acpi/hmat / cxl: Add extended linear cache support for CXL")
Cc: stable@vger.kernel.org
Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
[ constify struct range ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-23 16:24:40 +02:00
..
core cxl: Fix match_region_by_range() to use region_res_match_cxl_range() 2025-10-23 16:24:40 +02:00
acpi.c cxl/acpi: Fix setup of memory resource in cxl_acpi_set_cache_size() 2025-10-23 16:24:24 +02:00
cxl.h cxl for v6.17 2025-08-01 15:47:06 -07:00
cxlmem.h Merge branch 'for-6.17/cxl-events-updates' into cxl-for-next 2025-07-18 16:15:44 -07:00
cxlpci.h cxl/pci: Support Global Persistent Flush (GPF) 2025-03-14 15:50:22 -07:00
Kconfig cxl/edac: Support for finding memory operation attributes from the current boot 2025-05-23 13:24:38 -07:00
Makefile cxl/port: Fix CXL port initialization order when the subsystem is built-in 2024-10-25 16:06:49 -05:00
mem.c cxl/edac: Add CXL memory device patrol scrub control feature 2025-05-23 13:24:09 -07:00
pci.c cxl/pci: Replace mutex_lock_io() w mutex_lock() for mailbox access 2025-06-30 16:36:06 -07:00
pmem.c cxl/pci: Drop the parameter is_port of cxl_gpf_get_dvsec() 2025-04-09 12:48:18 -07:00
pmu.h cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
security.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00