Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3051083ybi; Mon, 10 Jun 2019 03:32:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuFd5O+1H09q9YjVkRNOWaKCqCHHdSE6N0Jr7vHrUl9eoAFhWOD2+HHV1lLkblMHYzIEoU X-Received: by 2002:a17:902:108a:: with SMTP id c10mr68474708pla.48.1560162741752; Mon, 10 Jun 2019 03:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560162741; cv=none; d=google.com; s=arc-20160816; b=0lh9l9vzNRInZk2wxmSFsDiAWErqQty2ct7Pdgh4cr8D+BoPSZ70/iGJIoY4TRHa4z g6n0phpgSkRwS6Wi4st9GMXZZbif2+y7qSgzUjwWCdY6BXWmIUocoO+1gKZnP83AQfrZ TSPS7DsouCvEInzMLPnCemy3dlvTuNCAR0QtERwf+NCt2l/wQajCRYEdkXvufF2pxT6i 2UuLev2v4f4c61C3SSQl0kVKwWXgD5nkWWmcGBQ9H5No8OwbbL9zZiAEanHtVYFNM6zG kc9j6JXTlYXZ4rTd7Q6mbQHHN5xscmfh/+bwFgDyijVHvN7nfTn1ppuTsw78vpL3mFnm RVdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OJxNCKHBqEq8hxmgfzQAJLVDLncAAe7CM9ROe+/BeNA=; b=JJLtlGuo7450wRQs/bt3PuqfYtDNoMs3oT7VXLhRnxJpMx8GlIzO+z+laeLV2wM32E aYSF6dnXmQY4xDNsLGG1UC3Az/ISZoZxP7jPuXeGEAj/XrdxtJoMbWRPnfjuTACg0pJM M4MBT2EQQlE96bxmT7Qsz9v6q5wb7O/Zrpw0mzOcuawxmf87R539xB6t+YYCVy9GBweH KjdwMp0lvwEHq8evZ471gfFHUwsvPC5wY/BRc71Ag3rALgmCJqfTdJJTIerY6DXXRXs5 Ij6cLQnDoKYFNa7rWc/bVQvkE6vb/rZODReufU6MoEGucTVotLhPnV3VcKfOLWWTzzy7 0FOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ed47JMDe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d126si9218633pgc.46.2019.06.10.03.32.05; Mon, 10 Jun 2019 03:32:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ed47JMDe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389365AbfFJKVs (ORCPT + 99 others); Mon, 10 Jun 2019 06:21:48 -0400 Received: from mail-vk1-f194.google.com ([209.85.221.194]:40996 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388937AbfFJKVr (ORCPT ); Mon, 10 Jun 2019 06:21:47 -0400 Received: by mail-vk1-f194.google.com with SMTP id l73so1524705vkl.8 for ; Mon, 10 Jun 2019 03:21:47 -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=OJxNCKHBqEq8hxmgfzQAJLVDLncAAe7CM9ROe+/BeNA=; b=ed47JMDehrtw98oo73hPrYOSdiClydVSZax5u/whwsvttI4jMeBg5r4kAaxNqyhRB5 BQFS+aUFK4fp9pg9m4ABxFL8f8WSLttgJ/crALrwhCsB3v1rjfIrckms9BqtJaYXtlqc bzwWVino1iCNJq+uESFaHxZLWBnG33vgs3Qmd1+/6T3+zMmoiN7Dl812exIOVO1cl1F7 +J34mbVL1NKVBr2n6AaV5gn/vEQktUbl74lRvHydB7/VR5zEDH8WVmV5fmMUTqQq4oUo jgFxnXWvvAWYApcTfNa6leYI+JjgeKGVBFkeuu7YRcJuNtctRfWgPTUPlWa5tSEu7aqi JNnQ== 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=OJxNCKHBqEq8hxmgfzQAJLVDLncAAe7CM9ROe+/BeNA=; b=ALjKPJ3mEp6hN39LlJ3YzzdWDvr5M+P/g9rUwRn/ip493lU9lLOmGmMIPpAETNjxD6 t45vEbgdo9hkqK0UDAGUYkgodLpcAAn/rtxJ672U7OlwmBtKC49axfn1ETZbzJLkUMW9 0fJ4gNWVSrxs4X4gtHX5CiZh3L8jqvhc8jjjPb3hzmHbF3JG5WRX8W7vmm0yUxPaxCgV E9VDYM0lEVSpBb/f2HMYuUF4npUyDPZW56QrPfK5nn34CfpihDwFDFziBY5EVqTC08H/ yhix+tc89NKqZ+LfNha7m7PYHPzncALOxLj5xBroHsUJnpbSXLmxnelIeaRkoUnBlQ/x CbGw== X-Gm-Message-State: APjAAAU6C0guzgtiiB9b4Yx14ah+WYqzVAWmThm1wSunkDv4dGrCepiI T6MReCHc9hWXo0pPBwhA+MV9vaugG4Cv2WNLF0W52g== X-Received: by 2002:a1f:12d5:: with SMTP id 204mr12861074vks.4.1560162106571; Mon, 10 Jun 2019 03:21:46 -0700 (PDT) MIME-Version: 1.0 References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-8-ulf.hansson@linaro.org> <20190607151716.GF15577@e107155-lin> In-Reply-To: <20190607151716.GF15577@e107155-lin> From: Ulf Hansson Date: Mon, 10 Jun 2019 12:21:10 +0200 Message-ID: Subject: Re: [PATCH 07/18] drivers: firmware: psci: Prepare to use OS initiated suspend mode To: Sudeep Holla 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 , Linux PM , linux-arm-msm , Linux Kernel Mailing List , Lina Iyer Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Kind regards Uffe