summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-13 05:47:36 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-18 18:55:01 -0400
commitfa54150aad84dbbd92b26ce47e6b2cf7c686dca0 (patch)
tree73c906f53114270ffcefdae38340dc7c750b7df8 /drivers/acpi/sleep.c
parent147a7d9d25ca2551aab15071cb1f048ecd9b7953 (diff)
ACPI / PM: Reduce LPI constraints logging noise
If a device referred to by ACPI LPI constrains (coming from function 1 of the Low Power S0 Idle _DSM interface) is not power-manageable via ACPI (no _PS0 method and no power resources), the code generating diagnostic information for the LPI constraints will print a message about that to the kernel log on every system suspend-resume cycle (possibly for multiple times). That is not very useful and noisy, so modify that code to disregard the LPI list entries corresponding to the devices that are not power- manageable after printing that information for them once. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index c53119740a3c..b5d27a4213ab 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -851,23 +851,25 @@ static void lpi_check_constraints(void)
851 int i; 851 int i;
852 852
853 for (i = 0; i < lpi_constraints_table_size; ++i) { 853 for (i = 0; i < lpi_constraints_table_size; ++i) {
854 acpi_handle handle = lpi_constraints_table[i].handle;
854 struct acpi_device *adev; 855 struct acpi_device *adev;
855 856
856 if (acpi_bus_get_device(lpi_constraints_table[i].handle, &adev)) 857 if (!handle || acpi_bus_get_device(handle, &adev))
857 continue; 858 continue;
858 859
859 acpi_handle_debug(adev->handle, 860 acpi_handle_debug(handle,
860 "LPI: required min power state:%s current power state:%s\n", 861 "LPI: required min power state:%s current power state:%s\n",
861 acpi_power_state_string(lpi_constraints_table[i].min_dstate), 862 acpi_power_state_string(lpi_constraints_table[i].min_dstate),
862 acpi_power_state_string(adev->power.state)); 863 acpi_power_state_string(adev->power.state));
863 864
864 if (!adev->flags.power_manageable) { 865 if (!adev->flags.power_manageable) {
865 acpi_handle_info(adev->handle, "LPI: Device not power manageble\n"); 866 acpi_handle_info(handle, "LPI: Device not power manageable\n");
867 lpi_constraints_table[i].handle = NULL;
866 continue; 868 continue;
867 } 869 }
868 870
869 if (adev->power.state < lpi_constraints_table[i].min_dstate) 871 if (adev->power.state < lpi_constraints_table[i].min_dstate)
870 acpi_handle_info(adev->handle, 872 acpi_handle_info(handle,
871 "LPI: Constraint not met; min power state:%s current power state:%s\n", 873 "LPI: Constraint not met; min power state:%s current power state:%s\n",
872 acpi_power_state_string(lpi_constraints_table[i].min_dstate), 874 acpi_power_state_string(lpi_constraints_table[i].min_dstate),
873 acpi_power_state_string(adev->power.state)); 875 acpi_power_state_string(adev->power.state));