From patchwork Thu Jul 30 16:55:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 6905781 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC7EE9F358 for ; Thu, 30 Jul 2015 17:48:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E27332054D for ; Thu, 30 Jul 2015 17:48:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15D44205F4 for ; Thu, 30 Jul 2015 17:48:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKrus-0003xc-6x; Thu, 30 Jul 2015 17:46:50 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZKruI-0003oR-CQ for linux-arm-kernel@bombadil.infradead.org; Thu, 30 Jul 2015 17:46:14 +0000 Received: from mga11.intel.com ([192.55.52.93]) by merlin.infradead.org with esmtp (Exim 4.85 #2 (Red Hat Linux)) id 1ZKrCe-0002Zz-3v for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2015 17:01:10 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 30 Jul 2015 10:00:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,577,1432623600"; d="scan'208";a="616174125" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.11]) by orsmga003.jf.intel.com with ESMTP; 30 Jul 2015 10:00:44 -0700 Subject: [PATCH v3 15/24] libnvdimm, pmem: push call to ioremap_cache out of line From: Dan Williams To: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com Date: Thu, 30 Jul 2015 12:55:02 -0400 Message-ID: <20150730165502.33962.1808.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20150730165155.33962.64121.stgit@dwillia2-desk3.amr.corp.intel.com> References: <20150730165155.33962.64121.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.17.1-8-g92dd MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150730_130108_275168_7CCFC8D7 X-CRM114-Status: GOOD ( 11.95 ) X-Spam-Score: -8.3 (--------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, toshi.kani@hp.com, linux-nvdimm@lists.01.org, mcgrof@suse.com, linux-kernel@vger.kernel.org, rmk+kernel@arm.linux.org.uk, hch@lst.de, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In preparation for deprecating ioremap_cache() push its usage into arch code where it deleted in a later globabl conversion of ioremap_cache() to arch_memremap(). Signed-off-by: Dan Williams --- arch/x86/include/asm/io.h | 7 +------ arch/x86/mm/ioremap.c | 6 ++++++ tools/testing/nvdimm/Kbuild | 2 +- tools/testing/nvdimm/test/iomap.c | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index cc9c61bc1abe..8aeb6456188a 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -248,12 +248,7 @@ static inline void flush_write_buffers(void) #endif } -static inline void __pmem *arch_memremap_pmem(resource_size_t offset, - unsigned long size) -{ - return (void __force __pmem *) ioremap_cache(offset, size); -} - +void __pmem *arch_memremap_pmem(resource_size_t offset, size_t size); #endif /* __KERNEL__ */ extern void native_io_delay(void); diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index ce53e6cff75c..dcaadc6a125b 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -317,6 +317,12 @@ void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size) } EXPORT_SYMBOL(ioremap_cache); +void __pmem *arch_memremap_pmem(resource_size_t offset, size_t size) +{ + return (void __force __pmem *) ioremap_cache(offset, size); +} +EXPORT_SYMBOL(arch_memremap_pmem); + void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size, unsigned long prot_val) { diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild index f56914c7929b..de2912ea78e8 100644 --- a/tools/testing/nvdimm/Kbuild +++ b/tools/testing/nvdimm/Kbuild @@ -1,7 +1,7 @@ ldflags-y += --wrap=ioremap_wt ldflags-y += --wrap=ioremap_wc ldflags-y += --wrap=devm_ioremap_nocache -ldflags-y += --wrap=ioremap_cache +ldflags-y += --wrap=arch_memremap_pmem ldflags-y += --wrap=ioremap_nocache ldflags-y += --wrap=iounmap ldflags-y += --wrap=__request_region diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c index 64bfaa50831c..f8486f98f860 100644 --- a/tools/testing/nvdimm/test/iomap.c +++ b/tools/testing/nvdimm/test/iomap.c @@ -80,11 +80,11 @@ void __iomem *__wrap_devm_ioremap_nocache(struct device *dev, } EXPORT_SYMBOL(__wrap_devm_ioremap_nocache); -void __iomem *__wrap_ioremap_cache(resource_size_t offset, unsigned long size) +void *__wrap_arch_memremap_pmem(resource_size_t offset, size_t size) { - return __nfit_test_ioremap(offset, size, ioremap_cache); + return __nfit_test_ioremap(offset, size, arch_memremap_pmem); } -EXPORT_SYMBOL(__wrap_ioremap_cache); +EXPORT_SYMBOL(__wrap_arch_memremap_pmem); void __iomem *__wrap_ioremap_nocache(resource_size_t offset, unsigned long size) {