From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [83.223.95.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CE3BBE4C; Sat, 30 Dec 2023 19:09:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 1537730001EA0; Sat, 30 Dec 2023 20:09:00 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 0077FD1DE1; Sat, 30 Dec 2023 20:08:59 +0100 (CET) Date: Sat, 30 Dec 2023 20:08:59 +0100 From: Lukas Wunner To: Ilpo =?iso-8859-1?Q?J=E4rvinen?= Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy??ski , Alexandru Gagniuc , Krishna chaitanya chundru , Srinivas Pandruvada , "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Bjorn Helgaas , Daniel Lezcano , Amit Kucheria , Zhang Rui , linux-kernel@vger.kernel.org, Alex Deucher Subject: Re: [PATCH v3 09/10] thermal: Add PCIe cooling driver Message-ID: <20231230190859.GA14758@wunner.de> References: <20230929115723.7864-1-ilpo.jarvinen@linux.intel.com> <20230929115723.7864-10-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230929115723.7864-10-ilpo.jarvinen@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Fri, Sep 29, 2023 at 02:57:22PM +0300, Ilpo Järvinen wrote: > @@ -253,8 +255,16 @@ static int pcie_bandwidth_notification_probe(struct pcie_device *srv) > pcie_enable_link_bandwidth_notification(port); > pci_info(port, "enabled with IRQ %d\n", srv->irq); > > + data->cdev = pcie_cooling_device_register(port, srv); > + if (IS_ERR(data->cdev)) { > + ret = PTR_ERR(data->cdev); > + goto disable_notifications; > + } > return 0; Now wait a minute, if you can't register the cooling device, you still want to provide accurate link speeds to the user in sysfs, right? At least that's what you promise in Kconfig. > --- /dev/null > +++ b/drivers/thermal/pcie_cooling.c > @@ -0,0 +1,107 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * PCIe cooling device > + * > + * Copyright (C) 2023 Intel Corporation. Another trailing period I'd remove. I take it this patch (only) allows manual bandwidth throttling through sysfs, right? And emergency throttling is introduced separately on top of this? Thanks, Lukas