All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Anthony Pighin" <anthony.pighin@nokia.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 1/2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports
Date: Thu, 03 Dec 2026 15:16:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-248089@kernel.org> (raw)
In-Reply-To: <20261203145647.707695-2-anthony.pighin@nokia.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] x86/PCI: blind write and resume log spam in
  quirk_amd_dpc_rp_pio_syserror()
--

commit 190fbd0bc3523b02566ddeae4186a65e382ced19
Author: Anthony Pighin <anthony.pighin@nokia.com>

x86/PCI: Work around AMD erratum #1146 on Family 17h root ports

This commit adds a PCI quirk for AMD Family 17h root ports (device ID 0x1453)
that writes 0x00070707 to PCI_EXP_DPC_RP_PIO_SYSERROR at enumeration and on
early resume to work around AMD erratum #1146.

Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21

> diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> index 795d81c7a4de4..d8ea0e5292aee 100644
> --- a/arch/x86/pci/fixup.c
> +++ b/arch/x86/pci/fixup.c
> @@ -1180,3 +1180,27 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
[ ... ]
> +	pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
> +	pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);

[Severity: Low]
Should quirk_amd_dpc_rp_pio_syserror() read PCI_EXP_DPC_RP_PIO_SYSERROR
before writing it?

The unconditional 32-bit write clears upper reserved bits [31:19] (RsvdP)
instead of updating only bits [18:0].  Because DECLARE_PCI_FIXUP_RESUME_EARLY
runs on every runtime PM and system resume, pci_info() also spams dmesg per
root port even when the register already has the expected value.

Reading the register first, returning early when bits [18:0] are already
0x00070707, and doing a read-modify-write on bits [18:0] (or using
pci_info_once()) would preserve the reserved bits and avoid repeated resume
logging.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203145647.707695-1-anthony.pighin@nokia.com?part=1

  reply	other threads:[~2026-12-03 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 14:56 [PATCH v3 0/2] x86/PCI: Work around AMD erratum #1146 Anthony Pighin
2026-12-03 14:56 ` [PATCH v3 1/2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports Anthony Pighin
2026-12-03 15:16   ` sashiko-bot [this message]
2026-12-04 16:02   ` Yazen Ghannam
2026-12-04 16:25     ` Anthony Pighin
2026-12-03 14:56 ` [PATCH v3 2/2] x86/PCI: Extend AMD erratum #1146 workaround to more " Anthony Pighin
2026-12-03 15:09   ` sashiko-bot
2026-12-03 20:05 ` [PATCH v3 0/2] x86/PCI: Work around AMD erratum #1146 Mario Limonciello

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=sashiko-outbox-248089@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anthony.pighin@nokia.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.