ARC: ioremap: use more commonly used PAGE_KERNEL based uncached flag
authorVineet Gupta <vgupta@kernel.org>
Thu, 12 Sep 2019 19:01:04 +0000 (12:01 -0700)
committerVineet Gupta <vgupta@kernel.org>
Tue, 24 Aug 2021 21:25:48 +0000 (14:25 -0700)
and remove the one off uncached definition for ARC

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
arch/arc/include/asm/pgtable.h
arch/arc/mm/ioremap.c

index 80b57c1..b054c14 100644 (file)
  */
 #define PAGE_KERNEL          __pgprot(_K_PAGE_PERMS | _PAGE_CACHEABLE)
 
-/* ioremap */
-#define PAGE_KERNEL_NO_CACHE __pgprot(_K_PAGE_PERMS)
-
 /* Masks for actual TLB "PD"s */
 #define PTE_BITS_IN_PD0                (_PAGE_GLOBAL | _PAGE_PRESENT | _PAGE_HW_SZ)
 #define PTE_BITS_RWX           (_PAGE_EXECUTE | _PAGE_WRITE | _PAGE_READ)
index 052bbd8..0ee75ac 100644 (file)
@@ -39,7 +39,8 @@ void __iomem *ioremap(phys_addr_t paddr, unsigned long size)
        if (arc_uncached_addr_space(paddr))
                return (void __iomem *)(u32)paddr;
 
-       return ioremap_prot(paddr, size, pgprot_val(PAGE_KERNEL_NO_CACHE));
+       return ioremap_prot(paddr, size,
+                           pgprot_val(pgprot_noncached(PAGE_KERNEL)));
 }
 EXPORT_SYMBOL(ioremap);