[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220701023328.2783-3-mario.limonciello@amd.com>
Date: Thu, 30 Jun 2022 21:33:21 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: <mario.limonciello@....com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"Len Brown" <lenb@...nel.org>
CC: <linux-pm@...r.kernel.org>, <linux-acpi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH v3 03/10] ACPI: LPIT: Use new `pm_suspend_preferred_s2idle`
Drop the direct check from the FADT and use the helper instead.
Signed-off-by: Mario Limonciello <mario.limonciello@....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
Powered by blists - more mailing lists