Message ID | 20231103190758.82911-4-mario.limonciello@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1257310vqu; Fri, 3 Nov 2023 12:08:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmXzkOtKva63qhBdw3nst5Bbtkx4kSiEeaNwnNAkNxwbq04/5nuNDbbLCdmzcCOhIBSnEk X-Received: by 2002:a05:6a20:7f93:b0:181:5480:d400 with SMTP id d19-20020a056a207f9300b001815480d400mr10415039pzj.12.1699038532000; Fri, 03 Nov 2023 12:08:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699038531; cv=pass; d=google.com; s=arc-20160816; b=dvzPpxk5GE6yG+IUJO2Naxy4S/qx4lr6tDlIg3Ws/1fnCkGcvjFZ5Dek+JOhxN/rOh yulh9aqEAzu0+je80YNG8wlmy5Lq8qTnek32bUMGm1LOOuitJpwWiCfPMLweokBy265e iS2ZvQ1Ge8q+Bp0y7OMQlmlTSvl89OidsRIvFHNpKCTmv9wpXh0PNFR+bl8ErSMhcrTS Esukf0PveGPFN2vVCDHM7/+PiaB6OvEDXSIG++8viFlepcRM/8msWUXJEkPYs0bO99Sw g/gvwFBvrgKaGEj+mMPZVm6F6PaswuEuVKKoiQzr22l7SHNkOiDFwKlfeDfsoB2j3GOS XsrQ== 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=0QxfD7oh6ox+7Amyrc3ZFd0iJqVv9LA5Zs0XIevzsAg=; fh=KNFJdtEo/PKi7O8w97tvcvT8B0Dxi/sdm3S+AQ96c5Q=; b=tPluU/FW6sTsBgTA4luXq1vyUcIRLCPcWNugjy9yXy04aLERPhdVR7ghK2X2Wg8REd 2LuaTCMcoZPR8spNrOmxqo8z1SmgWB0ye+Jz0rSQTVV0gTC+4TfEfz5cd3QvDs2ksgQH 3epRGqVOe+gTURMA4GgoArmvwW010zYlDELlEwuYibQ757/jBdPBVw6ZKorUEtOI8yGs XTOKvub6lJr7uEp6kruUxiwRzznDH2lSD0xwdWQE+ho1ZZkBYQGjx7N13dMAov8OUV9L vZxe9hHS8FUiKXb3fdJYyK8sO0tvx9G4z/JUvESveFrxOMlAKhTEz8siAWkoRxNVXpzA NWRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="0iN1KVj/"; 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.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x19-20020a17090ab01300b00274caaa057asi2191438pjq.42.2023.11.03.12.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 12:08:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="0iN1KVj/"; 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.37 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 snail.vger.email (Postfix) with ESMTP id 64C5E82D7C74; Fri, 3 Nov 2023 12:08:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376701AbjKCTIm (ORCPT <rfc822;heyuhang3455@gmail.com> + 35 others); Fri, 3 Nov 2023 15:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231204AbjKCTIi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Nov 2023 15:08:38 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2040.outbound.protection.outlook.com [40.107.102.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B26D5D45; Fri, 3 Nov 2023 12:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WiNYU4RDWKrPAtCS0Qt7fenw4bxcBZXVlVfiDgelIxicWCVFa99hi2vAuji27wS/ycM7bBpa8y64fNZeBY29DPzuQ1t50cH7HsH05S68t36BYJWqXVlDZlyhEfkgPrXusdrYPlmjM8WM2mA8NDsAhuSthW2SyZnmQtzhfy1bekincHcEDAogcpmRmi4rN2Dan9GRdD19IYos5DHJYN7gUlQpOjIGiyceDIfoygq/NZAPTap/5qDpTX/dLSZtQ4zJ1b7e5fnV9RAKPAx67YguZgBhPxQTSlLydYLjSPkJwh0u2Eke/jTfhtEC8p6g/NCS8wFsnt9+i0LiOL+OJMWjaQ== 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=0QxfD7oh6ox+7Amyrc3ZFd0iJqVv9LA5Zs0XIevzsAg=; b=Zx5kC+jn6AWXq2Os8gwlp769MpmL6x8pWX5qCPClSFwNK5tr+c1/cgeYNWK7xBpHkZDJjd4kDU4zRUptVicwmfaOQZ92rf8WtPaW3trepNf7hWkPoJRSBnqu0P+NcUfgedoopLtzNOntB0OzG5c9BT5/toa1gvAzO1x4fsU5WzF4M81s6LBQRyYBmIXkLcfzGBKkChTINac7zrb8MH1fWZkp/O+STXIpaGpSfkhOUNsir874KSeLRxiN9PPLx1rQKE/29acFL0V+IiXPiHKPdh724lsOHjaynOs/tEw+/7AyzP8YX9BtUn1uhAJwackGiqV6sqKRBaS96Y6Xk17PPw== 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=0QxfD7oh6ox+7Amyrc3ZFd0iJqVv9LA5Zs0XIevzsAg=; b=0iN1KVj/t3QuoRrKw2CCTFCV7FljD0nGB9Vv3SZ+3EqejzxC6rYgn6rpklOwY9b/x8nbUgpoHZzzAH7/aujfSvaTDilPrzsc2uiBU8dTKbSBZBs0XrcUUuNovEPwVFPU/yY+Ov+cejymhRJ+qQcss4n49TTBUu84sv365HsB7eU= Received: from MW2PR16CA0020.namprd16.prod.outlook.com (2603:10b6:907::33) by SJ2PR12MB8062.namprd12.prod.outlook.com (2603:10b6:a03:4c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 19:08:29 +0000 Received: from CO1PEPF000044EE.namprd05.prod.outlook.com (2603:10b6:907:0:cafe::34) by MW2PR16CA0020.outlook.office365.com (2603:10b6:907::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21 via Frontend Transport; Fri, 3 Nov 2023 19:08:29 +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 CO1PEPF000044EE.mail.protection.outlook.com (10.167.241.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6954.19 via Frontend Transport; Fri, 3 Nov 2023 19:08:29 +0000 Received: from AUS-P9-MLIMONCI.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; Fri, 3 Nov 2023 14:08:26 -0500 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>, "Hans de Goede" <hdegoede@redhat.com>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.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>, Mark Gross <markgross@kernel.org>, "Andreas Noever" <andreas.noever@gmail.com>, Michael Jamet <michael.jamet@intel.com>, Yehezkel Bernat <YehezkelShB@gmail.com>, =?utf-8?q?Pali_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>, "open list:X86 PLATFORM DRIVERS" <platform-driver-x86@vger.kernel.org>, "open list:THUNDERBOLT DRIVER" <linux-usb@vger.kernel.org> Subject: [PATCH v2 3/9] PCI: Drop pci_is_thunderbolt_attached() Date: Fri, 3 Nov 2023 14:07:52 -0500 Message-ID: <20231103190758.82911-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231103190758.82911-1-mario.limonciello@amd.com> References: <20231103190758.82911-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: CO1PEPF000044EE:EE_|SJ2PR12MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: 381c9bbe-a4b6-41b2-e91a-08dbdca043d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YTO4PkpAoAzUmyOE/f4DOQivcWPynYx50nzeb3k3ET1j1iutrDu712eKSofEn+nP06W7hq1LaFuu3m/Zi5vGm1+hsPr0EFeM0aH9Ef6V5bMvAqBhchZVIMsSMSVMx4IxdK3/+FZ4iCh0VtoIV2cS6wE8H99hPe2fWfKphi6Le/H49lPyWuKuhU7RS9R9FdL37m0+7g8jvE0jupfQuIQjscCJgGpmdofvUPhWT3rNANQQYg9SfwteTHJXXrgKn7TAOMF6wa9or6/0q4/rkJrihkpCHF/h29VQt+SXHzsLZuOd31ugjoe5fkU7Bj5QL7mG991WxNKpsq4usPRDWUaxhAOKcd9gI2Igf5EGBk9+/pJ+zn8PeTaGDcLu0Pe51GKB+7fB4y+RocSoZwEc/m3/IgRkCz5ug4jndU40RGsmElD8vRqaU21X2sshzj2rH4Kpd2/e5ldBfacKlHbDcNmGY90iuLvhzPUaKi88fxldjBreZBcqxuV+NX1B4rzRaGMOQCsxRkcJXdThtnqUrJq7ls5WnEROyWOFCdtFMgj8a5KwDQnba+0zPWqHOWT+zQTm++csrm3G+Q9305FK2HS8+3n5yRYWpNydvRResNFZrQTyKPoAC3kvWEfWsBUcZ+kOv/OkOsMXP26eSh70XSrplxV5LnJsP010CiYSlBhDO75BGXUzt9WJNDUMxyy6okjBeKV4cGr7ghrpo19g0QhVaY33HRkndyHiu5JllCpZ1TyrMKXKXxgSywlDN380uk7Bu1WEgoF3+0A8YmsC5PAjUg== 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)(376002)(346002)(396003)(136003)(39860400002)(230922051799003)(82310400011)(186009)(1800799009)(64100799003)(451199024)(40470700004)(36840700001)(46966006)(36756003)(26005)(40460700003)(40480700001)(16526019)(2616005)(86362001)(82740400003)(81166007)(356005)(426003)(2906002)(83380400001)(7416002)(478600001)(1076003)(7696005)(6666004)(36860700001)(336012)(8936002)(5660300002)(4326008)(47076005)(8676002)(316002)(54906003)(110136005)(44832011)(70586007)(41300700001)(70206006)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 19:08:29.2727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 381c9bbe-a4b6-41b2-e91a-08dbdca043d9 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: CO1PEPF000044EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8062 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 03 Nov 2023 12:08:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781571027819534206 X-GMAIL-MSGID: 1781571027819534206 |
Series |
Improvements to pcie_bandwidth_available() for eGPUs
|
|
Commit Message
Mario Limonciello
Nov. 3, 2023, 7: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>
---
include/linux/pci.h | 22 ----------------------
1 file changed, 22 deletions(-)
Comments
Hi Mario, kernel test robot noticed the following build errors: [auto build test ERROR on pci/for-linus] [also build test ERROR on drm-misc/drm-misc-next westeri-thunderbolt/next rafael-pm/linux-next rafael-pm/acpi-bus linus/master rafael-pm/devprop v6.6 next-20231103] [cannot apply to pci/next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Mario-Limonciello/drm-nouveau-Switch-from-pci_is_thunderbolt_attached-to-dev_is_removable/20231104-030945 base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git for-linus patch link: https://lore.kernel.org/r/20231103190758.82911-4-mario.limonciello%40amd.com patch subject: [PATCH v2 3/9] PCI: Drop pci_is_thunderbolt_attached() config: loongarch-randconfig-002-20231104 (https://download.01.org/0day-ci/archive/20231104/202311040800.zpVIwNrB-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231104/202311040800.zpVIwNrB-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311040800.zpVIwNrB-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c: In function 'nbio_v2_3_enable_aspm': >> drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c:364:21: error: implicit declaration of function 'pci_is_thunderbolt_attached' [-Werror=implicit-function-declaration] 364 | if (pci_is_thunderbolt_attached(adev->pdev)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c: In function 'amdgpu_device_ip_early_init': >> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2118:14: error: implicit declaration of function 'pci_is_thunderbolt_attached' [-Werror=implicit-function-declaration] 2118 | !pci_is_thunderbolt_attached(to_pci_dev(dev->dev))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/pci_is_thunderbolt_attached +364 drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c f1213b15976881d Evan Quan 2020-08-18 350 f1213b15976881d Evan Quan 2020-08-18 351 static void nbio_v2_3_enable_aspm(struct amdgpu_device *adev, f1213b15976881d Evan Quan 2020-08-18 352 bool enable) f1213b15976881d Evan Quan 2020-08-18 353 { f1213b15976881d Evan Quan 2020-08-18 354 uint32_t def, data; f1213b15976881d Evan Quan 2020-08-18 355 f1213b15976881d Evan Quan 2020-08-18 356 def = data = RREG32_PCIE(smnPCIE_LC_CNTL); f1213b15976881d Evan Quan 2020-08-18 357 f1213b15976881d Evan Quan 2020-08-18 358 if (enable) { f1213b15976881d Evan Quan 2020-08-18 359 /* Disable ASPM L0s/L1 first */ f1213b15976881d Evan Quan 2020-08-18 360 data &= ~(PCIE_LC_CNTL__LC_L0S_INACTIVITY_MASK | PCIE_LC_CNTL__LC_L1_INACTIVITY_MASK); f1213b15976881d Evan Quan 2020-08-18 361 f1213b15976881d Evan Quan 2020-08-18 362 data |= NAVI10_PCIE__LC_L0S_INACTIVITY_DEFAULT << PCIE_LC_CNTL__LC_L0S_INACTIVITY__SHIFT; f1213b15976881d Evan Quan 2020-08-18 363 f1213b15976881d Evan Quan 2020-08-18 @364 if (pci_is_thunderbolt_attached(adev->pdev)) f1213b15976881d Evan Quan 2020-08-18 365 data |= NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT << PCIE_LC_CNTL__LC_L1_INACTIVITY__SHIFT; f1213b15976881d Evan Quan 2020-08-18 366 else f1213b15976881d Evan Quan 2020-08-18 367 data |= NAVI10_PCIE__LC_L1_INACTIVITY_DEFAULT << PCIE_LC_CNTL__LC_L1_INACTIVITY__SHIFT; f1213b15976881d Evan Quan 2020-08-18 368 f1213b15976881d Evan Quan 2020-08-18 369 data &= ~PCIE_LC_CNTL__LC_PMI_TO_L1_DIS_MASK; f1213b15976881d Evan Quan 2020-08-18 370 } else { f1213b15976881d Evan Quan 2020-08-18 371 /* Disbale ASPM L1 */ f1213b15976881d Evan Quan 2020-08-18 372 data &= ~PCIE_LC_CNTL__LC_L1_INACTIVITY_MASK; f1213b15976881d Evan Quan 2020-08-18 373 /* Disable ASPM TxL0s */ f1213b15976881d Evan Quan 2020-08-18 374 data &= ~PCIE_LC_CNTL__LC_L0S_INACTIVITY_MASK; f1213b15976881d Evan Quan 2020-08-18 375 /* Disable ACPI L1 */ f1213b15976881d Evan Quan 2020-08-18 376 data |= PCIE_LC_CNTL__LC_PMI_TO_L1_DIS_MASK; f1213b15976881d Evan Quan 2020-08-18 377 } f1213b15976881d Evan Quan 2020-08-18 378 f1213b15976881d Evan Quan 2020-08-18 379 if (def != data) f1213b15976881d Evan Quan 2020-08-18 380 WREG32_PCIE(smnPCIE_LC_CNTL, data); f1213b15976881d Evan Quan 2020-08-18 381 } f1213b15976881d Evan Quan 2020-08-18 382
On Fri, 3 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> > --- > include/linux/pci.h | 22 ---------------------- > 1 file changed, 22 deletions(-) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index b56417276042..530b0a360514 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -2616,28 +2616,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 > I don't think all callers have been removed. Ah, lkp has caught the same problem.
On 11/6/2023 06:33, Ilpo Järvinen wrote: > On Fri, 3 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> >> --- >> include/linux/pci.h | 22 ---------------------- >> 1 file changed, 22 deletions(-) >> >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index b56417276042..530b0a360514 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -2616,28 +2616,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 >> > > I don't think all callers have been removed. Ah, lkp has caught the same > problem. > As I mentioned in the cover letter this series is done on 6.6 + a patch going into 6.7-rc1. The LKP report will drop off when I rebase the series on 6.7-rc1. As it's not yet in Linus' tree here is that patch so you can see it: https://gitlab.freedesktop.org/agd5f/linux/-/commit/7b1c6263eaf4fd64ffe1cafdc504a42ee4bfbb33
diff --git a/include/linux/pci.h b/include/linux/pci.h index b56417276042..530b0a360514 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2616,28 +2616,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