From patchwork Thu Nov 23 05:40:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 119510 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp369594qgn; Wed, 22 Nov 2017 21:40:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMYrjiVJc7+Dsm25bFc+rCgp61o3TK6npqQOZD6EGH5JLGeECzEdVNF2QEmobrawD+lGYsIU X-Received: by 10.84.253.142 with SMTP id a14mr22263550plm.38.1511415642768; Wed, 22 Nov 2017 21:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511415642; cv=none; d=google.com; s=arc-20160816; b=gu0sR5+1Ob4RcY0WL3/ZDOInd8ytWjUDSI8D4TdoTWbcfuLQyCjQP6+8GPoFqzhxAF kVrZuv/oyswMdJgh7RsjujOEKWtFqxfeWtncknXpbPisfHBYxWq2ZJUSMj2/8XrFQfVp dkiR+vUXUzJzQ8Pt6dNMkjLaYrV/GnH9D629rogACQaag11LpVYJiWvS3K9jKIF/flTh qZMhaxfpfaPnAUm5vsKep7VzHF1Kpp5G15Ca1W7PoIEK6pXmfmVyQdoBQgOxQFP+dxqH BrU8s6lQKDPGS5tcxBTWm5TDVzReEeaWN4PF6SqF8nO/RNasRw66nlxxC3PmEhq6ZL19 cqDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=oiVMwxK666qkGsTXWOdpH6+rvso8jD/V8tRVKBN115w=; b=PQqnKcGg3OzlrqDXh0kqRue3LHyoyT/gjbyerX5NMb03yJODE7YNMTJi27NH1U26uO hT6d5IUmpHwxGCDPFEJMLB1Z/QUsoVlkFIrEKKagcWTa5jbBCQS3K7d+y1NPKit3/RS1 v5QzIe8zWHE8BY3CfDUu64fIvqTTIr/eAUp1ARiQyZbxGQTOZ2j7fy3nA4W/iywFmsb6 A19C27Ia+MkW0tCE3WOMP75B3aP7HQ4y6N+D+HiGg2ae/hIlPDIK5unFQCZEGLC7RZjM KuIHtzfGKWod3kKu1Y6e8/BJoQnKOcgPYIMDH+ifUm+R97bxNfmzwSTaaAvBHzOgI25s jeQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ArVmrcer; 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 m4si11742854pgr.313.2017.11.22.21.40.42; Wed, 22 Nov 2017 21:40:42 -0800 (PST) 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=ArVmrcer; 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 S1752317AbdKWFkk (ORCPT + 28 others); Thu, 23 Nov 2017 00:40:40 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:45441 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbdKWFkj (ORCPT ); Thu, 23 Nov 2017 00:40:39 -0500 Received: by mail-wm0-f67.google.com with SMTP id 9so14305995wme.4 for ; Wed, 22 Nov 2017 21:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oiVMwxK666qkGsTXWOdpH6+rvso8jD/V8tRVKBN115w=; b=ArVmrcerWF5asJ9KPBndlPcz83M8T5wqwcSqKhznh01VkDk1d6xowhed3oBmAl/0zw jLzqN/24VsIaPA24lZ2Vhx2dVro28KNRuYJ7DsLFZMmFoPVAZiIlA0HXGjq+ptBqLnhi BtUqUWZrdmQirXHLmGkm21p6i7VB6D2NXbc/o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oiVMwxK666qkGsTXWOdpH6+rvso8jD/V8tRVKBN115w=; b=YI29/KxIRFUyh7rRT6QPXOKvXadc+oCA0kDjYtr7jUpVmwLxQn9ZMNus2nZgqYpCf2 PpoDxV71VYu5wjgAGKrAKhH7A9zxS+XeB0ylK2ZFpgk17hCRvzF+hQUSmgm2Hx+oddN3 Fixao/n+zL9+sHo++QcKR9b2UlK7TqiUoCjFD9Sr3y6jG6SmPLKqClY1y2FL8RnONROB 8j2gyqmbLGypKNzDcv38CHsM2V3U6MCp4ZoQqPXjv8TrFqSchZ3hG/bSqrLOpwUAWVLa cE6VP2KE0AI0lvFx7rjHvh9HMqOpazzX9Nm4C7RvqCXyHnN2l8UT57UDdaYLNGmeEpKf ua9g== X-Gm-Message-State: AJaThX6cO5urB/4aRf1mmKgkVy3Q5R6ySe8gSh6gDMOtfen89Zwpg2dN 6jItTWOBoHy/3wf/n4vSrEyVMw== X-Received: by 10.28.227.136 with SMTP id a130mr6210887wmh.104.1511415638214; Wed, 22 Nov 2017 21:40:38 -0800 (PST) Received: from localhost.localdomain (li1530-42.members.linode.com. [139.162.245.42]) by smtp.gmail.com with ESMTPSA id y2sm446384wra.18.2017.11.22.21.40.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 21:40:37 -0800 (PST) From: Leo Yan To: Wei Xu , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Leo Yan , Vincent Guittot , Daniel Lezcano Subject: [PATCH] arm64: dts: Hi3660: Fix state id for 'CPU_NAP' state Date: Thu, 23 Nov 2017 13:40:14 +0800 Message-Id: <1511415614-9859-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks a lot for Vincent Guittot careful work to find bug for 'CPU_NAP' idle state. From ftrace log we can observe CA73 CPUs can be easily waken up from 'CPU_NAP' state but the 'waken up' CPUs doesn't handle anything and sleep again; so there have tons of trace events for CA73 CPUs entering and exiting idle state. On Hi3660 CA73 has retention state 'CPU_NAP' for CPU idle, this state we set its psci parameter as '0x0000001' and from this parameter it can calculate state id is 1. Unfortunately ARM trusted firmware (ARM-TF) takes 1 as a invalid value for state id, so the CPU cannot enter idle state and directly bail out to kernel. This commit changes psci parameter to '0x00000000' for state id = 0; this id is accepted by ARM trusted firmware and finally CPU can stay properly in 'CPU_NAP' state. Cc: Vincent Guittot Cc: Daniel Lezcano Signed-off-by: Leo Yan --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index ab0b95b..5666d29 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -147,7 +147,7 @@ CPU_NAP: cpu-nap { compatible = "arm,idle-state"; - arm,psci-suspend-param = <0x0000001>; + arm,psci-suspend-param = <0x0000000>; entry-latency-us = <7>; exit-latency-us = <2>; min-residency-us = <15>;