From patchwork Wed Jul 24 23:38:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057731 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60FE2112C for ; Wed, 24 Jul 2019 23:40:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FD8D2237D for ; Wed, 24 Jul 2019 23:40:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 447E427CF3; Wed, 24 Jul 2019 23:40:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED0242237D for ; Wed, 24 Jul 2019 23:40:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729751AbfGXXjW (ORCPT ); Wed, 24 Jul 2019 19:39:22 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:46956 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfGXXjV (ORCPT ); Wed, 24 Jul 2019 19:39:21 -0400 Received: by mail-io1-f67.google.com with SMTP id i10so93239915iol.13; Wed, 24 Jul 2019 16:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rTecumU7fqxzO8Ey86PtqlrVLlcCU3kye66cW/2pXC8=; b=eZTuYeJ8qQVvAKEkD62gzYhDny70HcUiYsdLFk+5OpmH5r+KGFYbMPfJ5/8tKLOHb9 GiPxuuzAJPqrPH/XzeAz7GRHSaROpk21wTu8fHKu0aMKU4tpa66n37AA4gcG3ifx+wyG pMmHyApgoslzLo02xCPrzI5Lv204djJfuMGEVmTSWfzI03WEKWWHCVwzMCtCzmdHptAW svqPPB0MXdIokuerYX0Qy6o6+09hadOdMS8+JEoa1LQIjmxbh051vXTaqjcdHsvLwBwf X0gEbrTtB8Hp1rBTNfYcPOIYHq5/x+HIvNrW1gQlXbP9NENXGnwHDTMM2yPiOb88yRHo 0e5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rTecumU7fqxzO8Ey86PtqlrVLlcCU3kye66cW/2pXC8=; b=r19wPVpoeP5pxjvwSfKvVOO/1svqPCsw2QkTvrIsi+7fmZATVVFfEf96PHbVrVaAcp VqUflVljr7DTLT2OUm39Jw9wx04YVNbyBMpHP1l+bUVg0ykB20HizLdpBr6wUyuiV8f0 5/SMi0zmpa9iUEDS3OxmvbRTCIv5m4RVgvX6sD46gpVyQv50W0c6TsjsonlxjYDMp7Va 9Ny3bhfoZ/JB4YW4/NSKvTHJlrMnPy6iEck4Go+EANy4DWQBwA+ZwxQTzSjiQOEauyaP ZfRTbUMJ/QtixvSwegZ3NhZ9EPGje2W2h4uVA68gMxiyuuX8hRtF9ex90U/ne6b2x8Dm lAhQ== X-Gm-Message-State: APjAAAW7K74kYb54Drvl/NVM+3BheQNAy+rD3GMAE/7cv/65UZmtRc2q grf7R/bgLQLtjLPnnqNRJe0= X-Google-Smtp-Source: APXvYqzB+xtwPRKS3OdbQq9ob76sbkI2BqnmmjjA87AcI1j3FQyAS9p9NljtLYZMxdYHlvIThExx8w== X-Received: by 2002:a6b:5103:: with SMTP id f3mr74779419iob.142.1564011560346; Wed, 24 Jul 2019 16:39:20 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:19 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 01/11] PCI: Move #define PCI_PM_* lines to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:38 -0600 Message-Id: <20190724233848.73327-2-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The #define PCI_PM_* lines are only used within drivers/pci/ and they do not need to be seen by the rest of the kernel. Move #define PCI_* to drivers/pci/pci.h Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 5 +++++ include/linux/pci.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 1be03a97cb92..708413632429 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -39,6 +39,11 @@ int pci_probe_reset_function(struct pci_dev *dev); int pci_bridge_secondary_bus_reset(struct pci_dev *dev); int pci_bus_error_reset(struct pci_dev *dev); +#define PCI_PM_D2_DELAY 200 +#define PCI_PM_D3_WAIT 10 +#define PCI_PM_D3COLD_WAIT 100 +#define PCI_PM_BUS_WAIT 50 + /** * struct pci_platform_pm_ops - Firmware PM callbacks * diff --git a/include/linux/pci.h b/include/linux/pci.h index 9e700d9f9f28..238449460210 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -145,11 +145,6 @@ static inline const char *pci_power_name(pci_power_t state) return pci_power_names[1 + (__force int) state]; } -#define PCI_PM_D2_DELAY 200 -#define PCI_PM_D3_WAIT 10 -#define PCI_PM_D3COLD_WAIT 100 -#define PCI_PM_BUS_WAIT 50 - /** * typedef pci_channel_state_t * From patchwork Wed Jul 24 23:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057711 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D84D112C for ; Wed, 24 Jul 2019 23:39:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D3DE2237D for ; Wed, 24 Jul 2019 23:39:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2143527CF3; Wed, 24 Jul 2019 23:39:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4C002237D for ; Wed, 24 Jul 2019 23:39:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729758AbfGXXjX (ORCPT ); Wed, 24 Jul 2019 19:39:23 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:38608 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729749AbfGXXjW (ORCPT ); Wed, 24 Jul 2019 19:39:22 -0400 Received: by mail-io1-f67.google.com with SMTP id j6so18152107ioa.5; Wed, 24 Jul 2019 16:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iHIcdZJ5DH84ujFpUNF0zbPMo8AZLf+hnT10L/puUdA=; b=Qk+DAsNep7be2o8vxasuB63X1XihHLXN+ZYWVBogQMSCyNVadQYOYO7BC4q8JFCJpH IDpu6/S5LtY57NZcKNSJd7NcfHUVe1rseFUhj9lhIgBKrde0Rh+H2pxhPHprAPVXYGr4 gY1OY9gT2hKlITPmDMoT1ymbZEQlm3sYvSmJbgc4oVBGgwp9R1Y9XajbZJn2PIdT0rPn T1KCfUvNSKzVTrzbCLWNAN23YaGgEPn1CZc3iGwkhLWuQBOU/+LoJacoY74t01PPofm6 2Fd30Fvy2oDPKBZ46jufPxEkQ0D3f1KIZf/+6oDaw5YkOS474KdfMvF1uNxLTRLJU1cL +OMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iHIcdZJ5DH84ujFpUNF0zbPMo8AZLf+hnT10L/puUdA=; b=DsPKmBit0Y7ay5zyo5tfd5uCQF73NPLUFGVv4IrJrlkqCBq9UCQ0EaJE7UIgmdtcTb 8P7YtF1ECmPdKIHn1klpGvRL4aUfUYoAuHA9F3SuMseu0xGL+n0laIy04TInh1xjLBB9 3oAL0BWMifZqLe6RJM5HcmMD4ItYXMDvbG9Y1CfYJieWvDaXSWsOCHQgYhvRhA15EASP 5RHr1wMAc3Olw9LsK4e7nwR0kxTEfVq3hfETXLI7ad2BORjeAaSiEqo2bGkwGyMwwLHp 7AKrCH0IcQgnj9Nu7DSsJEH5EAj2cWLKIfUwsvdHNU7334Opjzw9mGyopiuBz6jNHXKV bGxQ== X-Gm-Message-State: APjAAAVYgGQ9fhjGbKR6p19EBkFKKec2pMdUOTL9eGpRHCMFqjboxaTV zd6jkzHDk7mWszl6ZPcgoiA= X-Google-Smtp-Source: APXvYqw7D0LWHVBi4GlpZqzVDpgwErE+kicK1CPnm/4ij5UTN/bhW3vaCwtXopOyzvrK/3V6EDb57Q== X-Received: by 2002:a05:6602:2183:: with SMTP id b3mr67144001iob.249.1564011561758; Wed, 24 Jul 2019 16:39:21 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:21 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 02/11] PCI: Move PME declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:39 -0600 Message-Id: <20190724233848.73327-3-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_check_pme_status() and pci_pme_wakeup_bus() are only called within drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 2 ++ include/linux/pci.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 708413632429..ad1fe54ab8ee 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -89,6 +89,8 @@ void pci_power_up(struct pci_dev *dev); void pci_disable_enabled_device(struct pci_dev *dev); int pci_finish_runtime_suspend(struct pci_dev *dev); void pcie_clear_root_pme_status(struct pci_dev *dev); +bool pci_check_pme_status(struct pci_dev *dev); +void pci_pme_wakeup_bus(struct pci_bus *bus); int __pci_pme_wakeup(struct pci_dev *dev, void *ign); void pci_pme_restore(struct pci_dev *dev); bool pci_dev_need_resume(struct pci_dev *dev); diff --git a/include/linux/pci.h b/include/linux/pci.h index 238449460210..e1f784de459f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1236,8 +1236,6 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable); int pci_prepare_to_sleep(struct pci_dev *dev); int pci_back_from_sleep(struct pci_dev *dev); bool pci_dev_run_wake(struct pci_dev *dev); -bool pci_check_pme_status(struct pci_dev *dev); -void pci_pme_wakeup_bus(struct pci_bus *bus); void pci_d3cold_enable(struct pci_dev *dev); void pci_d3cold_disable(struct pci_dev *dev); bool pcie_relaxed_ordering_enabled(struct pci_dev *dev); From patchwork Wed Jul 24 23:38:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057729 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50530112C for ; Wed, 24 Jul 2019 23:40:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C2652237D for ; Wed, 24 Jul 2019 23:40:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 301BE27CF3; Wed, 24 Jul 2019 23:40:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1BE92237D for ; Wed, 24 Jul 2019 23:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726099AbfGXXjY (ORCPT ); Wed, 24 Jul 2019 19:39:24 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:40409 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729765AbfGXXjY (ORCPT ); Wed, 24 Jul 2019 19:39:24 -0400 Received: by mail-io1-f68.google.com with SMTP id h6so6750625iom.7; Wed, 24 Jul 2019 16:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N/20K4zPt1+GF4yWXbg6ZLq7eeYH//zGfwHqy2zNVYY=; b=aOSQOn4/VbZarbVQ9TBvC/kLlR9+ig17cPc19RZAgY3ju3h9sU2E9bCLMF9aVWwhWX UCzDzKlfI/OLyBk29DvOA8QBmlZaBPsDSywTtd0N7XdGNezYXHh0qxRt8X5thTF+hAFs 1k0ytUq94dd7vMi8LOFdpKiPPDUKw8U0WhMd3yERILd44+lb5vAwhd71JUbbn+8zeRoL vnkxsv5lLgZTQMMdliCNg/VFTX/WnmnadTsA7SGMNu/l1YoxJtOticz1d6+QM0xJz7hD 4omTIi6ZluqqS0r+iN7mH2uV8ZezaUvyz/sri2cg4mqn8mfMxMMKoB3KF6lqXjP/PgU/ 68uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N/20K4zPt1+GF4yWXbg6ZLq7eeYH//zGfwHqy2zNVYY=; b=ODTgvtVFfbD9y6zTyeA0fYbc7wsSFLBn69DCIL4NQi0WyiB03TMpmlmH2bWhaBfV0k 0/6y9Rlqm162oDYXCColSJe9RGsJt4+aGxuSTM8PKt7IHsbNPxaqGu0/zXYlADip2y8F XwPyBKCkoB3VuwWkaGzabt/daC21caeQrflJ9lVOrPJAJ+QbFfq/Oj3gtZg5rFLr7BNm JGouOgzyhtOgRuAqWqJh1iq8dqjSZ6aGNTQTWKncNYa+AJlcLndXqW/tpiEf/GcQ6CP7 PnrJ+qAjTEF+WUqQd8wcyL6Ds8aoKdnKQJN14MbpgqW+ab+X7Ld1GTWkuA6ZRS4ZkMI2 cfvQ== X-Gm-Message-State: APjAAAUI+Lj0UT/Ze1kgz2/wC7oHKnQpElhtCOYBDRlPwMaf4pnQE2bu ag02utZ2IoSigHvZfesdCzA= X-Google-Smtp-Source: APXvYqzoL1m6fVY1SNoOjtTWL3LkMluHBuASVZZEdYjFzU72/k3CbDeS86JH/4wcaom/JIvCCwL7Qw== X-Received: by 2002:a6b:ed01:: with SMTP id n1mr78293304iog.255.1564011563412; Wed, 24 Jul 2019 16:39:23 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:22 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 03/11] PCI: Move *_host_bridge_device() declarations to drivers/pci.pci.h Date: Wed, 24 Jul 2019 17:38:40 -0600 Message-Id: <20190724233848.73327-4-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_get_host_bridge_device() and pci_put_host_bridge_device() are only called within drivers/pci/pci.h. Since declarations do not need to be visible to the rest of the kernel, move to drives/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 3 +++ include/linux/pci.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index ad1fe54ab8ee..f41dde136648 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -105,6 +105,9 @@ void pci_free_cap_save_buffers(struct pci_dev *dev); bool pci_bridge_d3_possible(struct pci_dev *dev); void pci_bridge_d3_update(struct pci_dev *dev); +struct device *pci_get_host_bridge_device(struct pci_dev *dev); +void pci_put_host_bridge_device(struct device *dev); + static inline void pci_wakeup_event(struct pci_dev *dev) { /* Wait 100 ms before the system can be put into a sleep state. */ diff --git a/include/linux/pci.h b/include/linux/pci.h index e1f784de459f..cd49427e198e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -644,9 +644,6 @@ static inline struct pci_dev *pci_upstream_bridge(struct pci_dev *dev) return dev->bus->self; } -struct device *pci_get_host_bridge_device(struct pci_dev *dev); -void pci_put_host_bridge_device(struct device *dev); - #ifdef CONFIG_PCI_MSI static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) { From patchwork Wed Jul 24 23:38:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057713 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58DB8112C for ; Wed, 24 Jul 2019 23:39:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 494742237D for ; Wed, 24 Jul 2019 23:39:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D93A27CF3; Wed, 24 Jul 2019 23:39:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD3922237D for ; Wed, 24 Jul 2019 23:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388225AbfGXXj0 (ORCPT ); Wed, 24 Jul 2019 19:39:26 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:33924 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388079AbfGXXjZ (ORCPT ); Wed, 24 Jul 2019 19:39:25 -0400 Received: by mail-io1-f67.google.com with SMTP id k8so93374083iot.1; Wed, 24 Jul 2019 16:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jv+5h9zsvocG3vmZUV+laGAVtUTGR/TP9VTvdDmoTz8=; b=EDBKGPEY8gNRIm6GLz7eEQXiloyjwA5nE4eDL//MPGFDqxgacSpuOhKqx1np8mzPjs hGPgyPBtOiMtQbL89K8Ug1fDzeYWb0PHZKX1ElGv6Yn8GHj1pudjK7I4EOojcsumedxh SuqZBv4w1zbhY1SWJDXbMk7HhlML90c3SitDL/ZpvuKOQjsPtC2n4cfr0ydXVadI23Wf /Dge/VY8EnTjx0YhHHkygpYLKooF/AXfLEwN30Y90ibKxoXliOAYZPBU/rsKoaARWmmX MYaEtzx/s7ztxFTmAGHbGQrzvwvDladSnJ8Qd2GjLgdqTAvDV/qyCiIjKxvRkJJWu98s Nttg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jv+5h9zsvocG3vmZUV+laGAVtUTGR/TP9VTvdDmoTz8=; b=YhrxyMMY/kmXf27tnuxnNkMtoIm89yv43KlLfbDgJatLk4Nt5saNgDZS4eOqljZoCd uYum3BLHA9WlglhgnE09DQ5qr0kAqGAnGofJMvlAjwdVKXifyvRwI9XZAkMg8Ousa85x 1P1IwKslH1884xnKaDrCAb6U+4M+EHR6qVzWRAHBiXrZi2H33Sm5gWNQVSu5JEsQ1nsb CvXxdre05hkkp4xxe0uZq14zVMtgJxqwzicmTAenlI73zWhZLZ3DUv2jFkD96Uf7gBrm 3lhTU3ZSlY5sXLnCQD8jbYSvKC+hbCmoHxviQt/gdJYdoMqtob4P16UHvzirxbf3YRum Y/8g== X-Gm-Message-State: APjAAAU88ONLtZv2BeyLBbTEJFfZ9EY+BFCKbn13wW1B73FK8OZCzIEs ioxIZXqBk/TVrjTmTRf/AC8Ki7u2c+hKSw== X-Google-Smtp-Source: APXvYqzL6oW/Clg2J47PQR1aH5O41FAHwJVYA5fEhLrRB3MVj8DyKnXYMYiW7k2oON2cgNcwRQyxjg== X-Received: by 2002:a6b:3102:: with SMTP id j2mr13169207ioa.5.1564011564997; Wed, 24 Jul 2019 16:39:24 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:24 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 04/11] PCI: Move PCI Virtual Channel declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:41 -0600 Message-Id: <20190724233848.73327-5-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PCI Virtual Channel declarations are only called within drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 5 +++++ include/linux/pci.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index f41dde136648..0eb0fb7ad353 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -133,6 +133,11 @@ void pci_vpd_release(struct pci_dev *dev); void pcie_vpd_create_sysfs_dev_files(struct pci_dev *dev); void pcie_vpd_remove_sysfs_dev_files(struct pci_dev *dev); +/* PCI Virtual Channel */ +int pci_save_vc_state(struct pci_dev *dev); +void pci_restore_vc_state(struct pci_dev *dev); +void pci_allocate_vc_save_buffers(struct pci_dev *dev); + /* PCI /proc functions */ #ifdef CONFIG_PROC_FS int pci_proc_attach_device(struct pci_dev *dev); diff --git a/include/linux/pci.h b/include/linux/pci.h index cd49427e198e..d1944e3e7eb2 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1239,11 +1239,6 @@ bool pcie_relaxed_ordering_enabled(struct pci_dev *dev); void pci_wakeup_bus(struct pci_bus *bus); void pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state); -/* PCI Virtual Channel */ -int pci_save_vc_state(struct pci_dev *dev); -void pci_restore_vc_state(struct pci_dev *dev); -void pci_allocate_vc_save_buffers(struct pci_dev *dev); - /* For use by arch with custom probe code */ void set_pcie_port_type(struct pci_dev *pdev); void set_pcie_hotplug_bridge(struct pci_dev *pdev); From patchwork Wed Jul 24 23:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057727 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF7FD1398 for ; Wed, 24 Jul 2019 23:40:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE1142237D for ; Wed, 24 Jul 2019 23:40:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC96827CF3; Wed, 24 Jul 2019 23:40:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AA3F2237D for ; Wed, 24 Jul 2019 23:40:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729782AbfGXXj2 (ORCPT ); Wed, 24 Jul 2019 19:39:28 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35806 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388357AbfGXXj1 (ORCPT ); Wed, 24 Jul 2019 19:39:27 -0400 Received: by mail-io1-f68.google.com with SMTP id m24so93359096ioo.2; Wed, 24 Jul 2019 16:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=95RnMuH9NZpUhiSkY13+rMKWH0ZloCzPp9W168L3YRE=; b=es+L+os4CRFmEFLfuoxD6vOAhMY+SoXD2dkVv3t4i4waqyfEEMl+Xc67my6gFWi09K Y2DtfsH4CWWCdySWbvbpDJ9y+njJ6vXKaB1/c9TdXjqCv4yb95dJp98UIqLiVoAmek9H ORnRQBrcPOjMxyxsZOvyXGmR7Fa8JMwv/PScV2XllBFIYbHW8RLVjPEmYagXb1gs+YB2 jp+y1InuQjpuyp22PeA8mTEhWEl+WctgKMX+SUzWU0NbgvIKYTA5i5m4V72ewqLU5Hst FhVt7BJzcTBA0UQcZp92b6dgDYdmOt45v4OZsDkqm17pgfR4cs2cftIsXpweICi44J8i 0S4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=95RnMuH9NZpUhiSkY13+rMKWH0ZloCzPp9W168L3YRE=; b=S8wSBz+s/kGabGLATPyudKdJwV/cgQKpJ6VciOYUiEt5vhnFihbos5MzOVLDJxaPlA elMDR6SbSyejnw7s3ihONSkl8ioFm8P2vql53cuZITdJGFap8zrEU8BWuFYJt4OIWE96 pjwbFzjhjBt6FRE23vnWleg7lSpSRMMzVB5bBMJ1a0t2O9qOEJwoQEH/E/LFSYxxZ3U4 ky1b21wrFAQ789qUYfp+tkUX96b9W26BHtdTdnCV3ZVuYuueEbBjNO4bX1wrcS2vv4DL wyJCeCQ2ZPlffNyscZsEn1uOPflXB4X58Vs6BnlJK0quqCDVWVl4aznHz58DFNF2oLLn /vpQ== X-Gm-Message-State: APjAAAW7uCFhLx865o0Vx8h/Jpsv86sp/qy+gTvaPXxvoaS0syhq0YnK TF0z73zKabQI2Z244p4aNlQ= X-Google-Smtp-Source: APXvYqzGKtiG9iaWb2B4WyrjpjrrOecz14NRtWR2FJfxv4zmwKffdnApTxKY1Nr7UXrBZPwO/S218Q== X-Received: by 2002:a6b:7909:: with SMTP id i9mr47728241iop.8.1564011566663; Wed, 24 Jul 2019 16:39:26 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:26 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 05/11] PCI: Move pci_hotplug_*_size declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:42 -0600 Message-Id: <20190724233848.73327-6-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_hotplug_*_size declarations are only called within drivers/pci/pci/. Since declarations do not need to be seen by the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 3 +++ include/linux/pci.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 0eb0fb7ad353..9391330805e9 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -211,6 +211,9 @@ extern const struct attribute_group *pcibus_groups[]; extern const struct device_type pci_dev_type; extern const struct attribute_group *pci_bus_groups[]; +extern unsigned long pci_hotplug_io_size; +extern unsigned long pci_hotplug_mem_size; +extern unsigned long pci_hotplug_bus_size; /** * pci_match_one_device - Tell if a PCI device structure has a matching diff --git a/include/linux/pci.h b/include/linux/pci.h index d1944e3e7eb2..9c9554906659 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2015,10 +2015,6 @@ extern unsigned long pci_cardbus_mem_size; extern u8 pci_dfl_cache_line_size; extern u8 pci_cache_line_size; -extern unsigned long pci_hotplug_io_size; -extern unsigned long pci_hotplug_mem_size; -extern unsigned long pci_hotplug_bus_size; - /* Architecture-specific versions may override these (weak) */ void pcibios_disable_device(struct pci_dev *dev); void pcibios_set_master(struct pci_dev *dev); From patchwork Wed Jul 24 23:38:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057723 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B4991398 for ; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BF0226224 for ; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 205A027CF3; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2C482237D for ; Wed, 24 Jul 2019 23:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388457AbfGXXj3 (ORCPT ); Wed, 24 Jul 2019 19:39:29 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35812 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729781AbfGXXj3 (ORCPT ); Wed, 24 Jul 2019 19:39:29 -0400 Received: by mail-io1-f68.google.com with SMTP id m24so93359209ioo.2; Wed, 24 Jul 2019 16:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zgONiMj8jlx3bdrKno5goCNAEVBGMf2Gp/n6CdPztZo=; b=YxQIlAce74J2bpdbovxttmNULI2DSygwlE7/ZgbbLfpTGD05VMjH+rir6gcjOQ70xB L1wtd8YUn+wznEMcUK1AMopWK5wVgU2gTGpMUhsq6MmlFCO3Z9/vD7NCf9gyeFdk/V+s A7w1+Sl+dqMeEEl/VJNdLdHLHNnBfS+kw0Ta7WSgOoKoRHDTzH6sTrDaiyWc38KUocHF PO/FmbAXG++7xFO7jvlhZNiHQbfeMrhCDPS0bC94HpJwwNpjMgfzB9Tuijsy7sLssdno fB+rSxupwYAuS6fUWJK06azPedjhqwfWdSSecY9hZYzgAZEWq9FMLrgxAyi9y9HU+ksb +weA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zgONiMj8jlx3bdrKno5goCNAEVBGMf2Gp/n6CdPztZo=; b=fSQgZavE5yEuu9hdkl+zVT2uf/TGjRAwXrZZiaMcfaR5kf1RSBr4MLh77pKeGqPNxW GLIavEIn3JRYc+DBYv/OZUFiGl7WWFazQllX6jIE89Ae5b8NJ1p9eL51PJLjZypxnxYy NDcb264lBvA34KwWz1hnlFzYyjdUdrKM9SDQP4/qKbEgHSBpOz3voPFk5Va5kOIaYvoW IY6VDAklbp28sxWPZAMkhNm+CA/9TBl7j50EI4s63tjHD98zhzEY7vm802R6/HP/xpPh K0ty3WyCFGkTkUVdNqZgLTLAKtIXLd+OPGZxXq3MZ4h/Gr2NdIaHvRP8cGHEcnfMzjiW 4uZw== X-Gm-Message-State: APjAAAX+VbtH4afSeCWv1Dke5mnl2tJZI45wES0n6ze+Yy8NWoA2n0mZ rQjJtL2h8XcL1VLGlhpm0/KXxrWfCaGjRg== X-Google-Smtp-Source: APXvYqwa3FsRBpR42KKC5o7E9bJTkBmQlB56yz2eJgifqsLzWIKwUvLK1dCb3cpd/yFZI6ryRtXLKg== X-Received: by 2002:a5d:9703:: with SMTP id h3mr12151260iol.152.1564011568446; Wed, 24 Jul 2019 16:39:28 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:27 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 06/11] PCI: Move pci_bus_* declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:43 -0600 Message-Id: <20190724233848.73327-7-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_bus_* declarations are only called within drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 2 ++ include/linux/pci.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9391330805e9..3e9dfca4b661 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -274,6 +274,8 @@ bool pci_bus_clip_resource(struct pci_dev *dev, int idx); void pci_reassigndev_resource_alignment(struct pci_dev *dev); void pci_disable_bridge_window(struct pci_dev *dev); +struct pci_bus *pci_bus_get(struct pci_bus *bus); +void pci_bus_put(struct pci_bus *bus); /* PCIe link information */ #define PCIE_SPEED2STR(speed) \ diff --git a/include/linux/pci.h b/include/linux/pci.h index 9c9554906659..af59ecf8ccff 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1282,8 +1282,6 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *); void pci_release_selected_regions(struct pci_dev *, int); /* drivers/pci/bus.c */ -struct pci_bus *pci_bus_get(struct pci_bus *bus); -void pci_bus_put(struct pci_bus *bus); void pci_add_resource(struct list_head *resources, struct resource *res); void pci_add_resource_offset(struct list_head *resources, struct resource *res, resource_size_t offset); From patchwork Wed Jul 24 23:38:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057725 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E05F14F6 for ; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E8112237D for ; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72DBE27CF3; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25E9F2237D for ; Wed, 24 Jul 2019 23:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729819AbfGXXj7 (ORCPT ); Wed, 24 Jul 2019 19:39:59 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37733 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388510AbfGXXja (ORCPT ); Wed, 24 Jul 2019 19:39:30 -0400 Received: by mail-io1-f65.google.com with SMTP id q22so93286711iog.4; Wed, 24 Jul 2019 16:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pAcPMfe4yfghI1KUSCC11QjOq9mL6eRC3i1HmLX64SA=; b=kjwyg+lUAIuMA/MRerzz3UX88Xahmp53ZcoCO6siikOWTAdnn1reZAx4HKYmgMwY5I t6iX1bPY2ITZ3qxMpey8uDrfMkq7LqtaufDZ4tWjLw9q8PXxdENVHtJtjTu7/CU/xZEb 8X55RBwHdpdm6W6JSwE8s/VmKQKUgKcn9MarMYMbn4T/nNnKDKzfnGUylxGuZSy3UIRV 0t8FZS6FZ2p3+AHanLHUHEErA1KG1POu38u402UXP7y9kstBcadh4DujqkgpjLjj6VEp bGENI79zF4Mg5EYJYCI4WS1J7oon6qJUElTBcw1MPjBwgMU6ITYyi16j2b/wAjjtI3qC 2thA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pAcPMfe4yfghI1KUSCC11QjOq9mL6eRC3i1HmLX64SA=; b=User/U6XVi8AXkJ+Ldr58QUuN1T7Awhp0I61s8d3O4ry++TlHVetk/HhirR4VoIEk7 Keaq6nn0kPQuRV2g1GBGWL0eLVbUpMs0vimjTx9OGgzXKlesmlHL0LGIBHyTZ1oKW1kL VHo1DEIr1DZlKDD9XPq1S8G0/I3PKLj96Ob54Ihgkdlo1mNJwNWMaGVpNQZT+KgXFI3B ySj1WWq/nIoRgv39fm759DUgI4iaihJ52mohlna36wLMlsTkwYDp9gWA1lgAqzCBZjxV WuDGMXuZ2kb/8uQnA3PboeGODsNL3EnGZDLej0Sf1WLQ7bkg+Szzo3SdenA4Sx/xx7aW uH2g== X-Gm-Message-State: APjAAAXCHBIxqQqHX6rxwmOLUUidRFC51gqZ0X2csGwwzBikRr6N2xiH +8LWPjqywYLBoB3A1C7uGe8= X-Google-Smtp-Source: APXvYqy8SNFjSICh1nq0Hw7XzdxkbUHtNbwwrjOlx+kGCNmsqIjRuGCmBHFzww4v/WfzCjlkn/Ut2Q== X-Received: by 2002:a6b:4107:: with SMTP id n7mr10472279ioa.12.1564011569971; Wed, 24 Jul 2019 16:39:29 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:29 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 07/11] PCI: Move pcie_update_link_speed() to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:44 -0600 Message-Id: <20190724233848.73327-8-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pcie_update_line_speed() is only called within drivers/pci/. Since declaration does not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 1 + include/linux/pci.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 3e9dfca4b661..feec29853a44 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -299,6 +299,7 @@ u32 pcie_bandwidth_capable(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width); void __pcie_print_link_status(struct pci_dev *dev, bool verbose); void pcie_report_downtraining(struct pci_dev *dev); +void pcie_update_link_speed(struct pci_bus *bus, u16 link_status); /* Single Root I/O Virtualization */ struct pci_sriov { diff --git a/include/linux/pci.h b/include/linux/pci.h index af59ecf8ccff..c6a25c32a49a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -987,7 +987,6 @@ struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, int pci_scan_root_bus_bridge(struct pci_host_bridge *bridge); struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr); -void pcie_update_link_speed(struct pci_bus *bus, u16 link_status); struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, const char *name, struct hotplug_slot *hotplug); From patchwork Wed Jul 24 23:38:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057715 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C9651398 for ; Wed, 24 Jul 2019 23:39:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B7E02237D for ; Wed, 24 Jul 2019 23:39:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DACD27CF3; Wed, 24 Jul 2019 23:39:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC9722237D for ; Wed, 24 Jul 2019 23:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388709AbfGXXjc (ORCPT ); Wed, 24 Jul 2019 19:39:32 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:45974 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388699AbfGXXjc (ORCPT ); Wed, 24 Jul 2019 19:39:32 -0400 Received: by mail-io1-f68.google.com with SMTP id g20so93285072ioc.12; Wed, 24 Jul 2019 16:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qNiVS6KaY4NBAE+rZSVHlFmLJSQHz8WYKfYsVUbOMCM=; b=W25R1WYezOB68dc9K78bpE8OES+u0aPNWsLm0Z/eSuGSyd0/XPQymoibZ4/BQIpcIq Eq3IrnM+oHw+Eh6OmLLt8+VcxYmuU7nbhOPftOr6CUCfGsWZq9kd6MU+KuDYSCr2lTKO 97W3ST3Ccjp0sPANSoCmnLWC6kpqmG6IaQnHr44maxuHGR4ryk1xyGo+Wk+1lOSkxNXL UDih0DZ1Xyp4+xltmYYSvYQOzDSm2m3cCP3Fp/o2ZyIuEcCwIs4aPI8LYmnnxHyEVJuP U6Lhd/1lq9BN0VuDudKaKlZrFQ3hgzTlZR7WlT/+jUemIuKhKe2DvVx9o8boR7KYii2E GmiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qNiVS6KaY4NBAE+rZSVHlFmLJSQHz8WYKfYsVUbOMCM=; b=tRUDZw7IH4RPePqk0vUJzEV5DE1RnKJ+zOD3cFPpQTpvnRtM6f3ycigE7I+htk5nd7 TO+ubNTxfxFZCY9rckwt0GDaRhwtP/8pJXiUM1xOfg07zGnVYJcE0HTXUYhzOerpfqcd sdR6j2XhwPIdNERaeN/WMphQZhtjWyAqwjKWbhbd0qLyKMUx7OEKJjOW4Dw+avd2+PQT JzKwh4+vnONiT8U9iNUvKibnIRRnlzItdhP+bsUTpmAguFoAfugO9XcjGNZ/sWxSppN6 VwVmOkP0hHlyPr6WENuvK1FutAL9sZzcYXZnBgm1rDRo+6kGT4V6Iqhnkwu0f3qgpH/l TX7A== X-Gm-Message-State: APjAAAX2nmFxT7ywTX30oAGtjL4IrVxTvvVI9j2A52L9yHnsnPAOAFQM 4Jeqlwk+htMzMq8vdDyMd4o= X-Google-Smtp-Source: APXvYqw9oabF3ab6Yv6x4v9tkcwqQAHiGbRpr88mk5G7RA3GapanX5AoCAwO5O+GaUOM0sxzbT5vIg== X-Received: by 2002:a6b:6505:: with SMTP id z5mr76156608iob.295.1564011571550; Wed, 24 Jul 2019 16:39:31 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:30 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 08/11] PCI: Move pci_ats_init() to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:45 -0600 Message-Id: <20190724233848.73327-9-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_ats_init() is only called with drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 7 ++++--- include/linux/pci.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index feec29853a44..7c0488b64faf 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -439,11 +439,12 @@ static inline void pci_restore_dpc_state(struct pci_dev *dev) {} #endif #ifdef CONFIG_PCI_ATS +/* Address Translation Service */ +void pci_ats_init(struct pci_dev *dev); void pci_restore_ats_state(struct pci_dev *dev); #else -static inline void pci_restore_ats_state(struct pci_dev *dev) -{ -} +static inline void pci_ats_init(struct pci_dev *d) { } +static inline void pci_restore_ats_state(struct pci_dev *dev) { } #endif /* CONFIG_PCI_ATS */ #ifdef CONFIG_PCI_IOV diff --git a/include/linux/pci.h b/include/linux/pci.h index c6a25c32a49a..5760e19cb625 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1766,13 +1766,11 @@ static inline bool pci_ats_disabled(void) { return true; } #ifdef CONFIG_PCI_ATS /* Address Translation Service */ -void pci_ats_init(struct pci_dev *dev); int pci_enable_ats(struct pci_dev *dev, int ps); void pci_disable_ats(struct pci_dev *dev); int pci_ats_queue_depth(struct pci_dev *dev); int pci_ats_page_aligned(struct pci_dev *dev); #else -static inline void pci_ats_init(struct pci_dev *d) { } static inline int pci_enable_ats(struct pci_dev *d, int ps) { return -ENODEV; } static inline void pci_disable_ats(struct pci_dev *d) { } static inline int pci_ats_queue_depth(struct pci_dev *d) { return -ENODEV; } From patchwork Wed Jul 24 23:38:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057719 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D04F2112C for ; Wed, 24 Jul 2019 23:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE3472237D for ; Wed, 24 Jul 2019 23:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF23027CF3; Wed, 24 Jul 2019 23:39:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F76D2237D for ; Wed, 24 Jul 2019 23:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388733AbfGXXje (ORCPT ); Wed, 24 Jul 2019 19:39:34 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:35831 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388717AbfGXXjd (ORCPT ); Wed, 24 Jul 2019 19:39:33 -0400 Received: by mail-io1-f67.google.com with SMTP id m24so93359536ioo.2; Wed, 24 Jul 2019 16:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ctOGDmMbV31DRZN6bdS13O+qL4D/YscoUsTj6P9f3ms=; b=Kyh4eV7lSsnfSvqnjqQGyTdGRXXAmHSHQpGvBW7tZ4hqf+BldRoz7XAOek3DPUjgHf ZZcX9kESdXzTgLLtESb3/Pt8uCfvDo9K0oSQBek2g+nTFKTlJSyQMW6mODCaChplNs5+ TRFgyNebhE4989JJ8ipBoQMddqaeoIPZnB/NugWftJWTL1h3ZSlwn3mtjpoy+4dTHply 9iP6Ez4Ovd4GpLgNmdqn1YL/SqFZm/j4dkikS/ArrhoiJJ/Skv9k3wzAddnhMsVPoWLZ jskMxYitB+tY1vpp8VMUDyp789EKpDv14f+Tpzh654LAmGYFqDDHgNl7JyR6PBr+kMDY 977A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ctOGDmMbV31DRZN6bdS13O+qL4D/YscoUsTj6P9f3ms=; b=kM97mX0KYlozPUasXyKaTzUL88Sb1Y1EyjAD8B9+wcszgeS9OUSLs/LxtaC4X7waG7 Ad6zloKdfw5Euys/HbG+giBXklog8magfUyoXFnV/HjmFU0PHV6c9bMni89iWT3B1sB4 FwCqAkYRMcNVJJqMP8elc7W2YSdl3PFOWhMpnq58KgIvYbO6WJHQSPCu7WhmudFYWrBg omVY7LIzUL4+nDBZRgItno6bVNSlkfxncP4maYxJIZOfswDTvQkC0/pT7zq7uAUmp1Wr Koh0ild2vhnGPO4TmMDLjwCfJ7aMFkTH6eiFErGrDX83Ujb60DzqiWS6NfwXB/18x9HX qwaw== X-Gm-Message-State: APjAAAU2j1vevAKyUyxhxdGKkbspug5FfPv1fa9vk8HsXEabFd+/tsyL K+tImJbIUmMhaV7kegn2h98= X-Google-Smtp-Source: APXvYqyrIYj9Of1LxsHeZG3OaAByJIlEvBdFsKiD7Yq6A3aBwkvuztrEQzQSvzzzc3epNAsx5dRrLw== X-Received: by 2002:a6b:3883:: with SMTP id f125mr6671895ioa.109.1564011573235; Wed, 24 Jul 2019 16:39:33 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:32 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 09/11] PCI: Move ECRC declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:46 -0600 Message-Id: <20190724233848.73327-10-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pcie_set_ecrc_checking() and pcie_ecrc_get_policy() are only called within drivers/pci/. Since declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 8 ++++++++ include/linux/pci.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 7c0488b64faf..5e5ce04bda59 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -541,6 +541,14 @@ static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) { } static inline void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) { } #endif +#ifdef CONFIG_PCIE_ECRC +void pcie_set_ecrc_checking(struct pci_dev *dev); +void pcie_ecrc_get_policy(char *str); +#else +static inline void pcie_set_ecrc_checking(struct pci_dev *dev) { } +static inline void pcie_ecrc_get_policy(char *str) { } +#endif + #ifdef CONFIG_PCIE_PTM void pci_ptm_init(struct pci_dev *dev); #else diff --git a/include/linux/pci.h b/include/linux/pci.h index 5760e19cb625..5dd4abeef8b0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1559,14 +1559,6 @@ bool pci_aer_available(void); static inline bool pci_aer_available(void) { return false; } #endif -#ifdef CONFIG_PCIE_ECRC -void pcie_set_ecrc_checking(struct pci_dev *dev); -void pcie_ecrc_get_policy(char *str); -#else -static inline void pcie_set_ecrc_checking(struct pci_dev *dev) { } -static inline void pcie_ecrc_get_policy(char *str) { } -#endif - bool pci_ats_disabled(void); #ifdef CONFIG_PCIE_PTM From patchwork Wed Jul 24 23:38:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057721 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BAD1D112C for ; Wed, 24 Jul 2019 23:39:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA2B12237D for ; Wed, 24 Jul 2019 23:39:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EA4027CF3; Wed, 24 Jul 2019 23:39:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B6CF2237D for ; Wed, 24 Jul 2019 23:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728953AbfGXXjv (ORCPT ); Wed, 24 Jul 2019 19:39:51 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:44081 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388743AbfGXXjf (ORCPT ); Wed, 24 Jul 2019 19:39:35 -0400 Received: by mail-io1-f67.google.com with SMTP id s7so93183522iob.11; Wed, 24 Jul 2019 16:39:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PMejsUr9K8/BuCWQx6vgffGUCxlWl6FVyv+Mq0t5PyY=; b=oALzStoxBDoSIlWbN6YPeEuD/T0n8vprngDcpk7Wdx026sDFtVNYqA0fCLFfy8XRW0 5YCmBMinTsiPjB5jXmUFg/uJIbptOD+pMSOeyRUN9UM6sXpY6+7RYh4VQkctaUk3caYv rtfcA+4Bb/VuD3oRTg6XxmWR2iv/MZd3i8kkzFOVoBZGQLg3iN3O5jqeYEB1D7gYmVUt WgDYXv4HBPR8WTTCeq5PTeceotDsx6TQUq5T1RHWDtJl2l5fjkISAjHsIVAxdXBX6SWd HgAFuWI8KWDuRVh7DQNfSNcwghqvDUmtrAIYHx0CL4n02dilRSLe1ph/56ncBpOyYtqu JNpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PMejsUr9K8/BuCWQx6vgffGUCxlWl6FVyv+Mq0t5PyY=; b=VllsBGc1fU1rEt4MRx4A9LKnyxKSdY6sWRTJLaL6m0QjpGRvTTY1BKUl2uP6X2f7jp H/CQNw48E6VK/1uFjFvmq0i35msYatfSVptn0pWMXbOtm81eMRFY9DKNg5orqkYztzuG fGOkAzqjO6BSHNa0ldwsNykE3WgsASY5dq9jrk9celtT5dLn7If2aCAMiOmd99u3U1w4 rMEasuYTY8mOxD+R0EDeMsqS5AK98AbSScRAR/jh21kmv0zt4pStFAVGKDAXefv9p6/H JfbajGaqrH46CU3qmmNjqn1n7rj6giJkzjLNsNcWJpTqXz8DpdpUo5+vEqBf1rh+3Dh7 Oo5g== X-Gm-Message-State: APjAAAWsSt8XDNFYJFjsuIe+Uz4UQd/jDNKOZMTMC+1S5yPU5dm8x1z6 ysmd6I0ISpfvaTav2vb4hkw= X-Google-Smtp-Source: APXvYqyArnMIGaLRu1YF0B/3Kg2tyhDsqsLvvZ/MgLRe2voM0nZtj/FUXNEnuExWm3h0sXW6r6ooLQ== X-Received: by 2002:a05:6602:2183:: with SMTP id b3mr67144703iob.249.1564011574860; Wed, 24 Jul 2019 16:39:34 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:34 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 10/11] PCI: Move PTM declaration to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:47 -0600 Message-Id: <20190724233848.73327-11-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_enable_ptm() is only called within drivers/pci/. Since declaration does not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 3 +++ include/linux/pci.h | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5e5ce04bda59..6cdc3500de15 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -551,8 +551,11 @@ static inline void pcie_ecrc_get_policy(char *str) { } #ifdef CONFIG_PCIE_PTM void pci_ptm_init(struct pci_dev *dev); +int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); #else static inline void pci_ptm_init(struct pci_dev *dev) { } +static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) +{ return -EINVAL; } #endif struct pci_dev_reset_methods { diff --git a/include/linux/pci.h b/include/linux/pci.h index 5dd4abeef8b0..a483b7598059 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1561,13 +1561,6 @@ static inline bool pci_aer_available(void) { return false; } bool pci_ats_disabled(void); -#ifdef CONFIG_PCIE_PTM -int pci_enable_ptm(struct pci_dev *dev, u8 *granularity); -#else -static inline int pci_enable_ptm(struct pci_dev *dev, u8 *granularity) -{ return -EINVAL; } -#endif - void pci_cfg_access_lock(struct pci_dev *dev); bool pci_cfg_access_trylock(struct pci_dev *dev); void pci_cfg_access_unlock(struct pci_dev *dev); From patchwork Wed Jul 24 23:38:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11057717 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BBD3112C for ; Wed, 24 Jul 2019 23:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AD7B2237D for ; Wed, 24 Jul 2019 23:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E56E27CF3; Wed, 24 Jul 2019 23:39:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E58FA2237D for ; Wed, 24 Jul 2019 23:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbfGXXjq (ORCPT ); Wed, 24 Jul 2019 19:39:46 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:36553 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388748AbfGXXjg (ORCPT ); Wed, 24 Jul 2019 19:39:36 -0400 Received: by mail-io1-f68.google.com with SMTP id o9so93396958iom.3; Wed, 24 Jul 2019 16:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+nfQZ2UdcSDgJjCDwmD/o1yYou6zHrnlrDckfQLhv48=; b=CZB+qQZ+IiCjqbrl3pG1VgfoIKlT1esq374rHCiwoSTr+htDGMMdB25C4Kju1ptnOv Sr0vWDqL1QJ8UxaHm3MSMXR8LZpxI8sSOFGwYpaXvbXoOaNpfJfY+8QnxMoy0sD4c5/G 7qLcwiTTCg8VwoMBVrIn2Jjo3NIsaxQZU8ASK/EaGVoGZtibG80it6wU6C6lktP9f5Wt sSCIM70yBh8fL8rsrpffoHwj93kjzxv/1zN/Cv647ellh7AJiCG/dPXcCrWpJSP8U2lB tHP4E6gWavTvF+TOL0eTMooXt7XVQ3+ITlWaQuZTNGAIlCyXmIDsZO5E36ET0q1faLPK qv/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+nfQZ2UdcSDgJjCDwmD/o1yYou6zHrnlrDckfQLhv48=; b=e58DkMqClxTc58FKiC/JFu66D9+cu1JIlmjyhUx7aVSQkUjUzx67el+kxWbQkVBQIC 9dk3PMHKCNh70H1O6HutfvEddBbxaoY9tODg0+jnJR7/eswAmFsnGY6sj7IooZITmlJb jhit1cc/nHkRWA8AA/vCp8twUEvJcv0WjbDvjJmf6Ux3ZJ+yQJsZCSJyc15M4vbRsCVl OmiFC3nMBhoAxj3x8b+9hzsEKurUH8O7p+IR0XOFVh11iUu4ycxHgsdDY1/UXRy1XNWw rZAOyvbcOlCk3c4RwUiz1dtEAziYvgQDuOqlYBeJ514NrGkrm5lem5GyHawndpI48gvY fbAg== X-Gm-Message-State: APjAAAXNl8uQVG3bnhjntXOZv8PDKNd64pv7MoeTrtbb1ZKUTJgynSIT s/dl7QhvLjrifNap4V+MMhU= X-Google-Smtp-Source: APXvYqwz03eSee7Y8W5j7Athc2oOY1acyYH6BBqvdR5E7s99JkIF/tHtBs+1nL70YWEqwyLZFCaI/Q== X-Received: by 2002:a6b:2cc7:: with SMTP id s190mr80038806ios.164.1564011576172; Wed, 24 Jul 2019 16:39:36 -0700 (PDT) Received: from localhost.localdomain (c-73-243-191-173.hsd1.co.comcast.net. [73.243.191.173]) by smtp.gmail.com with ESMTPSA id b14sm51612959iod.33.2019.07.24.16.39.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:39:35 -0700 (PDT) From: Kelsey Skunberg To: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: skunberg.kelsey@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH v2 11/11] PCI: Move pci_*_node() declarations to drivers/pci/pci.h Date: Wed, 24 Jul 2019 17:38:48 -0600 Message-Id: <20190724233848.73327-12-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190724233848.73327-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-1-skunberg.kelsey@gmail.com> <20190724233848.73327-1-skunberg.kelsey@gmail.com> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_*_node() is only called from drivers/pci/. Since these declarations do not need to be visible to the rest of the kernel, move to drivers/pci/pci.h. Signed-off-by: Kelsey Skunberg --- drivers/pci/pci.h | 9 +++++++++ include/linux/pci.h | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 6cdc3500de15..27089a87dfea 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -592,6 +592,10 @@ struct device_node; int of_pci_parse_bus_range(struct device_node *node, struct resource *res); int of_get_pci_domain_nr(struct device_node *node); int of_pci_get_max_link_speed(struct device_node *node); +void pci_set_of_node(struct pci_dev *dev); +void pci_release_of_node(struct pci_dev *dev); +void pci_set_bus_of_node(struct pci_bus *bus); +void pci_release_bus_of_node(struct pci_bus *bus); #else static inline int @@ -611,6 +615,11 @@ of_pci_get_max_link_speed(struct device_node *node) { return -EINVAL; } + +static inline void pci_set_of_node(struct pci_dev *dev) { } +static inline void pci_release_of_node(struct pci_dev *dev) { } +static inline void pci_set_bus_of_node(struct pci_bus *bus) { } +static inline void pci_release_bus_of_node(struct pci_bus *bus) { } #endif /* CONFIG_OF */ #if defined(CONFIG_OF_ADDRESS) diff --git a/include/linux/pci.h b/include/linux/pci.h index a483b7598059..d354fbcee5a7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2264,10 +2264,6 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, #ifdef CONFIG_OF struct device_node; struct irq_domain; -void pci_set_of_node(struct pci_dev *dev); -void pci_release_of_node(struct pci_dev *dev); -void pci_set_bus_of_node(struct pci_bus *bus); -void pci_release_bus_of_node(struct pci_bus *bus); struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus); int pci_parse_request_of_pci_ranges(struct device *dev, struct list_head *resources, @@ -2277,10 +2273,6 @@ int pci_parse_request_of_pci_ranges(struct device *dev, struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); #else /* CONFIG_OF */ -static inline void pci_set_of_node(struct pci_dev *dev) { } -static inline void pci_release_of_node(struct pci_dev *dev) { } -static inline void pci_set_bus_of_node(struct pci_bus *bus) { } -static inline void pci_release_bus_of_node(struct pci_bus *bus) { } static inline struct irq_domain * pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } static inline int pci_parse_request_of_pci_ranges(struct device *dev,