Skip to content

Commit

Permalink
riscv: pgtable: Fix __kernel_map_pages build error if NOMMU
Browse files Browse the repository at this point in the history
riscv64-none-linux-gnu-ld: mm/page_alloc.o: in function `.L0 ':
page_alloc.c:(.text+0xd34): undefined reference to `__kernel_map_pages'
riscv64-none-linux-gnu-ld: page_alloc.c:(.text+0x104a): undefined reference to `__kernel_map_pages'
riscv64-none-linux-gnu-ld: mm/page_alloc.o: in function `__pageblock_pfn_to_page':
page_alloc.c:(.text+0x145e): undefined reference to `__kernel_map_pages'

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 14, 2020
1 parent 6986841 commit 9a6630a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/riscv/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,

#define TASK_SIZE 0xffffffffUL

static inline void __kernel_map_pages(struct page *page, int numpages, int enable) {}

#endif /* !CONFIG_MMU */

#define kern_addr_valid(addr) (1) /* FIXME */
Expand Down

0 comments on commit 9a6630a

Please sign in to comment.