arm64: Implement ioremap_np() to map MMIO as nGnRnE
authorHector Martin <marcan@marcan.st>
Thu, 11 Feb 2021 12:37:48 +0000 (21:37 +0900)
committerHector Martin <marcan@marcan.st>
Thu, 8 Apr 2021 11:18:38 +0000 (20:18 +0900)
This is used on Apple ARM platforms, which require most MMIO
(except PCI devices) to be mapped as nGnRnE.

Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
arch/arm64/include/asm/io.h

index 5ea8656..953b870 100644 (file)
@@ -169,6 +169,7 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
 
 #define ioremap(addr, size)            __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
 #define ioremap_wc(addr, size)         __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
+#define ioremap_np(addr, size)         __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRnE))
 
 /*
  * PCI configuration space mapping function.