]> git.ipfire.org Git - thirdparty/linux.git/commit
cxl/core: Add locked variants of the poison inject and clear funcs
authorAlison Schofield <alison.schofield@intel.com>
Mon, 4 Aug 2025 08:00:12 +0000 (01:00 -0700)
committerDave Jiang <dave.jiang@intel.com>
Tue, 12 Aug 2025 23:02:00 +0000 (16:02 -0700)
commit25a0207828bc52f1ebb6588f9417eb43ca4960a3
tree2b2ec4c680845e03198dd03b1e39857ed1dda033
parentdc181170491bda9944f95ca39017667fe7fd767d
cxl/core: Add locked variants of the poison inject and clear funcs

The core functions that validate and send inject and clear commands
to the memdev devices require holding both the dpa_rwsem and the
region_rwsem.

In preparation for another caller of these functions that must hold
the locks upon entry, split the work into a locked and unlocked pair.

Consideration was given to moving the locking to both callers,
however, the existing caller is not in the core (mem.c) and cannot
access the locks.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/1d601f586975195733984ca63d1b5789bbe8690f.1754290144.git.alison.schofield@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/memdev.c
drivers/cxl/cxlmem.h