summaryrefslogtreecommitdiff
path: root/arch/arm/mm/nommu.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-02-22 15:02:08 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-04-04 10:26:42 +0200
commit9ab9e4fce45379cb6a7dbf87cf8f8e6ba01853c2 (patch)
tree905b07720628e6a24a1f719f0af05543712ef66e /arch/arm/mm/nommu.c
parentc269cba35b061181bc23c470809c00e8f71e535a (diff)
ARM: memremap: implement arch_memremap_wb()
The generic memremap() falls back to using ioremap_cache() to create MEMREMAP_WB mappings if the requested region is not already covered by the linear mapping, unless the architecture provides an implementation of arch_memremap_wb(). Since ioremap_cache() is not appropriate on ARM to map memory with the same attributes used for the linear mapping, implement arch_memremap_wb() which does exactly that. Also, relax the WARN() check to allow MT_MEMORY_RW mappings of pfn_valid() pages. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm/mm/nommu.c')
-rw-r--r--arch/arm/mm/nommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index f24967e8ff7f..ca6d8e8ca1f8 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -384,6 +384,11 @@ void __iomem *ioremap_wc(resource_size_t res_cookie, size_t size)
}
EXPORT_SYMBOL(ioremap_wc);
+void *arch_memremap_wb(phys_addr_t phys_addr, size_t size)
+{
+ return (void *)phys_addr;
+}
+
void __iounmap(volatile void __iomem *addr)
{
}