Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030216AbbGYCpU (ORCPT ); Fri, 24 Jul 2015 22:45:20 -0400 Received: from mga01.intel.com ([192.55.52.88]:44273 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030179AbbGYCpR (ORCPT ); Fri, 24 Jul 2015 22:45:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,542,1432623600"; d="scan'208";a="769352333" Subject: [PATCH v2 17/25] intel-iommu: switch from ioremap_cache to memremap From: Dan Williams To: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com Cc: linux-arch@vger.kernel.org, toshi.kani@hp.com, linux-nvdimm@ml01.01.org, Joerg Roedel , linux-kernel@vger.kernel.org, rmk+kernel@arm.linux.org.uk, David Woodhouse , hch@lst.de, linux-arm-kernel@lists.infradead.org Date: Fri, 24 Jul 2015 22:39:33 -0400 Message-ID: <20150725023933.8664.85856.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20150725023649.8664.59145.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20150725023649.8664.59145.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2736 Lines: 89 In preparation for deprecating ioremap_cache() convert its usage in intel-iommu to memremap. This also eliminates the mishandling of the __iomem annotation in the implementation. Cc: David Woodhouse Cc: Joerg Roedel Signed-off-by: Dan Williams --- drivers/iommu/intel-iommu.c | 10 ++++++---- drivers/iommu/intel_irq_remapping.c | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a98a7b27aca1..028ad0ff6abb 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -2871,7 +2872,8 @@ static int copy_context_table(struct intel_iommu *iommu, } ret = -ENOMEM; - old_ce = ioremap_cache(old_ce_phys, PAGE_SIZE); + old_ce = memremap(old_ce_phys, PAGE_SIZE, + MEMREMAP_CACHE); if (!old_ce) goto out; @@ -2919,7 +2921,7 @@ static int copy_context_table(struct intel_iommu *iommu, __iommu_flush_cache(iommu, new_ce, VTD_PAGE_SIZE); out_unmap: - iounmap(old_ce); + memunmap(old_ce); out: return ret; @@ -2953,7 +2955,7 @@ static int copy_translation_tables(struct intel_iommu *iommu) if (!old_rt_phys) return -EINVAL; - old_rt = ioremap_cache(old_rt_phys, PAGE_SIZE); + old_rt = memremap(old_rt_phys, PAGE_SIZE, MEMREMAP_CACHE); if (!old_rt) return -ENOMEM; @@ -3002,7 +3004,7 @@ static int copy_translation_tables(struct intel_iommu *iommu) ret = 0; out_unmap: - iounmap(old_rt); + memunmap(old_rt); return ret; } diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 27cdfa84ec5b..1da158d3b3ce 100644 --- a/drivers/iommu/intel_irq_remapping.c +++ b/drivers/iommu/intel_irq_remapping.c @@ -408,7 +408,7 @@ static int iommu_load_old_irte(struct intel_iommu *iommu) size = INTR_REMAP_TABLE_ENTRIES*sizeof(struct irte); /* Map the old IR table */ - old_ir_table = ioremap_cache(irt_phys, size); + old_ir_table = memremap(irt_phys, size, MEMREMAP_CACHE); if (!old_ir_table) return -ENOMEM; @@ -426,7 +426,7 @@ static int iommu_load_old_irte(struct intel_iommu *iommu) bitmap_set(iommu->ir_table->bitmap, i, 1); } - iounmap(old_ir_table); + memunmap(old_ir_table); return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/