From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-pci@vger.kernel.org, "Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Emmanuel Grumbach" <emmanuel.grumbach@intel.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Lukas Wunner" <lukas@wunner.de>,
"Jonathan Corbet" <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Dean Luick" <dean.luick@cornelisnetworks.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Jonas Dreßler" <verdre@v0yd.nl>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH v4 11/11] PCI: Document the Capability accessor RMW improvements
Date: Thu, 13 Jul 2023 15:45:05 +0300 [thread overview]
Message-ID: <20230713124505.94866-12-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20230713124505.94866-1-ilpo.jarvinen@linux.intel.com>
Documentation claims port service drivers should play nice wrt. PCIe
Capability changes but the concurrency control is now provided in the
Capability accessors as long as the correct ones are used.
Update the documention to match the RMW accessor behavior.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
Documentation/PCI/pciebus-howto.rst | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/Documentation/PCI/pciebus-howto.rst b/Documentation/PCI/pciebus-howto.rst
index f882ff62c51f..a0027e8fb0d0 100644
--- a/Documentation/PCI/pciebus-howto.rst
+++ b/Documentation/PCI/pciebus-howto.rst
@@ -213,8 +213,12 @@ PCI Config Registers
--------------------
Each service driver runs its PCI config operations on its own
-capability structure except the PCI Express capability structure, in
-which Root Control register and Device Control register are shared
-between PME and AER. This patch assumes that all service drivers
-will be well behaved and not overwrite other service driver's
-configuration settings.
+capability structure except the PCI Express capability structure,
+that is shared between many drivers including the service drivers.
+RMW Capability accessors (pcie_capability_clear_and_set_word(),
+pcie_capability_set_word(), and pcie_capability_clear_word()) protect
+a selected set of PCI Express Capability Registers (Link Control
+Register and Root Control Register). Any change to those registers
+should be performed using RMW accessors to avoid problems due to
+concurrent updates. For the up-to-date list of protected registers,
+see pcie_capability_clear_and_set_word().
--
2.30.2
prev parent reply other threads:[~2023-07-13 12:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 12:44 [PATCH v4 00/11] PCI: Improve PCIe Capability RMW concurrency control Ilpo Järvinen
2023-07-13 12:44 ` [PATCH v4 01/11] PCI: Add locking to RMW PCI Express Capability Register accessors Ilpo Järvinen
2023-07-13 12:44 ` [PATCH v4 02/11] PCI: Make link retraining use RMW accessors for changing LNKCTL Ilpo Järvinen
2023-07-13 12:44 ` [PATCH v4 03/11] PCI: pciehp: Use " Ilpo Järvinen
2023-07-14 8:58 ` Andy Shevchenko
2023-07-13 12:44 ` [PATCH v4 04/11] PCI/ASPM: " Ilpo Järvinen
2023-07-14 9:06 ` Andy Shevchenko
2023-07-13 12:44 ` [PATCH v4 05/11] drm/amdgpu: " Ilpo Järvinen
2023-07-13 12:45 ` [PATCH v4 06/11] drm/radeon: " Ilpo Järvinen
2023-07-13 12:45 ` [PATCH v4 07/11] net/mlx5: " Ilpo Järvinen
2023-07-13 12:45 ` [PATCH v4 08/11] wifi: ath11k: " Ilpo Järvinen
2023-07-13 12:45 ` [PATCH v4 09/11] wifi: ath12k: " Ilpo Järvinen
2023-07-13 12:45 ` [PATCH v4 10/11] wifi: ath10k: " Ilpo Järvinen
2023-07-13 12:45 ` Ilpo Järvinen [this message]
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=20230713124505.94866-12-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=dean.luick@cornelisnetworks.com \
--cc=emmanuel.grumbach@intel.com \
--cc=hkallweit1@gmail.com \
--cc=kw@linux.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=lukas@wunner.de \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=verdre@v0yd.nl \
/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
all inboxes | Powered by JetHome®