diff options
author | Dan Williams <dan.j.williams@intel.com> | 2023-05-18 05:19:43 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-05-18 22:18:49 +0200 |
commit | eb0764b822b9b26880b28ccb9100b2983e01bc17 (patch) | |
tree | 2f36af9d02fb292903e4c2795fbad46d669bc0c4 /Documentation | |
parent | Linux 6.4-rc2 (diff) | |
download | linux-eb0764b822b9b26880b28ccb9100b2983e01bc17.tar.xz linux-eb0764b822b9b26880b28ccb9100b2983e01bc17.zip |
cxl/port: Enable the HDM decoder capability for switch ports
Derick noticed, when testing hot plug, that hot-add behaves nominally
after a removal. However, if the hot-add is done without a prior
removal, CXL.mem accesses fail. It turns out that the original
implementation of the port driver and region programming wrongly assumed
that platform-firmware always enables the host-bridge HDM decoder
capability. Add support turning on switch-level HDM decoders in the case
where platform-firmware has not.
The implementation is careful to only arrange for the enable to be
undone if the current instance of the driver was the one that did the
enable. This is to interoperate with platform-firmware that may expect
CXL.mem to remain active after the driver is shutdown. This comes at the
cost of potentially not shutting down the enable on kexec flows, but it
is mitigated by the fact that the related HDM decoders still need to be
enabled on an individual basis.
Cc: <stable@vger.kernel.org>
Reported-by: Derick Marks <derick.w.marks@intel.com>
Fixes: 54cdbf845cf7 ("cxl/port: Add a driver for 'struct cxl_port' objects")
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/168437998331.403037.15719879757678389217.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions