Message ID | 20231114200755.14911-4-mario.limonciello@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2174119rwb; Tue, 14 Nov 2023 12:09:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNS/ImFKDYptew2rakX7JhEXbLuP+EAZfEP57IZB0PpxZpyvQZs2x+9pk8tQY4gsZgiaqz X-Received: by 2002:a05:6a21:1c8a:b0:181:1d71:7e0f with SMTP id sf10-20020a056a211c8a00b001811d717e0fmr9497645pzb.61.1699992577110; Tue, 14 Nov 2023 12:09:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699992577; cv=pass; d=google.com; s=arc-20160816; b=j3xT77Td84h7ZOvG4PdQFyDu/s78Pn3K2t2R+2xsgU53GETTbygPmuasBtoUT1GU4d JJPobWMNErPAI/hvYej3RWRsRNwZbmTYjpD5E8atVdP4qHyGRk9DoXgYDKfvhqm0BhUi qHjl0y+AmmjfbN8/RUAXe9z8rLMsR7H+7pKKNpIk+D64TYIdROGvW+tR8kna/Aewlu5q 1Us0Cg9CFfm6Yj+sCnTxMK8VsesMbgnzvNxjq3gux21EAXQAhXdPho+OhsiggxrckmJ0 2BUhk+c5d6Cur6bnHkNh4oszcIFaXrZJFnDYWG0RITZOsVqdtHj8sBy91Bxd/XPLJ3FT /NUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f50tXfm82fTpPzfjPb9J2spMNyZ25b8PuZgayxsLEHM=; fh=XahkkF9gQjQZupYlg05T/1lmLLYUBvjifWdLOB3g8TI=; b=kQqQiaNL+f0Go0ZTH3nzutNZ9/guGDt4wzY+dpY2/a+3h9W35F9mrhIq8gFTKtxuLN 80iON7RHDiF72Wd9uFcbzH6moCQ5cVvcws6+leLX0F9ulggIQiJ3o2sW0RYnTRRTj5lr 3GcjG1jDO8Wqu6UsfHgrq15il27gnqC3R3pUWL9suzOrBiSaIu5GFf8PdawuA/lwAUE6 rhS4FyO14PMLv/Bz3qWx460T4TdDuLrjuxws4XtzsG6c7vxzeM39e4zktc2pSaoTQ0Gz NHeaxamdZ+aOSvxzog8lOHPaU+0tEnyihRPi+k0mwPvNRRft1mmGhF8BoWVPpFGAIbAn s4qQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=SjKciasS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id y70-20020a638a49000000b005ad11a5ac8fsi8246501pgd.323.2023.11.14.12.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 12:09:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=SjKciasS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 119A380BD380; Tue, 14 Nov 2023 12:09:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233940AbjKNUIp (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 15:08:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233792AbjKNUIi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 15:08:38 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C9AD9; Tue, 14 Nov 2023 12:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OFiNJDaxhihZZ0J3OVKDNCn+v7229ymYz+B5tRaFAgo8DPepELX0r3s72ruYmflPK+Q/L5Vaou08jlr3mwc1rYpIIqrEFt8PqW5+j1E+Mnm+r2lldTIHbVwPRw3tInIbi4UWPK3Emn/7iZJ00+WgGw3TU1EnUkEun0udUiFG2bxphOTLeIJL1xDSs47UJkZYfcCkwKdOsx3nO0WKrl31JatkcN1iz0yr0BGwTIkLPMiwVtDdkHK+DIBBS2XXtkIHoYyLBhnO19VRnupgPVO1B9moUor0gcTk8+tDV7vsLCRo/QzJV6jETRw+fUFgbEPEto2dNgMv7k6RD+86rDCWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=f50tXfm82fTpPzfjPb9J2spMNyZ25b8PuZgayxsLEHM=; b=lPnc6bE6iEtDi/+uoOHKGAHeDhn4MEIKq5cUVXXuWTrvB3Lem22upl82a2EbAO+WluyFYAE/szkbLvQ3cBvhwsXOgDmp/CNJcyYfcQLVByUrhWhrj4S26FMReu6sRJDyGSZkNN6h0lpOJxDpm7ajQjGAAhVxnJsQWV2gb01/yO4p9Q7VTln1ec//Df2WZxhaKixtPqw/9fvtitYbzTwrNqo01MgXjVm+bItBYxpo+/N7/gVodbH1eeteX2rOl+Yr81wxnK7VNjMGNQkO9kCqxGR5KbkzNWsq2d2yIiMNkTqI9CNUJKYXLYzZ6zmPYLEzbzJ55w10nyG9aHPRdLEAnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f50tXfm82fTpPzfjPb9J2spMNyZ25b8PuZgayxsLEHM=; b=SjKciasSRoEjdJIbwKSNTE66Pn3wn1RZypXFIuIQZlrqrt27e6FLCDTPSbOS4TnmYbshoK6EIYeruv/EYwwi1/GEZP/oNv7M/HyAdpDs05ND8VWRzWnBq/z0nC4xUhT6OCb+S5vufxicobhZ+Vr4JFKiocf1cMVMRufVlc/r3zQ= Received: from BL1PR13CA0297.namprd13.prod.outlook.com (2603:10b6:208:2bc::32) by CH3PR12MB7500.namprd12.prod.outlook.com (2603:10b6:610:148::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Tue, 14 Nov 2023 20:08:33 +0000 Received: from BL02EPF0001A107.namprd05.prod.outlook.com (2603:10b6:208:2bc:cafe::9c) by BL1PR13CA0297.outlook.office365.com (2603:10b6:208:2bc::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.15 via Frontend Transport; Tue, 14 Nov 2023 20:08:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL02EPF0001A107.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7002.13 via Frontend Transport; Tue, 14 Nov 2023 20:08:32 +0000 Received: from test-TBI1100B.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 14 Nov 2023 14:08:31 -0600 From: Mario Limonciello <mario.limonciello@amd.com> To: Karol Herbst <kherbst@redhat.com>, Lyude Paul <lyude@redhat.com>, "Alex Deucher" <alexander.deucher@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Bjorn Helgaas <bhelgaas@google.com>, "Mika Westerberg" <mika.westerberg@linux.intel.com>, Lukas Wunner <lukas@wunner.de> CC: Danilo Krummrich <dakr@redhat.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Xinhui Pan <Xinhui.Pan@amd.com>, "Rafael J . Wysocki" <rafael@kernel.org>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, =?utf-8?q?P?= =?utf-8?q?ali_Roh=C3=A1r?= <pali@kernel.org>, =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org>, "Maciej W . Rozycki" <macro@orcam.me.uk>, Manivannan Sadhasivam <mani@kernel.org>, Mario Limonciello <mario.limonciello@amd.com>, "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" <dri-devel@lists.freedesktop.org>, "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" <nouveau@lists.freedesktop.org>, "open list" <linux-kernel@vger.kernel.org>, "open list:RADEON and AMDGPU DRM DRIVERS" <amd-gfx@lists.freedesktop.org>, "open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>, "open list:ACPI" <linux-acpi@vger.kernel.org> Subject: [PATCH v3 3/7] PCI: Drop pci_is_thunderbolt_attached() Date: Tue, 14 Nov 2023 14:07:51 -0600 Message-ID: <20231114200755.14911-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231114200755.14911-1-mario.limonciello@amd.com> References: <20231114200755.14911-1-mario.limonciello@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A107:EE_|CH3PR12MB7500:EE_ X-MS-Office365-Filtering-Correlation-Id: b7a77f9e-31d9-48a8-0aa5-08dbe54d7a44 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tu7+F0Yvlw0N9L4DixpqpXKchLCVSPgMRwghjqRk4ClKDjUPTtnHk00MCFqPhK4ANSgh/OrIdvb91sSc8BKJCgI/AjgZp3MRy7qCRTDL75F0/ttTH79OTINnUHvCf1gy/zKeEemb5/fyGbQo0+nrbtmDvZe9jXQuYnytq3WtPbwsh1ZT7GniggdSlwvWmG6Am1SR81ll+yWIvD9IHEHDuUqIcuS2IDVc7tD2vf41ew6VcaF5g8WTlugxvdgq77AhUqcv0ssBSi95r2tqEBdiMzzjFbGNY5LOva0ehQdPJoGblT/wyuIXWr5JEwzDSqiCAU4Nua4yaCvKAjFIxex13463RnQ4SeIyOjHHTsFJMT7S67oB7Z2y061p682lcH5E/xxlnw1+hTYJC0anw/4uBeXX3sZ8RJ9KRHpVXNIj9pTM+8+39uMdjdSsfNh8xyiOyf5V2QX9B+osDAlvfZacWtpPKeEEYNkkrZ5ntqfZp+BJjDRvb/cVzdS3ocaGaP8hexm76lGsKvss/robWNwg9Tz5ZIjADqtVxGB4JNftKbL0teuIuBf3p9NPOiuWf1bwWOl5AxsnW2NDb35I9y9XK7lLyGqaVIScan73MhvzFBfaZreYLfW/B+lJJKicAlenx4a52nr2AalQzRo49F7z6dbExTqg4YzEg09DlOvEwvNdnHcpEVrjDJKHFqIkgzcEj8V28RmMGhbNpWe0WQHCkWTUS7ggYIEv5A6ANNQQkNmby2ET+OnO8NxI+8ZgQBQ5/Ddoj1qI5LMXGO/CY7L3NQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(376002)(39860400002)(136003)(396003)(230922051799003)(82310400011)(64100799003)(1800799009)(451199024)(186009)(46966006)(40470700004)(36840700001)(8676002)(8936002)(40480700001)(41300700001)(40460700003)(5660300002)(7416002)(2906002)(83380400001)(426003)(44832011)(316002)(4326008)(36860700001)(54906003)(36756003)(70206006)(86362001)(47076005)(7696005)(6666004)(336012)(70586007)(81166007)(1076003)(356005)(110136005)(2616005)(82740400003)(16526019)(26005)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 20:08:32.8172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7a77f9e-31d9-48a8-0aa5-08dbe54d7a44 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A107.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7500 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 14 Nov 2023 12:09:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782571416740197475 X-GMAIL-MSGID: 1782571416740197475 |
Series |
Improvements to pcie_bandwidth_available() for eGPUs
|
|
Commit Message
Mario Limonciello
Nov. 14, 2023, 8:07 p.m. UTC
All callers have switched to dev_is_removable() for detecting
hotpluggable PCIe devices.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v2->v3:
* No changes
---
include/linux/pci.h | 22 ----------------------
1 file changed, 22 deletions(-)
Comments
On Tue, 14 Nov 2023, Mario Limonciello wrote: > All callers have switched to dev_is_removable() for detecting > hotpluggable PCIe devices. > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> > --- > v2->v3: > * No changes > --- > include/linux/pci.h | 22 ---------------------- > 1 file changed, 22 deletions(-) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 60ca768bc867..1fbca2bd92e8 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -2645,28 +2645,6 @@ static inline bool pci_ari_enabled(struct pci_bus *bus) > return bus->self && bus->self->ari_enabled; > } > > -/** > - * pci_is_thunderbolt_attached - whether device is on a Thunderbolt daisy chain > - * @pdev: PCI device to check > - * > - * Walk upwards from @pdev and check for each encountered bridge if it's part > - * of a Thunderbolt controller. Reaching the host bridge means @pdev is not > - * Thunderbolt-attached. (But rather soldered to the mainboard usually.) > - */ > -static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) > -{ > - struct pci_dev *parent = pdev; > - > - if (pdev->is_thunderbolt) > - return true; > - > - while ((parent = pci_upstream_bridge(parent))) > - if (parent->is_thunderbolt) > - return true; > - > - return false; > -} > - > #if defined(CONFIG_PCIEPORTBUS) || defined(CONFIG_EEH) > void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); > #endif > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
diff --git a/include/linux/pci.h b/include/linux/pci.h index 60ca768bc867..1fbca2bd92e8 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2645,28 +2645,6 @@ static inline bool pci_ari_enabled(struct pci_bus *bus) return bus->self && bus->self->ari_enabled; } -/** - * pci_is_thunderbolt_attached - whether device is on a Thunderbolt daisy chain - * @pdev: PCI device to check - * - * Walk upwards from @pdev and check for each encountered bridge if it's part - * of a Thunderbolt controller. Reaching the host bridge means @pdev is not - * Thunderbolt-attached. (But rather soldered to the mainboard usually.) - */ -static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) -{ - struct pci_dev *parent = pdev; - - if (pdev->is_thunderbolt) - return true; - - while ((parent = pci_upstream_bridge(parent))) - if (parent->is_thunderbolt) - return true; - - return false; -} - #if defined(CONFIG_PCIEPORTBUS) || defined(CONFIG_EEH) void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); #endif