From: Xi Pardee <xi.pardee@linux.intel.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>,
platform-driver-x86@vger.kernel.org
Cc: irenic.rajneesh@gmail.com, david.e.box@intel.com,
kernel-dev@igalia.com, kernel@gpiccoli.net
Subject: Re: [PATCH 3/4] platform/x86/intel/pmc: Always dump LPM status regs on unsuccessful paths
Date: Tue, 14 Oct 2025 12:29:08 -0700 [thread overview]
Message-ID: <dcd817d1-6ce5-4c09-a65b-21507424849b@linux.intel.com> (raw)
In-Reply-To: <20250922230812.1584253-4-gpiccoli@igalia.com>
Hi,
My response is inline.
Thanks!
Xi
On 9/22/2025 3:52 PM, Guilherme G. Piccoli wrote:
> Right now, there are 2 fail paths on pmc_core_resume_common(): either
> after (some) package(s) didn't enter Cx state, or after s0ix was
> not successfully entered.
>
> The code has a debug output, dumping LPM registers, but *only*
> on s0ix fail path, not when packages fail to enter some Cx state.
>
> Let's make it output the LPM registers in both fail cases, in order to
> help debugging issues.
>
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
> ---
> drivers/platform/x86/intel/pmc/core.c | 22 ++++++++++++++--------
> 1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index c8ce5d6ec30c..aeb5e47cf5bb 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -1882,16 +1882,22 @@ int pmc_core_resume_common(struct pmc_dev *pmcdev)
> msr_map[i].name, pc_cnt);
> }
> }
> - return 0;
> + } else {
> + /* The real interesting case - S0ix failed - lets ask PMC why. */
> + dev_warn(dev, "CPU did not enter SLP_S0!!! (S0ix cnt=%llu)\n",
> + pmcdev->s0ix_counter);
> +
> + /*
> + * Notice that SLP_S0_DBG regs are captured on C10 entry,
> + * according to the spec. So if we didn't enter C10 (i.e.,
> + * the above if-block was executed) seems to make no sense
> + * in dumping them.
> + */
> + if (pmc->map->slps0_dbg_maps)
> + pmc_core_slps0_display(pmc, dev, NULL);
> +
> }
>
> - /* The real interesting case - S0ix failed - lets ask PMC why. */
> - dev_warn(dev, "CPU did not enter SLP_S0!!! (S0ix cnt=%llu)\n",
> - pmcdev->s0ix_counter);
> -
> - if (pmc->map->slps0_dbg_maps)
> - pmc_core_slps0_display(pmc, dev, NULL);
> -
> for (i = 0; i < ARRAY_SIZE(pmcdev->pmcs); ++i) {
> struct pmc *pmc = pmcdev->pmcs[i];
>
Entering the S0ix state requires the system to reach the deepest package
C-state, PC10. If the system fails to achieve PC10 residency during
suspend, the slps0_dbg_maps data becomes irrelevant and may mislead
users. For this reason, the driver hides this information when PC10
residency is not attained.
next prev parent reply other threads:[~2025-10-14 19:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 22:52 [PATCH 0/4] Some TGL and overall S0ix debug improvements Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 1/4] platform/x86/intel/pmc: Fix typo on CNP register name (and clarify comment) Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 2/4] platform/x86/intel/pmc: Dump raw SLP_Sx_DBG registers and distinguish between them Guilherme G. Piccoli
2025-09-23 7:59 ` Ilpo Järvinen
2025-09-24 1:05 ` Guilherme G. Piccoli
2025-09-24 9:57 ` Ilpo Järvinen
2025-09-25 17:17 ` Guilherme G. Piccoli
2025-10-13 17:39 ` Xi Pardee
2025-10-13 18:05 ` Guilherme G. Piccoli
2025-10-23 21:44 ` Xi Pardee
2025-10-24 10:55 ` Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 3/4] platform/x86/intel/pmc: Always dump LPM status regs on unsuccessful paths Guilherme G. Piccoli
2025-10-14 19:29 ` Xi Pardee [this message]
2025-10-14 19:58 ` Guilherme G. Piccoli
2025-10-14 23:55 ` Xi Pardee
2025-10-15 17:35 ` Guilherme G. Piccoli
2025-09-22 22:52 ` [PATCH 4/4][RFC] platform/x86/intel/pmc: Re-add SLP_S0_DBG register dump on Tiger Lake Guilherme G. Piccoli
2025-10-14 19:24 ` Xi Pardee
2025-10-14 20:21 ` Guilherme G. Piccoli
2025-10-13 15:14 ` [PATCH 0/4] Some TGL and overall S0ix debug improvements Guilherme G. Piccoli
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=dcd817d1-6ce5-4c09-a65b-21507424849b@linux.intel.com \
--to=xi.pardee@linux.intel.com \
--cc=david.e.box@intel.com \
--cc=gpiccoli@igalia.com \
--cc=irenic.rajneesh@gmail.com \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox