linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: nacc@us.ibm.com
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, miltonm@bga.com,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: [RFC PATCH 08/11] ppc/iommu: remove unneeded pci_dma_bus_setup_pSeriesLP
Date: Fri,  8 Oct 2010 10:33:09 -0700	[thread overview]
Message-ID: <1286559192-10898-9-git-send-email-nacc@us.ibm.com> (raw)
In-Reply-To: <1286559192-10898-1-git-send-email-nacc@us.ibm.com>

The work done in pci_dma_bus_setup_pSeriesLP will be done in
pci_dma_dev_setup_pSeriesLP, and therefore we can remove the bus setup
function for lpar.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
 arch/powerpc/platforms/pseries/iommu.c |   43 --------------------------------
 1 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9d564b9..d8bb9be 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -417,47 +417,6 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
 	pr_debug("ISA/IDE, window size is 0x%llx\n", pci->phb->dma_window_size);
 }
 
-
-static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
-{
-	struct iommu_table *tbl;
-	struct device_node *dn, *pdn;
-	struct pci_dn *ppci;
-	const void *dma_window = NULL;
-
-	dn = pci_bus_to_OF_node(bus);
-
-	pr_debug("pci_dma_bus_setup_pSeriesLP: setting up bus %s\n",
-		 dn->full_name);
-
-	/* Find nearest ibm,dma-window, walking up the device tree */
-	for (pdn = dn; pdn != NULL; pdn = pdn->parent) {
-		dma_window = of_get_property(pdn, "ibm,dma-window", NULL);
-		if (dma_window != NULL)
-			break;
-	}
-
-	if (dma_window == NULL) {
-		pr_debug("  no ibm,dma-window property !\n");
-		return;
-	}
-
-	ppci = PCI_DN(pdn);
-
-	pr_debug("  parent is %s, iommu_table: 0x%p\n",
-		 pdn->full_name, ppci->iommu_table);
-
-	if (!ppci->iommu_table) {
-		tbl = kzalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
-				   ppci->phb->node);
-		iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window,
-			bus->number);
-		ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
-		pr_debug("  created table: %p\n", ppci->iommu_table);
-	}
-}
-
-
 static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
 {
 	struct device_node *dn;
@@ -547,7 +506,6 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
 #else  /* CONFIG_PCI */
 #define pci_dma_bus_setup_pSeries	NULL
 #define pci_dma_dev_setup_pSeries	NULL
-#define pci_dma_bus_setup_pSeriesLP	NULL
 #define pci_dma_dev_setup_pSeriesLP	NULL
 #endif /* !CONFIG_PCI */
 
@@ -588,7 +546,6 @@ void iommu_init_early_pSeries(void)
 			ppc_md.tce_free	 = tce_free_pSeriesLP;
 		}
 		ppc_md.tce_get   = tce_get_pSeriesLP;
-		ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pSeriesLP;
 		ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_pSeriesLP;
 	} else {
 		ppc_md.tce_build = tce_build_pSeries;
-- 
1.7.1

  parent reply	other threads:[~2010-10-08 17:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 17:33 [RFC PATCH 00/11] ppc: enable dynamic dma window support Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 01/11] macio: ensure all dma routines get copied over Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 02/11] ppc: allow direct and iommu to coexist Nishanth Aravamudan
2010-10-08 23:38   ` Benjamin Herrenschmidt
2010-10-08 17:33 ` [RFC PATCH 03/11] ppc: Create ops to choose between direct window and iommu based on device mask Nishanth Aravamudan
2010-10-08 23:43   ` Benjamin Herrenschmidt
2010-10-08 23:44   ` Benjamin Herrenschmidt
2010-10-10 15:09     ` FUJITA Tomonori
2010-10-10 23:41       ` Benjamin Herrenschmidt
2010-10-08 17:33 ` [RFC PATCH 04/11] ppc: add memory_hotplug_max Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 05/11] ppc: do not search for dma-window property on dlpar remove Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 06/11] ppc: checking for pdn->parent is redundant Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 07/11] ppc/iommu: do not need to check for dma_window == NULL Nishanth Aravamudan
2010-10-08 17:33 ` Nishanth Aravamudan [this message]
2010-10-08 17:33 ` [RFC PATCH 09/11] ppc/iommu: pass phb only to iommu_table_setparms_lpar Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 10/11] ppc/iommu: add routines to pseries iommu to map tces 1-1 Nishanth Aravamudan
2010-10-08 17:33 ` [RFC PATCH 11/11] ppc: add dynamic dma window support Nishanth Aravamudan

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=1286559192-10898-9-git-send-email-nacc@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=anton@samba.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=paulus@samba.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).