Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp454928rdb; Thu, 2 Nov 2023 08:22:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaoKZYC9mL9jrdejoap6KmX5GtTL3odhEWACTZ0ByB4NgLw9Y+X83EJL6cHtUKL3i01icD X-Received: by 2002:a17:902:dacc:b0:1cc:4b3d:1a8d with SMTP id q12-20020a170902dacc00b001cc4b3d1a8dmr123745plx.17.1698938531276; Thu, 02 Nov 2023 08:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698938531; cv=none; d=google.com; s=arc-20160816; b=KevdWBY50cxhDQrzlnjl73tVly0ATrXaVziJTwRdzG6OcRJE20kMsdEs45uT9VwPgN LlmhwB6VhYEKqiBLHkYtXPZyJgqoTp9ObJS9kfyr7nCgaAZm9jRacTV3Jlo9VmP50yw4 zJsZgCYJmDBsDpryFJIm1VT7iiysmHClu/JcbSLRTzI2pnRmJ0NGIgWYDhrBxKHyNNRC KCxsmA7BI9Uf3HrsQCUf2NxYwcgWy4uGFTb4Z0q9HvQNPJRHs+Gt1pcnLLoAOrPvQuwj ET91HDW3WZk7L7vG8tDzcEsPUnliyBSqM7i9MHNubGQtrZbngMK1zf9c9z8Y5o/IAZ6Q XluA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=quZeFDDBwM7Me+mH9O0l7jEBzMzup5q3U8yPmW+5U/4=; fh=ZkuaXkNgPynvCVFjZ1889iUFJTIIC24VwK+X1o917YM=; b=O9i2r9ZRsEF2SNKZ+AY9B2qZB9zdScQ7KFc1emdm2DC0zdvP3Vfp1nePP3tdoBkAWV PLKK/YzaCqDo0DT0TWSyc4vZIDWVGPXfE6ynYPhke2VykDAoradKYEYzlKg2l+6vpqX5 zK/Qy47ySy5bQZQ6Vy08DuboD4dHhOLqyBM6I7rVrycto4zOyy6i0OaVcP+yjqrKvRF1 /bH5yWFCduKsCkKUEv0rXHuTb1wVTAow20z3PPSQlv6R8bPatPjrfOyPUiBPgAMGpZYU KWcYUs6Il8q8KwHQoTmC5L13V+EPRo0CoKMPRpUxTvJB/gdFzKFDN97YNPQ0HqE2C/px ChHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w7-20020a170902e88700b001c77674ea97si31136plg.423.2023.11.02.08.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 08:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C67EE82DDAC6; Thu, 2 Nov 2023 08:22:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344598AbjKBPWC (ORCPT + 99 others); Thu, 2 Nov 2023 11:22:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233053AbjKBPWA (ORCPT ); Thu, 2 Nov 2023 11:22:00 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3699B193; Thu, 2 Nov 2023 08:21:56 -0700 (PDT) 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 Global TLS RSA4096 SHA256 2022 CA1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 2AA0C28046BF6; Thu, 2 Nov 2023 16:21:54 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1B3D740DA3E; Thu, 2 Nov 2023 16:21:54 +0100 (CET) Date: Thu, 2 Nov 2023 16:21:54 +0100 From: Lukas Wunner To: Mario Limonciello Cc: Bjorn Helgaas , bhelgaas@google.com, mika.westerberg@linux.intel.com, andreas.noever@gmail.com, michael.jamet@intel.com, YehezkelShB@gmail.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Alexander.Deucher@amd.com Subject: Re: [PATCH 2/2] PCI: Ignore PCIe ports used for tunneling in pcie_bandwidth_available() Message-ID: <20231102152154.GA22270@wunner.de> References: <20231101225259.GA101390@bhelgaas> <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <928df647-5b20-406b-8da5-3199f5cfbb48@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 08:22:09 -0700 (PDT) On Wed, Nov 01, 2023 at 08:14:31PM -0500, Mario Limonciello wrote: > Considering this I think it's a good idea to move that creation of the > device link into drivers/pci/pci-acpi.c and store a bit in struct pci_device > to indicate it's a tunneled port. > > Then 'thunderbolt' can look for this directly instead of walking all the FW > nodes. > > pcie_bandwidth_available() can just look at the tunneled port bit instead of > the existence of the device link. pci_is_thunderbolt_attached() should already be doing exactly what you want to achieve with the new bit. It tells you whether a PCI device is behind a Thunderbolt tunnel. So I don't think a new bit is actually needed. Thanks, Lukas