From patchwork Fri Nov 16 10:04:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151319 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp228916ljp; Fri, 16 Nov 2018 02:05:17 -0800 (PST) X-Google-Smtp-Source: AJdET5dzYFRracw309PVPf90s8ZkkC2I1MuJpGArP14y3TRY8luNrUZP7MVwyXp0PjEEVLNYr/nI X-Received: by 2002:a17:902:e08d:: with SMTP id cb13-v6mr6631082plb.196.1542362717359; Fri, 16 Nov 2018 02:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362717; cv=none; d=google.com; s=arc-20160816; b=rrtuF0LfezBC5Yic9s3Kztso0A3zPyk4g770LGLU26vv5rNfQg8rLE4TpjOTTGwT81 oVJ7driSid1iBKOBV6PS8FIC4+EEIM3SRXLcBHqPp8DTwnSs/8bsHKf5vq+ScQfxZATd ZBfiZtKWoON16HlI2DuBUjKvqWR7BgFbMsAOsaI3j3WYkLB2jmFvT1YaMJ3qlOvRNhXm swOixV4ks7AqzZ3Quqt/3njX5TcsT9SpOrGLCwgbzgJyPqb0JR1JioM+KnknRlP1352x jbmvRAuwLSAdRbtzmI5VKsLn1myd8aHq0KA80+A6FVYnvnXXYNFb8Y4J/nirCsQlu+ko 5D9A== 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 n7-v6si30266122plp.43.2018.11.16.02.05.16; Fri, 16 Nov 2018 02:05:17 -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 S2389594AbeKPUQw (ORCPT + 32 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 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(-) -- 2.19.1.568.g152ad8e3369a 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>; }; };