From: Srirangan Madhavan <smadhavan@nvidia.com>
To: Srirangan Madhavan <smadhavan@nvidia.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"Dave Jiang" <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
"Dan Williams" <dan.j.williams@intel.com>
Cc: Zhi Wang <zhiw@nvidia.com>, Vishal Aslot <vaslot@nvidia.com>,
"Shanker Donthineni" <sdonthineni@nvidia.com>,
<linux-cxl@vger.kernel.org>
Subject: [PATCH v1 0/1] Add CXL Reset Support for CXL Devices
Date: Fri, 7 Feb 2025 01:03:26 -0800 [thread overview]
Message-ID: <20250207090327.172478-1-smadhavan@nvidia.com> (raw)
This patch introduces support for the CXL Reset method
for CXL devices, implementing the reset procedure outlined in
CXL Spec [1] v3.1, Sections 9.6 and 9.7.
RFC -> v1:
- Added cover letter and dropped the RFC.
The RFC patche can be found here [2]
Motivation:
-----------
This change is broadly useful for reasons including but not limited to the
following:
- As support for Type 2 devices [3] is being introduced, more devices will
require finer-grained reset mechanisms beyond bus-wide reset methods.
- FLR does not affect CXL.cache or CXL.mem protocols, making CXL Reset
the preferred method in some cases.
- The CXL spec (Sections 7.2.3 Binding and Unbinding, 9.5 FLR) highlights use
cases like function rebinding and error recovery, where CXL Reset is
explicitly mentioned.
Change Description:
-------------------
The patch implements the required steps for CXL reset and introduces a new reset
method in the pci_reset_fn_methods. It also defines the necessary CXL DVSEC
register macros. The actual steps for rest are broadly: disable cache lines and
asserts WB+I, wait for cache and memory clear signals, initial reset, wait for
complete and return status.
Command line to test the CXL reset on a capable device:
echo cxl_reset > /sys/bus/pci/devices/<pci_device>/reset_method
echo 1 > /sys/bus/pci/devices/<pci_device>/reset
[1] https://computeexpresslink.org/wp-content/uploads/2024/02/CXL-3.1-Specification.pdf
[2] https://lore.kernel.org/all/20241213074143.374-1-smadhavan@nvidia.com/
[3] https://lore.kernel.org/linux-cxl/20241216161042.42108-1-alejandro.lucero-palau@amd.com/
Srirangan Madhavan (1):
cxl: add support for cxl reset
drivers/pci/pci.c | 183 ++++++++++++++++++++++++++++++++++
include/linux/pci.h | 2 +-
include/uapi/linux/pci_regs.h | 25 +++++
3 files changed, 209 insertions(+), 1 deletion(-)
--
2.25.1
next reply other threads:[~2025-02-07 9:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 9:03 Srirangan Madhavan [this message]
2025-02-07 9:03 ` [PATCH v1 1/1] cxl: add support for cxl reset Srirangan Madhavan
2025-02-07 15:19 ` Dave Jiang
2025-02-07 17:15 ` Ira Weiny
2025-02-13 7:35 ` Srirangan Madhavan
2025-02-08 11:48 ` kernel test robot
2025-02-14 16:57 ` Jonathan Cameron
2025-02-21 5:15 ` Srirangan Madhavan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250207090327.172478-1-smadhavan@nvidia.com \
--to=smadhavan@nvidia.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=sdonthineni@nvidia.com \
--cc=vaslot@nvidia.com \
--cc=vishal.l.verma@intel.com \
--cc=zhiw@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox