Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp263023imu; Fri, 16 Nov 2018 02:06:59 -0800 (PST) X-Google-Smtp-Source: AJdET5cOuO7ZmkGt73tr6wP2fycRazl4GRgplMAMiqPclWcNiNnvreCcElViOKjVQr50aUcKLH/Q X-Received: by 2002:a17:902:e207:: with SMTP id ce7-v6mr9790645plb.47.1542362819184; Fri, 16 Nov 2018 02:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362819; cv=none; d=google.com; s=arc-20160816; b=v47ieHEHNAAgdUt4srYlnGXPLtAme1G5TqmVOogqsuDeVwqHFV8pro55NLDuFmUBes Dvu+5h76YyS223U+FVz9PAHkIbhLqdo7DvJVVNFCvkOE6WyZ1bi6bezTjeGBHzUaYYPk eOQaedQUd6cJMkp2umHgmfXnIPGTeYJe2GYB6zxwWo9OuRla8QnAhsTtxQ++tVDH829a nAIfIQkjR7NJpeziCQw0DeN9fj1eOm5Ib2MwEACBq0V/MprsZDfQnxfT1R1JHtLzEQ0p vOMDlte4MsKHk/t2NJUTzPPoNYWBVO0e6L0VAgbOQT4tIn7K1EwD+1H2aVgTMR5BUSNo UCMg== 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=R48l0QEaByJoHr3oyNEuGDhlqtakwIzrZ+A+Go4oPU7E2hjF5TaeK3xTJgTj3+2Bxq /qHioKGz2NcLobW3cFLEARK9M2HpETuIOZkgZUgqF/sBqkaJSeWkI9wk9Lly3ucUjF2o Gt1l2XqPBGJtkBqEbGwKIoV7BIA49WoSBm7ghYZS/6+hz9+QeGJ+TUFj8XQ/CU7tN71t VAv+G8oTF2J6Sx8++R5LKd/SO45TPSRL4jqlaVE+kfxRucadg0UDSgRjnv1IkINfVCVB 5oudoi72/FaIrXKqoVNOv6fySnfUvvBc1sjqIMHKZlvCeN8zfb9nTYHezC0vdew1DUfO upvQ== 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 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 t19si13945867pgk.163.2018.11.16.02.06.39; Fri, 16 Nov 2018 02:06:59 -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=auctwtug; 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 S2389629AbeKPURI (ORCPT + 99 others); Fri, 16 Nov 2018 15:17:08 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37164 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389504AbeKPURH (ORCPT ); Fri, 16 Nov 2018 15:17:07 -0500 Received: by mail-pg1-f194.google.com with SMTP id 80so10406363pge.4 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=WwNYKexsG6fCEbvFhD6NL6W+ejGUySBBbgICHvme9JasmBAGkPx8ZtLJJknDLwdzDP di01jlS/m/0ZZJS0uHgR1OEm+5Plr4akEHhgGHcWb7kuSnshlFrTqVzKV5KLP4A8h7cI lGMzJDQB5bCp8xqIbll92TT6vtwIREAOxnSx7Ck7DcHMwkb+nlIywDs2BD/bvqFu8VD4 1ot1d4kauWrXXSTLyastOozyq5SQPSf/u4Byee8IgW00vhX+B2MIaeUNdzPXbdvARRtd iRZYNbHw1F0bb1pIkpQtR+dZKLkZP3FBaN6+8ttUBGNVI90p8lgCTgk1i8w3nFW3/wXZ rMyg== X-Gm-Message-State: AGRZ1gLMNlTlrTe9GPQLHgAvfrdeq2WN3tuSyhvmsQBhiiKc6zMAuxNi fMzTKsrwGaQZnNUUIGKIPtKHoA== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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>; }; }; }; -- 2.19.1.568.g152ad8e3369a