Skip to content

Commit fa8174a

Browse files
Kefeng Wangpalmer-dabbelt
authored andcommitted
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: Hulk Robot <[email protected]> Signed-off-by: Kefeng Wang <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 0502bee commit fa8174a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/riscv/include/asm/mmio.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#ifndef CONFIG_MMU
1818
#define pgprot_noncached(x) (x)
19+
#define pgprot_writecombine(x) (x)
20+
#define pgprot_device(x) (x)
1921
#endif /* CONFIG_MMU */
2022

2123
/* Generic IO read/write. These perform native-endian accesses. */

arch/riscv/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
470470

471471
#else /* CONFIG_MMU */
472472

473+
#define PAGE_SHARED __pgprot(0)
473474
#define PAGE_KERNEL __pgprot(0)
474475
#define swapper_pg_dir NULL
475476
#define VMALLOC_START 0

0 commit comments

Comments
 (0)