All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/PME: Replace RMW of Root Status register with direct write
Date: Thu, 22 Jan 2026 12:22:39 +0200 (EET)	[thread overview]
Message-ID: <4264eef0-c7c8-18c3-2461-d1fdcf2ba532@linux.intel.com> (raw)
In-Reply-To: <39f87c99f6c44be3c0371c79e454e6fde7be0d4d.1761497583.git.lukas@wunner.de>

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

On Sun, 26 Oct 2025, Lukas Wunner wrote:

> As of PCIe r7.0, the Root Status register contains a single writeable bit
> (PME Status, type RW1C) and otherwise just read-only bits and RsvdZ bits
> (which software must write as zero, PCIe r7.0 sec 7.4).
> 
> Thus, when clearing the PME Status bit, there's no need to perform a
> read-modify-write of the register.  Instead, the bit can be written
> directly.
> 
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> ---
>  drivers/pci/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index b14dd064006c..411a0b88841e 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -2285,7 +2285,7 @@ void pcie_clear_device_status(struct pci_dev *dev)
>   */
>  void pcie_clear_root_pme_status(struct pci_dev *dev)
>  {
> -	pcie_capability_set_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME);
> +	pcie_capability_write_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME);
>  }
>  
>  /**
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

  parent reply	other threads:[~2026-01-22 10:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-26 16:57 [PATCH] PCI/PME: Replace RMW of Root Status register with direct write Lukas Wunner
2026-01-22  9:01 ` Lukas Wunner
2026-01-22 10:22 ` Ilpo Järvinen [this message]
2026-02-06 22:42 ` Bjorn Helgaas

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=4264eef0-c7c8-18c3-2461-d1fdcf2ba532@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.