Skip to content

Commit

Permalink
riscv: Add pgprot_writecombine/device and PAGE_SHARED defination if N…
Browse files Browse the repository at this point in the history
…OMMU

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
  • Loading branch information
Kefeng Wang authored and Palmer Dabbelt committed May 13, 2020
1 parent 0502bee commit fa8174a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/riscv/include/asm/mmio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa8174a

Please sign in to comment.