From patchwork Fri Nov 16 10:04:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10685821 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 75C6B14E2 for ; Fri, 16 Nov 2018 10:07:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 649AB287A3 for ; Fri, 16 Nov 2018 10:07:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58B122915F; Fri, 16 Nov 2018 10:07:24 +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 E8099287A3 for ; Fri, 16 Nov 2018 10:07:23 +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=3/uNXqyCxFZ0yo3DPRA9SoO9RKJu+A/4HJaQIcfvS0c=; b=tVWX/DL/FpwRJ5 V3RfayOxQqjJinQqjh/mgVaNICNGwjyxemPZv6C7FDecx7VhLelwSjC7ukVsCuHswUSxWiKytfN+p 8ziTQgO//ynGgTU8sRMho4sC0j5+aaDNcD1oPM7VeXMyTPdARk0oz2hzNyP8aB9wMMZ3znySv3HMd +IwlacPFw+zlTFmACkiKT8dnlgQzG2dCuyv8TuXA+78i4t/krVFaw2opOyj1VDd6QN928LvNVcVZf nveTqug08zJOKLA5sjIAAppZa1tQRSWmbyaA+u8+uEyMnLfhiapnD8APy9lx2F4z2TYpMgx8EqLe8 gv8wq8E7ELkY5hMnmHhA==; 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 1gNb1z-0001AL-7T; Fri, 16 Nov 2018 10:07:19 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNb04-0006lo-Hl for linux-arm-kernel@lists.infradead.org; Fri, 16 Nov 2018 10:05:26 +0000 Received: by mail-pl1-x643.google.com with SMTP id b5-v6so10949614pla.6 for ; Fri, 16 Nov 2018 02:05:10 -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=QmjHQrzH3LPsysyMlkzh+Qm9rUsTXjJj/VyKPq1LnW8=; b=El0fMUQ3VTzNvHQ+No7yCC641xxRow2h2idrjFaDry9uLyyOekkFxoZPs17XGeLHtg Qr+tx6cU+FPu4OeX1wU737un2FszbXEtLjxKgMbXBLq1kjDeLP+HFFlya1yVbtwXrrXw sExaUXVj7dZcDR6VJ5rZgPdZZ9aqwTbf4gfwM= 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=QmjHQrzH3LPsysyMlkzh+Qm9rUsTXjJj/VyKPq1LnW8=; b=P4rZ0kyWaJXr6t0z4DvEWh5r/zu9c4dKQ+OLTNfSQA8z+dFngW9rwCRdGSzaqbZxYN zqiSuOh/C1uYt4mFkbfw0+o0RceweHCzM4k0oUaAhXzx62wsSJrx2cbnOSeO/n3cod6N +SQHjoNt92hAx7uJ2Lyv2AWjT7E+mnyIf6h9SBA8+0QdD9PFWr4BDl5z0U4CJNEQEgbZ fxH5W7KtDBEzG23NmxBOqy38IBNFHhKMSOH29zbrN2zMNRsaV5qL0hw5mwSrTYLLHfGD BLqwDWME8aQfiyPv2ugitlWfsr1kIJEK6TeUizWCGAs/RR30WjCqWt15mIi+gfTD7lV+ h3+w== X-Gm-Message-State: AGRZ1gLIombai2ntAdmOK2LZZcYQVsfO+mXrYteDKRwvJcuXZzQMnyZz sBuyxi2IQQBADy1dxu85TjcBYg== X-Google-Smtp-Source: AJdET5dzsVUVn0P59zjnuOoXv1A6JX0AvMsNwHLSVXEau9JNGRYmlpZCfpGhgRrFE0MWePflodTgQg== X-Received: by 2002:a17:902:a70b:: with SMTP id w11mr6181411plq.84.1542362709696; Fri, 16 Nov 2018 02:05:09 -0800 (PST) Received: from localhost ([122.172.88.116]) by smtp.gmail.com with ESMTPSA id s22-v6sm56173002pfi.15.2018.11.16.02.05.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 02:05:09 -0800 (PST) From: Viresh Kumar To: Mark Rutland , Rob Herring , arm@kernel.org, Wei Xu Subject: [PATCH 05/10] ARM64: dts: hisilicon: Add all CPUs in cooling maps Date: Fri, 16 Nov 2018 15:34:28 +0530 Message-Id: <89bb8c62404aa875d597da89c18852ce81fb9f26.1542362530.git.viresh.kumar@linaro.org> 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_020520_689122_1E1AC2C7 X-CRM114-Status: GOOD ( 13.66 ) 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/arm64/boot/dts/hisilicon/hi3660.dtsi | 10 ++++++++-- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index d943a96eedee..20ae40df61d5 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -1118,12 +1118,18 @@ map0 { trip = <&target>; contribution = <1024>; - 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 = <&target>; contribution = <512>; - cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&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>; }; }; }; diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 97d5bf2c6ec5..aec9e371c2a7 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -893,7 +893,14 @@ cooling-maps { map0 { trip = <&target>; - 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>, + <&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>; }; }; };