Skip to content

Commit ff76e3d

Browse files
Bixuan Cuipalmer-dabbelt
authored andcommitted
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: e88b333 ("riscv: mm: add THP support on 64-bit") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Bixuan Cui <[email protected]> Acked-by: Nanyong Sun <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent cba43c3 commit ff76e3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

arch/riscv/include/asm/pgtable.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,6 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
623623
{
624624
return __pmd(atomic_long_xchg((atomic_long_t *)pmdp, pmd_val(pmd)));
625625
}
626-
627-
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
628-
void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
629-
unsigned long end);
630-
631626
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
632627

633628
/*

arch/riscv/include/asm/tlbflush.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ void flush_tlb_mm(struct mm_struct *mm);
3333
void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
3434
void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
3535
unsigned long end);
36+
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
37+
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
38+
void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
39+
unsigned long end);
40+
#endif
3641
#else /* CONFIG_SMP && CONFIG_MMU */
3742

3843
#define flush_tlb_all() local_flush_tlb_all()

0 commit comments

Comments
 (0)