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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 557E5C76191 for ; Thu, 18 Jul 2019 13:12:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3458620880 for ; Thu, 18 Jul 2019 13:12:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726715AbfGRNMK (ORCPT ); Thu, 18 Jul 2019 09:12:10 -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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 F3F66C76191 for ; Thu, 18 Jul 2019 13:12:16 +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 C930420880 for ; Thu, 18 Jul 2019 13:12:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QlW0RDNm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C930420880 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XPbmkBBWQYlxXgC361/9P8aFJgz+QH0p4USPcED0v9U=; b=QlW0RDNmvmpg00 0ACJB1uU/HeNpJNB2ueqX6dF4fowG9ApPmjz9GTWajMLkSjzoFQZ+nBEMb/kizw6OKvfKX9LLhshO Dhah7NBfXSe7jtBd4np8i8BQ7u7Fgjq4hqgoLrsmhXPtsTTPDFU7G3kIFxRVdz4dhhwRtQRrPTZqV 77h30Pi1wUmkpqBnWnWRxnfbG24W44FDLP4lWYwHwVFzZ4SdGOqYI6q2avstIDRTGifsBzfb35nop lP4953GKXwq3tJgztLeX/QxBfvKDyDpKq6AWVQrjIwFYIlQ/oBmjnGwI2/ff0AxndLcWcLVbeuo8E qwqZwwF5jLV9QTvhdDOA==; 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 1ho6Ck-0006Sr-Hv; Thu, 18 Jul 2019 13:12:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1ho6Ch-0006Rv-Fr for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2019 13:12:12 +0000 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 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190718_061211_623275_1B8EA0A6 X-CRM114-Status: GOOD ( 21.50 ) 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 , Wei Xu , "Raju P . L . S . S . S . N" , 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel