* [PATCH v3 0/2] x86/PCI: Work around AMD erratum #1146 @ 2026-12-03 14:56 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 14:56 ` [PATCH v3 2/2] x86/PCI: Extend AMD erratum #1146 workaround to more " Anthony Pighin 0 siblings, 2 replies; 5+ messages in thread From: Anthony Pighin @ 2026-12-03 14:56 UTC (permalink / raw) To: Bjorn Helgaas, linux-pci Cc: x86, linux-kernel, Mario Limonciello, Yazen Ghannam, David Laight AMD erratum #1146 leaves the DPC RP PIO SysError register of affected root ports in a state that escalates RP PIO errors to a System Error. On our Family 17h Models 00h-0Fh systems that ends in a data fabric sync flood. Patch 1 applies AMD's documented workaround to 1022:1453, the root port of those processors, where it was tested. Patch 2 extends it to 1022:1483, and is kept separate so it can be reverted on its own. v3: - Drop the CPU family/model check. 1022:1453 only exists on Family 17h Models 00h-0Fh, so the device ID already limits the quirk (Mario). - Add patch 2 for 1022:1483 (Mario). Its commit message records which revision guides do and do not list #1146, and the quirk comment notes the other parts that use 1022:1483 (David). v2: https://lore.kernel.org/r/20261202170954.148541-1-anthony.pighin@nokia.com v1: https://lore.kernel.org/r/20261201041109.2656367-1-anthony.pighin@nokia.com Anthony Pighin (2): x86/PCI: Work around AMD erratum #1146 on Family 17h root ports x86/PCI: Extend AMD erratum #1146 workaround to more root ports arch/x86/pci/fixup.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) -- 2.43.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports 2026-12-03 14:56 [PATCH v3 0/2] x86/PCI: Work around AMD erratum #1146 Anthony Pighin @ 2026-12-03 14:56 ` Anthony Pighin 2026-12-03 15:16 ` sashiko-bot 2026-12-03 14:56 ` [PATCH v3 2/2] x86/PCI: Extend AMD erratum #1146 workaround to more " Anthony Pighin 1 sibling, 1 reply; 5+ messages in thread From: Anthony Pighin @ 2026-12-03 14:56 UTC (permalink / raw) To: Bjorn Helgaas, linux-pci Cc: x86, linux-kernel, Mario Limonciello, Yazen Ghannam, David Laight, stable AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146, "PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO SysError register in the DPC Extended Capability has inverted enable bits, so its zero reset value enables System Error reporting of RP PIO errors on every root port, and the processor may mishandle such a System Error. No fix is planned. The documented workaround is to program bits [18:0] of the register to 0x7_0707. With the register at zero, a config read to a root port whose link is down (e.g. after Link Disable or during an endpoint reset) completes with an RP PIO error that is escalated even when all RP PIO errors are masked. When that coincides with MMIO to an endpoint behind another root port of the same PCIe controller, the system takes a data fabric sync flood and resets. With the workaround, the same reads return all-ones and are logged by AER as Advisory Non-Fatal errors. Apply the workaround to affected root ports that implement the DPC RP Extensions, at enumeration and on resume, since the DPC state saved across suspend does not include this register. Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21 Cc: stable@vger.kernel.org Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com> --- arch/x86/pci/fixup.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 795d81c7a4de..d8ea0e5292ae 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) } DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3); #endif /* CONFIG_SUSPEND */ + +/* + * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The + * DPC RP PIO SysError register has inverted enable bits, so its zero reset + * value escalates Root Port PIO errors to a System Error that the processor + * may mishandle. Write the documented value to disable the escalation. + */ +static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev) +{ + u16 dpc, val; + + dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC); + if (!dpc) + return; + + pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val); + if (!(val & PCI_EXP_DPC_CAP_RP_EXT)) + return; + + 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); -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports 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 0 siblings, 0 replies; 5+ messages in thread From: sashiko-bot @ 2026-12-03 15:16 UTC (permalink / raw) To: Anthony Pighin, linux-pci 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] x86/PCI: Extend AMD erratum #1146 workaround to more root ports 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 14:56 ` Anthony Pighin 2026-12-03 15:09 ` sashiko-bot 1 sibling, 1 reply; 5+ messages in thread From: Anthony Pighin @ 2026-12-03 14:56 UTC (permalink / raw) To: Bjorn Helgaas, linux-pci Cc: x86, linux-kernel, Mario Limonciello, Yazen Ghannam, David Laight AMD erratum #1146 is also listed, with the same workaround, in the revision guide for Family 17h Models 30h-3Fh (56323). The same root port is also used by Family 17h Model 71h and Family 19h Models 00h-0Fh and 21h, none of which a public guide lists as affected. The erratum is expected to follow the PCIe IP rather than the processor, so apply the workaround to every such root port with the DPC RP Extensions. This is untested on such hardware, and is kept separate so it can be reverted on its own if that assumption is wrong. For reference, the public revision guides list #1146 only for Family 17h Models 00h-0Fh (55449) and 30h-3Fh (56323). It is absent from the guides for Family 19h Models 00h-0Fh (56683), 10h-1Fh (57095) and A0h-AFh (57926), and Family 1Ah Models 00h-0Fh (58251) and 10h-1Fh (58730), each of which states that errata that do not affect a product family do not appear. Link: https://docs.amd.com/v/u/en-US/56323_PUB_1.03_RG_Rome Suggested-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com> --- arch/x86/pci/fixup.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index d8ea0e5292ae..be179e81550c 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -1182,10 +1182,13 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3); #endif /* CONFIG_SUSPEND */ /* - * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The - * DPC RP PIO SysError register has inverted enable bits, so its zero reset - * value escalates Root Port PIO errors to a System Error that the processor - * may mishandle. Write the documented value to disable the escalation. + * AMD erratum #1146, listed in revision guides 55449 (Family 17h Models + * 00h-0Fh) and 56323 (Family 17h Models 30h-3Fh). The DPC RP PIO SysError + * register has inverted enable bits, so its zero reset value escalates + * Root Port PIO errors to a System Error that the processor may mishandle. + * Write the documented value to disable the escalation. The Models 30h-3Fh + * root port is also used by Family 17h Model 71h and Family 19h parts that + * no public guide lists. The erratum is assumed to follow the PCIe IP. */ static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev) { @@ -1204,3 +1207,5 @@ static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev) } 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); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1483, quirk_amd_dpc_rp_pio_syserror); +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1483, quirk_amd_dpc_rp_pio_syserror); -- 2.43.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 2/2] x86/PCI: Extend AMD erratum #1146 workaround to more root ports 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 0 siblings, 0 replies; 5+ messages in thread From: sashiko-bot @ 2026-12-03 15:09 UTC (permalink / raw) To: Anthony Pighin, linux-pci Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] x86/PCI: quirk_amd_dpc_rp_pio_syserror() lacks CPU gating for 0x1483 -- commit fef7a67559982357ef07371bab8932c87aa84604 Author: Anthony Pighin <anthony.pighin@nokia.com> x86/PCI: Extend AMD erratum #1146 workaround to more root ports This commit registers quirk_amd_dpc_rp_pio_syserror() as a header and early-resume PCI fixup for AMD PCI device ID 0x1483, extending the erratum #1146 workaround beyond device ID 0x1453. Link: https://docs.amd.com/v/u/en-US/56323_PUB_1.03_RG_Rome > diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c > index d8ea0e5292aee..be179e81550c7 100644 > --- a/arch/x86/pci/fixup.c > +++ b/arch/x86/pci/fixup.c [ ... ] > @@ -1204,3 +1207,5 @@ static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev) > } > 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); > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1483, quirk_amd_dpc_rp_pio_syserror); > +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1483, quirk_amd_dpc_rp_pio_syserror); [Severity: Medium] Should the 0x1483 fixup in quirk_amd_dpc_rp_pio_syserror() be gated by CPU family and model? Device ID 0x1483 is also used by Family 17h Model 71h and Family 19h Models 00h-0Fh and 21h, where Revision Guide 56683 omits erratum #1146. If PCI_EXP_DPC_RP_PIO_SYSERROR has standard active-high polarity on those parts, writing 0x00070707 enables escalation instead of disabling it. Routine RP PIO errors such as link-down config reads or hot-unplug would then trigger System Errors or platform resets, while the quirk logs that escalation was disabled. Reverting this commit later would also drop the documented Family 17h Models 30h-3Fh workaround. Gating 0x1483 with boot_cpu_data or x86_match_cpu() inside quirk_amd_dpc_rp_pio_syserror() to restrict it to confirmed affected models (Family 17h Models 30h-3Fh) would avoid regressing unaffected hardware until its register polarity is confirmed. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261203145647.707695-1-anthony.pighin@nokia.com?part=2 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-12-03 15:16 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox