linux/drivers/cxl/core
Alison Schofield e46f25f5a8 cxl/region: Test CXL_DECODER_F_NORMALIZED_ADDRESSING as a bitmask
The CXL decoder flags are defined as bitmasks, not bit indices.
Using test_bit() to check them interprets the mask value as a bit
index, which is the wrong test.

For CXL_DECODER_F_NORMALIZED_ADDRESSING the test reads beyond the
flags word, making the flag sometimes appear set and blocking creation
of CXL region debugfs attributes that support poison operations.

Replace test_bit() with a bitmask check.

Found with cxl-test.

Fixes: 208f432406 ("cxl: Disable HPA/SPA translation handlers for Normalized Addressing")
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Gregory Price <gourry@gourry.net>
Tested-by: Gregory Price <gourry@gourry.net>
Link: https://patch.msgid.link/63fe4a6203e40e404347f1cdc7a1c55cb4959b86.1771873256.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-02-24 08:33:30 -07:00
..
atl.c cxl: Disable HPA/SPA translation handlers for Normalized Addressing 2026-02-04 09:17:31 -07:00
cdat.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
core.h cxl/port: Introduce port_to_host() helper 2026-02-23 09:31:07 -07:00
edac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
features.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hdm.c cxl: Test CXL_DECODER_F_LOCK as a bitmask 2026-02-24 08:33:30 -07:00
Makefile Merge branch 'for-7.0/cxl-prm-translation' into cxl-for-next 2026-02-04 10:53:33 -07:00
mbox.c cxl/mbox: validate payload size before accessing contents in cxl_payload_from_user_allowed() 2026-02-24 08:33:29 -07:00
mce.c cxl: Add mce notifier to emit aliased address for extended linear cache 2025-02-26 14:13:49 -07:00
mce.h cxl: mce: fix typo "notifer" 2025-08-02 12:01:39 -07:00
memdev.c cxl/memdev: fix deadlock in cxl_memdev_autoremove() on attach failure 2026-02-23 09:03:44 -07:00
pci.c cxl/port: Move dport probe operations to a driver event 2026-02-02 08:41:29 -07:00
pmem.c cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-02-24 08:33:21 -07:00
pmu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
port.c cxl/port: Hold port host lock during dport adding. 2026-02-23 09:31:22 -07:00
ras.c cxl changes for v7.0 2026-02-12 16:33:05 -08:00
ras_rch.c cxl: Update RAS handler interfaces to also support CXL Ports 2026-01-22 15:07:04 -07:00
region.c cxl/region: Test CXL_DECODER_F_NORMALIZED_ADDRESSING as a bitmask 2026-02-24 08:33:30 -07:00
regs.c PCI: Update CXL DVSEC definitions 2026-01-22 14:52:23 -07:00
suspend.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
trace.c cxl/region: Move cxl_trace_hpa() work to the region driver 2024-04-30 12:24:42 -07:00
trace.h cxl/trace: Subtract to find an hpa_alias0 in cxl_poison events 2025-10-14 14:48:14 -07:00