Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1474847pxu; Fri, 16 Oct 2020 12:58:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZuy7U6gOZt5hKBtD0N5TIKX4BOBmzPLxvVM6SoqSGSH5PatC46CaJm/se65H6zJKeYAGw X-Received: by 2002:a17:906:934d:: with SMTP id p13mr5769595ejw.532.1602878212065; Fri, 16 Oct 2020 12:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602878212; cv=none; d=google.com; s=arc-20160816; b=d3oBEZbpiY6C92A85mI/hxB6nJ9awhgVxAMxn+Q/cN45zJHTHhSGCMh3MwuBg9rJbN l70SoTz4yMz7zcg2kh/skw9pDLg6viGQ471af2O+4Rs/LJCiTfrg8K4rQ1Hf6BXpIg/c z/VJ5hpCT678qMUTUVV/FeVBOhujXwFG6z5Vl67uCBtk4Mywaflo7oYR1J/sz2wHODN3 u38SueAlt3zf4VYe08XA77k1G12qcPupJuV2AjINAuyCup265L3W3YTCuFsIf5ftYPQS FraHODqHeIkR7+Xwksy3CSsqiTuDoB8hMR4r6UdvU+iT6L/kjxdEO7J1rf+mjJZvIJq8 B2Jg== 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; bh=wLNdAZob0B/HfCZfs4SRDuNnBT+b5bjOmS6VwnBTk1c=; b=pvDElnUzBbTFkcut2gczy7bLOJR3DuFOGoF5f8NW5ao1Hhy14zw+Q6CNCgbVBuV7YL /uy0JIlRtQ1ltXxjiXbz2Y431eB7W+VTPiavxA6MJVFXrkLa4IFchLtQ4XwL8WqwrkXG ifo3L+OKGMpqosINOmzOUu0B/RokyO+QDR2MMZDVv3ymLW60IBBYa2jMIOXtFSFNVJQ8 Hx5/0mF/1FJ8ilCQrVByp3pRoPIjgc/zhqjrbi5fpk9XINFMspgThy9ds+gWUc48Dk81 rWwxnld1SvS1eUPlDwKpSRayLZBHpk0F6FtC3jJGpyLe9+0MsLuAlqDLVMDqBva/qeVa Hc5A== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si2455188edn.39.2020.10.16.12.56.17; Fri, 16 Oct 2020 12:56:52 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410353AbgJPPlq (ORCPT + 99 others); Fri, 16 Oct 2020 11:41:46 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38966 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408610AbgJPPlp (ORCPT ); Fri, 16 Oct 2020 11:41:45 -0400 Received: by mail-oi1-f196.google.com with SMTP id c13so2890334oiy.6; Fri, 16 Oct 2020 08:41:45 -0700 (PDT) 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=wLNdAZob0B/HfCZfs4SRDuNnBT+b5bjOmS6VwnBTk1c=; b=gZuxKBhr+2gI5vd8J1O6KXoEA3SA9DknL8NhW/oteOljvvJSQW7RlnYRKMKo22Z2Ce dKSkvzLOUK0TYrrnppYl2DIakKMHOzCKcB1hGPpQX1vgp7HrujRPILK4OFjLHRd7jhcE rOd7v97r3isHCO9EUqy9vUTX916PtPS/oSnAcN0RS68NYw/7G9YS17rcwvuyP3D7tPqW fWrij8xUj4sWX4DcECkbVqCTg7v9HENOAYYK7olyVng3NdhcDzoGlB/XlxtcwfGvPmbk LgJAQBkfpOO2EatDoOMXdC7sVP2WoJCkpk+stFc2X57ylUc72mmYB8hlveSs6JZMQmV0 m1mw== X-Gm-Message-State: AOAM533hw92m4nvZzDX2NVwjtqPZmi21zQAKm3m2lR3oMtD5w45nhWh/ 4Y3uJr8lfpWfw25A5y8T9ypsZLopDVN49EvzXWU= X-Received: by 2002:aca:724a:: with SMTP id p71mr2891999oic.157.1602862904691; Fri, 16 Oct 2020 08:41:44 -0700 (PDT) MIME-Version: 1.0 References: <20201013122339.450955-1-ulf.hansson@linaro.org> In-Reply-To: <20201013122339.450955-1-ulf.hansson@linaro.org> From: "Rafael J. Wysocki" Date: Fri, 16 Oct 2020 17:41:33 +0200 Message-ID: Subject: Re: [PATCH v3] PM: domains: Add support for PM domain on/off notifiers for genpd To: Ulf Hansson Cc: "Rafael J . Wysocki" , Kevin Hilman , Linux PM , Peng Fan , 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 On Tue, Oct 13, 2020 at 2:23 PM Ulf Hansson wrote: > > 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, let's instead add a PM domain 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. > > To add/remove a notifier, let's introduce two genpd specific functions: > - dev_pm_genpd_add|remove_notifier() > > Note that, to further clarify when genpd power on/off notifiers may be > used, one can compare with the existing CPU_CLUSTER_PM_ENTER|EXIT > notifiers. In the long run, the genpd power on/off notifiers should be able > to replace them, but that requires additional genpd based platform support > for the current users. > > Signed-off-by: Ulf Hansson > --- > > Changes in v3: > - Adopted suggestions from Peng Fan to allow more fine grained levels of > notifications, which is needed on some NXP platforms. > - Move the code that fires the notifications into _genpd_power_on|off(), > as it simply fits better in there. > > Note that, I understand that some of us may be occupied with dealing with the > merge window, but I still wanted to get this submitted to allow those that have > some time to review and test. Appreciated. :-) Anyway, applied as 5.10-rc material, thanks!