From patchwork Wed Aug 19 10:40:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 11723477 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 9167515E4 for ; Wed, 19 Aug 2020 10:42:59 +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 69CF2206DA for ; Wed, 19 Aug 2020 10:42:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kWMwfUuO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dIjzW/35" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69CF2206DA 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=ahbAXxfiv6cYGMRfUDeMo2ez/j0PhZxm+D5MeW4DcuM=; b=kWMwfUuOwQffUXjfe0psZggpN2 oZGDBN6XxfpVYUwSbSz3wuxG4x1oyeMoP7IhhudwP8C0OQyk9irLCif4JchgguOnQReN0lEO/clzg courAndGN2grDMAEr59kRJ4JJXH0dPkejGdE50z32UOiQsP9Qt9uArtitZ9zkpwC4UMt7mUPDqxgb 2TYn/e7ayJ3C7Y86RG6wHDyRgaa4s1aq3eNkcKCPkC25Ozfq8A9VTZYVUPWdDVxSpr64kkHDYn13M bJxgQqC53cnbXtM3eBNK4eEdxyRdjMWHb9bvp8vpkwdyRpazJd4Uvb7pAvDtfqsZ58AKX5LLa8xKj Ke2gSw8A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8LX5-000130-Od; Wed, 19 Aug 2020 10:41:27 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8LX2-00011u-Oe for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2020 10:41:26 +0000 Received: by mail-lj1-x244.google.com with SMTP id t6so24798362ljk.9 for ; Wed, 19 Aug 2020 03:41:24 -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=8j9EGJFaSYFS5klbcZOeULgDjTEPoTVPGEbkdeSYqgo=; b=dIjzW/35yhnRnkFxvUPgMbWqfhAzruk/AqhRBDa2WxPDWwQYDGxGYfUp2HwEpekPS1 AWp6OT3mGiEZP3SLGhcpZOn+gwIUn/+8mk6dvxeY0+8kgMiReWklihQ24BZ52YeU3VI2 /jCyxxG4I/hzppae2+GHiGmr2UOufLHObk28gPDj/9K1PDpoDcIqzV4IvQNEZ34YAAmD ENyVMVvQcsyDxMyjbag4fRSqtylR5Mtr6Db4A8KHpI5lXo5QUcWMf2AyX8cV7wLvAhoi ro0wlCUEntEQgslF8gruZw3+mCQHccuTouSq7ivN9mFwWQhzVDuhLg8Rf1UggKLqrRz8 Cy0A== 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=8j9EGJFaSYFS5klbcZOeULgDjTEPoTVPGEbkdeSYqgo=; b=do5wX03p5PAnyvlCuU6SNakb9B4H1+GhZ5iVrxJhL+mIrtuUGLLFpmqHzZwXSWR3M1 24MeZhLYDPIsVPC4mnDlY1n4DSLsOrPYfut8zrrmJd1H7J1gewEajF18hKvrxCpW1lFr NCCCNB99X+sqGqhlI14q8Z5WuuObokE+yBQB3w+xhTzRwuekUP+8fdqCEnot2w0jBV2j fTnrGrS/UCXCqn/GNECCrlj0IAPfpflkNhnw5zy79MeMzrNq0Zc11Mg2VuIpET4bKEuO 4Pi/I1lLoBhuYVm8lAuwbFPE3twRMu+cztJuIyjEtUBhCuRfG54qbJ/EoW2yC7hCnNUR +gwg== X-Gm-Message-State: AOAM530T2Jg+Eqt7SCTmf+n48w6KsMeKB9wCkgdXIxBxPRnBP76RTc2X siqywk9jM9ziB+ga+C20b46HCg== X-Google-Smtp-Source: ABdhPJz2zqhf1rESCZqK5+UPE9Oyn+XjrrpI/jbRrqtY1rurHAv9YpsIlk7mPhkhznOPTWag/G+Fag== X-Received: by 2002:a2e:898d:: with SMTP id c13mr10887217lji.236.1597833682965; Wed, 19 Aug 2020 03:41:22 -0700 (PDT) Received: from localhost.localdomain (h-98-128-180-79.NA.cust.bahnhof.se. [98.128.180.79]) by smtp.gmail.com with ESMTPSA id y13sm6534822ljd.19.2020.08.19.03.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 03:41:21 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Kevin Hilman , linux-pm@vger.kernel.org Subject: [PATCH 0/3] PM / Domains: Add power on/off notifiers for genpd Date: Wed, 19 Aug 2020 12:40:54 +0200 Message-Id: <20200819104057.318230-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-20200819_064125_171647_A9C1A95D X-CRM114-Status: GOOD ( 13.35 ) 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:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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 , Benjamin Gaignard , 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 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 | 178 +++++++++++++++++++++++++++++------- include/linux/pm_domain.h | 19 +++- 2 files changed, 162 insertions(+), 35 deletions(-)