Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2287529ybi; Thu, 18 Jul 2019 06:12:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYYLPIu6caBjNdhlSsjdVmcs0TmhjiLnRZ3tm6Lmrew8alfUNMGH0Jwzts55uHY3g0OKLO X-Received: by 2002:a65:63cd:: with SMTP id n13mr47433933pgv.153.1563455569742; Thu, 18 Jul 2019 06:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563455569; cv=none; d=google.com; s=arc-20160816; b=PDyaaecLj5WnCzWqMk2z+juICwxZTGyLq6WEKoXZqWgMG44U724gGNBgvs9oi0lzm7 nZxk/Z2GGJ4zQPJyg2gNOc0T3Oq9BPkNakSerxWBry+MypXwCmG1bA0AvR4YRmVdMyBy oPXaZzuBSVUKyRzKjRAtzVP7CNTFnaPoCFmHh1Idnvp1vaYx4tgvDT7LUmDZEkajfJUO 5E5yKH83tsa6499yT677eDbeWTmXcE++BZHZuuHYeOh58ExVuckAJ2iaM4UvJKwFnKpw 9oU7e6ocvft69TiDN/gwmoyQPoAO7coQMl4yMoM4akSrxRopp31lIWr3QQYk2tVKoVOu o6Gw== 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=lD4c/hiJN/P6GmJmzZetx59iQHPgU9PMHRmIPIRXeIA=; b=HeE+fkJgBPenVNa2wKI0nNfnGe39JfTU/JOEhcTTwvAdFOZkEcPCSlBfOBNlXJiAXf 3J+3zqYvu6viyCCswJgAt57DXuXIIO3WbGBt2FKrRYkcvTWZ2vdOb2GJg6lXwsw3Yq8s NHdslLrE3l94G/Xf/rf1DB7KyE9biWYkaYP0ePgfHTkV2akeCNWsGXBYbw7rtw35KAA8 ID66QvE3d2GbOwcTyqhymTlfVmQuc46ZwOrK9//E8h8XZaqlfsu94C5qeQZGTZ/OFrXm uhcJl0am9dbKOENfu9K/KboSO3//AnO3VMp3Lml8y6IOMVoG3lZ6MosvAexSG6IKIvH9 kK7Q== 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 o7si1650440pgq.459.2019.07.18.06.12.31; Thu, 18 Jul 2019 06:12:49 -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 S1727794AbfGRNML (ORCPT + 99 others); Thu, 18 Jul 2019 09:12:11 -0400 Received: from foss.arm.com ([217.140.110.172]:58224 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbfGRNMK (ORCPT ); Thu, 18 Jul 2019 09:12:10 -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 AF528344; Thu, 18 Jul 2019 06:12:09 -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 09D7C3F71F; Thu, 18 Jul 2019 06:12:06 -0700 (PDT) Date: Thu, 18 Jul 2019 14:11:42 +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 , Linux PM , linux-arm-msm , Linux Kernel Mailing List , Wei Xu Subject: Re: [PATCH 18/18] arm64: dts: hikey: Convert to the hierarchical CPU topology layout Message-ID: <20190718131142.GA28633@e107155-lin> References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-19-ulf.hansson@linaro.org> <20190716144744.GB7250@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, Jul 18, 2019 at 12:48:14PM +0200, Ulf Hansson wrote: > On Tue, 16 Jul 2019 at 16:47, Sudeep Holla wrote: > > > > On Mon, May 13, 2019 at 09:23:00PM +0200, Ulf Hansson wrote: > > > To enable the OS to manage last-man standing activities for a CPU, while an > > > idle state for a group of CPUs is selected, let's convert the Hikey > > > platform into using the hierarchical CPU topology layout. > > > > > > Cc: Wei Xu > > > Signed-off-by: Ulf Hansson > > > --- > > > > > > Changes: > > > - None. > > > > > > --- > > > arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 87 ++++++++++++++++++++--- > > > 1 file changed, 76 insertions(+), 11 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi > > > index 108e2a4227f6..36ff460f428f 100644 > > > --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi > > > +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi > > > cpus { > > > > [...] > > > > > @@ -70,9 +128,8 @@ > > > }; > > > > > > CLUSTER_SLEEP: cluster-sleep { > > > - compatible = "arm,idle-state"; > > > - local-timer-stop; > > > - arm,psci-suspend-param = <0x1010000>; > > > + compatible = "domain-idle-state"; > > > + arm,psci-suspend-param = <0x1000000>; > > > entry-latency-us = <1000>; > > > exit-latency-us = <700>; > > > min-residency-us = <2700>; > > > > Again this must be original format and as per PSCI spec, your patch > > changes this cluster sleep state into cluster retention state which I > > think is not what you intended. > > If the hierarchical topology is used, the parameter for cluster states > are ORed with the deepest idle state for the CPU. > > CPU_SLEEP: 0x0010000 > CLUSTER_SLEEP: 0x1000000 > > After the ORed operation > CLUSTER_SLEEP: 0x1010000 > > So, this indeed works as expected. > Yes, it works. But we are not XOR-ing so what's wrong in keeping the StateType as required and be compliant to specification. Why do we need to make the state param on it's own non-complaint. What's wrong in retaining CLUSTER_SLEEP as 0x1010000 so that it reflects the state level and type correctly on it's own ? > However, are you saying that ORing the state parameters like above has > other problems? I am reading your other replies... > Yes OR-ing may have other problems but the point I made here was more on PSCI spec compliance for each suspend parameter values independently. -- Regards, Sudeep