From patchwork Mon May 24 15:23:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 447681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 167EEC04FF3 for ; Mon, 24 May 2021 15:28:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3F93611CE for ; Mon, 24 May 2021 15:28:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233119AbhEXPaA (ORCPT ); Mon, 24 May 2021 11:30:00 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:59546 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbhEXP3J (ORCPT ); Mon, 24 May 2021 11:29:09 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 2.0.5) id 71b85afe052eaf1c; Mon, 24 May 2021 17:27:40 +0200 Received: from kreacher.localnet (89-64-80-49.dynamic.chello.pl [89.64.80.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 3203C66971F; Mon, 24 May 2021 17:27:39 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: Linux PM , LKML , Zhang Rui , David Box , "Rafael J. Wysocki" Subject: [PATCH v1 0/3] ACPI: power: Keep track of power resource states Date: Mon, 24 May 2021 17:23:17 +0200 Message-ID: <2074778.irdbgypaU6@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 89.64.80.49 X-CLIENT-HOSTNAME: 89-64-80-49.dynamic.chello.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrvdejledgledtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvvefgteeuteehkeduuedvudetleevffdtffdtjeejueekffetieekgfeigfehudenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeekledrieegrdektddrgeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepkeelrdeigedrkedtrdegledphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtohepuggr vhhiugdrvgdrsghogieslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehrrghfrggvlheskhgvrhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi All, This series changes the handling of ACPI power resources so as to track the state of each power resource in the kernel in addition to using reference counting instead of relying on the values returned by the _STA objects of power resources. The underlying issue is that on some systems the _STA always returns the same value for certain power resources even after changing their state with _ON or _OFF, so it is not reliable in general. Patch [1/3] changes the data type used for representing the state of an ACPI power resources to u8 (cosmetics). Patch [2/3] introduces the power resource state tracking (refer to the changelog for details). Patch [3/3] simplifies turning off the unused power resources with the help of the state tracking mechanism (refer to the changelog for details). The series is not top of the patch at https://patchwork.kernel.org/project/linux-acpi/patch/11762320.O9o76ZdvQC@kreacher/ which is going to be pushed as a fix for 5.13-rc. Thanks!