]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/port: Move dport RAS setup to dport add time
authorDan Williams <dan.j.williams@intel.com>
Sat, 31 Jan 2026 00:04:00 +0000 (16:04 -0800)
committerDave Jiang <dave.jiang@intel.com>
Mon, 2 Feb 2026 15:44:51 +0000 (08:44 -0700)
commit7f5ff740ce0bcde242dafcc3f9bb3cbe6b5b8f3a
tree203b824868151278588414a883ab4f4a1a8b7347
parent3864cb60dad5a6c1bd9f444740cf541a1d8cda99
cxl/port: Move dport RAS setup to dport add time

Towards the end goal of making all CXL RAS capability handling uniform
across host bridge ports, upstream switch ports, and endpoint ports, move
dport RAS setup. Move it to cxl_switch_port_probe() context for switch / VH
dports (via cxl_port_add_dport()) and cxl_endpoint_port_probe() context for
an RCH dport. Rename the RAS setup helper to devm_cxl_dport_ras_setup() for
symmetry with devm_cxl_switch_port_decoders_setup().

Only the RCH version needs to be exported and the cxl_test mocking can be
deleted with a dev_is_pci() check on the dport_dev.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260131000403.2135324-7-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/core.h
drivers/cxl/core/port.c
drivers/cxl/core/ras.c
drivers/cxl/cxlpci.h
drivers/cxl/mem.c
drivers/cxl/port.c
tools/testing/cxl/Kbuild
tools/testing/cxl/test/mock.c