From: Mario Limonciello <mario.limonciello@amd.com>
To: <mario.limonciello@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Len Brown" <lenb@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v3 03/10] ACPI: LPIT: Use new `pm_suspend_preferred_s2idle`
Date: Thu, 30 Jun 2022 21:33:21 -0500 [thread overview]
Message-ID: <20220701023328.2783-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20220701023328.2783-1-mario.limonciello@amd.com>
Drop the direct check from the FADT and use the helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/acpi/acpi_lpit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_lpit.c b/drivers/acpi/acpi_lpit.c
index 48e5059d67ca..31c49107c579 100644
--- a/drivers/acpi/acpi_lpit.c
+++ b/drivers/acpi/acpi_lpit.c
@@ -6,6 +6,7 @@
* Copyright (C) 2017 Intel Corporation. All rights reserved.
*/
+#include <linux/suspend.h>
#include <linux/cpu.h>
#include <linux/acpi.h>
#include <asm/msr.h>
@@ -109,7 +110,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
if (!info->iomem_addr)
return;
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return;
/* Silently fail, if cpuidle attribute group is not present */
@@ -117,7 +118,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
&dev_attr_low_power_idle_system_residency_us.attr,
"cpuidle");
} else if (info->gaddr.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) {
- if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0))
+ if (!pm_suspend_preferred_s2idle())
return;
/* Silently fail, if cpuidle attribute group is not present */
--
2.34.1
next prev parent reply other threads:[~2022-07-01 2:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220701023328.2783-1-mario.limonciello@amd.com>
2022-07-01 2:33 ` [PATCH v3 02/10] ACPI / x86: Use new `pm_suspend_preferred_s2idle` Mario Limonciello
2022-07-13 18:33 ` Rafael J. Wysocki
2022-07-01 2:33 ` Mario Limonciello [this message]
2022-07-01 13:01 ` [PATCH v3 03/10] ACPI: LPIT: " kernel test robot
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=20220701023328.2783-3-mario.limonciello@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=rafael@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