Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2575295imm; Thu, 11 Oct 2018 12:29:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60kdJPv2H6bGSQ44nUEJg0nrTJwljsZdYLmg1w4GXlGUjh++DTxKROf4ZD7/jo0CxfHnM7d X-Received: by 2002:a63:cc51:: with SMTP id q17-v6mr2536947pgi.291.1539286197115; Thu, 11 Oct 2018 12:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539286197; cv=none; d=google.com; s=arc-20160816; b=UADKPWncqnca+bgyyQs9wQOzl9362FhtKrCLRc8x0Uai+/4uXBMtDLFBaUpGcjP97i buRL46h9X4iGZgNsxFwEKoZM3YtPb9aIYRJ88TwzePiKaTlqMLNTyG+cbsUzKKbOzyu/ y4/XcQ2K71jyaovXD958CX4YUR7RhNkKZlxixzB/vu1FToeujHYdHf7PrLwAgK456N1D MWu609FG60oW318XkYUu2dd9vH4QYAWC3rSyGr/4gpLAMVBCs03EGSex7nqv8oGeMOBK Xb2e3MUOfgYKCr9MtOlqe2B2aqZHk5bYxoQfyNgoWV85xFIKkfMW3k1oc/uh9mn5oC6i 3THg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NVCg+9yb3OKcpJ568tTR3uoEoMqqAMhP3Uv73OPiQgI=; b=Q5+fVcLl14ei664I+5WX7KdTYwf5zOTVVbGNKUDq3HcV/B86D6tt2pUIWMbc1TMskh n68QS9xjl1Ip21CXVOoEdpNBJH0g35KpSDnUDIuiAsfMRQYUt8Uhm4DuK39Gd3yLyTbT 7KgNZ3KPbTQ7+s2vYxRtbU+IOZvC7wmE8qGkwzia/X0jkYyS8cXylgaM5sgiAJ+na/zq BZf/GYPrO2hGSU8p2H4jVjDAH7odhwsysrQaw1wuf6+PnNuu9xuMcqqyGALlgjeZk7Fv iRE2SvAGYacbRcCV3vYE8CwgM+GUhxFlQ0vdpYw19dQbGjCz25VAShKSgW7PQJcrkjqS txJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8-v6si30819125pfx.185.2018.10.11.12.29.42; Thu, 11 Oct 2018 12:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729222AbeJKX16 (ORCPT + 99 others); Thu, 11 Oct 2018 19:27:58 -0400 Received: from foss.arm.com ([217.140.101.70]:40156 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727042AbeJKX15 (ORCPT ); Thu, 11 Oct 2018 19:27:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3FC33ED1; Thu, 11 Oct 2018 09:00:08 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 508B63F5D3; Thu, 11 Oct 2018 09:00:05 -0700 (PDT) Date: Thu, 11 Oct 2018 16:59:56 +0100 From: Sudeep Holla To: Ulf Hansson Cc: "Raju P.L.S.S.S.N" , Andy Gross , David Brown , "Rafael J. Wysocki" , Kevin Hilman , linux-arm-msm , linux-soc@vger.kernel.org, Rajendra Nayak , Bjorn Andersson , Linux Kernel Mailing List , Linux PM , DTML , Stephen Boyd , Evan Green , Doug Anderson , mka@chromium.org, Lina Iyer Subject: Re: [PATCH RFC v1 4/8] drivers: qcom: cpu_pd: add cpu power domain support using genpd Message-ID: <20181011155956.GA28583@e107155-lin> References: <1539206455-29342-1-git-send-email-rplsssn@codeaurora.org> <1539206455-29342-5-git-send-email-rplsssn@codeaurora.org> <20181011111306.GB32752@e107155-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 11, 2018 at 05:27:59PM +0200, Ulf Hansson wrote: > On 11 October 2018 at 13:13, Sudeep Holla wrote: > > On Thu, Oct 11, 2018 at 02:50:51AM +0530, Raju P.L.S.S.S.N wrote: > >> RPMH based targets require that the sleep and wake state request votes > >> be sent during system low power mode entry. The votes help reduce the > >> power consumption when the AP is not using them. The votes sent by the > >> clients are cached in RPMH controller and needs to be flushed when the > >> last cpu enters low power mode. So add cpu power domain using Linux > >> generic power domain infrastructure to perform necessary tasks as part > >> of domain power down. > >> > > > > You seem to have either randomly chosen just 3 patches from Lina/Ulf's > > CPU genpd series or this series doesn't entirely depend on it ? > > Yep, it not easy to follow. But I do understand what you are trying to do here. > > > > > If latter, how does this work with PSCI CPU_SUSPEND operations ? > > > > And why this can be part of PSCI firmware implementation. Only PSCI > > firmware needs if RPMH votes need to be flushed or not. So, honestly > > I don't see the need for this in Linux. > > I do think there is clear need for this in Linux. More precisely, > since the PSCI firmware have knowledge solely about CPUs (and clusters > of CPUs), but not about other shared resources/devices present on the > SoC. > I disagree. Even with OSI, you indicate the cluster power off though PSCI CPU_SUSPEND call. If for any async wakeup reasons, firmware decides not to enter cluster OFF, then it may skip flushing RPMH vote. So doing it in PSCI is more correct and elegant to avoid such corner cases. > What Raju is trying to do here, is to manage those resources which > needs special treatment, before and after the CPU (likely cluster) is > going idle and returns from idle. > OK I get that, but why is Linux better than PSCI. I have my reasoning above. > One question here though, what particular idle state is relevant for > the QCOM SoC to take last-man-actions for? I assume it's only cluster > idle states, and not about cpu idle states, no? Raju, can you please > clarify? > I assume so. I did see some comment or commit message to indicate the same. > Historically, the typical solution have been to use the > cpu_cluster_pm_enter|exit() notifiers. Those could potentially be > replaced by instead building a hierarchical topology, using > master/subdomain of genpd/"power-domains", along the lines of what > Raju is doing. However, I am not sure if that is the correct approach, > at least we need to make sure it models the HW in DT correctly. > Indeed. I am not sure how to represent both PSCI and this power domains ? Though I believe the latter is not required at all. -- Regards, Sudeep