From patchwork Fri Apr 22 14:10:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 565165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60B66C433FE for ; Fri, 22 Apr 2022 14:11:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448446AbiDVOOG (ORCPT ); Fri, 22 Apr 2022 10:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448412AbiDVON5 (ORCPT ); Fri, 22 Apr 2022 10:13:57 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E28E5AA59 for ; Fri, 22 Apr 2022 07:10:58 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso8054128wml.1 for ; Fri, 22 Apr 2022 07:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PYeD7CphIZ5NH/umo7M0wjdcvUu12ITU6k0/hQvLpn4=; b=ZALoyjG8zCeEignAj44ruQpeuReq8DfH1PQ77vyqmSCU6416JBsIknodyI9lNyoqVt 0lQ1f4NBwYJDpwMZ5QiWkdT5dcveL1rzIeSJn3bfuNMM8ltdQZWwc8wPeSP3usbealiB Xvu6jN+bwjLIIgDp6D0CK03EOuT5rJxZ0XoukaPsM+C5PKSFVuloS3nTU4ICshUgxgCr vL6vSqLI1bydjYbf4+xXByyC+gi7QxfIALHv2phJfVVbzBxLhrfCYR0dhLUH7BxM22MP hQMCQUv48hKvYY247w1nv+GGvk9EciUifUWvlPJk3H0k814PutkwIDGmdV0CqWoGzcpV /Xtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PYeD7CphIZ5NH/umo7M0wjdcvUu12ITU6k0/hQvLpn4=; b=kZk0MJ6vgaolaoBdu4yFOCiRLB4EfbvdWAjyVA07o4OjTdh248g5dmZzDSmM+KAdbL B2zCR0ap6HXTFH1is6QZ75aG/DP5QlxETEdtP3fz2KY8YrRiI17c4GaaArEPM1LOqJMu 0LcyWCEU2L2HdXh19hEe5M0cVqzi8zZcqcCGYnP2EnTChDi9qCpt9eFYW3qnFLEbjPDM +DYCZ/TvzcRF1JGYd4sPJCJfIA6C5GmsqHA9/bB9JMnQ14k7RcboxHDe1326aHY9y7+1 MRg6ZE+iBTOf3BD3luVXZlbClcBpz2LRMNhtSrAtInH5lnr8KyOnjQ+fr1ZBiG71oEJA ELIQ== X-Gm-Message-State: AOAM532bjeGBaEmY+FEKVPMIS6qphfmtGHvJnpqTm34Ra3WHKe/XG9gh ASha2uYW8s0DzmsPMnBG5yXElw== X-Google-Smtp-Source: ABdhPJw/DrTqoY84qNlsyOJcHJJoiMOi4jdHj0vLja2zZ+SWSQRqWgoDISxntvHncsYjySGdb9tGcQ== X-Received: by 2002:a05:600c:4e94:b0:392:8e2a:d794 with SMTP id f20-20020a05600c4e9400b003928e2ad794mr13888303wmq.107.1650636657065; Fri, 22 Apr 2022 07:10:57 -0700 (PDT) Received: from localhost.localdomain (static-176-182-171-101.ncc.abo.bbox.fr. [176.182.171.101]) by smtp.gmail.com with ESMTPSA id f189-20020a1c38c6000000b0038ff83b9792sm4607430wma.43.2022.04.22.07.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 07:10:56 -0700 (PDT) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@linaro.org Cc: srinivas.pandruvada@intel.com, rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria Subject: [PATCH 1/2] Revert "thermal/core: Deprecate changing cooling device state from userspace" Date: Fri, 22 Apr 2022 16:10:28 +0200 Message-Id: <20220422141029.968212-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This reverts commit a67a46af4ad6342378e332b7420c1d1a2818c53f. It has been reported the warning is annoying as the cooling device state is still needed on some production system. Meanwhile we provide a way to consolidate the thermal framework to prevent multiple actors acting on the cooling devices with conflicting decisions, let's revert this warning. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_sysfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index f154bada2906..1c4aac8464a7 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -610,9 +610,6 @@ cur_state_store(struct device *dev, struct device_attribute *attr, unsigned long state; int result; - dev_warn_once(&cdev->device, - "Setting cooling device state is deprecated\n"); - if (sscanf(buf, "%ld\n", &state) != 1) return -EINVAL; From patchwork Fri Apr 22 14:10:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 565545 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18FA9C433F5 for ; Fri, 22 Apr 2022 14:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448450AbiDVOOH (ORCPT ); Fri, 22 Apr 2022 10:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448511AbiDVON7 (ORCPT ); Fri, 22 Apr 2022 10:13:59 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDCC45AA5D for ; Fri, 22 Apr 2022 07:10:59 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id c10so11264256wrb.1 for ; Fri, 22 Apr 2022 07:10:59 -0700 (PDT) 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=v9pKfwCchdHC4OwwMYDqENqNCTj3wO3pUrxgL+YUsCg=; b=LgxY8EKn2SQB6F5GTuWAky1algw6CCJDrp4WE5zG/F7V9C38hu6xBWw8LSXEDyjVQq O8AH1ZOhVDuEsz64tWiqvJ+j5HZoCRDNLsCvRtTgKL86zuwxz3I8Go+0qQJpmZem19TK U0EEKjbViyPjQwsH5p7GVcE9cobEbO9RLG8LeSReyVJ9Tjll/tERERZBCh/7h7QxkQm5 jXSD8RXCT/8riVqPknBhkITGyKtnjnHMOOcfnRo5aaI1MreVjezwHxd3H6XYdSv99Ba9 DGdonBD0EQEV6eMv/YLdV7Qo3Ovf25RI/Ruv3P1q3D0glSgUpTos3pBIDl8zOj3bdNAL K/5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v9pKfwCchdHC4OwwMYDqENqNCTj3wO3pUrxgL+YUsCg=; b=gzxkAyqDk0Fb6GigJudDbeH5+k9O1FNbGqTFLVSNi9Tp2rqN1yO1VYYgegid3hRkV4 Nu/gCbEUhEyeK6c612CSepbfzDy99woz3TGpVLpdWQGZaBL4nUQNLKNwGYFXxlwrXvmL R45dJu7pBQJ1uP0CeO6KshvInyKy/IfFYgjqtK8szqY4uh8XR2a/von8JGnMR37D2x3K fZiItIjeQsHysqj59TGPjtxaHpTbSuq+9wFIs+mk8MoVqoxEoWr4xwi3ikIQuKMfUP5g oKRVWiV7biX156qblnTyuNtBHdsJ1XIwZsFgvbfvyeBSEy+iNsISNPQLmy7d4JJ3bVqB muUQ== X-Gm-Message-State: AOAM5334HAqK4fE64bneTlQMslcRW5jYjK+WkvImkEl6SIUU9Y1Namof 0LgVbwbJVw2BKlx7DGcPEiglKA== X-Google-Smtp-Source: ABdhPJw5XaV/YsAIMcO+prtxlgGuQnolZli3V4e28i77qY0gN2YrEC5ZZgZvZz4DoiFdDwTKU/0SzA== X-Received: by 2002:adf:e609:0:b0:20a:8110:2245 with SMTP id p9-20020adfe609000000b0020a81102245mr3845074wrm.211.1650636658458; Fri, 22 Apr 2022 07:10:58 -0700 (PDT) Received: from localhost.localdomain (static-176-182-171-101.ncc.abo.bbox.fr. [176.182.171.101]) by smtp.gmail.com with ESMTPSA id f189-20020a1c38c6000000b0038ff83b9792sm4607430wma.43.2022.04.22.07.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 07:10:57 -0700 (PDT) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@linaro.org Cc: srinivas.pandruvada@intel.com, rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Amit Kucheria Subject: [PATCH 2/2] thermal/governor: Remove deprecated information Date: Fri, 22 Apr 2022 16:10:29 +0200 Message-Id: <20220422141029.968212-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220422141029.968212-1-daniel.lezcano@linaro.org> References: <20220422141029.968212-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The userspace governor is still on different production system and the deprecating warning is scary. Even if we want to get rid of the userspace governor, it is too soon yet as the alternatives are not yet adopted. Change the deprecated warning by an information message suggesting to switch to the netlink thermal events. Signed-off-by: Daniel Lezcano --- drivers/thermal/Kconfig | 6 ++++-- drivers/thermal/gov_user_space.c | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index e37691e0bf20..0e5cc948373c 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -113,8 +113,10 @@ config THERMAL_DEFAULT_GOV_USER_SPACE bool "user_space" select THERMAL_GOV_USER_SPACE help - Select this if you want to let the user space manage the - platform thermals. + The Userspace governor allows to get trip point crossed + notification from the kernel via uevents. It is recommended + to use the netlink interface instead which gives richer + information about the thermal framework events. config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR bool "power_allocator" diff --git a/drivers/thermal/gov_user_space.c b/drivers/thermal/gov_user_space.c index 64a18e354a20..72c90486b46d 100644 --- a/drivers/thermal/gov_user_space.c +++ b/drivers/thermal/gov_user_space.c @@ -17,8 +17,7 @@ static int user_space_bind(struct thermal_zone_device *tz) { - pr_warn_once("Userspace governor deprecated: use thermal netlink " \ - "notification instead\n"); + pr_info_once("Consider using the netlink events interface\n"); return 0; }