riscv: Move nommu pgprot_* macros to pgtable.h
PATCH 1/1 riscv: Move nommu pgprot_* macros to pgtable.h
The mmio.h header file defines some pgprot macros for !CONFIG_MMU, but pgtable.h seems like a better place for them.
Compile tested with defconfig + !CONFIG_MMU.
Cc Kefeng Wang <[email protected]>
Signed-off-by Pekka Enberg <[email protected]>
--- arch/riscv/include/asm/mmio.h | 6 ------ arch/riscv/include/asm/pgtable.h | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-)
arch/riscv/include/asm/mmio.h +0 -6
@@ -14,12 +14,6 @@#include <linux/types.h> #include <asm/mmiowb.h> -#ifndef CONFIG_MMU -#define pgprot_noncached (x) (x) -#define pgprot_writecombine (x) (x) -#define pgprot_device (x) (x) -#endif /* CONFIG_MMU */ -/* Generic IO read/write. These perform native-endian accesses. */ #define __raw_writeb __raw_writebstatic inline void __raw_writeb (u8 val,volatile void __iomem *addr)
arch/riscv/include/asm/pgtable.h +4 -0
@@ -459,6 +459,10 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,static inline void __kernel_map_pages (struct page *page,int numpages,int enable) {} +#define pgprot_noncached (x) (x) +#define pgprot_writecombine (x) (x) +#define pgprot_device (x) (x) +#endif /* !CONFIG_MMU */ #define kern_addr_valid (addr) (1)/* FIXME */
Signature · 7 lines
2.25.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv