From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68737C282DD for ; Mon, 10 Jun 2019 10:21:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39CDC20859 for ; Mon, 10 Jun 2019 10:21:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ed47JMDe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389191AbfFJKVr (ORCPT ); Mon, 10 Jun 2019 06:21:47 -0400 Received: from mail-vk1-f196.google.com ([209.85.221.196]:47016 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389092AbfFJKVr (ORCPT ); Mon, 10 Jun 2019 06:21:47 -0400 Received: by mail-vk1-f196.google.com with SMTP id c200so851712vke.13 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=mRG0J0FXK6lfNZAu/Uj1WpcNsHvRAMvli/lquS16oJbmK7a0IsggoqzlDiMhKMd/nk I9i9NxEX7qS6dDsr20O6S8nSMK2p7U9C8nMHPYMJiZ9G2IsGJfkpICcS5mge8hJJF/wX WLpNEIAarOS1ucu/+eDIxiymQ+oZUSG8FwHq7VOlKxcaoo6bZmrETP1hhEtmJ/rhvvjk 0UR/ZKOmzxs7U3309ceUMCIz6dzaJgSQ1qT94F8urYKfEikxK0O5p2M6eJSJDEmhTUBI XsUcoHETzKUo0m6+npqczseJWL/y70KZxT8oouZdoyZaqpcbhO6/m0z1pkgJ/dwSvNul e29Q== X-Gm-Message-State: APjAAAXBL+fGmg77c3x+jKw/FP2cRQngOZUodJDWbPrf9L5fMHA8wW88 wwYzk5WB5wpoA6PQRFrxVIUk13Cg9UJk6IJEaNRYCQ== X-Google-Smtp-Source: APXvYqw85yEyPCfVXgt5WHExarvGTTNSk7I/nOG6fWausDPOCC8pBQhB+ownP2Y9XmGBJmpJYjtZLrkebjzWM3KbGXc= 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05469C282DD for ; Mon, 10 Jun 2019 10:21:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD42A206BA for ; Mon, 10 Jun 2019 10:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TjA4QMLM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ed47JMDe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD42A206BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2+1vwSDokJq+kYCth6gh5JOOt++oouBYIkYUMNzBpQA=; b=TjA4QMLMGKNwf9 ehNcWhKrFXWdHwZJHr2d9S1TgnNvXMU5DfsptETPGwwBBUXrDFzQUcE+4dzc051HirhLM33WQ4w95 2/fMejmbIQ9lv7xVPguaxd4TSM+CYaZ47QyjcgG/IhXCxHezEJVESyjMKkZ4SoW9unVHw7TntK33T VGjJSNX0ts0K/uvPnj1f9hGGRWcIDg4Wm6HnqICtTjn6DW17PSh8iPcD5DFvvQWU41Gi0fhJ8JdDt Wz7Qd6gAwSpGNcFg0kHZFnCXwAh9HhjHWiQ0oYOo5Iq971buGrZbgrJg6dmwQjUj0neRSAjwdqmPX QaEcMRoKHN8U2xl2SbHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haHR1-0003VR-CK; Mon, 10 Jun 2019 10:21:51 +0000 Received: from mail-vk1-xa43.google.com ([2607:f8b0:4864:20::a43]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1haHQx-0003Ul-Rd for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2019 10:21:49 +0000 Received: by mail-vk1-xa43.google.com with SMTP id s16so1529894vke.7 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=g0PP1hoYAoqoXAi198g17LDjAiEAd12WeusgWN9LjPtC2Z7dysypr58oKzMaPsn99t Rc0dtN3+gkcJdT1PJXpJwGMALc6Vvh/Nu/iH+0jF7YEuDtQ2JmgCTkllJQCwcXq8a9ai x3VIgy3fclLTwJGqkheubVN3fB+U22E8K7zwg0OVEJBBWPVLt991YE6Nt0ktqjD/XyUs L3Be6a+nFesMgksvAK9dZAamFIeYeRlAXL894nPy8UHxPG8kA82pp+liaTC+eMLBY4gi ZiqUu5m5uHDmBVA0zpe6wk7+ozLVNwFury+4XfPP6kHrzihTOuVBHUjx4a1YPbbv8LU6 kOnw== X-Gm-Message-State: APjAAAXacF487TxLF8RkjA3JIyLGBjZ543rWHW848niQwzmetvFJ/V7y PxZWLg+mKlMcF/tJvkB939Nd53tN9RowZYt0pdwVtQ== X-Google-Smtp-Source: APXvYqw85yEyPCfVXgt5WHExarvGTTNSk7I/nOG6fWausDPOCC8pBQhB+ownP2Y9XmGBJmpJYjtZLrkebjzWM3KbGXc= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190610_032147_904918_BBB362A7 X-CRM114-Status: GOOD ( 19.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , Geert Uytterhoeven , Kevin Hilman , Stephen Boyd , Viresh Kumar , Linux PM , Daniel Lezcano , "Rafael J . Wysocki" , Linux Kernel Mailing List , Amit Kucheria , Bjorn Andersson , Tony Lindgren , Lina Iyer , linux-arm-msm , Niklas Cassel , Souvik Chakravarty , "Raju P . L . S . S . S . N" , Lina Iyer , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel