From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Cole Leavitt <cole@unwrap.rs>
Cc: Hans de Goede <hansg@kernel.org>,
Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>,
Xi Pardee <xi.pardee@linux.intel.com>,
Rajvi Jingar <rajvi.jingar@linux.intel.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86/intel/pmc: Use each PMC's own status map on S0ix failure
Date: Tue, 20 Oct 2026 23:32:31 +0300 (EEST) [thread overview]
Message-ID: <20096655-ef73-b57a-b1c6-4a580b2bff60@linux.intel.com> (raw)
In-Reply-To: <20261018164037.133658-1-cole@unwrap.rs>
On Sun, 18 Oct 2026, Cole Leavitt wrote:
> When S0ix entry fails and warn_on_s0ix_failures is set,
> pmc_core_resume_common() dumps the latched LPM status registers of every
> PMC. The loop over pmcdev->pmcs[] however passes the register offset and
One space is enough.
> bit maps of the main PMC to pmc_core_lpm_display() for all of them, so
> the registers of the secondary PMCs are read at the main PMC's offset
> and decoded with the main PMC's bit names. On platforms with more than
> one PMC, such as Arrow Lake-HX with an 800 series PCH, the dump
> attributes the PCH's power gating state to the wrong IP blocks, which
> makes it useless for finding the device that blocks S0ix.
>
> Use the status offset and maps of the PMC being displayed.
>
> Fixes: 2bcef4529222 ("platform/x86:intel/pmc: Enable debugfs multiple PMC support")
> Signed-off-by: Cole Leavitt <cole@unwrap.rs>
> ---
>
> Notes:
> Tested on a Lenovo ThinkPad P16 Gen 3 (Core Ultra 9 275HX, JHL9580
> Barlow Ridge host, I226 Ethernet), in daily use since 2026-09-17.
>
> drivers/platform/x86/intel/pmc/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index 9f77c0716e59..3fd72e6a08ce 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -2068,8 +2068,6 @@ int pmc_core_resume_common(struct pmc_dev *pmcdev)
> {
> struct device *dev = &pmcdev->pdev->dev;
> struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
> - const struct pmc_bit_map **maps = pmc->map->lpm_sts;
> - int offset = pmc->map->lpm_status_offset;
> unsigned int pmc_idx, i;
>
> /* Check if the syspend used S0ix */
> @@ -2114,7 +2112,9 @@ int pmc_core_resume_common(struct pmc_dev *pmcdev)
> if (!pmc)
> continue;
> if (pmc->map->lpm_sts)
> - pmc_core_lpm_display(pmc, dev, NULL, offset, pmc_idx, "STATUS", maps);
> + pmc_core_lpm_display(pmc, dev, NULL,
> + pmc->map->lpm_status_offset,
> + pmc_idx, "STATUS", pmc->map->lpm_sts);
This looks good finding but I suggest you use intermediate variables
similar to what the other callers of pmc_core_lpm_display() do. It would
also allow converting that if check to use the same local var.
--
i.
prev parent reply other threads:[~2026-10-20 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 16:40 Cole Leavitt
2026-10-20 20:32 ` Ilpo Järvinen [this message]
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=20096655-ef73-b57a-b1c6-4a580b2bff60@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=cole@unwrap.rs \
--cc=hansg@kernel.org \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajvi.jingar@linux.intel.com \
--cc=xi.pardee@linux.intel.com \
/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
all inboxes | Powered by JetHome®