From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Antheas Kapenekakis" <lkml@antheas.dev>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sasha Levin" <sashal@kernel.org>,
Shyam-sundar.S-k@amd.com, platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 6.17-6.6] platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk list
Date: Mon, 24 Nov 2025 03:06:31 -0500 [thread overview]
Message-ID: <20251124080644.3871678-17-sashal@kernel.org> (raw)
In-Reply-To: <20251124080644.3871678-1-sashal@kernel.org>
From: Antheas Kapenekakis <lkml@antheas.dev>
[ Upstream commit f945afe01c6768dcfed7868c671a26e1164c2284 ]
The Lenovo Legion Go 2 takes a long time to resume from suspend.
This is due to it having an nvme resume handler that interferes
with IOMMU mappings. It is a common issue with older Lenovo
laptops. Adding it to that quirk list fixes this issue.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4618
Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251008135057.731928-1-lkml@antheas.dev
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
## Comprehensive Analysis
### 1. Commit Message Analysis
The commit "platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk
list" addresses a specific hardware issue on the Lenovo Legion Go 2. The
device experiences long resume times from suspend due to an NVMe resume
handler interfering with IOMMU mappings. This is identified as a
firmware bug common to several Lenovo laptops. The fix explicitly closes
a reported issue on GitLab (#4618) and includes `Reviewed-by` tags from
subsystem maintainers.
### 2. Deep Code Research & Mechanism
**Code Change:**
The commit modifies `drivers/platform/x86/amd/pmc/pmc-quirks.c` by
adding two new entries to the `fwbug_list` array. These entries target
the "Lenovo Legion Go 2" with product IDs `83N0` and `83N1`.
**Mechanism:**
The entries are associated with `quirk_s2idle_bug`.
- **The Bug:** On certain AMD platforms, the firmware executes a System
Management Interrupt (SMI) handler during the resume transition (D3 ->
D0). If IOMMU is enabled, this handler triggers page faults or
timeouts, resulting in the "long time to resume" symptom.
- **The Fix:** The `quirk_s2idle_bug` callback triggers the
`amd_pmc_skip_nvme_smi_handler` function. This function performs a
specific MMIO write (typically to the FCH PM scratch register) to
disable the problematic SMI handler during the resume phase, bypassing
the conflict.
**Infrastructure Context:**
This uses existing quirk infrastructure (`quirk_s2idle_bug` and
`amd_pmc_skip_nvme_smi_handler`) which was introduced in kernel v6.6.
The change itself is purely data—adding IDs to an existing table—rather
than introducing new logic.
### 3. Stable Kernel Rules Compliance
This commit falls squarely under the **"QUIRKS and WORKAROUNDS"**
exception category, which is explicitly allowed in stable trees.
- **Criteria Check:**
- **Obviously correct:** It strictly adds DMI matches to a table
using an existing, proven handler.
- **Fixes real bug:** Addresses a significant usability regression
(broken/slow suspend) for end users.
- **No new features:** It is a hardware enablement/fix, not a
feature addition.
- **Small scope:** Touch is limited to 17 lines of data addition in
one file.
### 4. Risk Assessment
- **Regression Risk:** **Extremely Low**. The change is guarded by
specific DMI matches (Vendor "LENOVO", Product "83N0"/"83N1"). It will
only trigger on the exact hardware specified. It cannot negatively
impact other devices.
- **User Impact:** High for owners of the device. Without this fix,
suspend/resume is effectively broken or frustratingly slow.
### 5. Dependencies and Backporting
- **Dependencies:** The commit depends on the AMD PMC quirk
infrastructure (`quirk_s2idle_bug`). This infrastructure is present in
current stable branches like 6.6.y, 6.12.y, and 6.1.y (where the
driver has been updated).
- **Applicability:** It should apply cleanly to any stable tree
containing the `drivers/platform/x86/amd/pmc/pmc-quirks.c` file and
the associated quirk definitions.
### Conclusion
This is a textbook stable backport candidate. It is a low-risk,
hardware-specific quirk that fixes a real user-visible bug using
established kernel infrastructure. It perfectly matches the exception
for hardware workarounds.
**YES**
drivers/platform/x86/amd/pmc/pmc-quirks.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/platform/x86/amd/pmc/pmc-quirks.c b/drivers/platform/x86/amd/pmc/pmc-quirks.c
index d63aaad7ef599..0fadcf5f288ac 100644
--- a/drivers/platform/x86/amd/pmc/pmc-quirks.c
+++ b/drivers/platform/x86/amd/pmc/pmc-quirks.c
@@ -204,6 +204,23 @@ static const struct dmi_system_id fwbug_list[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "82ND"),
}
},
+ /* https://gitlab.freedesktop.org/drm/amd/-/issues/4618 */
+ {
+ .ident = "Lenovo Legion Go 2",
+ .driver_data = &quirk_s2idle_bug,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83N0"),
+ }
+ },
+ {
+ .ident = "Lenovo Legion Go 2",
+ .driver_data = &quirk_s2idle_bug,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83N1"),
+ }
+ },
/* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */
{
.ident = "HP Laptop 15s-eq2xxx",
--
2.51.0
next prev parent reply other threads:[~2025-11-24 8:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 8:06 [PATCH AUTOSEL 6.17-5.10] platform/x86: huawei-wmi: add keys for HONOR models Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] sched_ext: Fix possible deadlock in the deferred_irq_workfn() Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.15] HID: elecom: Add support for ELECOM M-XT3URBK (018F) Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: intel-uncore-freq: Add additional client processors Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] platform/x86/amd/pmc: Add spurious_8042 to Xbox Ally Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.10] pinctrl: qcom: msm: Fix deadlock in pinmux configuration Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.10] samples: work around glibc redefining some of our defines wrong Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] HID: hid-input: Extend Elan ignore battery quirk to USB Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] HID: lenovo: fixup Lenovo Yoga Slim 7x Keyboard rdesc Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86/amd/pmc: Add support for Van Gogh SoC Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] sched_ext: Use IRQ_WORK_INIT_HARD() to initialize rq->scx.kick_cpus_irq_work Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86/intel/hid: Add Nova Lake support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: mark Victus 16-r0 and 16-s0 for victus_s fan and thermal profile support Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.4] platform/x86: acer-wmi: Ignore backlight event Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17] platform/x86: hp-wmi: Add Omen MAX 16-ah0xx fan support and thermal profile Sasha Levin
2025-11-24 8:06 ` Sasha Levin [this message]
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.6] nvme: fix admin request_queue lifetime Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.1] LoongArch: Mask all interrupts during kexec/kdump Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-6.1] HID: apple: Add SONiX AK870 PRO to non_apple_keyboards quirk list Sasha Levin
2025-11-24 8:06 ` [PATCH AUTOSEL 6.17-5.4] bfs: Reconstruct file type when loading from disk Sasha Levin
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=20251124080644.3871678-17-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Shyam-sundar.S-k@amd.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=lkml@antheas.dev \
--cc=mario.limonciello@amd.com \
--cc=patches@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=superm1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox