Message ID | 20210811004258.138075-8-vgupta@kernel.org |
---|---|
State | New |
Headers | show |
Series | ARC mm updates to support 3 or 4 levels of paging | expand |
On Tue, Aug 10, 2021 at 05:42:47PM -0700, Vineet Gupta wrote: > and remove the one off uncached definition for ARC > > Signed-off-by: Vineet Gupta <vgupta@kernel.org> > --- > arch/arc/include/asm/pgtable.h | 3 --- > arch/arc/mm/ioremap.c | 3 ++- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h > index 80b57c14b430..b054c14f8bf6 100644 > --- a/arch/arc/include/asm/pgtable.h > +++ b/arch/arc/include/asm/pgtable.h > @@ -103,9 +103,6 @@ > */ > #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) > diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c > index 052bbd8b1e5f..0ee75aca6e10 100644 > --- a/arch/arc/mm/ioremap.c > +++ b/arch/arc/mm/ioremap.c > @@ -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))); But this becomes _PAGE_CACHEABLE now. What did I miss? > } > EXPORT_SYMBOL(ioremap); > > -- > 2.25.1 >
On 8/10/21 10:18 PM, Mike Rapoport wrote: >> - return ioremap_prot(paddr, size, pgprot_val(PAGE_KERNEL_NO_CACHE)); >> + return ioremap_prot(paddr, size, >> + pgprot_val(pgprot_noncached(PAGE_KERNEL))); > But this becomes _PAGE_CACHEABLE now. What did I miss? We now use pgprot_noncached() arch/arc/include/asm/pgtable.h:30:#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) & ~_PAGE_CACHEABLE)) -Vineet
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 80b57c14b430..b054c14f8bf6 100644 --- a/arch/arc/include/asm/pgtable.h +++ b/arch/arc/include/asm/pgtable.h @@ -103,9 +103,6 @@ */ #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) diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c index 052bbd8b1e5f..0ee75aca6e10 100644 --- a/arch/arc/mm/ioremap.c +++ b/arch/arc/mm/ioremap.c @@ -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);
and remove the one off uncached definition for ARC Signed-off-by: Vineet Gupta <vgupta@kernel.org> --- arch/arc/include/asm/pgtable.h | 3 --- arch/arc/mm/ioremap.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-)