Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5424207rwe; Tue, 18 Apr 2023 06:47:33 -0700 (PDT) X-Google-Smtp-Source: AKy350bL5f2gtENMtaXQytWYUgVoiwZ7zi6h9Hbyxq5wPsBgzjj9MKaQfFSv80snYyC0wHH2wg+s X-Received: by 2002:a17:90a:c381:b0:247:40f1:79d7 with SMTP id h1-20020a17090ac38100b0024740f179d7mr1954070pjt.34.1681825653156; Tue, 18 Apr 2023 06:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681825653; cv=none; d=google.com; s=arc-20160816; b=hMK6rxFjdWvKNNjOasw78tfA9iOzLujTZR7ceRxBla4e6fptXXEm/U15+a//hlhf1A HWWZ1yvGG/qiAUb7cMFl9/UCJ4xxMDbFe+NHDa9DVzMWW5+D1lDo4hrf2QY1rzMkzp1T TjnqGyjwi62SV439M9JVb+sqTM1GaiNzL9jp+qlEabmZN1vhhGOarogWZK0cAyr2stAF MNjNfEzhlnHe3uqPnzfafXqn9AXcUbqSX3iubG2b7ooU/PpgNqWRI57qp+qJrJzIC+NP jYWBXhCmf2nQQ23uGU2ZoRL5ah6SBbdUgj+KeJy5/UdtEn4GoDd66rtDtzFkIJkdDMen RiZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=g1+A8ldOBJb4TTardky3TqCF0C5aJypjFs7swksN1BA=; b=wOGJa8GV1eWnL0jDeWj9Tl2p8BnbPWFff7JCYqD9SQMsJ1QHBknvTFgQNDZn5Jg7yt jNevJ0oWD10yHZR+OYgmsLeczW9GjnmI0sPl3SmBm4DEcB1F5DPSOL8YQkkX+0JKpOH3 mKrzvI+Xvx0VKifFwYFUkLG0dmsIyY9hzZah/evPP2OURti7d92hGC2m/SDe6inctbRZ wl6HmkwrQ43vVTQj6uQ0ktjdTeudzHR9Ah/EiNxTxvz10xXQaVtvbPqOzaeNdXmucHJm d5m3iPy12MZS52z8W1L9WNls6lQdjiR0xsZRA4fm+yprOEkq8bplt6rlaP0qK/I38TY+ MN6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w45twfQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu16-20020a17090b389000b002471589f0d9si15697268pjb.95.2023.04.18.06.47.21; Tue, 18 Apr 2023 06:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w45twfQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S231338AbjDRNpP (ORCPT + 99 others); Tue, 18 Apr 2023 09:45:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbjDRNo6 (ORCPT ); Tue, 18 Apr 2023 09:44:58 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E42C167F2 for ; Tue, 18 Apr 2023 06:44:49 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id d8-20020a05600c3ac800b003ee6e324b19so14857300wms.1 for ; Tue, 18 Apr 2023 06:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681825488; x=1684417488; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=g1+A8ldOBJb4TTardky3TqCF0C5aJypjFs7swksN1BA=; b=w45twfQ+bDR3nz+o5rBp1mQk0L8s966VTCGqMxqLDM/OdAw2xh4v0Qq0tgMRBzOZjE u2Jf0b4K5n8t2Vp7zec8TiR7JAtN8csrbI4IzSdR+zmJidLFwyJ5k65s2ZIrUOvY4AJw G+9npREHUc/NzidRoRZgV4POQZUPrU6w5qSW8YdzEGzCOniz743yGcTjTQrVvvTpzp24 oTMFTRYD2WkkUmmxDbycH3FFARrmTfVQzzCkQLAdOET67wx0MuIvXlq7ZhBmM/FyWaiL PX9+Q7yEb1oLL7/dreWfFb4lHbae/wrTt03FR8ySawIbx4ZrdJjZmI2PJW67l/XGBHuO TkAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681825488; x=1684417488; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g1+A8ldOBJb4TTardky3TqCF0C5aJypjFs7swksN1BA=; b=b8NEbRA8AdEUIQkR4jwFycjDMJczhYd0QfUkKI2nVQQH65ZiM9ixUx92boxDKhE2dc banuLIKsdK9xNDn+arLS41HHVz1u+C8nfhH3INBx96jHSMFTD8XbY6f0kbI8IHtaYAyw O3tyaWSq3TFxm9pIfBiqa29/xumRdC+4d96Cu3UrmEBjGMyGanReKqEyZKwI1Vt+LL0N LpoMaMn7ekPLka3T6E1Gis/H1nsNsEV6N5nJU31/7SrUXJN4GKZGkjiUPZyZWbFxViP3 dVZhqe268ySvAto9I0QLbYBnDHMe/7gCJuhmbcAmBJ0fARRVNZATKOyK9WmqVpJWPcS0 4KZw== X-Gm-Message-State: AAQBX9fE74T0WEp/L6402FCvvyKISnhksTdl3Hb0Zu5y8UHGgy8/fF5B 6EKv0oqTi1ixVGS1Nz0WWMucCQ== X-Received: by 2002:a05:600c:20c:b0:3f1:75d0:614d with SMTP id 12-20020a05600c020c00b003f175d0614dmr3897400wmi.38.1681825487084; Tue, 18 Apr 2023 06:44:47 -0700 (PDT) Received: from [192.168.2.1] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id e2-20020a5d65c2000000b002ceacff44c7sm13105157wrw.83.2023.04.18.06.44.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Apr 2023 06:44:46 -0700 (PDT) Message-ID: <7fd7df2d-f473-c0fd-5c3c-40d0fb697db7@linaro.org> Date: Tue, 18 Apr 2023 15:44:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3 5/6] thermal/drivers/acpi: Make cross dev link optional by configuration Content-Language: en-US To: "Rafael J. Wysocki" Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Len Brown , "open list:ACPI" References: <20230413114647.3878792-1-daniel.lezcano@linaro.org> <20230413114647.3878792-6-daniel.lezcano@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/04/2023 15:38, Rafael J. Wysocki wrote: > On Thu, Apr 13, 2023 at 1:47 PM Daniel Lezcano > wrote: >> >> The ACPI thermal driver creates a link in the thermal zone device >> sysfs directory pointing to the device sysfs directory. At the same >> time, it creates a back pointer link from the device to the thermal >> zone device sysfs directory. >> >> From a generic perspective, having a device pointer in the sysfs >> thermal zone directory may make sense. But the opposite is not true as >> the same driver can be related to multiple thermal zones. >> >> The usage of these information is very specific to ACPI and it is >> questionable if they are really needed. >> >> Let's make the code optional and disable it by default. If it hurts, >> we will revert this change. >> >> Signed-off-by: Daniel Lezcano >> --- >> drivers/acpi/Kconfig | 13 +++++++++ >> drivers/acpi/thermal.c | 62 ++++++++++++++++++++++++++++-------------- >> 2 files changed, 55 insertions(+), 20 deletions(-) >> >> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig >> index ccbeab9500ec..7df4e18f06ef 100644 >> --- a/drivers/acpi/Kconfig >> +++ b/drivers/acpi/Kconfig >> @@ -336,6 +336,19 @@ config ACPI_THERMAL >> To compile this driver as a module, choose M here: >> the module will be called thermal. >> >> +config ACPI_THERMAL_SYSFS_ADDON >> + bool "Enable thermal sysfs addon" >> + depends on ACPI_THERMAL >> + def_bool n >> + help >> + Enable sysfs extra information added in the thermal zone and >> + the driver specific sysfs directories. That could be a link >> + to the associated thermal zone as well as a link pointing to >> + the device from the thermal zone. By default those are >> + disabled and are candidate for removal, if you need these >> + information anyway, enable the option or upgrade the >> + userspace program using them. >> + > > I don't think that the Kconfig option is appropriate and the help text > above isn't really helpful. I'm sorry, I'm missing something. Don't we want to make these sysfs extra information optional and disable them by default ? >> config ACPI_PLATFORM_PROFILE >> tristate >> >> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c >> index 5763db4528b8..30fe189d04f8 100644 >> --- a/drivers/acpi/thermal.c >> +++ b/drivers/acpi/thermal.c >> @@ -787,9 +787,44 @@ static struct thermal_zone_device_ops acpi_thermal_zone_ops = { >> .critical = acpi_thermal_zone_device_critical, >> }; >> >> +#ifdef CONFIG_ACPI_THERMAL_SYSFS_ADDON > > I agree with moving the code in question to separate functions, but I > don't agree with putting it under the Kconfig option. Do you mean use IS_ENABLED check like what is done with Menlow patch 6 ? [ ... ] -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog