diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 1bfdddd9aa48..0836b67124db 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -751,6 +751,14 @@ static inline spinlock_t *huge_pte_lock(struct hstate *h, bool want_pmd_share(struct vm_area_struct *vma, unsigned long addr); +#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE +/* + * ARCHes with special requirements for evicting HUGETLB backing TLB entries can + * implement this. + */ +#define flush_hugetlb_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) +#endif + #ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE static inline bool hugetlb_pmd_shared(pte_t *pte) { diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1f80a7805b25..c67c17ec27a7 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4629,14 +4629,6 @@ same_page: return i ? i : err; } -#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE -/* - * ARCHes with special requirements for evicting HUGETLB backing TLB entries can - * implement this. - */ -#define flush_hugetlb_tlb_range(vma, addr, end) flush_tlb_range(vma, addr, end) -#endif - unsigned long hugetlb_change_protection(struct vm_area_struct *vma, unsigned long address, unsigned long end, pgprot_t newprot) {