Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2162787yba; Fri, 10 May 2019 07:14:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7rkjkBYk4n0JKFMUuXaxbrPKVfEQm7oeuztslcZbRE8AWD/C0nnCFuSyWx3QvbuTYWKu/ X-Received: by 2002:a63:f754:: with SMTP id f20mr13906528pgk.162.1557497674000; Fri, 10 May 2019 07:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557497673; cv=none; d=google.com; s=arc-20160816; b=pc7Q/lVm4P5/7UEOzC9fUsQ5nArH1xhoumT2uT+CJIYYcIH8jOQcf42+Z9tc7cEr9u EQ3SDpYLF7W+nWCrxMt1DEt8c28isQZdNhmh7b2FfA2QGY/+dRLgJ/T4acUjXwziG7rn pl58A3c0o/cge7S2cyDm9ZfBxE6ttuNtrJ5YTp7BVAqeh197BQAPVXm7ieCmxuzSZoJV LilQFXP6BDNt5xefREAqAOlExmubFRIlR7Y68mu0t3PXpX7R5a3/kcD3B6dlfde9hiLB 207MOf8UIj108vkb3ECqNBfhJM4mPlkQ5fAQqAAmgUlREgWQeBZdkhg1vM/jipqi/rfQ QK2g== 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=Oc+HOjNDQ7ZjdNxPUZBvb85a2F3DpskyEuAF4ob+cf0=; b=rKLR1ml1CDunWOTmsLTSlQTC8wqZqjsb5nPcBbrpfm+D++C+zKHC2Q62wMGE3RClO7 OHUd69jIrAFlXrYTka7Q/Q3SErWT6DdFp7S3eOZa+VcsG7MkDrNgVfvGqeCKuhA2N2aO hDP+IXpObjl1hIieahVeAdTmpIZ8lPrKasEfdSs5ENluiAvlOoY5gx1z9qiszMBJ/w15 eZK/N/XKyX8eEDovWPRLShAfCr4BrhAyRZEAfliYiUxHvP8DNsy93zPuaTn691L0mul1 jgoROLgp5/9Ktw0YhLd8uZurGuRevC4JEdT/g5stJ/ZZTPALlrd/fwAQmXnAMMdaxCty aYXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hXfOvlq1; 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 h89si7096922pld.367.2019.05.10.07.14.16; Fri, 10 May 2019 07:14:33 -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=hXfOvlq1; 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 S1727883AbfEJONA (ORCPT + 99 others); Fri, 10 May 2019 10:13:00 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:45254 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727735AbfEJONA (ORCPT ); Fri, 10 May 2019 10:13:00 -0400 Received: by mail-qk1-f196.google.com with SMTP id j1so3698280qkk.12 for ; Fri, 10 May 2019 07:12:59 -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=Oc+HOjNDQ7ZjdNxPUZBvb85a2F3DpskyEuAF4ob+cf0=; b=hXfOvlq1JUHYhRQN/Ecd6q0zC9XIBX61zsDh4XQdCD1zQW1hPj/PmsBI1uZaFd1hua HyikYujCWvHzujSK9TUo7erUKIbg+TcbT4C1ME7V3DcZmZmsLNfCqnNwWQCZT3/piURz BjcK8xDlY6we/9H/6O11CQvtXeodO10bkJAZBLljlda8dyXKkd+GFVMl437QHNa1+whW ayDJNGtMe8+v0bDP1lK5OTlIEA4ZTBR8NuerSXE6G+JfM45GsUVMJm6IHn0WevIw0s8Q 4lJCgH8aBbCvlje7zjfrPYon2n35yILcwaOD2wDBxULpMTkYisUSyBAG86VbqJ5YCzgd cwJQ== 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=Oc+HOjNDQ7ZjdNxPUZBvb85a2F3DpskyEuAF4ob+cf0=; b=hvO7mufs78JiNfOY04eGvefFryB3raxmsqEB4qL5sezU41ljHRaWbdW+cTblHwGOa7 eiGuvQn73ItfL2eYruGRoiHj5UfhF+P0zD5pq4RtSH2SfsnZOQCA4eKb5nk+UCx+pUJy XEkxBkf5Ft6XG568c2kTi9kfP4FRscln91XQ4K0iBNGorZKvaTFfyinl/9XsE2jUuL7a zCDH0TjALwsMWSVEg1p8OnRdwA4WOHxxS9WqpGaVRdPK0Sd75kUR0kFCH6If3BAl2BTN ANOCAFrVc1s3dPjetytM6e8KQgiJjlo1jUBGe9qf5SpiQilenuXm1Ssm0wDs4jLWs6aV q88w== X-Gm-Message-State: APjAAAWiWgma9zv2FcJMnVvAYx6RrOK31XvCQkUTACvDqyQ6uAMDScaO h424QXdGvmFFOFe77i3TC7UyErAFTprOEw/vvckBR4KsYV8= X-Received: by 2002:a37:9606:: with SMTP id y6mr8611016qkd.352.1557497578809; Fri, 10 May 2019 07:12:58 -0700 (PDT) MIME-Version: 1.0 References: <0afe77d25490b10250f9eac4b4e92ccac8c42718.1557486950.git.amit.kucheria@linaro.org> <3de9c573-5971-15fc-1632-706fc30e90c2@free.fr> In-Reply-To: <3de9c573-5971-15fc-1632-706fc30e90c2@free.fr> From: Amit Kucheria Date: Fri, 10 May 2019 19:42:47 +0530 Message-ID: Subject: Re: [PATCHv1 7/8] arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states To: Marc Gonzalez Cc: Bjorn Andersson , MSM , LKML 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, May 10, 2019 at 6:45 PM Marc Gonzalez wrote: > > On 10/05/2019 13:29, Amit Kucheria wrote: > > > Add device bindings for cpuidle states for cpu devices. > > > > Cc: Marc Gonzalez > > Signed-off-by: Amit Kucheria > > --- > > arch/arm64/boot/dts/qcom/msm8998.dtsi | 32 +++++++++++++++++++++++++++ > > 1 file changed, 32 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi > > index 3fd0769fe648..208281f318e2 100644 > > --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi > > +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi > > @@ -78,6 +78,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x0>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > For some reason, I was expecting the big cores to come first, but according > to /proc/cpuinfo, cores 0-3 are part 0x801, while cores 4-7 are part 0x800. > > According to https://github.com/pytorch/cpuinfo/blob/master/src/arm/uarch.c > > 0x801 = Low-power Kryo 260 / 280 "Silver" -> Cortex-A53 > 0x800 = High-performance Kryo 260 (r10p2) / Kryo 280 (r10p1) "Gold" -> Cortex-A73 Hmm, did I mess up the order of the big and LITTLE cores? I'll take a look again. > > efficiency = <1024>; > > next-level-cache = <&L2_0>; > > L2_0: l2-cache { > > @@ -97,6 +98,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x1>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > efficiency = <1024>; > > next-level-cache = <&L2_0>; > > L1_I_1: l1-icache { > > @@ -112,6 +114,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x2>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > efficiency = <1024>; > > next-level-cache = <&L2_0>; > > L1_I_2: l1-icache { > > @@ -127,6 +130,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x3>; > > enable-method = "psci"; > > + cpu-idle-states = <&LITTLE_CPU_PD>; > > efficiency = <1024>; > > next-level-cache = <&L2_0>; > > L1_I_3: l1-icache { > > @@ -142,6 +146,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x100>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > efficiency = <1536>; > > next-level-cache = <&L2_1>; > > L2_1: l2-cache { > > @@ -161,6 +166,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x101>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > efficiency = <1536>; > > next-level-cache = <&L2_1>; > > L1_I_101: l1-icache { > > @@ -176,6 +182,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x102>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > efficiency = <1536>; > > next-level-cache = <&L2_1>; > > L1_I_102: l1-icache { > > @@ -191,6 +198,7 @@ > > compatible = "arm,armv8"; > > reg = <0x0 0x103>; > > enable-method = "psci"; > > + cpu-idle-states = <&BIG_CPU_PD>; > > efficiency = <1536>; > > next-level-cache = <&L2_1>; > > L1_I_103: l1-icache { > > @@ -238,6 +246,30 @@ > > }; > > }; > > }; > > + > > + idle-states { > > + entry-method="psci"; > > + > > + LITTLE_CPU_PD: little-power-down { > > + compatible = "arm,idle-state"; > > + idle-state-name = "little-power-down"; > > + arm,psci-suspend-param = <0x00000002>; > > + entry-latency-us = <43>; > > + exit-latency-us = <43>; > > Little cores have higher latency (+5%) than big cores? > > > + min-residency-us = <200>; > > + local-timer-stop; > > + }; > > + > > + BIG_CPU_PD: big-power-down { > > + compatible = "arm,idle-state"; > > + idle-state-name = "big-power-down"; > > + arm,psci-suspend-param = <0x00000002>; > > + entry-latency-us = <41>; > > + exit-latency-us = <41>; > > + min-residency-us = <200>; > > + local-timer-stop; > > + }; > > + }; > > What is the simplest way to test this patch? You should be able to see state transitions in /sys/devices/cpu/cpu?/cpuidle/*/* $ grep "" /sys/devices/cpu/cpu?/cpuidle/*/* And if you have an instrumented board with power rails exposed, you could measure the cpu rails with and without some load on the CPUs. That'd help us tune the values too, in the future. Regards, Amit