linux/drivers/cxl
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
..
core cxl/region: Test CXL_DECODER_F_NORMALIZED_ADDRESSING as a bitmask 2026-02-24 08:33:30 -07:00
acpi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cxl.h cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-02-24 08:33:21 -07:00
cxlmem.h Merge branch 'for-7.0/cxl-aer-prep' into cxl-for-next 2026-02-02 09:39:41 -07:00
cxlpci.h cxl/port: Map Port RAS registers 2026-02-02 08:45:57 -07:00
Kconfig Merge branch 'for-7.0/cxl-prm-translation' into cxl-for-next 2026-02-04 10:53:33 -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 Merge branch 'for-7.0/cxl-aer-prep' into cxl-for-next 2026-02-02 09:39:41 -07:00
pci.c Merge branch 'for-7.0/cxl-aer-prep' into cxl-for-next 2026-02-02 09:39:41 -07:00
pmem.c cxl: Fix race of nvdimm_bus object when creating nvdimm objects 2026-02-24 08:33:21 -07:00
pmu.h cxl/pci: Find and register CXL PMU devices 2023-05-30 11:20:35 -07:00
port.c Merge branch 'for-7.0/cxl-aer-prep' into cxl-for-next 2026-02-02 09:39:41 -07:00
security.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00