Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2958350pxk; Mon, 28 Sep 2020 05:01:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJfQqudbL+Slp2WZNsq4usgLclBs/zOJ6fr5wN79nLnBO+y4kgqlw0jU7Yt8rlWs5qNzmX X-Received: by 2002:aa7:c148:: with SMTP id r8mr1352002edp.210.1601294497279; Mon, 28 Sep 2020 05:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601294497; cv=none; d=google.com; s=arc-20160816; b=T5nA+o9/+RywVKCeFoX9YcXrP5YNAVkybZWqu7QLMpw5UupKX7NcRvLx7r8RRR3APf z8F4AlhIvBWaQPVkUXzYEopHb3J+3qh7efenjC/wH2JgabFEGBKzEyPSUV9cQvVa9Ryj Z1zTYjOxYM+B0N/N9kMuo6Vz2Up2MfUBA6Hf9irzEzO66HNLqTxoebcsAGf27T+3dnp0 tyFOAqCGX4fgH0bnCQTqgcizEy6r7GHw+UbotY2W1De8tUVrrWGadLM/3+r2SqBIW8E+ SlMog3XoP1WeJyCn38B4IY6qCU/RPrMU8gP6ii0n5ffguNEFZ3s212v8ic6b8m1sIJvX YY4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=m6BlvVj0EVBywT2cgsOvKNryF2Rcqd3HsW1lXVo1/GQ=; b=CuU+K/Z9zAuBsMqgcCxEsM4dA7kT/XyAi0nMNUMQnEESSUN2C7CoM2VGX+V6m7jdg3 a1Y29HAJ+EN0uqQwIVBHgYg+uzHZivFDM1KlTmd04ICdS3ChAFaKwFBhfS+M1M7FZPOJ kJi8yPFh27tfqSrh5USYMlF4ZoT3ybnea/BJASy7EmvXrbISg+NLLmfz+zTsTtqXo8If /xwHTKvUTwoSgJTGN8cVb7uRKIO5eo0Do1//4AFk+paT8RA+61O4AA0Das2hLXrco1R6 xnbLY3iKnAAYL9yEGFF+36dSw/98VJ+dFRJ31Ul1AQg8PQnX7IZxAOQRXZ3qBSwOnB1e CnxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pEn/6/8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn25si441346edb.268.2020.09.28.05.01.13; Mon, 28 Sep 2020 05:01:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pEn/6/8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgI1L5M (ORCPT + 99 others); Mon, 28 Sep 2020 07:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726559AbgI1L5L (ORCPT ); Mon, 28 Sep 2020 07:57:11 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 993D7C061755 for ; Mon, 28 Sep 2020 04:57:11 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id z19so2088305uap.2 for ; Mon, 28 Sep 2020 04:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m6BlvVj0EVBywT2cgsOvKNryF2Rcqd3HsW1lXVo1/GQ=; b=pEn/6/8w3Oy5g1bbm39JWitdVAV22PJrmkH7b+G99ss/wCBD0qrKg18W5H/i5c1rWc y9uKCA8zaRWqRn28zrPEPT659GmhDg5KCB9mbEL4GMFnpc9/9H+rrgIcUkNjvEhd+uBd ryIAmPJ3xMFMyQr6lpwMCgvAMmMnlYl8UBqkq00fWI1N8wzGC/QxFaQRRATkGavKZqK2 blW91iQHF78F47AHuqcbpfmobaffGRoEjozN7WFmmV8yxcG/nGa/F3XuglPgmnKiNCP1 AIA11sjlfh/yWiEdY6Np6R/RGrmPTNdAwIV+CYy7sah+p9EilfEOEV/bvtxG74V++jAi ER0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m6BlvVj0EVBywT2cgsOvKNryF2Rcqd3HsW1lXVo1/GQ=; b=JzG3gV95w8fZIlHWk7Iv4YGhGp/u/j88znfhw3euYqDlIOySFWPmpoGTrgF+Sq5OsM GK4b/66DZAgzigPpzclfoTMkWxC91IMxMke5xoycOCLjC6qEnN6pIN+LR3YtbnvGS0F4 uHMcNMYncPoHDybuSUaV1QjlSP/JdCLpSGmOWu2cyq4wtwMEUhyOiGAJWdaV84wtcXI+ Pa/paChH2RocjuxSj00O/jJsPlcgA6UPXbppNVnadB3nYBzDXQrGZ31kiacRiNO6kyro FMkF6k94o+jyMkEMlIZvxyhkGbaHsruMQX6VG0cdQnhXOQUOfaEMI1lWCE/hzeHdHpps ROLA== X-Gm-Message-State: AOAM5311BunfAJvhQL1wCm/zA08YirNRyrqzUx+9l5NvgiKrIZDM+eXI 1Qv5K61XdGNlLSpzgL4pPCVFYp9v11uK0ObNAzlCKw== X-Received: by 2002:ab0:130a:: with SMTP id g10mr375063uae.100.1601294230739; Mon, 28 Sep 2020 04:57:10 -0700 (PDT) MIME-Version: 1.0 References: <20200924110449.329523-1-ulf.hansson@linaro.org> In-Reply-To: <20200924110449.329523-1-ulf.hansson@linaro.org> From: Ulf Hansson Date: Mon, 28 Sep 2020 13:56:34 +0200 Message-ID: Subject: Re: [PATCH v2 0/3] PM / Domains: Add power on/off notifiers for genpd To: "Rafael J . Wysocki" , Kevin Hilman , Linux PM Cc: Sudeep Holla , Lorenzo Pieralisi , Daniel Lezcano , Lina Iyer , Lukasz Luba , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rafael, On Thu, 24 Sep 2020 at 13:06, Ulf Hansson wrote: > > 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(-) > > -- > 2.25.1 > I will need to iterate patch 3, potentially even a couple of more times. As I expect patch 1 and patch2 to not get changed, may I suggest that you pick up those so we can move focus to patch3? Kind regards Uffe