riscv: fix build error when CONFIG_SMP is disabled
Fix build error when disable CONFIG_SMP:
mm/pgtable-generic.o: In function `.L19':
pgtable-generic.c:(.text+0x42): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_huge_clear_flush':
pgtable-generic.c:(.text+0x6c): undefined reference to `flush_pmd_tlb_range'
mm/pgtable-generic.o: In function `pmdp_invalidate':
pgtable-generic.c:(.text+0x162): undefined reference to `flush_pmd_tlb_range'
Fixes: e88b333142
("riscv: mm: add THP support on 64-bit")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Acked-by: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
parent
cba43c31f1
commit
ff76e3d7c3
2 changed files with 5 additions and 5 deletions
|
@ -623,11 +623,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
|
||||||
{
|
{
|
||||||
return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
|
return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
|
|
||||||
void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|
||||||
unsigned long end);
|
|
||||||
|
|
||||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
|
||||||
void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
|
void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
|
||||||
void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
||||||
unsigned long end);
|
unsigned long end);
|
||||||
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
|
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
|
||||||
|
void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
||||||
|
unsigned long end);
|
||||||
|
#endif
|
||||||
#else /* CONFIG_SMP && CONFIG_MMU */
|
#else /* CONFIG_SMP && CONFIG_MMU */
|
||||||
|
|
||||||
#define flush_tlb_all() local_flush_tlb_all()
|
#define flush_tlb_all() local_flush_tlb_all()
|
||||||
|
|
Loading…
Add table
Reference in a new issue