Unverified Commit fa8174aa authored by Kefeng Wang's avatar Kefeng Wang Committed by Palmer Dabbelt
Browse files

riscv: Add pgprot_writecombine/device and PAGE_SHARED defination if NOMMU



Some drivers use PAGE_SHARED, pgprot_writecombine()/pgprot_device(),
add the defination to fix build error if NOMMU.

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 0502bee3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#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. */
+1 −0
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,

#else /* CONFIG_MMU */

#define PAGE_SHARED		__pgprot(0)
#define PAGE_KERNEL		__pgprot(0)
#define swapper_pg_dir		NULL
#define VMALLOC_START		0