From patchwork Tue Dec 8 15:30:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 339750 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3787338jai; Tue, 8 Dec 2020 07:31:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPWVCP2NH//q5pi89R0d2z3RQ77iEFX8RV4U6yWky4XmtHTDHjZA2rSS/Wb0oJzdV6PMkM X-Received: by 2002:a17:906:c289:: with SMTP id r9mr23121473ejz.311.1607441493875; Tue, 08 Dec 2020 07:31:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607441493; cv=none; d=google.com; s=arc-20160816; b=Ms5cWueGEF/nGo4c/0nScm7pjKmz5+EujmTGyDzOEK36UpJTT6GmmvSJNb7uxxCkbl vDs9c188C5aUtCYmNB3P2x8CZwavmsFC4Tvbh7KkwFS3NXu/G6NvduE8aP6sMmvf+1zv 3ycRagtn0lSN+R04l/3CZKbmrYODwtnxWvcUdsJPBGpCoTTbCrk/bQ++R8EA0wGq1EDb WsT0WFuze3zx4bYRQ3Vo4x+JjGwn60rcGZxWFFam2gPmkqPDogh5yR2JuV114ak9dIyU t+XevEa6W1ln/INAuBs/RuzAciG+EkX9H8umFQDW232d2ZR93ISCtJlRsD31z9CKOPs2 Cj7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bJHsD7wusQYPoSnayseCrxu6qN7hzp3QYIwsAak7I3I=; b=dLkpLbK6yD8qeyWjj+0n6okLV9Nk6MzAr4+eALXHYooYKsxNr8sXe9Qz93UQdKDGSm 6eM22BuiJoS8WXHsgePeaFi6rqdNmsru5qWOeFPqlARZFf36iuLet3dkrhEN+XhX7r+G xNFcJ7GSRXcKZYx31rL6N1AfyxcEBtEZJyu8u22/OoRJzANU203eeCIny9mQXAl7JoVe KLapX3cWh6shqnxLNiDaBmdXjfi8rSpYoX6Xd7uTvqT4v7tIJD8OKZrcArLlj5rBvbm3 uePCOJ8UsFLlY9Nw76PNGCTz1UFXKiE9NcqoaXG59PIL0LxXakzSLVTg1NDX/kWRNYl+ BWrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bzJj91XM; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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. [23.128.96.18]) by mx.google.com with ESMTP id h7si7916173ejj.159.2020.12.08.07.31.33; Tue, 08 Dec 2020 07:31:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bzJj91XM; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S1730116AbgLHPbc (ORCPT + 8 others); Tue, 8 Dec 2020 10:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730114AbgLHPbc (ORCPT ); Tue, 8 Dec 2020 10:31:32 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9850C061749 for ; Tue, 8 Dec 2020 07:30:51 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id bo9so25070482ejb.13 for ; Tue, 08 Dec 2020 07:30:51 -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:mime-version :content-transfer-encoding; bh=bJHsD7wusQYPoSnayseCrxu6qN7hzp3QYIwsAak7I3I=; b=bzJj91XMnvArriI3I1poli3kf9PSZjAHzPXbnwtMGmfHPoHARHfic9GH5/nSP6a21N FE0e4E4o14IYYLgzGDOeUGxAr/H4n4rNvp9l/rNuOt1nqkLKOuG5qrvmRI6NMhIbSeOv 6Qhl7o2zrzyqqfkYQradnD/t6hU2VHaH02kjrhx72k2A6iqJKoNGyEfKBadcd+R0DXJc d30xQrl/deFB438A12OgexfIqN7N9gGP1kVJIHUmkGsd+YEZPQ36W+9euOBd9SF5EDHQ JC8PWXJM5LKf811U4haUANBlLXhAs20BYsEj3TnU29+72zG96PGpBCPc/My0MJaUdesw JMZg== 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:mime-version :content-transfer-encoding; bh=bJHsD7wusQYPoSnayseCrxu6qN7hzp3QYIwsAak7I3I=; b=i7ZEyPcR4tMaouyU6/AAz+yx7Wqg+dfVch5oUFbqci87mHTmYFq4PPe11Z9H6SSvQ+ AMOB2qWoktf+fhprEXaAG1Led7gv2l6YigslZCfYf45ojvsKjurZu9Qolt2/zbDjg2f9 cOHIJJ1T+I9WxNqVkX0mU9SSHJLADLAVxppKKRXQINZuBL9Zk948kypAVd3gM+ygk3pj DbfVQm9IZPKviJdTxglGwleqOtWdIlMc1BDG6L0YfkRPRa5aAchDhVjdIEv7VxqpIpdi cxnR01rIlsv34QDFnkJccIFOso8EN9Px18CQhFg1LPuboY8NyOy8pMRaYZfnfQeWOYzJ iixA== X-Gm-Message-State: AOAM530XcgDjIbWbHcKE18OesXHpfgJscrxR738HXF35tnZCqt5bMpgJ ecqtaHcaByyRqwOSEOsy+oAcDM11yr/ymg== X-Received: by 2002:a17:906:7aca:: with SMTP id k10mr23128906ejo.215.1607441450423; Tue, 08 Dec 2020 07:30:50 -0800 (PST) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:7b:3cd9:3112:fa1b]) by smtp.gmail.com with ESMTPSA id z9sm16233427eju.123.2020.12.08.07.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 07:30:49 -0800 (PST) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, amitk@kernel.org Subject: [PATCH] thermal/core: Make 'forced_passive' as obsolete candidate Date: Tue, 8 Dec 2020 16:30:43 +0100 Message-Id: <20201208153046.297456-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 The passive file in sysfs forces the usage of a passive trip point set by the userspace when a broken BIOS does not provide the mitigation temperature for such thermal zone. The hardware evolved a lot since 2008 as a good thermal management is no longer an option. Linux on the other side also provides now a way to load fixed ACPI table via the option ACPI_TABLE_UPGRADE, so additionnal trip point could be added there. Set the option obsolete and plan to remove it, so the corresponding code can be removed from the core code and allow more cleanups the thermal framework deserves. Signed-off-by: Daniel Lezcano --- Documentation/ABI/obsolete/sysfs-thermal-passive | 13 +++++++++++++ drivers/thermal/thermal_sysfs.c | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 Documentation/ABI/obsolete/sysfs-thermal-passive -- 2.25.1 diff --git a/Documentation/ABI/obsolete/sysfs-thermal-passive b/Documentation/ABI/obsolete/sysfs-thermal-passive new file mode 100644 index 000000000000..2510724cc165 --- /dev/null +++ b/Documentation/ABI/obsolete/sysfs-thermal-passive @@ -0,0 +1,13 @@ +What: /sys/class/thermal/thermal_zone*/passive +Date: December 2008 +KernelVersion: 2.6.28 +Contact: Daniel Lezcano +Description: + + The passive file in sysfs forces the usage of a passive trip point + set by the userspace when a broken BIOS does not provide the + mitigation temperature for such thermal zone. However, the Linux + kernel evolved a lot since 2008 as well as the hardware and it is + able to manage correctly the thermal envelope. It does also provide + a way to load fixed ACPI table via the option ACPI_TABLE_UPGRADE, so + additionnal trip point could be added there. diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index 0866e949339b..578099b520b1 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -232,6 +232,8 @@ passive_store(struct device *dev, struct device_attribute *attr, if (state && state < 1000) return -EINVAL; + pr_warn("%s: Consider the 'passive' option obsolete\n", tz->type); + if (state && !tz->forced_passive) { if (!tz->passive_delay) tz->passive_delay = 1000;