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: 10685785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1F8714DB for ; Fri, 16 Nov 2018 10:03:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1D172D3EC for ; Fri, 16 Nov 2018 10:03:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 962FF2D4CA; Fri, 16 Nov 2018 10:03:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BA462D4CB for ; Fri, 16 Nov 2018 10:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=25eglL2gL54PcUbltsVBhc81IO6X8ftjvT3B5uSgNMc=; b=nQMp/Aczb6MzoI TVcBOB9MA1Gy3w0vbtzpDGRNHOgWs9B7uq2q8Ukptve3Zm6iEGlZfrLGtrtHrzOZ2TRtp3MVU3xAS ac/FTvnmZBtXGyn6GBSQk35mElkcODEmMctluT1KBMwHwRJx4bBjjRqnxI5IP9KwNxWmvL0LpiEVN cCiSIUIhMN4KOGNb9kMu8ydnEk2GFscQqXPAWb53ssOqJR+nTE0O+B/IG+DN9ayVYdD+/SEcPk8Qz HAxKPHNFxXnBZRsKTCQ8S5yFzrKdpEAldy+z3lDv8IB2CoL10LFvrvTF2cDuao6DcfFDvrc2YVlTO mZM/SeXxzCHZ3wLm7S9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNayA-0005B3-E0; Fri, 16 Nov 2018 10:03:22 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNawh-0003oh-Sp for linux-arm-kernel@lists.infradead.org; Fri, 16 Nov 2018 10:02:00 +0000 Received: by mail-pf1-x444.google.com with SMTP id b85so4352742pfc.3 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=MC35Qj2c2rFjC4n9ZsDbLvhHe2Kwh6S9yCQdaelVAbL8SPyC6LDMCIeIHmpekz9RqO MmsYXznr/Hq5lLMut5kdaFGKUpmEfCStwkEu/fPTFCQECKDC80DVoadwIXkcV3JxhL9Q pwhOkceUOrOUUsYqHJ7J3lKvI0esk1aqI+qsGfkgjOLYfV19VMLZX6gtd8Gj8+kjsm3g DbeN4RTwLuSo2Uxex7T1GNu69qtTVV2KSAPuVjHeg9nugXQoQEQ8EZ4eVN8g0zq/bhZA ATyub9CwHJqZl9dRmIW+oNUd1Rd7kcmtR3eXCRIWds31k/aFRwG2Pr001uvNz5JOSp/C FDxA== X-Gm-Message-State: AGRZ1gL43K+KLaNmq5Nrit77xu9t0C4EpcuycGruvfGh+Ce2iG96xq7O TW785pwmH+z8eTLVYABBFB0PUA== X-Google-Smtp-Source: AJdET5eXq6l7stfr9qN5pRZ5Cb2+y06vwTIGaWCuynlUfu8fYZthALuyZNzGWJK0NGX5SUJXn21vwQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_020151_943257_10EE2B77 X-CRM114-Status: GOOD ( 14.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Vincent Guittot , Viresh Kumar , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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 {