Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6100170rdb; Mon, 1 Jan 2024 08:40:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuBRRSGip17lCxwQoOQ5fxhRTXWS+Uc8lQWRoaD1aWqVgMLo+ncrPu4Ar4vfI7OTz5N77g X-Received: by 2002:a05:6a20:7f96:b0:196:7e8d:aef7 with SMTP id d22-20020a056a207f9600b001967e8daef7mr5716859pzj.19.1704127205529; Mon, 01 Jan 2024 08:40:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704127205; cv=none; d=google.com; s=arc-20160816; b=YMV4vMqdxiaDffgrRDHXVaIuYoGf21ZuuJiw8x3kxzXUaHWZnJENVl5Dw2UBqU14MJ ZOHDppGCjhdbSaLOa2XkE10n2LTWcCVx3ahBm/XFRlK71xRiBDrQVo3Zl6+x2EvgWyo0 zq7u4e0fsN1SPJ2S1AT7iWBiLRikCnaiQB7gvJ5tiS+bmrMUBd7EmDl8kNLlA9rNQuSx 5evyS5oyeuzNA8xS3tYMU35g9ScKP7OaBHv/1BBAyFUnYsxPyfk5PmJwqa7lybjeRwXk 6fcRGLUT5EoJ260U/rFEx7Vj+ISd5yq3CfcfefpKGXcH4VXLThTh49nkV0GoAP9jg36x 6V0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=U2YE0c5ev6SI35spblyGcDY6vP54RF2CMXOPy8IpFl8=; fh=f5Sg/Gs2lZ696p6ab0fTv4n+Yp9g+9AgB4t0lyuRhvs=; b=1JGQq605+Y2U47YBCHm4QsTelkwtahtJ+I9WX6soKgGtFC2gZDnomC6SNzEIllCMDN dy3xHRQXXNlYt8NCAfsxBAq40q/DtHiIDED3T9y30/j20NQAX44IhVVOCQ5Z2DjU2kjS kC82M7a3Yld02MVZh72MITASvVpAwHhRsNXqzPsg2DSaN67DHYUopheitw+KzHGTUj0z 2qHt2Pb5fx3zz/W5KU+6khkpR9GcIaUeNdXX8IhNgLtSQmwmNp3Zs8v9lDksTTNp4Dd9 XWYLAcu7/QyOUXv7BI7/8ukwz/Xem84XS+sCCeFFJEu+Xgs9gpNu5EvsbyI818ROX6aE OBiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XCAVo10G; spf=pass (google.com: domain of linux-kernel+bounces-13906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13906-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fc26-20020a056a002e1a00b006da1b6363basi7255986pfb.89.2024.01.01.08.40.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 08:40:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13906-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; dkim=pass header.i=@intel.com header.s=Intel header.b=XCAVo10G; spf=pass (google.com: domain of linux-kernel+bounces-13906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13906-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 07322281F4F for ; Mon, 1 Jan 2024 16:40:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04FD96FB8; Mon, 1 Jan 2024 16:39:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XCAVo10G" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) (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 7FA6F63C7; Mon, 1 Jan 2024 16:39:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704127193; x=1735663193; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=S8I8/xcvQ90BCmeW2g6usrmvW8e/hziS5RmiC66MkmA=; b=XCAVo10GggaMPRdezkjbyLD7140IWKEk1RziqXR8kCdOML+XGIARt5K0 EVgKxssGkGcDTCTjjfk6JFM5RCYc3nuaaNnS5yq/6PWBgyf/y7uchOrlW Mx9emV4ienKKzq4+gnh7H43PxeARgqTCLvRprWCvp2B0ol4tkF38dblWe Eg9XGjfatv3pza62YBiAyNukhZqKqEjm66fz57nwsDWyAaiGMPcXqDU/D qboC92GupSTmjdO3ucU28QUHD53PXh7LYKkmLu8vluViJrehTFpN1LFuy ZEU+GSOMPN5KyA6p0TyrYCz7MryWUf5fC3azbNkPsH9TMU56sfqwDsXOL w==; X-IronPort-AV: E=McAfee;i="6600,9927,10940"; a="376964818" X-IronPort-AV: E=Sophos;i="6.04,322,1695711600"; d="scan'208";a="376964818" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jan 2024 08:39:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10940"; a="755705282" X-IronPort-AV: E=Sophos;i="6.04,322,1695711600"; d="scan'208";a="755705282" Received: from amazouz-mobl.ger.corp.intel.com ([10.251.210.158]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jan 2024 08:39:47 -0800 Date: Mon, 1 Jan 2024 18:39:44 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lukas Wunner 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 , LKML , Alex Deucher Subject: Re: [PATCH v3 09/10] thermal: Add PCIe cooling driver In-Reply-To: <20231230190859.GA14758@wunner.de> Message-ID: References: <20230929115723.7864-1-ilpo.jarvinen@linux.intel.com> <20230929115723.7864-10-ilpo.jarvinen@linux.intel.com> <20231230190859.GA14758@wunner.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-987063157-1704127191=:2521" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-987063157-1704127191=:2521 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT On Sat, 30 Dec 2023, Lukas Wunner wrote: > 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. When thermal side is not even configured, it returns NULL which is not ERR. I guess I can change the behavior for the real ERR cases (I was bit on borderline what to do with those failures). > > --- /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? Only sysfs throttling is introduced by this series, there's no emergency throttling in the series. Also, many things have been simplified in this series because more complex things would be only justified with the emergency throttling and would just raise questions 'why is this and that being done' (e.g., the critical section was enlarged as per your request where if there would be emergency throttlink doesn't make sense to wait until the end of the link training before "emergency throttling" can attempt to lower the link speed). -- i. --8323329-987063157-1704127191=:2521--