From patchwork Mon Jan 14 10:21:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10761993 X-Patchwork-Delegate: agross@codeaurora.org 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 A755213BF for ; Mon, 14 Jan 2019 10:21:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C9B528B64 for ; Mon, 14 Jan 2019 10:21:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AAA128B6D; Mon, 14 Jan 2019 10:21:29 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4873A28B74 for ; Mon, 14 Jan 2019 10:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbfANKV1 (ORCPT ); Mon, 14 Jan 2019 05:21:27 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52385 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbfANKV0 (ORCPT ); Mon, 14 Jan 2019 05:21:26 -0500 Received: by mail-wm1-f65.google.com with SMTP id m1so8296047wml.2 for ; Mon, 14 Jan 2019 02:21:26 -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 :in-reply-to:references; bh=CxA8ebFB4r9OLZ96bqgPVVsxsgvpcqnBcZSvktTXPrA=; b=BeXpdXPJWTOyjVfEKcnsuBOavIGy7gWpa7ZK+wmEiGluSGhnRKP5bxARIEJBza1dh7 6h+HXqgf8LjTMw+8387u5M56b796rChvDvvHl7Gw96PhKYFnajv8VpE9Xre7z6pjeSZ0 MGK+1bHBoivW1wC05g3MczWDHDCj8gSOdsvj0= 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:in-reply-to:references; bh=CxA8ebFB4r9OLZ96bqgPVVsxsgvpcqnBcZSvktTXPrA=; b=jw43AICa7q/eOAs4DLO5wHTdV7GS+dtxmPFMjAiiETsIdlbtfKlKkpd4ZAKMtwR3T0 1Rkngqvbzwr8w5LU4i8QCBFSnAlVdL34TC1/VhPpdBbj3PJYnHmMTBIUkR7w3DRrU6QN Iw4lNtd/NnqgpDjvwPbzfQDwn2MW1rFS3RBKeapxqBvbUfb9Eb5JDMUalUaf+bEK5Lm7 xVcjJHu/bG5YMbNGPegk1ROjEgtHBDvfnAvI3SVmS6I+kKPAEeEBq8Bid13r/L8KBa1I bsJO2+SQqeSHxj/YD1EBtgJ1iRwWssvyIw+fqXpmA02CLR2t7wuFX4dOb03CRvFIN0Yy Y1Sg== X-Gm-Message-State: AJcUukeMsoNwuUlDcEOMqiOR3TE4NBntcSdaVTJEqXmt4jH43Z2Joo9C YUifylURcPufgdU5wmRdBYacKw== X-Google-Smtp-Source: ALg8bN4tZ1gdXoiZAfGmOsdJ0DEeokQS/vuwjwKn6VKlGSotSb246Hw43rTqz8tsZFkHibwqg3mliw== X-Received: by 2002:a1c:ab87:: with SMTP id u129mr11368856wme.104.1547461285223; Mon, 14 Jan 2019 02:21:25 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id d16sm56370701wru.52.2019.01.14.02.21.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:24 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 1/9] [ALREADY QUEUED] cpufreq: qcom-hw: Move to device_initcall Date: Mon, 14 Jan 2019 15:51:03 +0530 Message-Id: <2ae45b9263f51a14a7f672f40da2193caf174971.1547458732.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP (Resent to allow people testing the series to test it easily) subsys_initcall causes problems registering the driver as a thermal cooling device. If "faster boot" is the main reason for doing subsys_initcall, this should be handled in the bootloader or another boot constraint framework. Signed-off-by: Amit Kucheria --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index d83939a1b3d4..649dddd72749 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -296,7 +296,7 @@ static int __init qcom_cpufreq_hw_init(void) { return platform_driver_register(&qcom_cpufreq_hw_driver); } -subsys_initcall(qcom_cpufreq_hw_init); +device_initcall(qcom_cpufreq_hw_init); static void __exit qcom_cpufreq_hw_exit(void) { From patchwork Mon Jan 14 10:21:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762025 X-Patchwork-Delegate: agross@codeaurora.org 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 5647F139A for ; Mon, 14 Jan 2019 10:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C03128B60 for ; Mon, 14 Jan 2019 10:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A41E28B64; Mon, 14 Jan 2019 10:22:32 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03C2F28B65 for ; Mon, 14 Jan 2019 10:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbfANKVd (ORCPT ); Mon, 14 Jan 2019 05:21:33 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55261 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbfANKVc (ORCPT ); Mon, 14 Jan 2019 05:21:32 -0500 Received: by mail-wm1-f65.google.com with SMTP id a62so8282356wmh.4 for ; Mon, 14 Jan 2019 02:21:31 -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 :in-reply-to:references; bh=9SBw2Z8hokpAYRi9yYWIqHgwrnBSoCdeIR1YxJHRWTA=; b=RFTdFL04O0QYIhX0JBnUjQGAz3APxexoATMRsqvN4V8qZZgP+ccNCDl2usSW0Yp29y Nb5EVStf6xppuRlyc1Jov52MVq+vpMsi7C9J2BqcCfgcFJYb2kRtynQc1LyfZDLD/C0V bwJOnezzKErTQq8dgddkCsY5zpP8pCyaO5phY= 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:in-reply-to:references; bh=9SBw2Z8hokpAYRi9yYWIqHgwrnBSoCdeIR1YxJHRWTA=; b=DvXcP1aHLNMJKKRMcW0VjZqIpEDC7hCdsYQBOfxzrnqLfYmzhxeqCjw+TCthOjSic8 kGREm6SiugfU85yYqzAf4OoTtonq0x+ZyNPKMeVSTEgU4Wu2zCL6sFnmJrT3MB6sShFm YgLbbTrAcnXLWZXWKplTw2x/ogKFccywyBbYlXFhB73Iqcco6V5eKpBz7yEHYFtWY681 dx9b8ntA9M3vqY+pcOgZO5jH0u+gRCEeq9rtVUHJvPa7PxMIhwiwuG0jU3h3yrZbklJ1 iXerXtkEzaKYUTUoXZCx6h4HmG2pjwmkmpcdxQbKmA2BwpV29JnKyUzzc0soE/KWIXg7 nw9w== X-Gm-Message-State: AJcUukcpHyKdre0YS677Zab/Kf7rt9yKP5kEGAZG2fslNTWCMbRBo/lj EaDc/Hiyi9U1SPntFKQwB1LtXA== X-Google-Smtp-Source: ALg8bN6G6klT2ZY5A1/WibAL7ZNVVxAHhcPpHOtgGC/X8+p0l9Jx/vnS0cO3VxjzdXwQFgbd7E+2eg== X-Received: by 2002:a7b:c5cc:: with SMTP id n12mr11292507wmk.149.1547461291120; Mon, 14 Jan 2019 02:21:31 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id x81sm27364850wmg.17.2019.01.14.02.21.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:30 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH v2 2/9] drivers: thermal: of-thermal: Print name of device node with error Date: Mon, 14 Jan 2019 15:51:04 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make it easier to debug devicetree definition in case of errors. Signed-off-by: Amit Kucheria --- drivers/thermal/of-thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index 4bfdb4a1e47d..08c3ccbdacf8 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -867,14 +867,14 @@ __init *thermal_of_build_thermal_zone(struct device_node *np) ret = of_property_read_u32(np, "polling-delay-passive", &prop); if (ret < 0) { - pr_err("missing polling-delay-passive property\n"); + pr_err("%pOFn: missing polling-delay-passive property\n", np->name); goto free_tz; } tz->passive_delay = prop; ret = of_property_read_u32(np, "polling-delay", &prop); if (ret < 0) { - pr_err("missing polling-delay property\n"); + pr_err("%pOFn: missing polling-delay property\n", np->name); goto free_tz; } tz->polling_delay = prop; From patchwork Mon Jan 14 10:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762023 X-Patchwork-Delegate: agross@codeaurora.org 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 B82CA13B4 for ; Mon, 14 Jan 2019 10:22:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD41028B60 for ; Mon, 14 Jan 2019 10:22:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9B0028B74; Mon, 14 Jan 2019 10:22:29 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C79E28B65 for ; Mon, 14 Jan 2019 10:22:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbfANKVm (ORCPT ); Mon, 14 Jan 2019 05:21:42 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46059 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726764AbfANKVj (ORCPT ); Mon, 14 Jan 2019 05:21:39 -0500 Received: by mail-wr1-f65.google.com with SMTP id t6so22092523wrr.12 for ; Mon, 14 Jan 2019 02:21:38 -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 :in-reply-to:references; bh=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=ZfPUQzxziYUzsb8yM368ueLuq8ISb7GvH6YdC9XIQEtutmz5I41/tI3dFA5e2RwFc7 GYkI7+V9hD0yfBKSpI6lHiq4ZPxwtBDFQ8TDBBXW9ENe9G1yDPZ5uLMzW3jDWSP2sK6Z uP0Djba+mAuFnqCUqls4txjXp6QmOcpCWPogk= 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:in-reply-to:references; bh=EJX+dwJGPWWCAq/U7Rxqn4mqzkt0rkUgh6ol6e18W2g=; b=Z1fTgOQygKMt5jCOV/XFI0IMy/kpLtASZiyxjb5Vda1xQIhxfdn7HREnklWsmxwny5 WZqMgnSbiZKE7bF8j8bo2pPJycI3pBBhWRG1pJRXLv5HnRyQTItX8kcPrHKvCr7Cc8Aq NKH8AQ9hJFrRCUTQq0tnLGEhcdMRZCf6tm6tgn0sMlo6NA2SWM/0PYxhGYEsAqeK+WXj LugOIZiVeM/qws4HV1beHXA3nyyjTKMNbPi+nkx+4oR6O3xzE+xuG6+/AsMuie4TkqMs lFKDH7Ix5P/THiaNMobPx+q8riSplTNiFqAk6IbRs0fIF1KqSUHf+3pasw9V1gPfpIoX 6VwA== X-Gm-Message-State: AJcUukdeDuDTIOZpS1H65QXO1R4VsX0HSA8k1n50A+0/jWKLcZQeBNQ2 5MT8hOub9LKMC8ykuXn7QgZk6Q== X-Google-Smtp-Source: ALg8bN5muGx9Q25Onqti2STyxOsGR+BffokPLDhaTgWX1gTbVMyO9l37Hg5dRFAFqdVb0tLNjo/sFw== X-Received: by 2002:adf:de91:: with SMTP id w17mr25144412wrl.320.1547461297218; Mon, 14 Jan 2019 02:21:37 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id a1sm63729951wrw.76.2019.01.14.02.21.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:36 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 3/9] drivers: cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy Date: Mon, 14 Jan 2019 15:51:05 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Several cpufreq drivers register themselves as thermal cooling devices. Adding a pointer to struct cpufreq_policy removes the need for them to store this pointer in a private data structure. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- include/linux/cpufreq.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c86d6d8bdfed..9fbc1d996967 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -95,6 +95,9 @@ struct cpufreq_policy { struct cpufreq_frequency_table *freq_table; enum cpufreq_table_sorting freq_table_sorted; + /* Pointer to the cooling device if used for thermal mitigation */ + struct thermal_cooling_device *cooldev; + struct list_head policy_list; struct kobject kobj; struct completion kobj_unregister; From patchwork Mon Jan 14 10:21:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762005 X-Patchwork-Delegate: agross@codeaurora.org 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 3EC84139A for ; Mon, 14 Jan 2019 10:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 331CF28B64 for ; Mon, 14 Jan 2019 10:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3160728B6D; Mon, 14 Jan 2019 10:21:58 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6CD728B70 for ; Mon, 14 Jan 2019 10:21:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbfANKVq (ORCPT ); Mon, 14 Jan 2019 05:21:46 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40030 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfANKVp (ORCPT ); Mon, 14 Jan 2019 05:21:45 -0500 Received: by mail-wr1-f68.google.com with SMTP id p4so22148444wrt.7 for ; Mon, 14 Jan 2019 02:21:43 -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 :in-reply-to:references; bh=BQcigTwmLx6wtNJkbza+fNndqo6R5swIJwwOJw4wxh8=; b=KAd62fxQUgm/bVgOmDp0tmRdPoWBzID9XmJsxzsC2JFZ9SX6MqJWIDvc4/SeJBQCpW SbqHlojaHVqFxQtORtMCHZM1W70Tw0wKJYdJ8vUud0iVkiHw+86Qtkip9OWXRfy+hFjG /ZuzduBHyvGE512CYtsrGQX3jvjPawx7+9L8U= 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:in-reply-to:references; bh=BQcigTwmLx6wtNJkbza+fNndqo6R5swIJwwOJw4wxh8=; b=PSKq7zt2rrT7Je/DKQE9O35vhYQbkLllC0ryF5jtH5ZFKmwkQcd0Whci/oNabLTMxR /meut8+jzZKE2ShDxDpGQlVqu0urKu+87qqayWO/Usm46JspFTZB1FQq2KxMR3QD9SEo ll0rF+J40zRdeyxyAWFIEWIwGP1tsuIqz7teuRbZ59xc3YzdXPjrQNv16UOHeKcF6c40 ojAEYvPcFL2i0N/4pPeUXa32BnvsymGg46D8Uq7gYPXz6rdNjl71iBVjnC0wk1j6XKgK WmDsAZAJ+hu7s7M+B4ejncaBqxwQXMBlQXhZWZCmtlBZdQcEODkLzLiJbziVz9OIryQJ fDWA== X-Gm-Message-State: AJcUukef9vt3SKaQED9Zihw/v5OTsI6VxWZHnVdlcwIe/y7MVjBdLl9E +uq1jQChuv/xrpRPD5D/K+wegQ== X-Google-Smtp-Source: ALg8bN69Go2+pxt6FFFKDw+cPKMZ1Vvb4sVEz9b8dF3kodNwhQepsPc/0+exXf4o9bUxL/qLbXYbxw== X-Received: by 2002:adf:97d1:: with SMTP id t17mr23797843wrb.283.1547461303153; Mon, 14 Jan 2019 02:21:43 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id f130sm26226842wme.41.2019.01.14.02.21.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:42 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 4/9] cpufreq: Add a flag to auto-register a cooling device Date: Mon, 14 Jan 2019 15:51:06 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All cpufreq drivers do similar things to register as a cooling device. Provide a cpufreq driver flag so drivers can just ask the cpufreq core to register the cooling device on their behalf. This allows us to get rid of duplicated code in the drivers. Suggested-by: Stephen Boyd Suggested-by: Viresh Kumar Signed-off-by: Amit Kucheria --- drivers/cpufreq/cpufreq.c | 13 +++++++++++++ include/linux/cpufreq.h | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6f23ebb395f1..7faebfc61e60 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -30,6 +30,7 @@ #include #include #include +#include static LIST_HEAD(cpufreq_policy_list); @@ -1318,6 +1319,12 @@ static int cpufreq_online(unsigned int cpu) if (cpufreq_driver->ready) cpufreq_driver->ready(policy); + if (cpufreq_driver->flags & CPUFREQ_AUTO_REGISTER_COOLING_DEV) { + struct thermal_cooling_device **cdev = &policy->cooldev; + + *cdev = of_cpufreq_cooling_register(policy); + } + pr_debug("initialization complete\n"); return 0; @@ -1411,6 +1418,12 @@ static int cpufreq_offline(unsigned int cpu) if (has_target()) cpufreq_exit_governor(policy); + if (cpufreq_driver->flags & CPUFREQ_AUTO_REGISTER_COOLING_DEV) { + struct thermal_cooling_device **cdev = &policy->cooldev; + + cpufreq_cooling_unregister(*cdev); + } + /* * Perform the ->exit() even during light-weight tear-down, * since this is a core component, and is essential for the diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 9fbc1d996967..0c51d5ce7350 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -388,6 +388,12 @@ struct cpufreq_driver { */ #define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6) +/* + * Set by drivers that want the core to automatically register the cpufreq + * driver as a thermal cooling device + */ +#define CPUFREQ_AUTO_REGISTER_COOLING_DEV (1 << 7) + int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); From patchwork Mon Jan 14 10:21:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762003 X-Patchwork-Delegate: agross@codeaurora.org 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 671AC139A for ; Mon, 14 Jan 2019 10:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 597E6286CD for ; Mon, 14 Jan 2019 10:21:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 578D9289A5; Mon, 14 Jan 2019 10:21:57 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03B2628B82 for ; Mon, 14 Jan 2019 10:21:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726804AbfANKVv (ORCPT ); Mon, 14 Jan 2019 05:21:51 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55372 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbfANKVv (ORCPT ); Mon, 14 Jan 2019 05:21:51 -0500 Received: by mail-wm1-f68.google.com with SMTP id y139so8221642wmc.5 for ; Mon, 14 Jan 2019 02:21: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 :in-reply-to:references; bh=VetZdY4CkpnIoseIMJiUu8n+JdK4ZfAqKf1jE2X0vFM=; b=OcGf/FTBqUMQkD9F05ac/NUQru8v7tpBP4vbtbbKVS/UChYWbb5hB7GTgeHar/vGlK 2c0g4PbEeuAcy+Y4+qKsBNp0HKDprBkO3MZkttoz7tfjSaTipbAZmuxRKe3zIsTw+goQ Nohy8SbKuperex8IV74nfYPaOA0hNbrOMjj/I= 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:in-reply-to:references; bh=VetZdY4CkpnIoseIMJiUu8n+JdK4ZfAqKf1jE2X0vFM=; b=oZtPlhVpVFD1VBLRdTjW4KIQYYWsKpJP1zuCz7sSZgK2UJvEeQ2ajgTkCxyvi7App9 8DzufUPgBP+V4lWJT/PjOCN5DztUAmiwxGqZ9JEzxTWXCztsr45tX1E7qnUg+yq6AZqV 7htIuytm1JSBuU8b4vcX20A7R6PTWa+yPVR9HZIRvXDJBUntIpwjIZFlxV4XKwlktd8/ BA6PX3snuq9Qys3pSkiGzvRl9fy87u8iDVbL3SxU9joo899xk7J9OfY9SI62YQfTFHBT 0PtSS5l40H7/Mua+2MtBlV0ILuZq+cMeYtaOBPF6J91wrrzq36dWEYogqPXoGXW1FaYH tMTQ== X-Gm-Message-State: AJcUukfCF4rFABkCtw5IcEU9B57dIDO0x74DckyehT+HcLmdAiIjDiGT 6lgVsn3hKXEVLPrmp6s/2mF5Pg== X-Google-Smtp-Source: ALg8bN62n6bBdmLwVMyLNefLVcgESRJXuDGGrQCadTVvrEezHFv4ngWEmOvwkDONq0ke/HZWQ/BtBg== X-Received: by 2002:a1c:c60e:: with SMTP id w14mr11816664wmf.18.1547461308945; Mon, 14 Jan 2019 02:21:48 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id v6sm54612203wro.57.2019.01.14.02.21.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:48 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 5/9] cpufreq: Replace open-coded << with BIT() Date: Mon, 14 Jan 2019 15:51:07 +0530 Message-Id: <59ce8ef9777ab0ae3636d8d10110a7f331456ba6.1547458732.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Minor clean-up to use BIT() and keep checkpatch happy. Clean-up the comment formatting to while we're at it to make it easier to read. Signed-off-by: Amit Kucheria --- include/linux/cpufreq.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 0c51d5ce7350..c87989c97834 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -349,14 +349,15 @@ struct cpufreq_driver { }; /* flags */ -#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if - all ->init() calls failed */ -#define CPUFREQ_CONST_LOOPS (1 << 1) /* loops_per_jiffy or other - kernel "constants" aren't - affected by frequency - transitions */ -#define CPUFREQ_PM_NO_WARN (1 << 2) /* don't warn on suspend/resume - speed mismatches */ + +/* driver isn't removed even if all ->init() calls failed */ +#define CPUFREQ_STICKY BIT(0) + +/* loops_per_jiffy or other kernel "constants" aren't affected by frequency transitions */ +#define CPUFREQ_CONST_LOOPS BIT(1) + +/* don't warn on suspend/resume speed mismatches */ +#define CPUFREQ_PM_NO_WARN BIT(2) /* * This should be set by platforms having multiple clock-domains, i.e. @@ -364,14 +365,14 @@ struct cpufreq_driver { * be created in cpu/cpu/cpufreq/ directory and so they can use the same * governor with different tunables for different clusters. */ -#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY (1 << 3) +#define CPUFREQ_HAVE_GOVERNOR_PER_POLICY BIT(3) /* * Driver will do POSTCHANGE notifications from outside of their ->target() * routine and so must set cpufreq_driver->flags with this flag, so that core * can handle them specially. */ -#define CPUFREQ_ASYNC_NOTIFICATION (1 << 4) +#define CPUFREQ_ASYNC_NOTIFICATION BIT(4) /* * Set by drivers which want cpufreq core to check if CPU is running at a @@ -380,19 +381,19 @@ struct cpufreq_driver { * from the table. And if that fails, we will stop further boot process by * issuing a BUG_ON(). */ -#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) +#define CPUFREQ_NEED_INITIAL_FREQ_CHECK BIT(5) /* * Set by drivers to disallow use of governors with "dynamic_switching" flag * set. */ -#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6) +#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING BIT(6) /* * Set by drivers that want the core to automatically register the cpufreq * driver as a thermal cooling device */ -#define CPUFREQ_AUTO_REGISTER_COOLING_DEV (1 << 7) +#define CPUFREQ_AUTO_REGISTER_COOLING_DEV BIT(7) int cpufreq_register_driver(struct cpufreq_driver *driver_data); int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); From patchwork Mon Jan 14 10:21:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762009 X-Patchwork-Delegate: agross@codeaurora.org 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 30CE813B4 for ; Mon, 14 Jan 2019 10:22:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23FE228B7A for ; Mon, 14 Jan 2019 10:22:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1847928B75; Mon, 14 Jan 2019 10:22:04 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD1E228B70 for ; Mon, 14 Jan 2019 10:22:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbfANKV5 (ORCPT ); Mon, 14 Jan 2019 05:21:57 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35312 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbfANKV4 (ORCPT ); Mon, 14 Jan 2019 05:21:56 -0500 Received: by mail-wr1-f65.google.com with SMTP id 96so22173532wrb.2 for ; Mon, 14 Jan 2019 02:21:55 -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 :in-reply-to:references; bh=cNYNQ5KauWNer74TDBHyi3aVg7qesm9a6f/suNN7BOE=; b=jmgzWA3DtEZ+pp9ewQZONx3Svz0g4mDEuJnlXIKx1f05yBEZeouIq0rjNWQS/7qvCV ErmFWPp/V40JeP3IvUQIiYvuCzpgj1jmU5olayPUhLnyeYsXCfYmdQvEJx6asF7tzlLH FFyQKblrYrHS5q4KrQQ80EFEA0pDUo9DJxUdE= 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:in-reply-to:references; bh=cNYNQ5KauWNer74TDBHyi3aVg7qesm9a6f/suNN7BOE=; b=EDNJHjtugTV8uzCvvVmLq3sbECNih/N0oOxPygGZYr3rs9FEQxGDYeMOaIqwUCbUd5 oOVgIB979mA0L7N09uHjNgi+kGZwyTcTAr7XoRr29U8iHQ60ocnJNXROTUaaMb9vUhQ1 m+hbFIBpIn3FyXUBPYPArd/GXRsjh6jy9+HL+cbscZvbJcziS5I4+4LM6MzpIw82oubV TbCCuu0aqpNsQHGI9XiBAN656dw4UHGF0jnZkln9BZt+ZllYYY0AQbHLOoh6Y00I5p68 U5LLN5jDqCoXZKKXPK0ecn3JFyEWal8AnQvsiZxt+a7xBJgAGPU9xNyuhugfiSfEryAw oaYw== X-Gm-Message-State: AJcUukfsehRsSlLbSBaaa3e/Xu+3OieOCpmOodtExaYE6BOawLdgpeKX zPLh61YdhGnthSB/yrCOk7NMnw== X-Google-Smtp-Source: ALg8bN6N4nPyi7ryYyTPveVcVLN2AW+0ZijVlkHW606l7wjb8pm8Fe6xBBuOd8LoiM6pkSnmBQKXrA== X-Received: by 2002:adf:8421:: with SMTP id 30mr24392096wrf.153.1547461314750; Mon, 14 Jan 2019 02:21:54 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id y185sm17801534wmg.34.2019.01.14.02.21.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:21:54 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org (open list:CPU FREQUENCY DRIVERS) Subject: [PATCH v2 6/9] cpufreq: qcom-hw: Register as a cpufreq cooling device Date: Mon, 14 Jan 2019 15:51:08 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the CPUFREQ_AUTO_REGISTER_COOLING_DEV flag to allow the cpufreq core to auto-register the driver as a cooling device. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd --- drivers/cpufreq/qcom-cpufreq-hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 649dddd72749..47c7cea22da1 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -231,7 +231,8 @@ static struct freq_attr *qcom_cpufreq_hw_attr[] = { static struct cpufreq_driver cpufreq_qcom_hw_driver = { .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK | - CPUFREQ_HAVE_GOVERNOR_PER_POLICY, + CPUFREQ_HAVE_GOVERNOR_PER_POLICY | + CPUFREQ_AUTO_REGISTER_COOLING_DEV, .verify = cpufreq_generic_frequency_table_verify, .target_index = qcom_cpufreq_hw_target_index, .get = qcom_cpufreq_hw_get, From patchwork Mon Jan 14 10:21:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762011 X-Patchwork-Delegate: agross@codeaurora.org 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 DE59513BF for ; Mon, 14 Jan 2019 10:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D22E1288A9 for ; Mon, 14 Jan 2019 10:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEFEB28B76; Mon, 14 Jan 2019 10:22:09 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D46F288A9 for ; Mon, 14 Jan 2019 10:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbfANKWD (ORCPT ); Mon, 14 Jan 2019 05:22:03 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43706 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726595AbfANKWC (ORCPT ); Mon, 14 Jan 2019 05:22:02 -0500 Received: by mail-wr1-f68.google.com with SMTP id r10so22139564wrs.10 for ; Mon, 14 Jan 2019 02:22:01 -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 :in-reply-to:references; bh=8dAtUVNc/SrckVQO26IbIxKg4nf0RH/0OVrQbJ3H/go=; b=Neux7xUrwWoFXUZ7sVlRENjwWDvXD+6pnDNismmVjV6uSSqvJrw46OWS24nDJ2AePn y7oyCapNk6j8XZ0kCwI7CI+oxUaJTA4e7rmhf6/9xL4Yq7r6KubCv+6xcoG2PZ96k5oM tRSDtfOZtY2vTODgTdS0uw4hdtUN5FthqcDtw= 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:in-reply-to:references; bh=8dAtUVNc/SrckVQO26IbIxKg4nf0RH/0OVrQbJ3H/go=; b=TtyWODjsLzDajIzfDAY63376VQFbYNDedf3yoT7fExjxf2bnPyRlQBadlXOkB5Rswb +0yWOOb6gkQo2wCOx8CKq8JBg8UlrsgV1dWCqyQjXpmsfWMvhHGn7teghv41c1WMTgCg il80dskr50hXbl1aaUOjcyzrOSVwHa40EknjaY9H5AS7G8hPJWCHXNo3UWZAaqTDUqA4 Pb+XpRnJbc002zgid5JGUjsY6HBec7x/zItLxSHJxXA4XRkEz76YG9nNgHmQJMhWTLTO /PRWe6kXsTYDitclYS4GzhAbaVthYXWVqeUD+XXH4SslCLku9Tk+5fFs0UkLDOaG55u2 cFUg== X-Gm-Message-State: AJcUuke0bPTB9Y7YlJT3+BU9E0MBzkFdo5shkI4feReJhwJLHTiBbykx y78gwYlaxmVJTnsSUO4wp+j22Q== X-Google-Smtp-Source: ALg8bN4duYE/DVBOcjtSa9JTM1k8VOBoQhZ4+rbgDh4fgZQ1Ybd1gg/Mm3pdo9hn0Fye8mNlgmJeVA== X-Received: by 2002:adf:f504:: with SMTP id q4mr24501045wro.321.1547461320685; Mon, 14 Jan 2019 02:22:00 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id e27sm75831684wra.67.2019.01.14.02.21.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:22:00 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, David Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v2 7/9] arm64: dts: sdm845: Increase alert trip point to 95 degrees Date: Mon, 14 Jan 2019 15:51:09 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 75 degrees is too aggressive for throttling the CPU. After speaking to Qualcomm engineers, increase it to 95 degrees. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 0e659b0524ba..fb7da678b116 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -1720,7 +1720,7 @@ trips { cpu_alert0: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1741,7 +1741,7 @@ trips { cpu_alert1: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1762,7 +1762,7 @@ trips { cpu_alert2: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1783,7 +1783,7 @@ trips { cpu_alert3: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1804,7 +1804,7 @@ trips { cpu_alert4: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1825,7 +1825,7 @@ trips { cpu_alert5: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1846,7 +1846,7 @@ trips { cpu_alert6: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; @@ -1867,7 +1867,7 @@ trips { cpu_alert7: trip0 { - temperature = <75000>; + temperature = <95000>; hysteresis = <2000>; type = "passive"; }; From patchwork Mon Jan 14 10:21:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762021 X-Patchwork-Delegate: agross@codeaurora.org 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 22A22139A for ; Mon, 14 Jan 2019 10:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 166C9289A5 for ; Mon, 14 Jan 2019 10:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 147B628B6E; Mon, 14 Jan 2019 10:22:28 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40766289A5 for ; Mon, 14 Jan 2019 10:22:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbfANKWJ (ORCPT ); Mon, 14 Jan 2019 05:22:09 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36183 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfANKWJ (ORCPT ); Mon, 14 Jan 2019 05:22:09 -0500 Received: by mail-wr1-f65.google.com with SMTP id u4so22176520wrp.3 for ; Mon, 14 Jan 2019 02:22:07 -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 :in-reply-to:references; bh=b84VzS+zt/SYuz8SCYw22/mwhzuXk7yy3r3UAQeofo8=; b=VAT/qx4pWCvf/A4ZUSpHjwVNrketlaH1WIrcCH5h5qxAKVbvo5+z4tCQyRz6+QBNV1 62BquKMDZl+E59cAjzMnECp6/1JWsRyGMyKniWzNpmw4BHRlbPbdP+oFwv7a9gmJlxOZ t0tbaLwdjFhkp5ZLfp6qzIIvvJnch/6QKQ97I= 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:in-reply-to:references; bh=b84VzS+zt/SYuz8SCYw22/mwhzuXk7yy3r3UAQeofo8=; b=tetojsIKCdRBhYThUhd1ATnZfhdk3ajOfusFz23DN61QnkQ0hXO617QErZzSaoCAoA ZNkuHs8uK5SqEl5IS5M+N4Sf6NlcTwRN2r/DMDUXWdzgtJ6qlNDog4K7VC5zFS8lXkaQ VqNsLFpLxapef/ktTAkoDbcyRkaZeTbKUelUu/ZIc7CgD9odhyAXoSzpzfJ33PBOqQWi fWp75fqa1iIfyfbymwvmLwUWizP5lAYkUDJQuikBd4Oy8ot1Izzro91PV5Tix9vwUT1Y qzJUMGgivoxGbKjkyb8ShmdeCBhMje27PrtkFZPwK+/qkuudqMuWSgNaQ4UY36MLt+D+ Ui9g== X-Gm-Message-State: AJcUukeh7N1HHRww7VrqYaYRmUAKuHj8L2aPt/XGLo+pngIqLzY3JFhl KaYiHBQ0YemKhsop4oB6cd5C2NTSHAk= X-Google-Smtp-Source: ALg8bN6KiDUdohCO+frq/jg2Eo5qIj35wrJDFw9p+lzdW7jsRHanVirm4M7D6QJqcQMPwnPPSj1Etw== X-Received: by 2002:a5d:4586:: with SMTP id p6mr22941742wrq.69.1547461326543; Mon, 14 Jan 2019 02:22:06 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id h62sm22421356wmf.11.2019.01.14.02.22.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:22:05 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, David Brown , Rob Herring , Mark Rutland , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v2 8/9] arm64: dts: sdm845: wireup the thermal trip points to cpufreq Date: Mon, 14 Jan 2019 15:51:10 +0530 Message-Id: <7f94696460848a6bcfe5aee5ffda7fe556240736.1547458732.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since all cpus in the big and little clusters, respectively, are in the same frequency domain, use all of them for mitigation in the cooling-map. We end up with two cooling devices - one each for the big and little clusters. At the lower trip points we restrict ourselves to throttling only a few OPPs. At higher trip temperatures, allow ourselves to be throttled to any extent. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 177 ++++++++++++++++++++++++--- 1 file changed, 161 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index fb7da678b116..7973e88bdf94 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -13,6 +13,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -99,6 +100,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x0>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_0>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -116,6 +118,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x100>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_100>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -130,6 +133,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x200>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_200>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -144,6 +148,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x300>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_300>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -158,6 +163,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x400>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_400>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -172,6 +178,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x500>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_500>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -186,6 +193,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x600>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_600>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -200,6 +208,7 @@ compatible = "qcom,kryo385"; reg = <0x0 0x700>; enable-method = "psci"; + #cooling-cells = <2>; next-level-cache = <&L2_700>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -1719,18 +1728,35 @@ thermal-sensors = <&tsens0 1>; trips { - cpu_alert0: trip0 { + cpu0_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit0: trip1 { + cpu0_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu0_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu0_crit>; + 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>; + }; + }; }; cpu1-thermal { @@ -1740,18 +1766,35 @@ thermal-sensors = <&tsens0 2>; trips { - cpu_alert1: trip0 { + cpu1_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit1: trip1 { + cpu1_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu1_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu1_crit>; + 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>; + }; + }; }; cpu2-thermal { @@ -1761,18 +1804,35 @@ thermal-sensors = <&tsens0 3>; trips { - cpu_alert2: trip0 { + cpu2_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit2: trip1 { + cpu2_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu2_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu2_crit>; + 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>; + }; + }; }; cpu3-thermal { @@ -1782,18 +1842,35 @@ thermal-sensors = <&tsens0 4>; trips { - cpu_alert3: trip0 { + cpu3_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit3: trip1 { + cpu3_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu3_alert0>; + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, + <&CPU1 THERMAL_NO_LIMIT 4>, + <&CPU2 THERMAL_NO_LIMIT 4>, + <&CPU3 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu3_crit>; + 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 { @@ -1803,18 +1880,35 @@ thermal-sensors = <&tsens0 7>; trips { - cpu_alert4: trip0 { + cpu4_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit4: trip1 { + cpu4_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu4_alert0>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu4_crit>; + 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>; + }; + }; }; cpu5-thermal { @@ -1824,18 +1918,35 @@ thermal-sensors = <&tsens0 8>; trips { - cpu_alert5: trip0 { + cpu5_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit5: trip1 { + cpu5_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu5_alert0>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu5_crit>; + 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>; + }; + }; }; cpu6-thermal { @@ -1845,18 +1956,35 @@ thermal-sensors = <&tsens0 9>; trips { - cpu_alert6: trip0 { + cpu6_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit6: trip1 { + cpu6_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu6_alert0>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu6_crit>; + 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>; + }; + }; }; cpu7-thermal { @@ -1866,18 +1994,35 @@ thermal-sensors = <&tsens0 10>; trips { - cpu_alert7: trip0 { + cpu7_alert0: trip-point@0 { temperature = <95000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit7: trip1 { + cpu7_crit: cpu_crit@0 { temperature = <110000>; hysteresis = <1000>; type = "critical"; }; }; + + cooling-maps { + map0 { + trip = <&cpu7_alert0>; + cooling-device = <&CPU4 THERMAL_NO_LIMIT 4>, + <&CPU5 THERMAL_NO_LIMIT 4>, + <&CPU6 THERMAL_NO_LIMIT 4>, + <&CPU7 THERMAL_NO_LIMIT 4>; + }; + map1 { + trip = <&cpu7_crit>; + 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>; + }; + }; }; }; }; From patchwork Mon Jan 14 10:21:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 10762017 X-Patchwork-Delegate: agross@codeaurora.org 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 38EF113B4 for ; Mon, 14 Jan 2019 10:22:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D6A728B5D for ; Mon, 14 Jan 2019 10:22:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BCAB28B64; Mon, 14 Jan 2019 10:22:16 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B935928B70 for ; Mon, 14 Jan 2019 10:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbfANKWO (ORCPT ); Mon, 14 Jan 2019 05:22:14 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40426 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbfANKWO (ORCPT ); Mon, 14 Jan 2019 05:22:14 -0500 Received: by mail-wm1-f68.google.com with SMTP id f188so8212156wmf.5 for ; Mon, 14 Jan 2019 02:22:13 -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 :in-reply-to:references; bh=Wu/tmpT7BDXo4oTQUwIjofVpVoXKP/NrUVRomzzYDk8=; b=Z1N08G6opSL2YIWhjPthqe3mvAA4GZbBv2gowuWMVignQnnwPM4OtQrPGFKjt4ykXb E/LzT9mAttHZw2pS7F1UL4raKcuvwlI7KsrllyKU55Twem4025TdkuTL3C8P46o2jfNP hj8Jd88FQRY8AOg3H71Ro7UAKEaY73RUPWxaQ= 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:in-reply-to:references; bh=Wu/tmpT7BDXo4oTQUwIjofVpVoXKP/NrUVRomzzYDk8=; b=FC/DPonIog9b7QoWJoFFwhpzB0impzz2gaDp6eZCnnk4nOvBBk6saBGwWQuut1sp6v sCskrxS0JAbtdqBnVTgAV35yxDK377mMRPBf21d8awOqEOH/kSEGAKxZMual8nztyxYF yipm6YZiY/xDnRX+KUIGDslfQaP8755YnGbj0SS5p+3Y/LuxbKlJvQ6t8ZgqTbAaH0y0 JiYZckqvbRKbNELFESOIcbB+ZISuiPM87/RC4S8VeZUMiVaYWENdTzaYeebJPTzo2s0A wA2vmp7joRgwJbs8EG5nvCSt04GKjrm3LXCQ8PCldUoxTfr5cf4qiWDeMbBcDvf/U+k2 r7RA== X-Gm-Message-State: AJcUukenBvh/v4qv7C9QgXq3l4gufn+GlNJIz4MpAwSe8mx/sYpQZCSf HTitRW0OYMROXsNWjTl+a+IlEw== X-Google-Smtp-Source: ALg8bN6El3lLYFz8Pk1H3n6lW7ctd/mEMwD34o2/U9BGIlxE/Pjv5wis19psEacp8YU+6U24yG+eSw== X-Received: by 2002:a7b:c34c:: with SMTP id l12mr11046788wmj.147.1547461332650; Mon, 14 Jan 2019 02:22:12 -0800 (PST) Received: from localhost ([49.248.81.155]) by smtp.gmail.com with ESMTPSA id k15sm105513691wru.8.2019.01.14.02.22.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 02:22:11 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, viresh.kumar@linaro.org, edubezval@gmail.com, andy.gross@linaro.org, tdas@codeaurora.org, swboyd@chromium.org, dianders@chromium.org, mka@chromium.org, Javi Merino , Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org (open list:THERMAL/CPU_COOLING) Subject: [PATCH v2 9/9] thermal: cpu_cooling: Clarify error message Date: Mon, 14 Jan 2019 15:51:11 +0530 Message-Id: <2de2d178380525191d99d6c3619ad8c45efdbab4.1547458732.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make it clear that it is a failure if the cpufreq driver was unable to register as a cooling device. Makes it easier to find in logs and grepping for words like fail, err, warn. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index dfd23245f778..6fff16113628 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy) cdev = __cpufreq_cooling_register(np, policy, capacitance); if (IS_ERR(cdev)) { - pr_err("cpu_cooling: cpu%d is not running as cooling device: %ld\n", + pr_err("cpu_cooling: cpu%d failed to register as cooling device: %ld\n", policy->cpu, PTR_ERR(cdev)); cdev = NULL; }