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: linuxppc-dev@lists.ozlabs.org, miltonm@bga.com,
	linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
	Olof Johansson <olof@lixom.net>, Yinghai Lu <yinghai@kernel.org>
Subject: [PATCH 3/7] ppc/pasemi: clean up pasemi iommu table initializations
Date: Mon, 18 Oct 2010 10:27:00 -0700	[thread overview]
Message-ID: <1287422825-14999-4-git-send-email-nacc@us.ibm.com> (raw)
In-Reply-To: <1287422825-14999-1-git-send-email-nacc@us.ibm.com>

No need for empty helpers with iommu off, the ppc_md hooks are optional.

The direct_dma_ops are the default pci_dma_ops, so no need to set in the
them iommu off case.

No need to set the device tree device_node pci node iommu pointer, its
only used for dlpar remove.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Olof Johansson <olof@lixom.net>
---
 arch/powerpc/platforms/pasemi/iommu.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 1f9fb2c..14943ef 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -156,20 +156,12 @@ static void iommu_table_iobmap_setup(void)
 
 static void pci_dma_bus_setup_pasemi(struct pci_bus *bus)
 {
-	struct device_node *dn;
-
 	pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self);
 
 	if (!iommu_table_iobmap_inited) {
 		iommu_table_iobmap_inited = 1;
 		iommu_table_iobmap_setup();
 	}
-
-	dn = pci_bus_to_OF_node(bus);
-
-	if (dn)
-		PCI_DN(dn)->iommu_table = &iommu_table_iobmap;
-
 }
 
 
@@ -192,9 +184,6 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
 	set_iommu_table_base(&dev->dev, &iommu_table_iobmap);
 }
 
-static void pci_dma_bus_setup_null(struct pci_bus *b) { }
-static void pci_dma_dev_setup_null(struct pci_dev *d) { }
-
 int __init iob_init(struct device_node *dn)
 {
 	unsigned long tmp;
@@ -251,14 +240,8 @@ void __init iommu_init_early_pasemi(void)
 	iommu_off = of_chosen &&
 			of_get_property(of_chosen, "linux,iommu-off", NULL);
 #endif
-	if (iommu_off) {
-		/* Direct I/O, IOMMU off */
-		ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null;
-		ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null;
-		set_pci_dma_ops(&dma_direct_ops);
-
+	if (iommu_off)
 		return;
-	}
 
 	iob_init(NULL);
 
-- 
1.7.1

  parent reply	other threads:[~2010-10-18 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1287422825-14999-1-git-send-email-nacc@us.ibm.com>
2010-10-18 17:26 ` [PATCH 1/7] microblaze: pci-common cleanup Nishanth Aravamudan
2010-10-20  5:31   ` Michal Simek
2010-11-01  6:29   ` Re: Michal Simek
2010-10-18 17:26 ` [PATCH 2/7] ppc/vio: use dma ops helpers Nishanth Aravamudan
2010-10-18 17:27 ` Nishanth Aravamudan [this message]
2010-10-18 17:27 ` [PATCH 4/7] ppc/cell: beat dma ops cleanup Nishanth Aravamudan
2010-10-18 17:27 ` [PATCH 5/7] ppc/dart: iommu table cleanup Nishanth Aravamudan
2010-10-18 17:27 ` [PATCH 6/7] ppc/pseries: iommu cleanup Nishanth Aravamudan
2010-10-18 17:27 ` [PATCH 7/7] ppc64 iommu: use coherent_dma_mask for alloc_coherent 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=1287422825-14999-4-git-send-email-nacc@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=yinghai@kernel.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).