• Ard Biesheuvel's avatar
    ARM: memremap: implement arch_memremap_wb() · 9ab9e4fc
    Ard Biesheuvel authored
    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: default avatarDan Williams <dan.j.williams@intel.com>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    9ab9e4fc
ioremap.c 12.1 KB