cxl/memdev: Add trigger_poison_list sysfs attribute
authorAlison Schofield <alison.schofield@intel.com>
Tue, 18 Apr 2023 17:39:06 +0000 (10:39 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 23 Apr 2023 18:46:02 +0000 (11:46 -0700)
commit7ff6ad1075885fdc71f6fea94b95109a582dec29
tree0e2b6a34618028e49bf617df565324e5846a7f9e
parentddf49d57b841e55e1b0aee1224a9f526e50e1bcc
cxl/memdev: Add trigger_poison_list sysfs attribute

When a boolean 'true' is written to this attribute the memdev driver
retrieves the poison list from the device. The list consists of
addresses that are poisoned, or would result in poison if accessed,
and the source of the poison. This attribute is only visible for
devices supporting the capability. The retrieved errors are logged
as kernel events when cxl_poison event tracing is enabled.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/1081cfdc8a349dc754779642d584707e56db26ba.1681838291.git.alison.schofield@intel.com
Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-bus-cxl
drivers/cxl/core/memdev.c
drivers/cxl/cxlmem.h
drivers/cxl/mem.c