From patchwork Fri Nov 16 10:04:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151322 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp229149ljp; Fri, 16 Nov 2018 02:05:31 -0800 (PST) X-Google-Smtp-Source: AJdET5fNBxG/Ox0YX7zdDhS3Qa/dDQfDbyKcnOSTlysVEisX04lulavpYLPyScqI/1V5b3YbMGhQ X-Received: by 2002:a17:902:147:: with SMTP id 65-v6mr10233183plb.140.1542362731163; Fri, 16 Nov 2018 02:05:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362731; cv=none; d=google.com; s=arc-20160816; b=QiVeDUVpxG03EBfeOH/tQh45Zzuu/oQvYr4OCUwSKkqJgwL46yRoo1NeZQ5z8IPDj6 CQkZl8NMVeIfnnaQ95RSHz7BmMRZSvh5/W/NCmRibQd2ks5RdQJ1P43RleM/tpSwIPBz tHApr2BG3ESu9EwGttgOjYAeQEPNZDY5UztcuKAa/6bdvn3PEpqt1AJPGeMF9/+wDcFb wz4tbmQG3sLg9xUajT3woSQZG0lzG6eq+UAyNDGmvo2t7CBZkckX8oWt0bjVQFR4UzSz vJ0u2Mc8OAl3nsevH4YadGu4xRaQ1tY2IgS70geeh8uwVpHpqBd21/O9LMEhooXDuCEd Ow7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=om0H71tufNAx0r7YflYDpC1gYfbPSxJIkzk36iVdtAw=; b=UizaPQcdJt+TQhrJ2ItveEWlbErZahbtKtqv18Lmw7Ut98495unNnhWzogldkKlqvu fejGzDm8ScwLiePng8tQIDnJWF/hz25857dgLQPAVVRBjf9yZAhYQLwhcpFG+dCndUB5 5qPlrJt2Y9TTEW4VajUx4fGy9uvmC+Zy54qW7ZDZu6Z9UgQ7uZ2zetGD8A386s/ACsOU 57hwm3wbejnzFanplwFvHvedCHdXVOi1q/nDo0QOgHORa9AqpIrwmklsByIus30qTbWo zLRFsP1Ky/EksMwxeP5L6WiUr/UT68b1CLtbPWivPveIwdl3HGnxj7K0hWg912PJ34TR jlhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=auctwtug; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 b19si5140420pfm.100.2018.11.16.02.05.30; Fri, 16 Nov 2018 02:05:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=auctwtug; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S2389494AbeKPURH (ORCPT + 6 others); Fri, 16 Nov 2018 15:17:07 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44389 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389460AbeKPURG (ORCPT ); Fri, 16 Nov 2018 15:17:06 -0500 Received: by mail-pf1-f193.google.com with SMTP id b81-v6so10683088pfe.11 for ; Fri, 16 Nov 2018 02:05:28 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=om0H71tufNAx0r7YflYDpC1gYfbPSxJIkzk36iVdtAw=; b=auctwtugckjHOD5UYwG5YZKu9lugfvTLsmETpIWATYFmmRKSoMz8hKoNZJg1vRIqcc /SVMWzBdcg7V3+I8AUw8f2GHCNQ+v7i9aAXAF4QWrcOQyLan24bCiBP7wKBz7+Ufx6h2 wgVPCk/H/6x9eUb2oDprX/qc/SAKcd8l7q3i0= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=om0H71tufNAx0r7YflYDpC1gYfbPSxJIkzk36iVdtAw=; b=dBZKHt9iz+Y9D2wzXOZhjWSHS/tevZ2Ue3sjUdhjuLRfeT+4OYPW0KNANDdeyvfV9w L6395cQG16NtPTGLQfVhgUWgXQPdI17XfMb4dEm/upGMeQ6cjdmyk8lYeUzIvSqA45AN 3+L3jyBT3ig83dnzU7PMKBtyM6pykT25pxzqqLOgkVd0osk5RwwsEiHChogH2d4FbyeY yUqHtxBeGriPQd3ByCoQZrxBql0CjaJdDGVwleVXnMwf0NWCoRheIqwiyVFJF9FtNZKL k0XFb9Lu5OWuYY5I9zfXdxGhHhLF+BIfsXKBZZR01Ab/3/fHwdL89qHieAX3OnOhcXLJ iGvA== X-Gm-Message-State: AGRZ1gKBfQ3RWscIr3nXYMb79GOsFjMso07zwh63BQfr+zkVIYj4yDAt VJdiCWfOBCkUQVIEFB+54Dtz5A== X-Received: by 2002:a62:178c:: with SMTP id 134-v6mr10578182pfx.29.1542362728307; Fri, 16 Nov 2018 02:05:28 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id c7-v6sm37915148pfh.25.2018.11.16.02.05.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:05:27 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , arm@kernel.org, Heiko Stuebner Cc: Viresh Kumar , devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/10] ARM64: dts: rockchip: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:34:32 +0530 Message-Id: X-Mailer: git-send-email 2.19.1.568.g152ad8e3369a In-Reply-To: References: MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Each CPU can (and does) participate in cooling down the system but the DT only captures a handful of them, normally CPU0, in the cooling maps. Things work by chance currently as under normal circumstances its the first CPU of each cluster which is used by the operating systems to probe the cooling devices. But as soon as this CPU ordering changes and any other CPU is used to bring up the cooling device, we will start seeing failures. Also the DT is rather incomplete when we list only one CPU in the cooling maps, as the hardware doesn't have any such limitations. Update cooling maps to include all devices affected by individual trip points. Signed-off-by: Viresh Kumar --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 5 ++++- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 15 ++++++++++++--- arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 8 ++++++-- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 +++++++++--- 4 files changed, 31 insertions(+), 9 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index e1a33dd981e0..ecd7f19c3542 100644 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi @@ -479,7 +479,10 @@ cooling-maps { map0 { trip = <&target>; - cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; contribution = <4096>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi index 9c24de1ba43c..7014d10b954c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3368.dtsi @@ -426,12 +426,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&cpu_alert1>; cooling-device = - <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; @@ -459,7 +465,10 @@ map0 { trip = <&gpu_alert0>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts index 2cc7c47d6a85..81e73103fa78 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts @@ -118,13 +118,17 @@ map0 { trip = <&ppvar_bigcpu_alert>; cooling-device = - <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; contribution = <4096>; }; map1 { trip = <&ppvar_bigcpu_alert>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; contribution = <1024>; }; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 99e7f65c1779..d4ebffc28953 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -770,13 +770,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&cpu_alert1>; cooling-device = <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_l1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; @@ -804,7 +809,8 @@ map0 { trip = <&gpu_alert0>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };