Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5228849rdb; Sat, 30 Dec 2023 11:09:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgA21zmbdxx7hb3H+Dx/GTvOzdeTdmnd8XTPgVyCYPeS8nyo4zk4r0hqXdT6cLitNIzsVm X-Received: by 2002:a05:6e02:18ce:b0:35f:e0a5:7946 with SMTP id s14-20020a056e0218ce00b0035fe0a57946mr17313310ilu.46.1703963355993; Sat, 30 Dec 2023 11:09:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703963355; cv=none; d=google.com; s=arc-20160816; b=nTLV9lVXIhcXzQdb16zL9c9BBAY9dT956NhgulgggfUuzGGEyEXzlAQv3PwYJfq1CB SVQgk8aR5ER0eB7NX+qrmMNsAZq2UKLctFKBktqtSGCbnquTSnPWvPNPmZzWSjadSxQj /nf4YPc5tcErzfenH6Zh/Hb9OywtBi2maj4rytnNDx03NIj6+SUYkYacBv9Bb4RrjTU1 GKl/zIt2x8BJnmni4wgD35ks481b1ftVLlEsuRGNdi6faHd/MwvmoFYCCqF6mnIxWt8k 3ZwHBcnJJkjUW8Ks/NDJjKL8vyyZoagpO+XFT8K+zai+ZLLddtFea5UeXS2Spa/EiFM+ vhKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date; bh=X4JEmyOye+DOsvARR52J+QLOAui5iBjWopwNRtfqIw4=; fh=dIUDaIUQ7dt7iwVaHTqdv+8M6sdXJWBE/IuH96QUljA=; b=aOt9kh3lu+0NrmR9loGnb018MO5HsSCdp4V6RVoQs6spIrEIDO9Is+VP70reo6yyGo tHACWx2ancnNB4pUtDenCqdIsphEbrh1yPnWAPx88ANydl2Wb20heBynaUDHLxQv9eN3 lZlbmgMQiTRbKCrr3SSwnt5CDoBwe8XFqjtXN3k7WTmPKKtw2KkWVzjVT1qZNGw8KaWJ w76KtOsPKiwzfJ23zbMokVf46ymGnPLhN3xp92cU8OGYzQrS23Syp6+/AF8EdEat7ddf M9E74uZ1gCJSq6PhIXnee/dN2m404pfOQrRaBbETH1yg7xEzBVAFz2JjGC4c6nKM1pH0 R0bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-13573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13573-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h184-20020a6383c1000000b005cdfd6c1a12si13190296pge.431.2023.12.30.11.09.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 11:09:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-13573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13573-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7E224283F41 for ; Sat, 30 Dec 2023 19:09:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31805C122; Sat, 30 Dec 2023 19:09:06 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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-kernel@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