Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp262407imu; Fri, 16 Nov 2018 02:06:21 -0800 (PST) X-Google-Smtp-Source: AJdET5c/JgNVZoL0JtDwYuFKsFd8jZTl9G/S4ZrltuZjbpWuCVbIpXjxoYFMNncA4P6JyyPc7F/m X-Received: by 2002:a62:2a04:: with SMTP id q4-v6mr10221081pfq.61.1542362781754; Fri, 16 Nov 2018 02:06:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362781; cv=none; d=google.com; s=arc-20160816; b=MBO0Is9cCtwhsdbSlNNSr+j2HiHqo9ELpP3902L6/Ol5iUwh0qf4j+4qrU8j36zL82 r7i+S27T+jW2/WwvpCZoqwt4JcbQmTC5tvDraw6SomlGubUzYi8HZR17GbIrAC5NrWTh Z1Lz32aUS72VlRthyc/CAT9S6aSxJvgagK8nhNA+3c3Iz/YwzSwxsW5/T/biySowTVRQ hf1pZUY0UssX3+o08ksgh/D7PS9XG6hK2R2SxHRBaWiWUreLX21WNP5pdc8X2FW+Uq0R sDjrmfSe4fa9jaiTK3S5lpzOiFysxJVqbgCvYAMwnVSh5I9Y9zJnQfYxYbd+8U4m+4MI Brvg== 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=RnCIsEGq5MZTTZCkNy8l3CMIA4bwOFY/LPw8vXjcyjo=; b=Ot6f8HXqmKGkQOEh5WyIDhXKw40dce0j5SDRMmmCyG2isOYNOMnVeCRkQylw/3Hl0w c42H2rkfMwrjN9+n/cUjlvAlCW1Icsytt6DqJIE2GSopa68lTCtuPLqwicVParwVh23t Os106tUVt1vN6WsHUnMSofdsz1WNTOV6FW4Xwq0metY5//2vFnroEvE3Imib7mjCdN0F Vvc8EEGHCx4l1gYl4ABIWNM7SzpFnTSNdwqOhFCcNOk9io2usKDImcN6ZurHQoZlAaKR udcUY2mCUxvAm8PZXt1WmOLoSjlIp4j6f5rCU1V89BmudKfytgR4l61oLWJytRIPTPY3 DHqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T+iqTvBv; 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 y6-v6si32203450pfy.29.2018.11.16.02.06.07; Fri, 16 Nov 2018 02:06:21 -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=T+iqTvBv; 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 S2389481AbeKPUQw (ORCPT + 99 others); Fri, 16 Nov 2018 15:16:52 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:46752 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389436AbeKPUQw (ORCPT ); Fri, 16 Nov 2018 15:16:52 -0500 Received: by mail-pf1-f195.google.com with SMTP id s9-v6so11160665pfm.13 for ; Fri, 16 Nov 2018 02:05:14 -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=RnCIsEGq5MZTTZCkNy8l3CMIA4bwOFY/LPw8vXjcyjo=; b=T+iqTvBvTwFjGud//iZpTeH9leHdAkXHiolZPRv3m8YPKwjf2NcPiFwBMBs7pPsl7i R5glNd1K+psMyhUEK1DQEqo7NLCNyyuPWywmWuqlnBOqjjuysRuc+lDVK/lwYT+9t6dK KFeF0TCLS7C54iI2qZj7AIdlKNDijQ52Ooaf8= 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=RnCIsEGq5MZTTZCkNy8l3CMIA4bwOFY/LPw8vXjcyjo=; b=pAErhGJzE7hLSqFo4SFhcwyJt6vhIEmaxorgmSXmiEXDC53m/PsVS0uTbXkym6lI5K PRONPkCPWZ1J/yaG8WdrjyLTtlj2LJnQLnFOjLyPw5ViIO/xlYij32YrcgtC7mdANeiG rTlY6Y8ooH6GHWKFHuZNHv0I2Belpky1o2ykRMZCfBllbG+hXkP7yyu4BK3CDzjzm33V WQZvJRindDi4JE+mf46cdmsg1RWsob727lBkenXZLKLsoHlrPHUQgVpbMBWC1E/34FHt GXqFxx2lN/K3SGiBwoLx/OMpTO79MwOdAPhtRfoz/xSHIMpqEIlTxJrMml3vph/e4igF ZJtg== X-Gm-Message-State: AGRZ1gIQ6qwqHFHvFkvPqG/5IZxDq95Rxpy7K9atPRXBuNqMrjv/2MXV yxmoJVB6gKSLFEoKt4vW2RBkUQ== X-Received: by 2002:a63:314c:: with SMTP id x73mr9435566pgx.323.1542362714354; Fri, 16 Nov 2018 02:05:14 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id u76-v6sm41233381pfa.176.2018.11.16.02.05.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:05:13 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , arm@kernel.org, Matthias Brugger Cc: Viresh Kumar , devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/10] ARM64: dts: mediatek: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:34:29 +0530 Message-Id: <3c7c9155ac01a2d745ba5e4434c958820200d088.1542362530.git.viresh.kumar@linaro.org> 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/mediatek/mt7622.dtsi | 9 ++++++--- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622.dtsi b/arch/arm64/boot/dts/mediatek/mt7622.dtsi index fe0c875f1d95..53e707df98d9 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi @@ -170,17 +170,20 @@ cooling-maps { map0 { trip = <&cpu_passive>; - 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>; }; map1 { trip = <&cpu_active>; - 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>; }; map2 { trip = <&cpu_hot>; - 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>; }; }; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index abd2f15a544b..e578f7d18038 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -275,12 +275,14 @@ cooling-maps { map@0 { trip = <&target>; - cooling-device = <&cpu0 0 0>; + cooling-device = <&cpu0 0 0>, + <&cpu1 0 0>; contribution = <3072>; }; map@1 { trip = <&target>; - cooling-device = <&cpu2 0 0>; + cooling-device = <&cpu2 0 0>, + <&cpu3 0 0>; contribution = <1024>; }; }; -- 2.19.1.568.g152ad8e3369a