From patchwork Thu Jul 11 22:23:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040825 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 4ACBF1395 for ; Thu, 11 Jul 2019 22:26:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CD5028B7F for ; Thu, 11 Jul 2019 22:26:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3068B28B82; Thu, 11 Jul 2019 22:26:16 +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 CBE2328B7F for ; Thu, 11 Jul 2019 22:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728613AbfGKW0P (ORCPT ); Thu, 11 Jul 2019 18:26:15 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:35530 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbfGKW0N (ORCPT ); Thu, 11 Jul 2019 18:26:13 -0400 Received: by mail-io1-f67.google.com with SMTP id m24so16212945ioo.2; Thu, 11 Jul 2019 15:26:12 -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=BqFBk1FaYQjd5Lzc/850mm3V6XDniUot7IqB9zeZTao=; b=JcM5L6GuN8ncWjv+3WRDFgbZGs1pMOi1cAzotJyME1JgQbkm4tcvyGJ382atCLNTDj kQtZz8an0A/vJCcjYQeB3i2A0J1YQ0+IunvPdMm7A4XHVNnId/M1gwtcWYl9FG6b0M9i C8gA21gINuWZUNk17WFs3F3exotOKJJ6DZw8itU9vM2roTObAQqEM2CcEFFDopW35tnS U7lqrm1PCP/8zUAAq3F1euyodEVQ20d/hMJXIbSI7H10Ht3U7PxFmbNQhVz2SAiUsIjX sR00BrA60UvSMxxokcGDSHQ+rEirvBADOF8XqOOSZIjGnkxDkfCRFxM3Viv/Da0OeQzU 7Pzg== 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=BqFBk1FaYQjd5Lzc/850mm3V6XDniUot7IqB9zeZTao=; b=tcIILu4pUBoJx+SHhFz4Ai6rEJ9SKj7kFYinIQgznCxRLKKKQrzfTFLtiROaL391HR vNmDqxvVYrR9Du2FuYreuTdrbXKqDuYRAmX/O2S9ZqebcfPrxQsSaLB8W3RnxzEqb38T GAPHm5ui9nBl0JIqzmd1hm14e/TWznq/DDJqk/rNtFPnHTwfg9spdDqVpRaIdRWYI2rF XYIZp7JeEvf+vtRvJJV97t5t202xNsm85gszTF3o1eAdwoN4FESmOONh0x7ZBwpfvz+u W07sbns2YyUlGAZR0/Byr/nsCRPzLoZzM5H0yZO2jehS4AnTikl3tjFV4Oz1FeX619D/ Hetg== X-Gm-Message-State: APjAAAUS9y937vvchcpB8eCaq871bGw4KT2SX/PP45fcTII3BTE78Mgx m+X7UEEfG4t2dbioppQoVVbs/avIV1bJpw== X-Google-Smtp-Source: APXvYqzbYgulXcThSGIMz/NMbDOKuJMQszIhPvb5qChUfwJv3PxF494BVb5b5byadTNBwnRJaOlrjA== X-Received: by 2002:a6b:f114:: with SMTP id e20mr4139658iog.169.1562883972052; Thu, 11 Jul 2019 15:26:12 -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 s2sm4478982ioj.8.2019.07.11.15.26.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:11 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 01/11] PCI: Move #define PCI_PM_* lines to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:31 -0600 Message-Id: <20190711222341.111556-2-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 9cb99380c61e..7e30fbde5c84 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 dd436da7eccc..3bda6a87a815 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 - /** * The pci_channel state describes connectivity between the CPU and * the PCI device. If some PCI bus between here and the PCI device From patchwork Thu Jul 11 22:23:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040845 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 689E61395 for ; Thu, 11 Jul 2019 22:27:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AA2528B7F for ; Thu, 11 Jul 2019 22:27:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CF9E28B82; Thu, 11 Jul 2019 22:27:03 +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 E360228B7F for ; Thu, 11 Jul 2019 22:27:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729162AbfGKW07 (ORCPT ); Thu, 11 Jul 2019 18:26:59 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:39671 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728757AbfGKW0O (ORCPT ); Thu, 11 Jul 2019 18:26:14 -0400 Received: by mail-io1-f67.google.com with SMTP id f4so16157226ioh.6; Thu, 11 Jul 2019 15:26:14 -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=B7Q+88/1r0u7c2B6QjPHmF5D3UfMD7VkncBOPB4xqnY=; b=WBoEHXu0KZ4DEZnPjfSX+XW+fGJCDiT5qC5+TC0Bw9R3Zg5bndhAmFizc7RNrWVpaX iNkFBOdQTjpiaAijq/F9tfezaY9SICoZZJbCjjCtxwSxyg+6nh+KscU5fv/gEdi6sqCI hAKC28MCHrf8Dr+jXdjUZDlGKj/Lst9vRID1mTykfPEiM2JPoFp3bw0Bbn/4knPZE25K aML2JaHGoZ6pBA2d0qAlnav+RI/dQHe7x9pzLYzEThPBeYKuzFk9tN1QeEFpDE4T2u0h 42tzZwlLjwT7ptCTYFHHB03PhMsVh9bqav2+AP5pRVRESUDKD609P2FqAIw6rB26jmJX WBTA== 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=B7Q+88/1r0u7c2B6QjPHmF5D3UfMD7VkncBOPB4xqnY=; b=rDJvgQTqbrxqkaaacWHNb4yYvwmWpa0dUrcSxn/R5fPu459s7Tel6fkcOJOGDVpSHn RisO4dTqCSM+xchpsNcAEyIxh2gA40PxHNLXJ3NcOPuKCnLMqgvqb4V7irkPX7zT03rB b+xRvnbvMMDE0U8ePAUAyGzJD+EQiQrOA8+5D5yVHSvCV/GpbOPcV+tRn4l8GTW9YIS/ jGuGt5/0+wYVYeURWCj5ZaJmadoERFOVzwAPAhShS0gyR2jlbKT8catuRzzbQG8ZCzye 8IBPb00gxONTdD2mcf3x3Jqc4pGrcY9A8dLH0iq90JDLT+evICCdob64KSY78L0Bok6j /C0Q== X-Gm-Message-State: APjAAAVnLsdkMkyWRU+6ILRbgcmEU8AntyJk2D3OeEPh6awgg5tOY1pt 1KoVf41XJ1TqApWBM9lMSHCRC+4V4CZRRg== X-Google-Smtp-Source: APXvYqzIOpFYThRbBahecvJaRJQDIcL+OA8MrF+nPbgf4gJ2Cl91cYTYiwTeyF2E0q03szbbyEW5tQ== X-Received: by 2002:a6b:641a:: with SMTP id t26mr6958337iog.3.1562883973499; Thu, 11 Jul 2019 15:26:13 -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 s2sm4478982ioj.8.2019.07.11.15.26.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:12 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 02/11] PCI: Move PME declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:32 -0600 Message-Id: <20190711222341.111556-3-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 7e30fbde5c84..800fe8989f48 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -85,6 +85,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_keep_suspended(struct pci_dev *dev); diff --git a/include/linux/pci.h b/include/linux/pci.h index 3bda6a87a815..cedebb08a32d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1187,8 +1187,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 Thu Jul 11 22:23:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040843 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 8AC4414DB for ; Thu, 11 Jul 2019 22:26:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B54D28B7F for ; Thu, 11 Jul 2019 22:26:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FEC528B80; Thu, 11 Jul 2019 22:26:58 +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 1E79A28B82 for ; Thu, 11 Jul 2019 22:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728890AbfGKW0R (ORCPT ); Thu, 11 Jul 2019 18:26:17 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:43825 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728762AbfGKW0Q (ORCPT ); Thu, 11 Jul 2019 18:26:16 -0400 Received: by mail-io1-f66.google.com with SMTP id k20so16112075ios.10; Thu, 11 Jul 2019 15:26:15 -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=ojyucIvKYu7CDUehRCpB+nredG5sCsEyfgfj3qkRIiw=; b=i/mEcKa+xHrz06ZIZEmoKfO8o/1ZFEOiblV2dinwYFXK6eAxvmnu+0vvfkAbwYS6O4 fuAICrMduoNmJHBRxgAXr3bxwCy3RrjtDIpwobjGSj4QOlgWbSowotg9OI3XiSSNKK43 UQEru/kEstdUTG9/lvkyL3okm7v9jVQYdpYCMg1MNwEK9NogLATOPdfsnsaT/q07NdvZ yIvN/NhQUCE5DdOz+bpGkADj5zI5L6QGyl5kJjqZgXolX4xQmTRFYsuZDK9jPdixYFCP Qde3xuqEue7CeShjiNMlJRB43SqPt37mwJHiomcrbAlXKyHy/6HhJ9BiIcgkzR5y+Qgx DGAA== 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=ojyucIvKYu7CDUehRCpB+nredG5sCsEyfgfj3qkRIiw=; b=dCP8dOhCILMoLLZ4iXxndTFfLOveB4vnkJbw9CzecJVY/X1Y+OsnRPfNvPELrr6KtC G2sDINpdUMCrRqSFjaBOipLVb50Dg3fYUteHk08bjQnCCjiIReKHqeCYQcHzup+bBiMO WFCNoH1DY2WvKhrRehWt2q6NCd9Bw1ASi+O99UfYM5imAF+78/0eXSYqzSIUUvVxEGdl YMyHRVpHrhGPonYQ6+Io8rVJH9fs+FCNUu7S9KcpYw4DAbuigoRni2FuGrhgeIvbY9BH 0nslDywR8WyoqQniYuDEL8glbtmw7LvLSDLJ6BSz4WvyOJouZwSf91O8vmXeRafk2Jf/ 5enQ== X-Gm-Message-State: APjAAAXkTZMSiA8WOnQPqyiGeBRw7S2Ee4dW3sJF0haeoUF5PG0IbPRM XC1TE+qp8kJ0UAVUUaFyp2Bd68RWJM7adA== X-Google-Smtp-Source: APXvYqxVaWyX7BoBLPXUnidLV1bwccbWvm2pLjuPiRmmJRziC/3nXuJ9jBAfSDZji5oj4xFHzZojEQ== X-Received: by 2002:a5d:940b:: with SMTP id v11mr7205793ion.69.1562883974909; Thu, 11 Jul 2019 15:26:14 -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 s2sm4478982ioj.8.2019.07.11.15.26.13 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:14 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 03/11] PCI: Move *_host_bridge_device() declarations to drivers/pci.pci.h Date: Thu, 11 Jul 2019 16:23:33 -0600 Message-Id: <20190711222341.111556-4-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 drivers/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 800fe8989f48..f2ba33613c21 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -100,6 +100,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 cedebb08a32d..39e609ea316e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -639,9 +639,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 Thu Jul 11 22:23:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040841 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 3788B13BD for ; Thu, 11 Jul 2019 22:26:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29FE328B7F for ; Thu, 11 Jul 2019 22:26:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E8DE28B87; Thu, 11 Jul 2019 22:26:58 +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 B138428B7F for ; Thu, 11 Jul 2019 22:26:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728898AbfGKW0S (ORCPT ); Thu, 11 Jul 2019 18:26:18 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:44715 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbfGKW0R (ORCPT ); Thu, 11 Jul 2019 18:26:17 -0400 Received: by mail-io1-f67.google.com with SMTP id s7so16086039iob.11; Thu, 11 Jul 2019 15:26:16 -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=tB5J2/wqtRLqVSXhsqanry6b574nX1t8eRYt7w0aqcw=; b=bTJr5fSTVteg1zkn9u+Bj/u8lEeQk6RpJCfWjePP9aNRHpTxIk+U2JwkRP2cn70jza TCoMKWc8E66ErT/8863dThZ8ZOW+nxYKKHHvlQuDrUuRLmJpbYZMVJaN4cLv4UF4rEqO QerNts7ijEyvSeYNgyRt76IKf0++sQuzCIzwJZWWBRYTlQ2IjVa4v/vmQkn9HC9K54hN gl7qavNetJA+utE9STOVQdNnDaKP5GxJQukzoXiYjshghaIl+JqghCjkolYmxv/449O6 lKBDrleIKB/ImyiMiGv5hD3l4XQEetk3Ftw6gme7ira/xtMIjJVx0oUrW4CRr8AFco7W wG4Q== 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=tB5J2/wqtRLqVSXhsqanry6b574nX1t8eRYt7w0aqcw=; b=ATLi5L7t45H8wVpgrG9fo6OWsyjCUQd4a8X1Qi0SU47SnZbS833q7r2Jvfey2bkB8R wwiGxgMxgUZHsjW/Qq3ffR/LvaXikX9ugW1B1wdifrj21FB8Y84Izj2ipccK5rHztRD1 7S9uhHEHUoFu8eoBA9dQVMmhv5NEouRgLh4OL/08cdUXKs3WK2E/h19XapVUxlapzAs5 wWFIrfIamM3IKdqzSR4t+SCyLjeNJxSvzFIWGPo6/cE9OBUaCkz3i2W2I/CrV3tMkHeN hK/Q5iKqnxBszSfG0VS1IhR61NBjKA8TJtSXsDWZ65AFgFBSI6krPfTTE0TaVuWxEAAg au6w== X-Gm-Message-State: APjAAAVpklT3glcCmgl+yfpGEe5Rze/JtP1hYlkbil5f3hfgBG0aGfUh d3SQJAqfVJhwqoPmGRtGuqEgjtjtzObBOg== X-Google-Smtp-Source: APXvYqzvttkYZYuof6PBH2+QH6WG8r1tQqxM9JEk4AGtZ1qFXB0pldv5f93GKqTbY4DGleOgjkNSvw== X-Received: by 2002:a02:c615:: with SMTP id i21mr7123006jan.135.1562883976159; Thu, 11 Jul 2019 15:26:16 -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 s2sm4478982ioj.8.2019.07.11.15.26.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:15 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 04/11] PCI: Move PCI Virtual Channel declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:34 -0600 Message-Id: <20190711222341.111556-5-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 f2ba33613c21..6ba790a77be4 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -128,6 +128,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 39e609ea316e..2c5609b5782e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1190,11 +1190,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 Thu Jul 11 22:23:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040837 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 5CE101395 for ; Thu, 11 Jul 2019 22:26:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D25F28B7F for ; Thu, 11 Jul 2019 22:26:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4085228B87; Thu, 11 Jul 2019 22:26:53 +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 E368F28B7F for ; Thu, 11 Jul 2019 22:26:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729105AbfGKW0p (ORCPT ); Thu, 11 Jul 2019 18:26:45 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37777 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728897AbfGKW0T (ORCPT ); Thu, 11 Jul 2019 18:26:19 -0400 Received: by mail-io1-f66.google.com with SMTP id q22so16168311iog.4; Thu, 11 Jul 2019 15:26:18 -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=6C8gOL/gtuVuIQHsRRX9/x6z/r3bgy+YX1I9PN/BOZU=; b=GuF+xPzq4LSpuE2uxDHIOBij3fhmGP9ykR+0TcJhLmXX+KMkco3hoBkcGRi0gEVzy9 ttkal8e2g3EFZGk9goaLOsJE1X+RQdtSnUwzlHSsL+W8sbgBOprbQ6E97yUodnosLEHr tNsEJ+l1Q5Fu8Jy3NKIjXhF71gtrtjSLWF+vSEQXtQVuqPvZ1ofnoK5QOnb/DBPFD/sk 6lOVyWjusnu7P4eGzsnUNTor7NKAQDtEV3eJ1Tpn6VBFzf9Zvu3k0fe6JPdSZ0q/Ak9+ Yc02ex4cwvoGhuh8rudmo5KV2YaA59srvHcGGP9BOUYPjObod5Y54ei9PnAdYrwTcfiT 9zVA== 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=6C8gOL/gtuVuIQHsRRX9/x6z/r3bgy+YX1I9PN/BOZU=; b=ul0/qEYja9tEXUyhIHuTtDjCxkwmVwiqrYSDPNUFPc43Zjp0/L+4ev0tLmR6BNGbkF b+mMnbP99I6kQJQZyi8zR81rEhNcH1uWNPurYtXboITxDLFEz4QjS2ihEjqIVAylXWMa kYknIc7orOzDNarEX7aufdyr8tGFegOlWNXdLeSO+wrH8uO8BMSUVFuc90bmTzRw7XPE nHAtfpOhcWsbgQk4sdNDYOHQKVqX+A7kqlHcocSXUDP+SBSWudKyEvFvRLtXWRf3NgBu LvFNfDDk0iekHDDgix2/4djJqfzZ7u4b8kd0ZAWjwgujoHDoSN6d6TUNMwh28gkbqmE6 0WuA== X-Gm-Message-State: APjAAAWJR7Lxb8DNSOViaw1pRlfzWN9k35BhR6u9/nTNfuBJG71ZMW73 4ig5H8L4leW073pgT3eF85vxZy3dItQc0g== X-Google-Smtp-Source: APXvYqwwpXtbyuHvI2vT6Wh2p81PzzOTHXLApB03nwZ1VuJmzZlUiQjwOPovu2mv7VlJVikr1WXw1g== X-Received: by 2002:a02:37d6:: with SMTP id r205mr7272845jar.57.1562883977615; Thu, 11 Jul 2019 15:26:17 -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 s2sm4478982ioj.8.2019.07.11.15.26.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:16 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 05/11] PCI: Move pci_hotplug_*_size declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:35 -0600 Message-Id: <20190711222341.111556-6-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 6ba790a77be4..ee7b7383e497 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -206,6 +206,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 2c5609b5782e..ead399b8d136 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1957,10 +1957,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 Thu Jul 11 22:23:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040839 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 C78FD14DB for ; Thu, 11 Jul 2019 22:26:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B994228B80 for ; Thu, 11 Jul 2019 22:26:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADAB528B82; Thu, 11 Jul 2019 22:26:53 +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 5AE8428B88 for ; Thu, 11 Jul 2019 22:26:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728815AbfGKW0o (ORCPT ); Thu, 11 Jul 2019 18:26:44 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37918 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728918AbfGKW0U (ORCPT ); Thu, 11 Jul 2019 18:26:20 -0400 Received: by mail-io1-f66.google.com with SMTP id j6so16156840ioa.5; Thu, 11 Jul 2019 15:26:19 -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=ennLunQ9TkM3x4gwpKDDEDl4f5cWuKJXyPLOxDF+qM4=; b=nN3PEeSVF2l2B8RlLtBVwI8FPxD8xPMi++HNTi9R3R12EClqhhVzxA9PjwqnZnFyl8 VO79EMTbnduhRPzJAyeIoWMBiJXNnfOc1VF2fkk9puHqz42ewP5O49JM35wnfoVc+bbV H63dIiomvbzJUlPD9AgF37G6ZzHQRecxEXs17rp1a6EOqSFAFWUpEkF9EP4ykSxg4sHR D89BiNJTd+zE949Q+lSk2O2gAWvLzMYFj+qqR/PHD6n57II+GaI91zozR4WAYiW7tK3N 3ZIC7rRdTge47nqA6MweVHCDHxm8/nfCxovbPBLoy+sTnHstyw8E+NWeEnS5yWY11KH6 49pQ== 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=ennLunQ9TkM3x4gwpKDDEDl4f5cWuKJXyPLOxDF+qM4=; b=tGtYU6k3TdnPSlm947cTENRDBaWFBOtZeeHjI2MsXWUS8m9KwfKUFkPgbTcqzgMls2 Yl2eTo63L7qKI/fwI01AWwn3SwxjpA/LDoX53hejTrCXbWxU8CJBtPaY5CsRhHhtEOje 3DZ7zBUmVMSMSTGV47+OX5nEWdHFtpTXWEo3ZIy5Oemm7wZRlJ/OTbFjS2CB4xCi3Juu t3HT8a173kueSDRfo/AMQCHaH1+EKgDzeupAY2rSp5UZRHIg01swOzSyC0mQiI+O6mhz ba6jWc2BnlgAG0aeXCPYDiFSnazh6qXs39ziF/EPhaXis/GBXeWiHvFyYjWfr41komA7 XV1A== X-Gm-Message-State: APjAAAWSk0xdYUyaaD9DlTa41KJVjrEguuApYvL2tC0lkSO5p0PU/pFq ENMjeUcRohr8nH42m36KUuMTFtFre2zFwg== X-Google-Smtp-Source: APXvYqw//z5PUYsXOOIBkVQ8XPE7Al9+P9DuHpP3uy5ZK8whRC/nhkVkTPrBhiIzeNoHUSKXrBarVA== X-Received: by 2002:a02:b812:: with SMTP id o18mr7819714jam.64.1562883978929; Thu, 11 Jul 2019 15:26:18 -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 s2sm4478982ioj.8.2019.07.11.15.26.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:18 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 06/11] PCI: Move pci_bus_* declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:36 -0600 Message-Id: <20190711222341.111556-7-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 | 3 +++ include/linux/pci.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index ee7b7383e497..9b87309f5c12 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -270,6 +270,9 @@ 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) \ ((speed) == PCIE_SPEED_16_0GT ? "16 GT/s" : \ diff --git a/include/linux/pci.h b/include/linux/pci.h index ead399b8d136..54946423d901 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1233,8 +1233,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 Thu Jul 11 22:23:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040827 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 45D2F1395 for ; Thu, 11 Jul 2019 22:26:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3655A28B7F for ; Thu, 11 Jul 2019 22:26:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29DC628B82; Thu, 11 Jul 2019 22:26:24 +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 C991928B7F for ; Thu, 11 Jul 2019 22:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728955AbfGKW0W (ORCPT ); Thu, 11 Jul 2019 18:26:22 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:42813 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728946AbfGKW0V (ORCPT ); Thu, 11 Jul 2019 18:26:21 -0400 Received: by mail-io1-f66.google.com with SMTP id u19so16098946ior.9; Thu, 11 Jul 2019 15:26:21 -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=Rs/77Ks02ouzvxcSMVSV/vw4rnOl+hQ1vPq1Vy99eWE=; b=DgShit4pGId1J6NNp887ww+CAb0MlNaHTKs9Qmd/u5xt7RHXX4GbCU60yPh7gdqSlR ZQ7XqbShLg0HOqqT/iK97Lm0csRmuBLAi58g8MlHVshloyN3ZkdgFa6R63Y4l1l6YAWZ GcUfKBmWWVsF/B27AanLMHk99sUkDjCqOu6JAAByKcUfkUUziwlA5T8SQFL5bjD1Myt/ jPKd0ajhwbx8XsHeq1HHBtCA1v5L/nyjaplYE4KkDMVbcpSkxIN0EkG1gqy7QVo5n5um rR/ZhoZilK+XaaOfTUyuPoux85nlunv/y8vj5KcMFNTuTkmQJTw9YXFyZwq0XifkW/u1 Iubg== 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=Rs/77Ks02ouzvxcSMVSV/vw4rnOl+hQ1vPq1Vy99eWE=; b=JvWMIvt4qW0sj6fxBBlMP5xpiClOdFwsoaCHrkp9/witAVLgdMaQvM19iNCg0mQQnj gkW4G+aP4wgujQc0dHGwkvpcBbj3JlP8VMGHRTECBGnCI8GIzuqp9+TzgzZo3Y9Fh4eH c9h3rLxsjwLP2DFVG4kXkuLf4dXNeFWFJ0of4pD3LkPVHko2TduTIOZyJY5jaMlo6SqX pRfSOw/ueYl2pgBWQ6/jFllpePBOCMBI7vTLaEhRe8Z1MH6GF/mdEYW5mVYjw2tCk4pt kqX7OZ6s4q+WAa7JSSq4tyGgN72d9vorR18bd0hdjs0NiBK85c1FNEjfiKbfez/GrEYu ymcg== X-Gm-Message-State: APjAAAWSlmRAn4En9wt4zqMIApFN8Y4V5y+h6ZchmADnnkdAgDWm2rNN IHxtt3NO7DbMfsOqbQtYUeMwDls9K57anA== X-Google-Smtp-Source: APXvYqwwFxZ4u7zTAnZJyMBxsUUa2L1OhTVEdQawNb4k3T4pRBNZ9TOoN9I4ZK3WZgjS/I1u595VyA== X-Received: by 2002:a6b:6611:: with SMTP id a17mr6719902ioc.179.1562883980447; Thu, 11 Jul 2019 15:26: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 s2sm4478982ioj.8.2019.07.11.15.26.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:19 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 07/11] PCI: Move pcie_update_link_speed() to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:37 -0600 Message-Id: <20190711222341.111556-8-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 9b87309f5c12..59321488da03 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -295,6 +295,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 54946423d901..3221d9f61ab4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -938,7 +938,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 Thu Jul 11 22:23:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040835 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 CF1B513BD for ; Thu, 11 Jul 2019 22:26:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD7C228B7F for ; Thu, 11 Jul 2019 22:26:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF28228B82; Thu, 11 Jul 2019 22:26:44 +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 5EBCD28B7F for ; Thu, 11 Jul 2019 22:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728993AbfGKW0j (ORCPT ); Thu, 11 Jul 2019 18:26:39 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:36818 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728960AbfGKW0X (ORCPT ); Thu, 11 Jul 2019 18:26:23 -0400 Received: by mail-io1-f67.google.com with SMTP id o9so16211972iom.3; Thu, 11 Jul 2019 15:26: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=tLtPErnr+10mn/XsYOjDK3yHjlI3l+cv/3zQtxd52ew=; b=vAHxja5YQ/17QpJhY0YbiqGLiWC3QUVwEZWVnncNW2rXsmHpTwA5W4kZ/8xD9OnZ0T N4s07/uneatBdzihYNtKyAGLYsscPNce7EI5lYNYtQyIxyVKJ1LTnixBAcbJGQyvYD3D LOCs+MMXw39TkG6ckB4GBcvSdOQyczUQMA6vRWo+3ZkLAFWnspR/bPkDAMyDfIjxp6Ny AMBD1HcjogPFyRx1YeDyFTtThhI3m2phXwhtZhXKwUb3Rf0bcAy5i/wMdaT/naBqorzg o81T+zHv6piOZSTUvzOiAGTOwhS0rpoWwOBUpvZhe1r0NbHlLVGHXOx0kVpKphHot4Nz NyRw== 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=tLtPErnr+10mn/XsYOjDK3yHjlI3l+cv/3zQtxd52ew=; b=Mly4JK7LaeFSUa/80c8/FyRHfa5gOhvUM5pYnnm1JlVsJvb7aAxxDCSfywkxFSbsro k0sUtcTS5+6yBesfSFhCEQVhOqPXR+PYIoLYYq8cZLxpfPjWmUkr0UCPtNPcG+TmZURO rfNmjlQVBXehcxarfOARtgnAxEX/hiA5H/e9YJvHirpW6S96HMChA0BsAYfwggqhODu1 u09ZzUqdoge9fIwazOtexo/7jGfAfra0PRwlaD3Tnk0txg42Ze/p1ukGpiX5Dv9YpxDa KgFso7uGC2h3mrIsAdr2FI0b2RGOyl8wYN1ZVnDwiOwZp+XRsUeNa+/MYhLKZV2b5H8U kFDw== X-Gm-Message-State: APjAAAXNeIPPlu9SBJ4Q/mfiZfaNDFPL/TGOeGhCwqAmX/HuRHI7dC9f DdlVeqoUdQ8swdnHxD8SJe9YNEDlwMOtrQ== X-Google-Smtp-Source: APXvYqxrrWPZB2J+3K2QCgyIVw+lp6xsZ+i3MMFO9R3py1cZ4WR00jvhtOEW3nSoU8AR9K5nox6n1Q== X-Received: by 2002:a02:c487:: with SMTP id t7mr7318479jam.99.1562883981680; Thu, 11 Jul 2019 15:26: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 s2sm4478982ioj.8.2019.07.11.15.26.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:21 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 08/11] PCI: Move pci_ats_init() to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:38 -0600 Message-Id: <20190711222341.111556-9-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 59321488da03..bc677e97a262 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -436,11 +436,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 3221d9f61ab4..263c087b95d5 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1708,13 +1708,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 Thu Jul 11 22:23:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040831 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 77F7613BD for ; Thu, 11 Jul 2019 22:26:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67D5528B7F for ; Thu, 11 Jul 2019 22:26:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59CE128B82; Thu, 11 Jul 2019 22:26:36 +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 0807228B7F for ; Thu, 11 Jul 2019 22:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728994AbfGKW01 (ORCPT ); Thu, 11 Jul 2019 18:26:27 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:34626 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728977AbfGKW0Y (ORCPT ); Thu, 11 Jul 2019 18:26:24 -0400 Received: by mail-io1-f68.google.com with SMTP id k8so16224648iot.1; Thu, 11 Jul 2019 15:26: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=IOIoEJiKcP7vpakpaaAnI3MdiobFP9JXIkK9dclT5Sg=; b=suoYMK+cDcUzj8/bNfNGnbhnCEPaNiRoO75KGYMJ4ENig42Y2CnEvQNCF+wGG6v/9h dlA/qBwi9RZn4p3f3rXKAB+j5u6mHMLpbjv3h/zmY5g5rKaGRuzT9gZhJpC2tZ1P+eml w5Git5WsUAavrL+PvLxgXAAqCaGiH8BNC6/PLthRnHdQ/0r/DwGMgGbFcfyRZlkQRS1m YrBUwqIa4eFJNYpI0NGpCwpdMDd+8FUA7lEPmYkJqgPvTSua+nVlBJ0okxmDCllpsgxm KLBY7QU+wxa2tzVp593DhMbN7/VqdJEXvXS3/gN/HQuwsAHjaiYlnyIJ2/cTQ3dkVvNN rmqg== 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=IOIoEJiKcP7vpakpaaAnI3MdiobFP9JXIkK9dclT5Sg=; b=J0EUNNj3QM6e+dfBIGLkuTyCFOdsVg0p+fVDf/PxS8OWF6eqqed/8wcuF6MiffaY3C 8fa14Hpp71EMuGHc4duMR8UKgTiYFUdyX1zGs3ZTvXC3WQxmp20pUgu5EdCpsaU/taO/ jf/XTZblg0O8TRGy541AaKOBbUkh0b/g+Y8LCo17XXDnyzZfr2uILASlnlVIrtg31FKL CC0Q4zUYjteUIe6pUTNJ5JwCOU6H9s2rGPZ83gQFRo9xq6jSDwptkjr0doPoifvc4Ue8 Cc3eKg0Tt7M/xltwKYSxacpM3mX+KOonZVq6VUFM1BXrTbMj9y8CXlo7QurVaNW+jBn3 paRQ== X-Gm-Message-State: APjAAAXfA1H22MPARnUlPeuq9Zt/qNlhjJdzPdpDlKvGtSHrDzrEul/X eCs1tqBk5XNSS5UoWb04YTrIvAKSBSXcBg== X-Google-Smtp-Source: APXvYqxpUwXIT6ElevR2eXDlrNot95sTB+oFjcn6YUNJWF7Fw0rKUmQ/yfUKiS9TlVbIV2n9W43JGg== X-Received: by 2002:a5d:8049:: with SMTP id b9mr6596133ior.199.1562883983124; Thu, 11 Jul 2019 15:26: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 s2sm4478982ioj.8.2019.07.11.15.26.21 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:22 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 09/11] PCI: Move ECRC declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:39 -0600 Message-Id: <20190711222341.111556-10-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 bc677e97a262..74249c31325c 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -537,6 +537,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 263c087b95d5..8fbe3471e8f0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1501,14 +1501,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 Thu Jul 11 22:23:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040829 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 0FF0F13BD for ; Thu, 11 Jul 2019 22:26:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01C4528B7F for ; Thu, 11 Jul 2019 22:26:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA47D28B82; Thu, 11 Jul 2019 22:26: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 9A9E228B7F for ; Thu, 11 Jul 2019 22:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729005AbfGKW01 (ORCPT ); Thu, 11 Jul 2019 18:26:27 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:37802 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728946AbfGKW00 (ORCPT ); Thu, 11 Jul 2019 18:26:26 -0400 Received: by mail-io1-f68.google.com with SMTP id q22so16168827iog.4; Thu, 11 Jul 2019 15:26: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=TcJ39mrTnrQlLHfGMzt7/5Q8HNdDCCU3tKZkCQ828ZU=; b=uTWK1/58bH92DE6I5OcM0TOKOi08hvLUxO2zwYDSeu+G0xK0fEO+sl+bl8ufZT8Ofs 2ZtGevaZh+JRkImOpVXgC52RU6KvSoo+rq6gunglaY8azo3+IKe9qlPRdm3vwWSogcCn qkF5+dg1WoZI5cOAVLfVk7mglurCY713h5x8o2jC3635Gl93ytO1f92t5HZTwm0VVide YAJ9vp6/cidQ8WSue7C07T0Py06UDSCJeMLZ/9FL0f2IhXkPyZm5nRaUPPMI+OKg+ykQ 2ONZeDHcY9tXpbQHlLZnOoyFd87LrvnUaAfu+R0wa2llPdIhjSZLyT4hJFagt1vcyRLx qsGA== 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=TcJ39mrTnrQlLHfGMzt7/5Q8HNdDCCU3tKZkCQ828ZU=; b=NuH63WvkJxh03/huaLypWyCIl8e/iMpFT06/MawKUyUd7lDzZeblQLVbRtLMZEfMWy bvV0k9/Fu0Tk/6cZH6iEKOyuBAUt70/toi24YsLFdequfEtatq6Uu1jWw7W2Xtu+EQBw TW2zE8VFzY/ZIjqtMzFKriDoa1OLfNqZ46eIoCTTv3/xHRikoK2L6mO3nzOYdhIzVehv Ff9XwTXBytbG47K9fWZKgwvUceATvzEKPd9HoZWZUfEoe2p6XwVR8AO0at4uLUoqHAqx fQ52ktXL7nkLV3beZkxfn+WPKIGsiZZghWmKGhPziudw0c7tP7nu4HFI34PHn8n4ku0r KKpw== X-Gm-Message-State: APjAAAW1irU2PLAa6hQPGFj0WDjCIPgtJb4GCz97NoGgscTdH6BkKhRm 7JvSunskN+xkzGO4hpNHleZkLBeFPumx0w== X-Google-Smtp-Source: APXvYqxR+OqfK3XOrZf7742wsjyMO7kSKYIu8GaWsGPoEx/W2J+txrGujJWRGIegbDsS268MwqGJgg== X-Received: by 2002:a02:7f15:: with SMTP id r21mr7677881jac.120.1562883985001; Thu, 11 Jul 2019 15:26:25 -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 s2sm4478982ioj.8.2019.07.11.15.26.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:24 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 10/11] PCI: Move PTM declaration to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:40 -0600 Message-Id: <20190711222341.111556-11-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 74249c31325c..95bca00ea85a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -547,8 +547,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 8fbe3471e8f0..ea4dfb6b6693 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1503,13 +1503,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 Thu Jul 11 22:23:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kelsey X-Patchwork-Id: 11040833 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 CDF0D1395 for ; Thu, 11 Jul 2019 22:26:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF69628B7F for ; Thu, 11 Jul 2019 22:26:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B41AF28B82; Thu, 11 Jul 2019 22:26:39 +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 56DFA28B7F for ; Thu, 11 Jul 2019 22:26:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728835AbfGKW0f (ORCPT ); Thu, 11 Jul 2019 18:26:35 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:35573 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728993AbfGKW01 (ORCPT ); Thu, 11 Jul 2019 18:26:27 -0400 Received: by mail-io1-f66.google.com with SMTP id m24so16213972ioo.2; Thu, 11 Jul 2019 15:26:27 -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=/DSl25R/ZCYqKafBqZ5mvbsP/zVmzOF+Tc2j+UihA1o=; b=POPW8k6csdMUuVmbWRit+VbrORLtWfDUBb3L/0NWXiay7PhXag0K3CkIXDrrQX7OkA apze0LwAAhm8ow2TTl3gpC5jR4MrKO6cq2MFbQmyhp1AAfrwxiXkVGQV3UZ+MH2nJPcb OfnjluoM55/X5F/1fl5xEE3HWEuWgdFBwRo8EmyucO6LtO7CGE3/hbws3Af5DnpPazpY ULgZq6t21EIlWG9gMrMVFg+38EaeYYg+vy0nFEXhixm5mESRUK55h4mqoAzAU+XraIQd uyZlgk9ZTmy0tNzRI/Pz1cWQ5ma4XKN/c8qiUEwhZWy5Hr6fHTDPh81Ng/FYQimKrIbb lqnA== 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=/DSl25R/ZCYqKafBqZ5mvbsP/zVmzOF+Tc2j+UihA1o=; b=nBosEHkDiz2QPxBbr3UDs31lvU8q+1EGIi//3bhaCA2CZDUBrvtLKWNkYPe/mt6anY cljh0GXTZ9c448ZzH00s4FfXzX+Ka+pb6zzfawimJ/rEF5ViwQPB0dkxot5ABeHDr/rJ bLJ286ExsO3+sWg4zQX3HWUqMXVAxC8rEPT20i+ypSjiEkKtHzb1JgtkHkG5slYfQc8z V7RlMf0nVt3OZ/putwOYEY7iy1a//xH3tv+2GKt8g/DcgZzmjRJel/Xtq1aCFTkRMlWC 4IhNpap2jjQCtwG2oj9k0cAVslkITlgn75JoKN0MIIIz2fDhagaq6L91JnBP//opy/ui IvWg== X-Gm-Message-State: APjAAAXnbMW4mRE0FZupBIGmyMHQWVU1Nt8TGd+Pp58twTFvtSFfDzHa XU+gRsL1huCQN+5ISOBXk0L0PyVk/FQCNA== X-Google-Smtp-Source: APXvYqzaWkAsYLQgjdnEmj1l/5YVqCelq2Oy6oEsw76XTDvCCa1hFWtmV0LG6HXf5yvSy8O9Sj6DOA== X-Received: by 2002:a02:a90a:: with SMTP id n10mr7208197jam.61.1562883986618; Thu, 11 Jul 2019 15:26: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 s2sm4478982ioj.8.2019.07.11.15.26.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 11 Jul 2019 15:26:25 -0700 (PDT) From: Kelsey Skunberg To: linux-pci@vger.kernel.org, bhelgaas@google.com, linux-kernel@vger.kernel.org Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org, skunberg.kelsey@gmail.com Subject: [PATCH 11/11] PCI: Move pci_*_node() declarations to drivers/pci/pci.h Date: Thu, 11 Jul 2019 16:23:41 -0600 Message-Id: <20190711222341.111556-12-skunberg.kelsey@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190711222341.111556-1-skunberg.kelsey@gmail.com> References: <20190711222341.111556-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 | 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 95bca00ea85a..a8d04dac3430 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -588,6 +588,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 @@ -607,6 +611,10 @@ 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 ea4dfb6b6693..cf380544c700 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2206,10 +2206,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, @@ -2219,10 +2215,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,