From patchwork Fri Nov 16 10:04:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151314 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp228490ljp; Fri, 16 Nov 2018 02:04:53 -0800 (PST) X-Google-Smtp-Source: AJdET5eKRJMZ2U5gdZJ95EzT85hII2Op8JTPBeg1DdlSjg2OtzyFtthG6uC86PX4kr3Mv4xqsQIu X-Received: by 2002:a63:78cd:: with SMTP id t196mr9352213pgc.62.1542362693809; Fri, 16 Nov 2018 02:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362693; cv=none; d=google.com; s=arc-20160816; b=eQCN5m/eY7i1P6O5ZX5UKmxileP5k5piP9bcW8FQU46haOv9M06tOFHsLnjHU+WQk6 AHAxZwARC+awLbhbBHPAMSFAy76Xfox8CGLusJWxowm+Oj5F9s6FmESMDjHFEzFUyxp3 vmu6EN/KE1VgO9eIpLdKF/dDEHjS4JtT29CO9+K4oEEa8Lu7lTulKLp4dxlacbxWndfM uAEzxsagQj6pvgEEOD+jp3j/C/qbRUwkv0sunv/MDcHsdwS/Epal+QZC4qTIb+kmPs2x obMjxCRH6cSagJeSW7MCg8qyPzlwvn1PH9uingv0Hx9wjD/BzENyJ154HMsUeqdNvaoK 8K0w== 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=6jGnK7p9DNH1VSecCKTpjJESfpN6DrO/lgZIFx1WzcQ=; b=pgrZGinq+nWM9KPnt25XpiYkmnXFJeKuZgr+Qu509NQr2BrO4/8AmLnsS7s8nOkkt8 0SJHnWG5KILrzel6ZVEIuMB4YCkr5olX+s8kTaCe5670XLeFR6HBZgHI51rni8KHld6L aNp7/JwtyCkT6Q7mAI2bXBUmajl6VF+05bPObgZchd+wLvYfj0mRoWold38C/Kigwe5u IEbfo3RHqTULVJqvtsoMBZDWpRhza7CmKyJ99Do48Mtm6FFfTM8CkltCBaG+Sgy3ukYD 46F9eVbxcqd6JOjoYOnKgc2rFOosl9nHlEvO+jBJW6Rt40LhVEVIc/X2rrfBP7/gINIx iJiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b1U75Cq6; 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 j7-v6si30847191plk.51.2018.11.16.02.04.53; Fri, 16 Nov 2018 02:04:53 -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=b1U75Cq6; 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 S2389500AbeKPUQ3 (ORCPT + 32 others); Fri, 16 Nov 2018 15:16:29 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36682 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727543AbeKPUQ3 (ORCPT ); Fri, 16 Nov 2018 15:16:29 -0500 Received: by mail-pg1-f194.google.com with SMTP id n2so3226632pgm.3 for ; Fri, 16 Nov 2018 02:04:51 -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=6jGnK7p9DNH1VSecCKTpjJESfpN6DrO/lgZIFx1WzcQ=; b=b1U75Cq6PiWwsh0z0qHVgT8KLwnvoLvx19itx4tR0J7yUo4r7wTyFJrjq1gAnh3+a/ DflgwvN3jgsXHSjLZDgoryYD+QBV8BMllSbKnzhPJK5kO2SY3Qta71boyGvWMduiBi+S W0xdwbuvTG67CAHgbzPvoKWe3XXQUnYY4xs8U= 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=6jGnK7p9DNH1VSecCKTpjJESfpN6DrO/lgZIFx1WzcQ=; b=VLmwVZjQVJJiLeyX7gp3csT0JlLFdbQzQ0J21fCP8YZCuFuuyBRWm1VcVrHm4oKoQG z2wg+qUlSLg6DHN+r8G9Qg3w8UVEk4yKrTl3aKZ5HdLSqWiKbEPOaR8zSNw5lJlRSb2L Hmjd059dhMG2BHhjQnBmffc75olD9wQgVHUHliiT1oKkCifeohSsDSmgeJ9OnQ7cT2r3 q9+xoXuOoA1JqiD6SA4qBbTlHBhTUWFLmtDAOzGmFJex2mBGEnJC5eWf5H0pOK8a9sag UnFYRcs5QWmOhVIym4bnDQNAX/IagHtNOGkl/H0r0JFUpl0tvFfWhG+FYcznwc8DQk8S t9IA== X-Gm-Message-State: AGRZ1gLGCnW9mLOM8NlnXgDSr3/MLOg75RWsMR2+T5NI5Aq30q9wwtXC TSQduk5LvBaUAvMG8GYgSgK2zQ== X-Received: by 2002:a62:c501:: with SMTP id j1-v6mr5208284pfg.205.1542362691168; Fri, 16 Nov 2018 02:04:51 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id h7-v6sm51224721pfd.35.2018.11.16.02.04.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:04:50 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , arm@kernel.org, Carlo Caione , Kevin Hilman Cc: Viresh Kumar , devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/10] ARM64: dts: amlogic: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:34:24 +0530 Message-Id: <2778d0d4813cc56be851719846afecbab5f2e657.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 --- .../dts/amlogic/meson-gxm-khadas-vim2.dts | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts index 313f88f8759e..cfc92d06a28f 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts @@ -132,19 +132,15 @@ map1 { trip = <&cpu_alert1>; - cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>; - }; - - map2 { - trip = <&cpu_alert1>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; - }; - - map3 { - trip = <&cpu_alert1>; - cooling-device = - <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>, + <&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>, + <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };