From patchwork Fri Nov 16 10:01:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151308 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp224979ljp; Fri, 16 Nov 2018 02:01:39 -0800 (PST) X-Google-Smtp-Source: AJdET5cGEdvMm9BUPffUpKV+5OIZjurIqkQ2pXFEQlAYS7TuxAExBKGewAtXCdxPD4oWE0Eg6/gT X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr10024009plb.117.1542362499239; Fri, 16 Nov 2018 02:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362499; cv=none; d=google.com; s=arc-20160816; b=ngM165ewj8HIEL/quD1JGtcrH+VBWJps7ttIqjbAJX6zAZLctYKW1jiFWt3HOkQbc6 KVBm95kIrNtS3/8t/Dh22x7cGaLn7lOmtEW8e9lrUOaoF/f7MHF94wudGjIvPBUhO3Hg oW11skJ7r0RfL9KKZ8sEMXVb43sws2un2Mzll0YRwbZAUff6qTJr/73bbPx0UzOIlpv6 JH4A+sR3w8Dg5TXZoucFHMSubbxSTKtEWrYkY/bxS1cuJWa+gvwtl1ZCrBr3/tIToLD5 F3t/HciJfetCJyOyjK4Gy64GSLSJl4RvAGmHp6s1MTWj1RnQYRSUXzxrHmGLvz01j6m0 d7VA== 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=PQa+91PLxFYb8h1aIVw+4jOUYz51ilym0PbG90kh508=; b=k85xpLptPFJWDaW4y7xLXjI0JeupQ+e27eubDSDTwvQOJyQyaWa38AhFIHHtHlYBYg xKumKX7z52z9dH2kQ4DDT896niTATiDPrydYKzWIDGLZec/cex7C6fyJUf8cZ2tgYS/i K//FcAzHycPalXC6HRiv6oV8tKVZPbj+AAJCxxHVc8mJE7GzwljKeMel0aekPWtYP4a2 x2d6q5PyjxhoctNINTF5eVjkgaiHzHrp3Zxz7YkU9J9ywmROxATac1Q3lm4IWpiJ7OA4 jtgTiSYwlhCSJyf/tI42O12ewKTg5tBXkVbasCtoN4NQV2iyo3t//6m3zCZqWXODScdc PrMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aHWWgwrJ; 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 x136si13382149pfd.75.2018.11.16.02.01.38; Fri, 16 Nov 2018 02:01:39 -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=aHWWgwrJ; 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 S2389484AbeKPUNN (ORCPT + 32 others); Fri, 16 Nov 2018 15:13:13 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33838 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727543AbeKPUNM (ORCPT ); Fri, 16 Nov 2018 15:13:12 -0500 Received: by mail-pl1-f195.google.com with SMTP id f12-v6so10953540plo.1 for ; Fri, 16 Nov 2018 02:01:36 -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=PQa+91PLxFYb8h1aIVw+4jOUYz51ilym0PbG90kh508=; b=aHWWgwrJHeMJF7ff+1nnC4xFocDcrbbCvgDon1DEptT8Nv3+kT8MtF5A1rPMDRLE1R sfFIptosEqc8HanBNvZItk3DiZolp+jOkm2UAWMSrxY7nqw6dBMHh4WvvX4Znak52ZMe d9SCmulfAKlNGrZTWNVKofTrKqW21c9pt4ba4= 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=PQa+91PLxFYb8h1aIVw+4jOUYz51ilym0PbG90kh508=; b=Lzg1KtlaA3cxDAxg8oxaDW3fk6DHhH9vofNTKi2eHBhgSeYSJg9YqIymiMqkfd2p+d htSnpMVA9pv89pTDYEXscNrrXQHp4Neq0ZCm7RuojPcwv3KwXOeGiiNhwnEDy8p4QAxB ARYdU2GFHyxMMvtlBtdxSuTj2+f8zoFK+Bkq5rbmO4VZEROjAC+XKg6x1ViiPTZUpIy4 u8EWlUvyz8u7mmM1Q+dUEwcW/UbOCu0FYGl+J6w8X3M3wq/+8Lqwm0F762aZEWEQh5H8 AJgo+X1VufZtGYlxJSvkfpzQwIDA2OmQeYFFTYiETLdk6iC6cApInqIKgazTu8qALExQ vZEQ== X-Gm-Message-State: AGRZ1gKqG0fP7k6u84WEIUYRh3UoU1NbThQSA+ItPV1wq5Jq6U1LRPf0 /5ugjr1BAw+Q3IXtgS5Pg7RkMw== X-Received: by 2002:a17:902:396a:: with SMTP id e39-v6mr10242837plg.65.1542362495513; Fri, 16 Nov 2018 02:01:35 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id u6sm30797249pgr.79.2018.11.16.02.01.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:01:34 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , Shawn Guo , Li Yang Cc: Viresh Kumar , devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] ARM: dts: ls1021a: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:31:11 +0530 Message-Id: <4e3e13854a25a2c59a8202872191be329ae4d5f1.1542362000.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/arm/boot/dts/ls1021a.dtsi | 2 ++ 1 file changed, 2 insertions(+) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index bdd6e66a79ad..2a411eb1ebb0 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -324,6 +324,8 @@ trip = <&cpu_alert>; cooling-device = <&cpu0 THERMAL_NO_LIMIT + THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; From patchwork Fri Nov 16 10:01:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151309 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp225041ljp; Fri, 16 Nov 2018 02:01:42 -0800 (PST) X-Google-Smtp-Source: AJdET5f7sNZiq38LJwPp5d6/E2682WXtK053DS0x807iWQzMlKpHiYncBC3bCgy4buI0cvjKkhN4 X-Received: by 2002:a17:902:9004:: with SMTP id a4-v6mr9983401plp.334.1542362502552; Fri, 16 Nov 2018 02:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362502; cv=none; d=google.com; s=arc-20160816; b=wsFBSPpFoNtIcj76MfyWCTmpapSE1OMobbb7dZB5SnXy2CohdDoRmC5uwpLUkhfNXy v0aszcRT8RWcMrvPG13S7px2qiA1kHkrOej/TGktzZsq2zui3MbMMg2NmTSBnJS6zEV5 R44N8PfxcecjpL1jXT8GRzIMMUlNivSMZfeR+FGAqYaOFButpX6C8C1demGHZVV6EaSp JlPNjwIW3QuJE8hlAjLuvDR0LDA3TYY/SNFPgjSyMSDXBX0CV+9mTl9TG3bp6AId+ju0 logAO2JA757b3BLHFEyfeDvLLFKy13Ubtaqk+18H+mw+JSFnIMbv93iXEOcuYjD+zbmw XO7Q== 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=LK6GiW769WFFMCSrW8bZq8d0PusJgT2ioSzhc2edhMA=; b=ScMETp9ryGat313FRWvI4l/aqoJIb7BCIv9NNcGMtHM67BiqU/06tUeL0S7l0Er2iI L8pYVszASzLXstVYJzgYj9VvMB8q3LbGIfiZgxMxlmQBYJwTT+blyNhmsw/etf7Tt3jh dKEjcHyUCWnJNFhd9eDOgsXO1bhI34FosvgOIdDCEZ8q6lEKuiQ7UFxz7RZs3s++zPIe /BnxcqZr3u6RphDcU3UyajTeQ/RaCJFuJ5qguNqZxao51QhmGWDv2Kwkz18M3SVVpnSP Hu5mVGroK/aLGjErJvIROr+d535NEVcsTg/+i8qAX3OccVPqYs8ppnBwHYYheR5F99NY DWZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fq+At354; 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 x136si13382149pfd.75.2018.11.16.02.01.41; Fri, 16 Nov 2018 02:01:42 -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=fq+At354; 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 S2389517AbeKPUNR (ORCPT + 32 others); Fri, 16 Nov 2018 15:13:17 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44488 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389485AbeKPUNQ (ORCPT ); Fri, 16 Nov 2018 15:13:16 -0500 Received: by mail-pl1-f194.google.com with SMTP id s5-v6so10923992plq.11 for ; Fri, 16 Nov 2018 02:01:40 -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=LK6GiW769WFFMCSrW8bZq8d0PusJgT2ioSzhc2edhMA=; b=fq+At354HoAdN09twMtyS3uMc8QXc2XxXLgHQY9WkbhKgkRKwNemxOdQH3+SceMY+m SKk6RGwNyqjv49thLZgJfxIzTLX44RhhOfJ+SJqDtuiDCjrESb1MkUqMz+5EDSEwLDzM InKRhBL9rj1SrpStpMIXCel8q5B66PSAT13EE= 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=LK6GiW769WFFMCSrW8bZq8d0PusJgT2ioSzhc2edhMA=; b=EQ0mrfmud+IUcfbtb0s79BeCBj0zZiyoYzemo6yIKDqP5BqbqjheYggnGdwkdjBiVp BUBirabJM5FeQveE55jTaQGQoZBspcJn0CcFUkkZtSCxABhfPfqLBIiXtPtrZL8lj8f8 3mDytwrzf0XA6Rq9RTbhbMHgSIO3wKkP57+NLfWEAaD3YEakclhHlFpvKo8f3t+otCE7 D7bGQGtmd6GipRI9uWeJ6j63/VggJIXzHSg2QBIn3oz9MfTJPpsnCAKrdSj/ekzG1UFD GjdwU3jJyIOFHv/D0OnDCK1ypCRSIYUp67ogZVIDdAxcjaVcDh8lUB+ljh1aqU+pGPQZ b5Ag== X-Gm-Message-State: AGRZ1gJqXUp+ItdF2dWidLkqk0lZEhNwmq5/HT5KtG6B+lNtGI2Ojx80 NhjK3nRwLhRKAte96v89P5UXwQ== X-Received: by 2002:a17:902:162:: with SMTP id 89-v6mr10100540plb.293.1542362499626; Fri, 16 Nov 2018 02:01:39 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id o84sm18959674pfi.172.2018.11.16.02.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:01:39 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , 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 3/6] ARM: dts: mt7623: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:31:12 +0530 Message-Id: <3c44454d70c9c9bafcf86f2c020d17d048f33360.1542362000.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/arm/boot/dts/mt7623.dtsi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index d01bdee6f2f3..7cae886f79c9 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -187,17 +187,26 @@ 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>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 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>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 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>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; }; From patchwork Fri Nov 16 10:01:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151310 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp225107ljp; Fri, 16 Nov 2018 02:01:46 -0800 (PST) X-Google-Smtp-Source: AJdET5e6wsj6INq7CklJ5Ts//yolRmuD/A8zufxO6oaIW8yZo/tsOWOR1dvyu6JaZTeownTn/MTf X-Received: by 2002:a63:8c2:: with SMTP id 185mr9515526pgi.26.1542362506304; Fri, 16 Nov 2018 02:01:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362506; cv=none; d=google.com; s=arc-20160816; b=wQRUJ1acNtTLddWkIOLjUOhUiVxK42UB+khnx663B1qb+diFQ7p/wSvHx95BFeN798 WHKRxXfwVj5sU4nyUiW4LqV72AsTxARPlNE5eDWTDlZr2BTghdrtlDE1WAWU805H8yWF SXeqO2KwnW1ytqg8SxQlkW4p4sf5D/JLLA2+BFRqn/z9JgXdvoBDqJI429Sr3gXkG4qz U3d3jovFnoSsiFtnHPiGnfojJvORzMGpGpWbUzgXYIWv56SQbJEJKw+gjixb61WWJ7yg d3EGj/IOpmWsx9lOtPcpusv99cdzpyzNnqy5IfjwEyEuibgjScS2R9fSA7gV9DlYqTHS Aesw== 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=U5rf2itzTOB9dax2BRq+hIYugAJTWtXSu7y5bvsLcSw=; b=EmE1UjOND9/5KAbKoz/9fIbKUFd6+LS9B8dxvVXQlDnFFjsdTaUDLxPiNmQNB6bRLA LsHFtQj8fs3xC53ZRL5hCcoiMJPggBchJepi1i3NiYcuBNOOF0NseSY3cBeabSuBPKb9 e6zsdXic1gJ4DXxw4vMBVVWgZQygRApjmHqTSNiLtxa7eRgv2+WTthCNQKeXSPGMHG9R 5ZnD1CQ8/OuIISFLiU7QOMsnec7nVseY+Nf7DA45J337InvPrAgUo/x3EwBmD2lhvH27 GXuJmw050NSbIoI8m6Y2hCzAvUdl4AGXuFh+EkgU8bHN7glGSA2WbT9WrPG1wfoG90wY Rc0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JVPGj49/"; 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 x136si13382149pfd.75.2018.11.16.02.01.45; Fri, 16 Nov 2018 02:01:46 -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="JVPGj49/"; 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 S2389535AbeKPUNV (ORCPT + 32 others); Fri, 16 Nov 2018 15:13:21 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36371 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389485AbeKPUNU (ORCPT ); Fri, 16 Nov 2018 15:13:20 -0500 Received: by mail-pl1-f194.google.com with SMTP id y6-v6so3369737plt.3 for ; Fri, 16 Nov 2018 02:01:44 -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=U5rf2itzTOB9dax2BRq+hIYugAJTWtXSu7y5bvsLcSw=; b=JVPGj49/bBk59RqV2L5ue3O6HvsEhZV/XPoi+xJdLJozZQR7EveaokK7roEQ+WyYQl N70Y/WTEklM1ZU3P0aOiY+gBXU74y0ZqWKljsm+4Mc38kOw33KAAvWBoageihkKN+vb/ R6iH2+bmM9Zbxrntzr7Ng4Drc2fOyQlRhTxVY= 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=U5rf2itzTOB9dax2BRq+hIYugAJTWtXSu7y5bvsLcSw=; b=qAZdSnX3kkRy+MGuJdK9tCC677FM/HTo5L70iIaIpibPw32gVkNthysAspXmBssXiL ijGs3S9HNvyVi8+Y7agOyfe4gQB1p22huJ4Lux3fUPLz7Fh7PLcLbWKMZWdaCl4AO6Cz 57KqgPoAaPhcUtuMK27HYDC6DQiYNUL93P+qxs7EPcpVt5SVMC+5siNdpa5oBPLum0wt AbSuwxpN9/af3oWKrbZ+sdF2NvSaq7/mf6lxTJeKwd24tdmRfUOaC/p/Q3KBNZGJXI1A i++b3rQHrMLGtRoczhHg3fOtwTAwY5W1AlXj4eeW1/ifuObS/aRMI5txYVr6ZN7B9Htu W65w== X-Gm-Message-State: AGRZ1gKbI5hRlqbkOy1aAEqz67QufH96vCdhU7ovxsn4HKn5yXA9ofE+ pPAeqsRxzZoIE3kQ/6wrCPFaLA== X-Received: by 2002:a17:902:5ac7:: with SMTP id g7mr10273850plm.212.1542362503876; Fri, 16 Nov 2018 02:01:43 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id a15sm3111223pgb.1.2018.11.16.02.01.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:01:43 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , 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 4/6] ARM: dts: rockchip: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:31:13 +0530 Message-Id: <8e59f97ae89a116b835ee14c63f550b159b000cc.1542362000.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/arm/boot/dts/rk322x.dtsi | 10 +++++++-- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 24 +++++++++++++--------- arch/arm/boot/dts/rk3288.dtsi | 15 +++++++++++--- 3 files changed, 34 insertions(+), 15 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index cd8f2a3b0e91..29f19076dceb 100644 --- a/arch/arm/boot/dts/rk322x.dtsi +++ b/arch/arm/boot/dts/rk322x.dtsi @@ -493,12 +493,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 6>; + <&cpu0 THERMAL_NO_LIMIT 6>, + <&cpu1 THERMAL_NO_LIMIT 6>, + <&cpu2 THERMAL_NO_LIMIT 6>, + <&cpu3 THERMAL_NO_LIMIT 6>; }; map1 { trip = <&cpu_alert1>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 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>; }; }; }; diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index 1e0158acf895..d889ab3c8235 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -81,8 +81,10 @@ */ cpu_warm_limit_cpu { trip = <&cpu_alert_warm>; - cooling-device = - <&cpu0 THERMAL_NO_LIMIT 4>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT 4>, + <&cpu1 THERMAL_NO_LIMIT 4>, + <&cpu2 THERMAL_NO_LIMIT 4>, + <&cpu3 THERMAL_NO_LIMIT 4>; }; /* @@ -103,23 +105,25 @@ */ cpu_almost_hot_limit_cpu { trip = <&cpu_alert_almost_hot>; - cooling-device = - <&cpu0 5 6>; + cooling-device = <&cpu0 5 6>, <&cpu1 5 6>, <&cpu2 5 6>, + <&cpu3 5 6>; }; cpu_hot_limit_cpu { trip = <&cpu_alert_hot>; - cooling-device = - <&cpu0 7 7>; + cooling-device = <&cpu0 7 7>, <&cpu1 7 7>, <&cpu2 7 7>, + <&cpu3 7 7>; }; cpu_hotter_limit_cpu { trip = <&cpu_alert_hotter>; - cooling-device = - <&cpu0 7 8>; + cooling-device = <&cpu0 7 8>, <&cpu1 7 8>, <&cpu2 7 8>, + <&cpu3 7 8>; }; cpu_very_hot_limit_cpu { trip = <&cpu_alert_very_hot>; - cooling-device = - <&cpu0 8 THERMAL_NO_LIMIT>; + cooling-device = <&cpu0 8 THERMAL_NO_LIMIT>, + <&cpu1 8 THERMAL_NO_LIMIT>, + <&cpu2 8 THERMAL_NO_LIMIT>, + <&cpu3 8 THERMAL_NO_LIMIT>; }; }; }; diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 0840ffb3205c..1da86e82bb57 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -508,12 +508,18 @@ map0 { trip = <&cpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 6>; + <&cpu0 THERMAL_NO_LIMIT 6>, + <&cpu1 THERMAL_NO_LIMIT 6>, + <&cpu2 THERMAL_NO_LIMIT 6>, + <&cpu3 THERMAL_NO_LIMIT 6>; }; map1 { trip = <&cpu_alert1>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 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>; }; }; }; @@ -541,7 +547,10 @@ map0 { trip = <&gpu_alert0>; cooling-device = - <&cpu0 THERMAL_NO_LIMIT 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>; }; }; }; From patchwork Fri Nov 16 10:01:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 151311 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp225210ljp; Fri, 16 Nov 2018 02:01:52 -0800 (PST) X-Google-Smtp-Source: AJdET5cHqBvIx+kuwt18BxIskXc6MW5hKvL54McMzU5BjfVnBUwNGiwz+U9prghCJVAsPc2/c66Q X-Received: by 2002:a62:d10c:: with SMTP id z12mr10642682pfg.52.1542362512010; Fri, 16 Nov 2018 02:01:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542362512; cv=none; d=google.com; s=arc-20160816; b=cBHLpgEcjLfNt0gNW8GPbAPMDFTBz1/aXDlQ5qjNuqvdEhrTNITmWdXjw7J3iMCfJR kkhiw15QKmdlmSXqhhj0cDULm/XLoinHPYKCAsUeFZLgT2Jo4t7VwMiuK9b9CCn2wnms MAcb0ceJsAvqnykaUUJk36MwuzBDCMZAjwb6E/mEWv8G8DLsKs5sCI3goR4PLstCYE0K sYTjAZjaIdO3+pedpRG7LqOo6OkkMN9CZIRr3EYXje9prOxsPHqNEhRse7N5JAywVLGN ZCLLhzywzKVGWng9/XszoagwH28jtPocLV5+kI0Z0UYMeMH76KOJ/bFJbeiC+xSdcrny sUKw== 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=mKdk4u9uuV3/V2n+XEiMfTYkJhxf8c+bfGxxkDgZOEY=; b=JtVi+iQfAZI7kDycnOazr5lGAWXyLYe/N12EkIus6eWyH2au2dyTLer9ET0opgwXNa JyZRgHn1ugZ6gM3ebIqRbjRykP91dLSK0iwD3cJzfBrRmoCdQs0IUPc2Mk4vJ+/vjhrY YIcL/uLq7WZ2+GLrbsWeEkkcpgKvtBYjIYSJ4Ij932eripnzIpg9RT1YKhywj3AhvW/F 77jcAszEPdzFDDD7WtpF+QhomUXT11SdkTLN4ZE7YBYRG7pSknV3pqIv8jSlh5ehuY/R qtE+jjrrmYYnUu513c4FgrKRJpJ+x8LFqWeVeR6u9+Au2h1r43ujeU6rcVxoqoKaaezx aF7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khGGSh6g; 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 x136si13382149pfd.75.2018.11.16.02.01.51; Fri, 16 Nov 2018 02:01:52 -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=khGGSh6g; 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 S2389549AbeKPUN0 (ORCPT + 32 others); Fri, 16 Nov 2018 15:13:26 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41435 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389532AbeKPUNZ (ORCPT ); Fri, 16 Nov 2018 15:13:25 -0500 Received: by mail-pf1-f196.google.com with SMTP id e22-v6so11167619pfn.8 for ; Fri, 16 Nov 2018 02:01:49 -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=mKdk4u9uuV3/V2n+XEiMfTYkJhxf8c+bfGxxkDgZOEY=; b=khGGSh6gI7N4doAVpcL7uHa6DTmcuayGAhPPhSeVUzm8qrVeFuR73wyRDo5XnVxV7k 606J6cOTrAoNwuoRQ32KZAyKgm1z9ROrNviT9yHvnAr9mrAuL9x6tOisotVK/xmk0OHB RG+dFDEKQDjLc7z9NBsfn3lYTgPzUxC+YeJGs= 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=mKdk4u9uuV3/V2n+XEiMfTYkJhxf8c+bfGxxkDgZOEY=; b=gRXx/pariwSR0CjNrn2YqEpF7H7J5x9ZCWY6tH66oKtIGq3Y2MxpGAMfh+jZcWBf67 FneJjG9Kw/XFbkxQ6kaxUe1RH45w0DMiKNlmwXJcCGO4RpYAlONpr/2N3LjKFfDTjqvp iak4gX5d+3owQt5LJoQ3Gjn8COruV1ik2Gcx83SlNaIK0xq7Yn+V8PvbiEoyDjG5Hr6B TEj1lY3HL+ViUFKeQmn/41WXg1qkqCOZBZvtgcr4bHO98jADaO7WAILOGmLVdimdeHFI NIpvAO4CRlDR7pjJNFTjv/Vm+7M6kb6LkD4fUILO9wQ01VkbQ6pNYoG2wuVFKbdDzppD uodA== X-Gm-Message-State: AGRZ1gK+Qxc/ZcndZ7cMQXmUjK9PPFiSGiqqNJTnuBMg1+XHVsgowWRU VMaU2qKVbMpwtpMf7CaVh9YDEw== X-Received: by 2002:a62:798f:: with SMTP id u137mr7491081pfc.168.1542362508571; Fri, 16 Nov 2018 02:01:48 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id y71-v6sm37238045pfk.70.2018.11.16.02.01.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:01:48 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , Maxime Ripard , Chen-Yu Tsai Cc: Viresh Kumar , devicetree@vger.kernel.org, Vincent Guittot , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/6] ARM: dts: sunxi: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:31:14 +0530 Message-Id: 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/arm/boot/dts/sun6i-a31.dtsi | 11 +++++++---- arch/arm/boot/dts/sun7i-a20.dtsi | 5 +++-- arch/arm/boot/dts/sun8i-a33.dtsi | 16 +++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) -- 2.19.1.568.g152ad8e3369a diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index debc0bf22ea3..1eaa60cd3218 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -115,7 +115,7 @@ #cooling-cells = <2>; }; - cpu@1 { + cpu1: cpu@1 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; @@ -131,7 +131,7 @@ #cooling-cells = <2>; }; - cpu@2 { + cpu2: cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; @@ -147,7 +147,7 @@ #cooling-cells = <2>; }; - cpu@3 { + cpu3: cpu@3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; @@ -174,7 +174,10 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - 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>; }; }; diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 02e40da9f028..b4fd4f5ca66b 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -118,7 +118,7 @@ #cooling-cells = <2>; }; - cpu@1 { + cpu1: cpu@1 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; @@ -148,7 +148,8 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - 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/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index c1cc8f09dd9a..502de6f44a9a 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -131,14 +131,14 @@ #cooling-cells = <2>; }; - cpu@1 { + cpu1: cpu@1 { clocks = <&ccu CLK_CPUX>; clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; #cooling-cells = <2>; }; - cpu@2 { + cpu2: cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; @@ -148,7 +148,7 @@ #cooling-cells = <2>; }; - cpu@3 { + cpu3: cpu@3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; @@ -479,11 +479,17 @@ cooling-maps { map0 { trip = <&cpu_alert0>; - 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>; }; map1 { trip = <&cpu_alert1>; - 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>; }; map2 {