summaryrefslogtreecommitdiffstats
path: root/arch/nios2/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-08-07 17:56:08 +0200
committerChristoph Hellwig <hch@lst.de>2019-11-11 17:19:49 +0100
commit5ace77e0b41af6b9a3a8cd189a79270e8840fe0a (patch)
tree892e3885beeaab35e9109e2341c2aa4fe81d119b /arch/nios2/mm
parentalpha: remove the unused __ioremap wrapper (diff)
downloadlinux-5ace77e0b41af6b9a3a8cd189a79270e8840fe0a.tar.xz
linux-5ace77e0b41af6b9a3a8cd189a79270e8840fe0a.zip
nios2: remove __ioremap
The cacheflag argument to __ioremap is always 0, so just implement ioremap directly. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/nios2/mm')
-rw-r--r--arch/nios2/mm/ioremap.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/nios2/mm/ioremap.c b/arch/nios2/mm/ioremap.c
index 3a28177a01eb..7a1a27f3daa3 100644
--- a/arch/nios2/mm/ioremap.c
+++ b/arch/nios2/mm/ioremap.c
@@ -112,8 +112,7 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr,
/*
* Map some physical address range into the kernel address space.
*/
-void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
- unsigned long cacheflag)
+void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
{
struct vm_struct *area;
unsigned long offset;
@@ -139,15 +138,6 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
return NULL;
}
- /*
- * Map uncached objects in the low part of address space to
- * CONFIG_NIOS2_IO_REGION_BASE
- */
- if (IS_MAPPABLE_UNCACHEABLE(phys_addr) &&
- IS_MAPPABLE_UNCACHEABLE(last_addr) &&
- !(cacheflag & _PAGE_CACHED))
- return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr);
-
/* Mappings have to be page-aligned */
offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK;
@@ -158,14 +148,13 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
if (!area)
return NULL;
addr = area->addr;
- if (remap_area_pages((unsigned long) addr, phys_addr, size,
- cacheflag)) {
+ if (remap_area_pages((unsigned long) addr, phys_addr, size, 0)) {
vunmap(addr);
return NULL;
}
return (void __iomem *) (offset + (char *)addr);
}
-EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(ioremap);
/*
* __iounmap unmaps nearly everything, so be careful