diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-02-22 17:02:08 +0300 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-04-04 11:26:42 +0300 |
commit | 9ab9e4fce45379cb6a7dbf87cf8f8e6ba01853c2 (patch) | |
tree | 905b07720628e6a24a1f719f0af05543712ef66e /arch/arm/mm/nommu.c | |
parent | c269cba35b061181bc23c470809c00e8f71e535a (diff) | |
download | linux-9ab9e4fce45379cb6a7dbf87cf8f8e6ba01853c2.tar.xz |
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.c | 5 |
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) { } |