cxl/core: Add CXL EINJ debugfs files
authorBen Cheatham <Benjamin.Cheatham@amd.com>
Mon, 11 Mar 2024 14:25:07 +0000 (09:25 -0500)
committerDan Williams <dan.j.williams@intel.com>
Wed, 13 Mar 2024 06:08:30 +0000 (23:08 -0700)
commit8039804cfa7314ad50085a779923aa5469889f88
treec622f326542eaeb42b7a28b0435dc9eddaf16554
parent12fb28ea6b1cf24bde27c406eb38ee3c108d73f9
cxl/core: Add CXL EINJ debugfs files

Export CXL helper functions in einj-cxl.c for getting/injecting
available CXL protocol error types to sysfs under kernel/debug/cxl.

The kernel/debug/cxl/einj_types file will print the available CXL
protocol errors in the same format as the available_error_types
file provided by the einj module. The
kernel/debug/cxl/$dport_dev/einj_inject file is functionally the same
as the error_type and error_inject files provided by the EINJ module,
i.e.: writing an error type into $dport_dev/einj_inject will inject
said error type into the CXL dport represented by $dport_dev.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ben Cheatham <Benjamin.Cheatham@amd.com>
Link: https://lore.kernel.org/r/20240311142508.31717-4-Benjamin.Cheatham@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/debugfs-cxl
drivers/cxl/core/port.c