From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] ACPI: PM: x86: Print messages regarding LPS0 idle support
Date: Thu, 21 Jul 2022 14:55:17 -0500 [thread overview]
Message-ID: <c3b142ff-4a54-036d-320d-0b74410ba825@amd.com> (raw)
In-Reply-To: <12039470.O9o76ZdvQC@kreacher>
On 7/21/2022 11:13, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Because suspend-to-idle is always supported and on x86 it is the only
> way to suspend the system if S3 is not supported by the platform, the
> kernel attempts to enter low-power S0 idle in the suspend-to-idle flow
> regardless of whether or not the ACPI_FADT_LOW_POWER_S0 flag is set in
> the FADT. However, if that flag is not set, residency counters
> associated with low-power S0 idle may not count and the platform may
> refuse to put the EC into a low-power mode, for example.
>
> For this reason, print diagnostic messages when the platform should
> achieve significant energy savings in low-power S0 idle (because the
> ACPI_FADT_LOW_POWER_S0 flag is set in the FADT) and when
> suspend-to-idle becomes the default suspend method (because low-power
> S0 idle should be equally or more efficient than S3, if available).
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/acpi/sleep.c | 3 +++
> drivers/acpi/x86/s2idle.c | 4 +++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> Index: linux-pm/drivers/acpi/sleep.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/sleep.c
> +++ linux-pm/drivers/acpi/sleep.c
> @@ -824,6 +824,9 @@ static const struct platform_s2idle_ops
>
> void __weak acpi_s2idle_setup(void)
> {
> + if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)
> + pr_info("Efficient low-power S0 idle declared\n");
> +
> s2idle_set_ops(&acpi_s2idle_ops);
> }
>
> Index: linux-pm/drivers/acpi/x86/s2idle.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/x86/s2idle.c
> +++ linux-pm/drivers/acpi/x86/s2idle.c
> @@ -423,8 +423,10 @@ static int lps0_device_attach(struct acp
> * line.
> */
> if ((acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) &&
> - mem_sleep_default > PM_SUSPEND_MEM && !acpi_sleep_default_s3)
> + mem_sleep_default > PM_SUSPEND_MEM && !acpi_sleep_default_s3) {
> mem_sleep_current = PM_SUSPEND_TO_IDLE;
> + pr_info("Low-power S0 idle used by default for system suspend\n");
> + }
>
> /*
> * Some LPS0 systems, like ASUS Zenbook UX430UNR/i7-8550U, require the
>
>
>
prev parent reply other threads:[~2022-07-21 19:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 16:13 [PATCH] ACPI: PM: x86: Print messages regarding LPS0 idle support Rafael J. Wysocki
2022-07-21 19:55 ` Limonciello, Mario [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=c3b142ff-4a54-036d-320d-0b74410ba825@amd.com \
--to=mario.limonciello@amd.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@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