Skip to contentSkip to conversation

Spurious GPIO interrupt storm on AMD A520 / Ryzen 5 5500 (floating GPIO)

DISCUSSION Munique Feitoza via Bugspray Bot 1 participant 9 messages Dec 3 GPIO

lore
Share & tools
lore
#0 lore raw

Munique Feitoza added an attachment on Kernel.org Bugzilla:

Created attachment 311393
Kernel log, acpidump and /sys/kernel/debug/gpio

During boot on an AMD Ryzen 5 5500 with HA0QING A520 motherboard, an interrupt storm occurs on the AMD GPIO controller (IRQ 7). The kernel eventually disables the IRQ line with "irq 7: nobody cared" (handlers: amd_gpio_irq_handler).

Mario Limonciello noted on the linux-gpio mailing list thread that this behavior looks like a floating GPIO and requested a Bugzilla ticket with:
1) Full kernel log
2) acpidump
3) /sys/kernel/debug/gpio

Attaching all requested files.

File: amd_gpio_logs.tar.gz (application/gzip)
Size: 132.11 KiB

---
Kernel log, acpidump and /sys/kernel/debug/gpio

You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#1 lore raw

Mario Limonciello (AMD) writes via Kernel.org Bugzilla:

Well so you don't have any _AEI in your acpi tables. So gpiochip_line_is_irq() is false for every pin. IE any pin that reaches dispatch is spurious by definition.

Quoted 1 line

irqfixup pnpacpi=off

Uh, turning off PNP probably isn't going to do the best for us. Can we start with a vanilla command line, does this still repro?

If so can you run with dyndbg="file pinctrl-amd.c +p" on your otherwise vanilla kernel command line so we can see which GPIO is active and causing this?

It may also be helpful to do some debug code to read WAKE_INT_STATUS_REG0/1 and the pin registers while the storm is running, for example with irqpoll or by booting with a handler that doesn't disable the IRQ.

View: https://bugzilla.kernel.org/show_bug.cgi?id=222242#c1
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#2 lore raw
In reply to Munique Feitoza via Bugspray Bot

Munique Feitoza added an attachment on Kernel.org Bugzilla:

Created attachment 311398
Clean vanilla boot dmesg and gpio debugfs

Hi Mario,

Yes, booting with a clean/vanilla command line (without pnpacpi=off and without irqfixup), the issue still reproduces 100% on boot.

The kernel still triggers "irq 7: nobody cared" with "handlers: [<...>] amd_gpio_irq_handler" and disables the IRQ line.

Attached is the new kernel log (dmesg_vanilla.txt) and /sys/kernel/debug/gpio (gpio_vanilla.txt) from this clean boot.

File: vanilla_boot_logs.tar.gz (application/gzip)
Size: 22.59 KiB

---
Clean vanilla boot dmesg and gpio debugfs

You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#3 lore raw
In reply to Munique Feitoza via Bugspray Bot

Munique Feitoza added an attachment on Kernel.org Bugzilla:

Created attachment 311403
Boot log and GPIO debugfs output from a clean boot with dynamic debug enabled

Hi Mario,

I realized I had not yet sent you the boot log and GPIO debugfs output from the clean boot with dynamic debug enabled. I’m attaching both now in amd-gpio-debug-logs.tar.gz.

I booted with dyndbg="file pinctrl-amd.c +p" and confirmed that the relevant callsites in /sys/kernel/debug/dynamic_debug/control have =p. The storm still reproduces (irq 7: nobody cared, handler amd_gpio_irq_handler), but the boot log contains no GPIO ... is active or Disabling spurious GPIO IRQ ... messages. I captured /sys/kernel/debug/gpio after boot; no interrupt was shown pending there.

I kept mem=7400M on the kernel command line because I am seeing memory bit-flip symptoms on this machine and use that parameter as a workaround. An earlier boot log also recorded an Oops in __free_frozen_pages and marked the kernel with BAD_PAGE. I removed pnpacpi=off and irqfixup, but kept mem=7400M for this test.

Please let me know if you would like me to try another way to capture the per-pin register state while the interrupt is active.

Best,
Munique

File: amd-gpio-debug-logs.tar.gz (application/gzip)
Size: 28.98 KiB

---
Boot log and GPIO debugfs output from a clean boot with dynamic debug enabled

You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#4 lore raw
In reply to Munique Feitoza via Bugspray Bot

Mario Limonciello (AMD) added an attachment on Kernel.org Bugzilla:

Created attachment 311405
diagnostics patch

I believe we need to get more register state around the failure. Please apply this patch and collect the new logs.

File: 0001-DEBUG-pinctrl-amd-Dump-controller-state-on-unhandled.patch (text/plain)
Size: 5.24 KiB

---
diagnostics patch

You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#5 lore raw
In reply to Munique Feitoza via Bugspray Bot

Munique Feitoza added an attachment on Kernel.org Bugzilla:

Created attachment 311443
Diagnostic boot logs for the AMD GPIO IRQ storm, including kernel messages, GPIO debugfs state, interrupt list, and kernel command line.

Hi Mario,

Sorry for the long delay in getting these logs to you. I had trouble getting the diagnostic kernel rebuilt and booted, and then ran into issues collecting the privileged logs. I’ve now booted it and attached the requested data.

The diagnostic kernel captured eight unhandled IRQ reports at about 5.008–5.012 seconds into boot. In each report, STATUS_REG1/0 was 0x1f000000/0x00000000, and WAKE_INT_MASTER_REG was 0xff000000. The pin scan found zero pins with interrupt-related bits set. The status and master register values were unchanged between the pre-EOI and post-EOI dumps. Shortly afterward, the kernel reported irq 7: nobody cared, showed amd_gpio_irq_handler as the handler, and disabled IRQ 7.

This appears to show an asserted controller status with no corresponding pending state in the pin registers, though I can’t tell from this dump which pin or signal is responsible. The archive includes the full kernel log, GPIO debugfs state, interrupt list, and kernel command line.

Please let me know if another measurement or test would help.

Thanks,
Munique

File: amd-gpio-logs-HUXJea91.tar.gz (application/gzip)
Size: 31.91 KiB

---
Diagnostic boot logs for the AMD GPIO IRQ storm, including kernel messages, GPIO debugfs state, interrupt list, and kernel command line.

You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#6 lore raw
In reply to Munique Feitoza via Bugspray Bot

Munique Feitoza writes via Kernel.org Bugzilla:

Hi Mario,

Looking closely at the captured dump (STATUS_REG1 = 0x1f000000, MASTER = 0xff000000) and the driver implementation in pinctrl-amd.c, I noticed a couple of structural issues that explain why this storm is unhandled:

Status bits masking out-of-bounds: In do_amd_gpio_irq_handler():

´´´
/* Bit 0-45 contain the relevant status bits */
status &= (1ULL << 46) - 1;
´´´

STATUS_REG1 = 0x1f000000 has bits 24–28 set, which correspond to bits 56–60 of the 64-bit status value. Since the driver masks status &= (1ULL << 46) - 1;, these bits are discarded before the loop. The loop never inspects them and treats the event as having 0 pins active, returning ret = false without clearing or acknowledging the condition. These higher bits correspond to Bank 3 pins (AMD_GPIO_PINS_BANK3 = 32 pins, covering pins 192–223) or extended status lines that the current loop simply overlooks.

Spurious handling should acknowledge the event: When a spurious or unmapped status bit asserts, returning ret = false causes note_interrupt() in the core IRQ subsystem to increment the unhandled counter until it hits 100,000/200,000 and forces Disabling IRQ #7. If the driver silences or disables an unconfigured line (and properly clears both INTERRUPT_MASK_OFF and INTERRUPT_ENABLE_OFF), acknowledging the event (ret = true / EOI) prevents the core kernel from treating it as an unhandled storm.

Would expanding the status loop mask beyond bit 45 to cover Bank 3 and ensuring unhandled/orphan status bits in WAKE_INT_STATUS_REG1 are properly acknowledged/cleared be the right direction for a fix?

Do you foresee any potential regressions or side effects on older AMD hardware generations with this change (e.g., platforms that do not implement Bank 3)?

I would love to actively participate in writing, iterating, and testing this patch series and contribute further to the AMD pinctrl driver. Please let me know how you'd like to proceed!

Best regards,
Munique

View: https://bugzilla.kernel.org/show_bug.cgi?id=222242#c6
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#7 lore raw
In reply to Munique Feitoza via Bugspray Bot

Mario Limonciello (AMD) writes via Kernel.org Bugzilla:

Quoted 3 lines

Would expanding the status loop mask beyond bit 45 to cover Bank 3 and ensuring unhandled/orphan status bits in WAKE_INT_STATUS_REG1 are properly acknowledged/cleared be the right direction for a fix?

That sounds like a reasonable direction to me.

Quoted 3 lines

Do you foresee any potential regressions or side effects on older AMD hardware generations with this change (e.g., platforms that do not implement Bank 3)?

Nothing jumps out to me right now, but I'll loop Shyam into this thread in case he has any ideas.

Quoted 3 lines

I would love to actively participate in writing, iterating, and testing this patch series and contribute further to the AMD pinctrl driver. Please let me know how you'd like to proceed!

That's awesome! Please march forward and send something out. When you send a patch Shyam is one of the maintainers for this driver and if he thinks of anything he'll say it when he reviews it.

View: https://bugzilla.kernel.org/show_bug.cgi?id=222242#c7
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#8 lore raw
In reply to Munique Feitoza via Bugspray Bot

Munique Feitoza writes via Kernel.org Bugzilla:

Hi Mario and Shyam,

Thanks for the guidance and for including Shyam in the discussion.

I’m following up on Kernel.org Bugzilla #222242:
https://bugzilla.kernel.org/show_bug.cgi?id=222242

I reviewed the diagnostic output from my HA0QING A520 system. During the unhandled IRQ storm, WAKE_INT_STATUS_REG1 consistently reads 0x1f000000, while the diagnostic scan reports no GPIO pins with interrupt-related bits set.

Could you clarify how bits 56–60 of the combined WAKE_INT_STATUS_REG1/0 status value should be interpreted on this controller? Do they correspond to additional GPIO groups, or could they indicate another source? I’d also appreciate guidance on the correct way to acknowledge or clear them.

The driver currently describes the main GPIO banks through GPIO 223, so I want to confirm the hardware mapping and acknowledgement mechanism before preparing a functional patch.

Once I have that information, I can prepare a patch for review.

Thanks,
Munique

Quoted 9 lines · On Fri, Nov 13, 2026 at 11:37 AM <[email protected]> wrote:

https://bugzilla.kernel.org/show_bug.cgi?id=222242

Mario Limonciello (AMD) ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

Quoted 5 lines

--
You may reply to this email to add a comment.

You are receiving this mail because:
You reported the bug.

View: https://bugzilla.kernel.org/show_bug.cgi?id=222242#c8
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)