public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT"
@ 2022-07-13 17:33 Rafael J. Wysocki
  2022-07-13 18:09 ` Limonciello, Mario
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-07-13 17:33 UTC (permalink / raw)
  To: Linux ACPI
  Cc: LKML, Linux PM, Srinivas Pandruvada, Zhang Rui, Mario Limonciello

Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Revert commit 1cdda9486f51 ("ACPI / PM: LPIT: Register sysfs attributes
based on FADT"), because what it did was more confusing than it would
be to allow the sysfs attributes in question to be created regardless
of whether or not the relevant flag was set in the FADT.

If ACPI_FADT_LOW_POWER_S0 is not set, it need not mean that LPIT is
invalid and low-power S0 idle is not usable.  It merely means that
using S3 on the given system is more beneficial from the energy
saving perspective than using low-power S0 idle.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
diff --git a/drivers/acpi/acpi_lpit.c b/drivers/acpi/acpi_lpit.c
index 48e5059d67ca..50540d4d4948 100644
--- a/drivers/acpi/acpi_lpit.c
+++ b/drivers/acpi/acpi_lpit.c
@@ -109,17 +109,11 @@ 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))
-			return;
-
 		/* Silently fail, if cpuidle attribute group is not present */
 		sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
 					&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))
-			return;
-
 		/* Silently fail, if cpuidle attribute group is not present */
 		sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
 					&dev_attr_low_power_idle_cpu_residency_us.attr,




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT"
  2022-07-13 17:33 [PATCH] Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT" Rafael J. Wysocki
@ 2022-07-13 18:09 ` Limonciello, Mario
  0 siblings, 0 replies; 2+ messages in thread
From: Limonciello, Mario @ 2022-07-13 18:09 UTC (permalink / raw)
  To: Rafael J. Wysocki, Linux ACPI
  Cc: LKML, Linux PM, Srinivas Pandruvada, Zhang Rui

[Public]



> -----Original Message-----
> From: Rafael J. Wysocki <rjw@rjwysocki.net>
> Sent: Wednesday, July 13, 2022 12:33
> To: Linux ACPI <linux-acpi@vger.kernel.org>
> Cc: LKML <linux-kernel@vger.kernel.org>; Linux PM <linux-
> pm@vger.kernel.org>; Srinivas Pandruvada
> <srinivas.pandruvada@linux.intel.com>; Zhang Rui <rui.zhang@intel.com>;
> Limonciello, Mario <Mario.Limonciello@amd.com>
> Subject: [PATCH] Revert "ACPI / PM: LPIT: Register sysfs attributes based on
> FADT"
> 
> Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Revert commit 1cdda9486f51 ("ACPI / PM: LPIT: Register sysfs attributes
> based on FADT"), because what it did was more confusing than it would
> be to allow the sysfs attributes in question to be created regardless
> of whether or not the relevant flag was set in the FADT.
> 
> If ACPI_FADT_LOW_POWER_S0 is not set, it need not mean that LPIT is
> invalid and low-power S0 idle is not usable.  It merely means that
> using S3 on the given system is more beneficial from the energy
> saving perspective than using low-power S0 idle.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
> diff --git a/drivers/acpi/acpi_lpit.c b/drivers/acpi/acpi_lpit.c
> index 48e5059d67ca..50540d4d4948 100644
> --- a/drivers/acpi/acpi_lpit.c
> +++ b/drivers/acpi/acpi_lpit.c
> @@ -109,17 +109,11 @@ 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))
> -			return;
> -
>  		/* Silently fail, if cpuidle attribute group is not present */
>  		sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
> 
> 	&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))
> -			return;
> -
>  		/* Silently fail, if cpuidle attribute group is not present */
>  		sysfs_add_file_to_group(&cpu_subsys.dev_root->kobj,
> 
> 	&dev_attr_low_power_idle_cpu_residency_us.attr,
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-13 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 17:33 [PATCH] Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT" Rafael J. Wysocki
2022-07-13 18:09 ` Limonciello, Mario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox