* [PATCH] platform/x86/amd: pmc: Dump idle mask during "check" stage instead
@ 2022-09-29 21:50 Mario Limonciello
2022-10-03 11:52 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-09-29 21:50 UTC (permalink / raw)
To: mario.limonciello, Shyam Sundar S K
Cc: Hans de Goede, Mark Gross, platform-driver-x86, linux-kernel
The idle mask is dumped during the "prepare" and "restore" stage
right now, which helps to demonstrate issues only related to the
first s2idle entry.
If the system has entered s2idle once, but was woken up never
breaking the s2idle loop but also never went back to sleep we
might still have another issue to deal with however.
Move the dynamic debugging message here so that we'll catch it on
each iteration.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216516
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd/pmc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index 047e47449ff93..ce859b300712b 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -719,8 +719,6 @@ static void amd_pmc_s2idle_prepare(void)
}
}
- /* Dump the IdleMask before we send hint to SMU */
- amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
msg = amd_pmc_get_os_hint(pdev);
rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
if (rc) {
@@ -738,6 +736,9 @@ static void amd_pmc_s2idle_check(void)
struct amd_pmc_dev *pdev = &pmc;
int rc;
+ /* Dump the IdleMask before we add to the STB */
+ amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
+
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_CHECK);
if (rc)
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
@@ -757,9 +758,6 @@ static void amd_pmc_s2idle_restore(void)
/* Let SMU know that we are looking for stats */
amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
- /* Dump the IdleMask to see the blockers */
- amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
-
rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_RESTORE);
if (rc)
dev_err(pdev->dev, "error writing to STB: %d\n", rc);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86/amd: pmc: Dump idle mask during "check" stage instead
2022-09-29 21:50 [PATCH] platform/x86/amd: pmc: Dump idle mask during "check" stage instead Mario Limonciello
@ 2022-10-03 11:52 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2022-10-03 11:52 UTC (permalink / raw)
To: Mario Limonciello, Shyam Sundar S K
Cc: Mark Gross, platform-driver-x86, linux-kernel
Hi,
On 9/29/22 23:50, Mario Limonciello wrote:
> The idle mask is dumped during the "prepare" and "restore" stage
> right now, which helps to demonstrate issues only related to the
> first s2idle entry.
>
> If the system has entered s2idle once, but was woken up never
> breaking the s2idle loop but also never went back to sleep we
> might still have another issue to deal with however.
>
> Move the dynamic debugging message here so that we'll catch it on
> each iteration.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216516
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/amd/pmc.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
> index 047e47449ff93..ce859b300712b 100644
> --- a/drivers/platform/x86/amd/pmc.c
> +++ b/drivers/platform/x86/amd/pmc.c
> @@ -719,8 +719,6 @@ static void amd_pmc_s2idle_prepare(void)
> }
> }
>
> - /* Dump the IdleMask before we send hint to SMU */
> - amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
> msg = amd_pmc_get_os_hint(pdev);
> rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
> if (rc) {
> @@ -738,6 +736,9 @@ static void amd_pmc_s2idle_check(void)
> struct amd_pmc_dev *pdev = &pmc;
> int rc;
>
> + /* Dump the IdleMask before we add to the STB */
> + amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
> +
> rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_CHECK);
> if (rc)
> dev_err(pdev->dev, "error writing to STB: %d\n", rc);
> @@ -757,9 +758,6 @@ static void amd_pmc_s2idle_restore(void)
> /* Let SMU know that we are looking for stats */
> amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
>
> - /* Dump the IdleMask to see the blockers */
> - amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
> -
> rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_RESTORE);
> if (rc)
> dev_err(pdev->dev, "error writing to STB: %d\n", rc);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-03 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 21:50 [PATCH] platform/x86/amd: pmc: Dump idle mask during "check" stage instead Mario Limonciello
2022-10-03 11:52 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).