From patchwork Mon Oct 18 17:27:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Aravamudan X-Patchwork-Id: 68219 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 4501B100806 for ; Tue, 19 Oct 2010 04:48:43 +1100 (EST) Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e1.ny.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 3D6BF1007D4; Tue, 19 Oct 2010 04:48:35 +1100 (EST) Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9IHKAfj014947; Mon, 18 Oct 2010 13:20:10 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9IHRLIL253768; Mon, 18 Oct 2010 13:27:22 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9IHRKXF023120; Mon, 18 Oct 2010 13:27:20 -0400 Received: from arkanoid.localdomain (sig-9-65-22-168.mts.ibm.com [9.65.22.168]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9IHRGsp022566; Mon, 18 Oct 2010 13:27:16 -0400 Received: by arkanoid.localdomain (Postfix, from userid 1000) id 86A78F2AEE; Mon, 18 Oct 2010 10:27:10 -0700 (PDT) From: Nishanth Aravamudan To: nacc@us.ibm.com Subject: [PATCH 6/7] ppc/pseries: iommu cleanup Date: Mon, 18 Oct 2010 10:27:03 -0700 Message-Id: <1287422825-14999-7-git-send-email-nacc@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1287422825-14999-1-git-send-email-nacc@us.ibm.com> References: <1287422825-14999-1-git-send-email-nacc@us.ibm.com> Cc: devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, miltonm@bga.com, Paul Mackerras , Anton Blanchard , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org No need to initialize per-cpu pointer to NULL, it is the default. Direct dma ops and no setup are the defaults, no need to set for iommu-off. Signed-off-by: Milton Miller Signed-off-by: Nishanth Aravamudan Reviewed-by: Grant Likely --- arch/powerpc/platforms/pseries/iommu.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index a77bcae..9184db3 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -140,7 +140,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, return ret; } -static DEFINE_PER_CPU(u64 *, tce_page) = NULL; +static DEFINE_PER_CPU(u64 *, tce_page); static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages, unsigned long uaddr, @@ -589,13 +589,8 @@ static struct notifier_block iommu_reconfig_nb = { /* These are called very early. */ void iommu_init_early_pSeries(void) { - if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) { - /* Direct I/O, IOMMU off */ - ppc_md.pci_dma_dev_setup = NULL; - ppc_md.pci_dma_bus_setup = NULL; - set_pci_dma_ops(&dma_direct_ops); + if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) return; - } if (firmware_has_feature(FW_FEATURE_LPAR)) { if (firmware_has_feature(FW_FEATURE_MULTITCE)) {