From patchwork Thu Sep 24 11:04:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 11796993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F268859D for ; Thu, 24 Sep 2020 11:08:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC41B20702 for ; Thu, 24 Sep 2020 11:08:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lIyxSSpU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mufSaWhJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC41B20702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vjtbHyS+FBT1fkR7rkSvu0lwaWaFL6rzLIHkEWB3aew=; b=lIyxSSpU4bLWiSG6AbslFn3V4n CIfGeVaepdIeyI5cTAaEhTr6gL03tpKD1r5GeGgxU5V80onesfddIayKz6Hc7WRM4dv+FoDLOmxiL G3WP4dRYm+zSUGP0gImzs9mADzFdeX9Jb67Jcw3GzIyQM8hdo8Upb9CQheTRIZxSbrjjcHemQuvIe to4loCNAIkWh5Gn0WTBiSSexoZLIIa5jjBGg/TrN+Kju5+4KbiUwqov63MkKleHzLZ5FF/Qj44R4R dqrEFgbCp9NCWej+kkeUI1PDyohoL6H8GMPUnAWQkPmUsKoJsTPdVfW3qyd/mekd+tOqj6zDFVVLQ dSlCjLtg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLP57-0000ZR-L6; Thu, 24 Sep 2020 11:06:33 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLP4n-0000R2-Vj for linux-arm-kernel@lists.infradead.org; Thu, 24 Sep 2020 11:06:15 +0000 Received: by mail-lf1-x141.google.com with SMTP id z19so3444883lfr.4 for ; Thu, 24 Sep 2020 04:06:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LzyEVfHWmhqp2YeTW1iTgqjO0Sx0b8TSpBv6gZq633w=; b=mufSaWhJTEpeaZqLGunvZqqHp9vEfBBCJzxEWCpJIHPJWzWi4QefkwK17iHLj/pM7s fo3Q/6tkCYEU1JO1FR8d0Fw1SbQjuYNK7wD1jJbywuEiIMVj1wu0Mng26Fk8TMYlTMB0 ij9xlXAM5BmSstdnt4c6W+tgp8uqsCiOftPyb/HBtk14B1VLqILUzVHnIWT+skfcvSUt U8qor5QHgb8M4sS19ELlkfjSP4OJ8fk7aoQwkmaWj9VdJN7KhP6kR53XUzhLzSssLOfs TO42wpmo034sPiyRDcX4NGwSLBrA3zYMOw4IZcHOTu/pGikUUPWXM4fOpxD0Y/ULdQP+ lwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LzyEVfHWmhqp2YeTW1iTgqjO0Sx0b8TSpBv6gZq633w=; b=fEGS8nTfKzruVYVsXhwGBYXUYH4Q5Y9Zm96hbFzNzUIxJpkUbXjOVCzgxgcbMHNWeX XIv+/+Db14YwPFdFx9jVcqJovcAWTL4bpBluRKGk3fWUKWHKRn2CoIJo0aH8QsRPPLQx R9Md7VFpegcv1xq4+nwtWscV53MjARwwdDw0DXaFY6DMDJ8ViaH8cM9j99nwINkevUbX onLLxfGxPfGYAvchhMr/Rcw7evad9ayNKy0IURItwO8uy+Q9xRXyc3ft9hSC3Kq8J/dh YxXQ5qh4662hJZ6Y7RfIDqBdEOUSm/ZvS/oT/cvKxRW/68HEB1YQZvKwzQRJaka76WGB EQvA== X-Gm-Message-State: AOAM530CEGWGkddIuHmym6lYOIaU/evCyyNYiQ4BcelcwE+zszec9e85 isQkdW8+GOQF8ewLtcwcm5lLfw== X-Google-Smtp-Source: ABdhPJx2FKWu3aQ4RnPGtoMvMr5etGzGRJYG6Q3BiqdvsBtHHdBydd7wU/4y8htyLWyho1WG9GSMIg== X-Received: by 2002:ac2:5110:: with SMTP id q16mr102229lfb.561.1600945572287; Thu, 24 Sep 2020 04:06:12 -0700 (PDT) Received: from localhost.localdomain (h-155-4-133-169.NA.cust.bahnhof.se. [155.4.133.169]) by smtp.gmail.com with ESMTPSA id w4sm1762393lfr.139.2020.09.24.04.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2020 04:06:11 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Kevin Hilman , linux-pm@vger.kernel.org Subject: [PATCH v2 0/3] PM / Domains: Add power on/off notifiers for genpd Date: Thu, 24 Sep 2020 13:04:46 +0200 Message-Id: <20200924110449.329523-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200924_070614_107276_ACC88EF3 X-CRM114-Status: GOOD ( 14.32 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:141 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Lorenzo Pieralisi , Vincent Guittot , Stephen Boyd , Daniel Lezcano , linux-kernel@vger.kernel.org, Lina Iyer , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Sudeep Holla , Lukasz Luba Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Changes in v2: - Improved error handling in patch3. A device may have specific HW constraints that must be obeyed to, before its corresponding PM domain (genpd) can be powered off - and vice verse at power on. These constraints can't be managed through the regular runtime PM based deployment for a device, because the access pattern for it, isn't always request based. In other words, using the runtime PM callbacks to deal with the constraints doesn't work for these cases. For these reasons, this series introduces a power on/off notification mechanism to genpd. To add/remove a notifier for a device, the device must already have been attached to the genpd, which also means that it needs to be a part of the PM domain topology. The intent is to allow these genpd power on/off notifiers to replace the need for the existing CPU_CLUSTER_PM_ENTER|EXIT notifiers. For example, those would otherwise be needed in psci_pd_power_off() in cpuidle-psci-domain.c, when powering off the CPU cluster. Another series that enables drivers/soc/qcom/rpmh-rsc.c to make use of the new genpd on/off notifiers, are soon to be posted. However, I would appreciate any feedback on the approach taken, even before that series hits LKML. Kind regards Ulf Hansson Ulf Hansson (3): PM / Domains: Rename power state enums for genpd PM / Domains: Allow to abort power off when no ->power_off() callback PM / Domains: Add support for PM domain on/off notifiers for genpd drivers/base/power/domain.c | 187 +++++++++++++++++++++++++++++------- include/linux/pm_domain.h | 19 +++- 2 files changed, 171 insertions(+), 35 deletions(-)