From: bugzilla-daemon@kernel.org
To: platform-driver-x86@vger.kernel.org
Subject: [Bug 221759] amd_pmc: failed probe leaks LPS0 handler registration; subsequent probe hits list_add BUG in acpi_register_lps0_dev
Date: Fri, 17 Jul 2026 06:48:47 +0000 [thread overview]
Message-ID: <bug-221759-215701-OIbRxpJmHi@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-221759-215701@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=221759
--- Comment #2 from Francis DB (francisdb@gmail.com) ---
Tested the series on the reporting machine (Framework Desktop, FRANMFCP06, BIOS
03.05), applied on top of vanilla 7.1.3 (plus the unrelated amdgpu device-link
patch from bug 221073). All three patches work as intended here:
1. The reload BUG is fixed. With enable_stb=1, repeated `modprobe -r amd_pmc &&
modprobe amd_pmc enable_stb=1` cycles now complete cleanly; on the unpatched
kernel the second load was a guaranteed list_add BUG.
2. Probe now survives the STB failure: "amd_pmc AMDI000B:00: STB initialization
failed (-12), continuing without STB support", and /sys/kernel/debug/amd_pmc/
stays available.
3. s2idle is fully functional afterwards: an rtcwake s2idle cycle right after a
failed STB init reached full hardware residency (S0ix residency 59.08 s of a 60
s sleep per s0ix_stats), confirming the msg_port restore; previously the failed
init would have left msg_port on MSG_PORT_S2D.
One residual issue in amd_stb_s2d_init(), now visible thanks to the error
propagation fix: on this platform S2D_TELEMETRY_SIZE now succeeds, but a later
S2D command is refused ("SMU cmd failed. err: 0xff") and the
S2D_PHYS_ADDR_LOW/HIGH results are never checked, so stb_phys_addr ends up 0
and devm_ioremap(0, 16 MB) trips the ioremap-on-RAM WARN before failing with
-ENOMEM:
amd_pmc AMDI000B:00: SMU cmd failed. err: 0xff
------------[ cut here ]------------
ioremap on RAM at 0x0000000000000000 - 0x0000000000ffffff
WARNING: arch/x86/mm/ioremap.c:216 at __ioremap_caller+0xfc/0x3b0, CPU#13:
modprobe/4592
Call Trace:
devm_ioremap+0x5a/0xb0
amd_stb_s2d_init+0x239/0x280 [amd_pmc]
amd_pmc_probe+0x2d1/0x370 [amd_pmc]
...
amd_pmc AMDI000B:00: STB initialization failed (-12), continuing without STB
support
The end result is still correct (STB unavailable, driver fine), but checking
the return codes of the two phys-addr commands (or rejecting a zero address)
would turn this into a clean bail-out instead of a WARN backtrace that taints
the kernel.
Thanks for the quick turnaround. For the series as posted:
Tested-by: Francis De Brabandere <francisdb@gmail.com>
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2026-07-17 6:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 20:35 [Bug 221759] New: amd_pmc: failed probe leaks LPS0 handler registration; subsequent probe hits list_add BUG in acpi_register_lps0_dev bugzilla-daemon
2026-07-16 21:47 ` [Bug 221759] " bugzilla-daemon
2026-07-17 6:48 ` bugzilla-daemon [this message]
2026-07-17 16:22 ` bugzilla-daemon
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=bug-221759-215701-OIbRxpJmHi@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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.