Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3060469ybi; Mon, 10 Jun 2019 03:43:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPkctgKcshwh63l+z336Pbi4CV0RfCAeD4ZjS9Mcx0m+ZgIA1GEDtf2+HwsRPHkUydru7X X-Received: by 2002:a17:902:728a:: with SMTP id d10mr68440733pll.90.1560163399839; Mon, 10 Jun 2019 03:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560163399; cv=none; d=google.com; s=arc-20160816; b=Bog44ac9ZnhrflZG9i2hR50XfMXxQmDaKS83eXV92gamC1YP0cT48xrbpf+WfQZm9k cRycGxZNCUlD20EQdpmDVxEfntMD7ugYl1HnmZHwrso6yiTwuLWWufZ+oXkIVi3kbTYR 67yIE5wrH6aWYUM+GrUcn9jd6sqZjJ5PxCg94LAZb+DCtVZXYwhqOkV0slDGKrDZyvT6 3J542GaIvSCIvPfTnCMQUHtQKSPXBybuO0hpeEK/aDQMZCcu3cWw+cUFjdHhwVAzeCCn jewSKPykzRI9w/DrkpFeIXVpYJMRGoay1wtLwLFQc0yX2ZBntfuyd9HMuTBCV3qOe0RT bwag== 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=vXD7H/Pv86iBn6rW/xbbRvyM8JIY05UXsc8bfzadpKM=; b=L/LVser8udxRoB67IfK0EowsMQ4XB1++1LrsLODnMXuR8ivpGGU/GMcJbcNUoF4kAp IFXvPRcq9UTBD32EcY8DdskJF7KXao+DYX83FMc3aC4kw88/McXtXeSscMn07kxhNth9 x52QeS56kPlOrHGi0noLIGHeqCCa75iVa+KRebkr+nQBmaNbBDUua1QrR6hF9BMPULwn rRST99UQLzqwOU74UR9dyrue8GqIUxVxIan/UpuQWFb4e6Ls+kz508ia3rGXUUfEiml6 CjzkzK4wHHZjq5UP47TwjJejYld3mN2xByEzWUB1kbis3UZtm4XAfaRgfgv1l94w7hYp E5pg== 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 u6si8386949pfm.17.2019.06.10.03.43.04; Mon, 10 Jun 2019 03:43:19 -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 S2389514AbfFJKm7 (ORCPT + 99 others); Mon, 10 Jun 2019 06:42:59 -0400 Received: from foss.arm.com ([217.140.110.172]:40384 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389426AbfFJKm7 (ORCPT ); Mon, 10 Jun 2019 06:42:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 20FE5337; Mon, 10 Jun 2019 03:42:58 -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 31CE23F557; Mon, 10 Jun 2019 03:44:37 -0700 (PDT) Date: Mon, 10 Jun 2019 11:42:53 +0100 From: Sudeep Holla To: Ulf Hansson Cc: Lorenzo Pieralisi , Mark Rutland , Linux ARM , "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , Sudeep Holla , Linux PM , linux-arm-msm , Linux Kernel Mailing List , Lina Iyer Subject: Re: [PATCH 07/18] drivers: firmware: psci: Prepare to use OS initiated suspend mode Message-ID: <20190610104253.GB26602@e107155-lin> References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-8-ulf.hansson@linaro.org> <20190607151716.GF15577@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 Mon, Jun 10, 2019 at 12:21:10PM +0200, Ulf Hansson wrote: > On Fri, 7 Jun 2019 at 17:17, Sudeep Holla wrote: > > > > On Mon, May 13, 2019 at 09:22:49PM +0200, Ulf Hansson wrote: > > > The per CPU variable psci_power_state, contains an array of fixed values, > > > which reflects the corresponding arm,psci-suspend-param parsed from DT, for > > > each of the available CPU idle states. > > > > > > This isn't sufficient when using the hierarchical CPU topology in DT in > > > combination with having PSCI OS initiated (OSI) mode enabled. More > > > precisely, in OSI mode, Linux is responsible of telling the PSCI FW what > > > idle state the cluster (a group of CPUs) should enter, while in PSCI > > > Platform Coordinated (PC) mode, each CPU independently votes for an idle > > > state of the cluster. > > > > > > For this reason, let's introduce an additional per CPU variable called > > > domain_state and implement two helper functions to read/write its values. > > > Following patches, which implements PM domain support for PSCI, will use > > > the domain_state variable and set it to corresponding bits that represents > > > the selected idle state for the cluster. > > > > > > Finally, in psci_cpu_suspend_enter() and psci_suspend_finisher(), let's > > > take into account the values in the domain_state, as to get the complete > > > suspend parameter. > > > > > > > I understand it was split to ease review, but this patch also does > > nothing as domain_state = 0 always. I was trying hard to find where it's > > set, but I assume it will be done in later patches. Again may be this > > can be squashed into the first caller of psci_set_domain_state > > You have a point, but I am worried that it would look like this series > is solely needed to support OSI mode. This is not the case. Let me > explain. > > Having $subject patch separate shows the specific changes needed to > support OSI mode. The first caller of psci_set_domain_state() is added > in patch9, however, patch9 is useful no matter of OSI or PC mode. > > Moreover, if I squash $subject patch with patch9, I would have to > squash also the subsequent patch (patch8), as it depends on $subject > patch. > > So, to conclude, are you happy with this as is or do you want me to > squash the patches? > Yes I am fine either way. As I put the comments in the same flow as I did review, I thought it's worth mentioning if someone else get similar thoughts. I am fine if you prefer to keep it the same way unless someone else raise the same point. -- Regards, Sudeep