iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-gpGsJRJZ3PBBDgjK7y7TUQ@public.gmane.org,
	eddy0596-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: [PATCH v4 15/16] PCI: Remove pci_find_upstream_pcie_bridge()
Date: Thu, 22 May 2014 17:08:58 -0600	[thread overview]
Message-ID: <20140522230857.2856.60347.stgit@bling.home> (raw)
In-Reply-To: <20140522230230.2856.40017.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>

It's broken and has no users.

Signed-off-by: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 drivers/pci/search.c |   35 -----------------------------------
 include/linux/pci.h  |   11 -----------
 2 files changed, 46 deletions(-)

diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index df38f73..b8e65c2 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -104,41 +104,6 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
 	return ret;
 }
 
-/*
- * find the upstream PCIe-to-PCI bridge of a PCI device
- * if the device is PCIE, return NULL
- * if the device isn't connected to a PCIe bridge (that is its parent is a
- * legacy PCI bridge and the bridge is directly connected to bus 0), return its
- * parent
- */
-struct pci_dev *
-pci_find_upstream_pcie_bridge(struct pci_dev *pdev)
-{
-	struct pci_dev *tmp = NULL;
-
-	if (pci_is_pcie(pdev))
-		return NULL;
-	while (1) {
-		if (pci_is_root_bus(pdev->bus))
-			break;
-		pdev = pdev->bus->self;
-		/* a p2p bridge */
-		if (!pci_is_pcie(pdev)) {
-			tmp = pdev;
-			continue;
-		}
-		/* PCI device should connect to a PCIe bridge */
-		if (pci_pcie_type(pdev) != PCI_EXP_TYPE_PCI_BRIDGE) {
-			/* Busted hardware? */
-			WARN_ON_ONCE(1);
-			return NULL;
-		}
-		return pdev;
-	}
-
-	return tmp;
-}
-
 static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr)
 {
 	struct pci_bus *child;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 85ab35e..903c7d6 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1804,15 +1804,4 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
 			   int (*fn)(struct pci_dev *pdev,
 				     u16 alias, void *data), void *data);
 
-/**
- * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
- * @pdev: the PCI device
- *
- * if the device is PCIE, return NULL
- * if the device isn't connected to a PCIe bridge (that is its parent is a
- * legacy PCI bridge and the bridge is directly connected to bus 0), return its
- * parent
- */
-struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
-
 #endif /* LINUX_PCI_H */

  parent reply	other threads:[~2014-05-22 23:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 23:07 [PATCH v4 00/16] PCI/iommu: Fix DMA alias problems Alex Williamson
     [not found] ` <20140522230230.2856.40017.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2014-05-22 23:07   ` [PATCH v4 01/16] PCI: Add DMA alias iterator Alex Williamson
2014-05-22 23:07   ` [PATCH v4 02/16] PCI: define pci_dev_flags as bit shifts Alex Williamson
2014-05-22 23:07   ` [PATCH v4 03/16] PCI: quirk pci_for_each_dma_alias() Alex Williamson
2014-05-22 23:07   ` [PATCH v4 04/16] PCI: quirk dma_alias_devfn for Ricoh devices Alex Williamson
2014-05-22 23:07   ` [PATCH v4 05/16] PCI: quirk dma_alias_devfn for Marvell devices Alex Williamson
     [not found]     ` <20140522230755.2856.19714.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2014-05-23  1:29       ` George Spelvin
2014-05-28 17:55       ` Bjorn Helgaas
2014-05-28 18:04         ` Alex Williamson
2014-05-28 20:54       ` [PATCH v4.1 " Alex Williamson
2014-05-22 23:08   ` [PATCH v4 06/16] PCI: Quirk pci_for_each_dma_alias() for bridges Alex Williamson
2014-05-28 18:00     ` Bjorn Helgaas
     [not found]       ` <20140528180018.GS11907-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-05-28 19:09         ` Alex Williamson
2014-05-28 20:57     ` [PATCH v4.1 " Alex Williamson
2014-05-22 23:08   ` [PATCH v4 07/16] PCI: Add quirks for ASMedia and Tundra bridges Alex Williamson
2014-05-22 23:08   ` [PATCH v4 08/16] iommu: Create central IOMMU group lookup/creation interface Alex Williamson
2014-05-22 23:08   ` [PATCH v4 09/16] iommu/amd: Update to use PCI DMA aliases Alex Williamson
2014-05-22 23:08   ` [PATCH v4 10/16] iommu/amd: Use iommu_group_get_for_dev() Alex Williamson
2014-05-22 23:08   ` [PATCH v4 11/16] iommu/intel: " Alex Williamson
2014-05-22 23:08   ` [PATCH v4 12/16] iommu/intel: Update to use PCI DMA aliases Alex Williamson
2014-05-22 23:08   ` [PATCH v4 13/16] iommu/fsl: Use iommu_group_get_for_dev() for IOMMU groups Alex Williamson
     [not found]     ` <20140522230845.2856.95844.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2014-05-30  9:17       ` Varun Sethi
2014-05-22 23:08   ` [PATCH v4 14/16] iommu: Remove pci.h Alex Williamson
2014-05-22 23:08   ` Alex Williamson [this message]
2014-05-22 23:09   ` [PATCH v4 16/16] PCI: Remove pci_get_dma_source() Alex Williamson
2014-05-28  5:23   ` [PATCH v4 00/16] PCI/iommu: Fix DMA alias problems Pat Erley
2014-05-28 20:29   ` Bjorn Helgaas
     [not found]     ` <20140528202922.GT11907-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-05-28 20:45       ` Alex Williamson
2014-05-30  5:30       ` Andrew Cooks
2014-06-09 18:01   ` Alex Williamson
2014-06-16 14:47   ` Joerg Roedel
     [not found]     ` <20140616144759.GC18986-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-06-16 15:34       ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140522230857.2856.60347.stgit@bling.home \
    --to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=eddy0596-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-gpGsJRJZ3PBBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).