1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_POWERPC_TLBFLUSH_RADIX_H 3 #define _ASM_POWERPC_TLBFLUSH_RADIX_H 4 5 struct vm_area_struct; 6 struct mm_struct; 7 struct mmu_gather; 8 9 static inline int mmu_get_ap(int psize) 10 { 11 return mmu_psize_defs[psize].ap; 12 } 13 14 extern void radix__flush_hugetlb_tlb_range(struct vm_area_struct *vma, 15 unsigned long start, unsigned long end); 16 extern void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start, 17 unsigned long end, int psize); 18 extern void radix__flush_pmd_tlb_range(struct vm_area_struct *vma, 19 unsigned long start, unsigned long end); 20 extern void radix__flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 21 unsigned long end); 22 extern void radix__flush_tlb_kernel_range(unsigned long start, unsigned long end); 23 24 extern void radix__local_flush_tlb_mm(struct mm_struct *mm); 25 extern void radix__local_flush_all_mm(struct mm_struct *mm); 26 extern void radix__local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); 27 extern void radix__local_flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr, 28 int psize); 29 extern void radix__tlb_flush(struct mmu_gather *tlb); 30 #ifdef CONFIG_SMP 31 extern void radix__flush_tlb_mm(struct mm_struct *mm); 32 extern void radix__flush_all_mm(struct mm_struct *mm); 33 extern void radix__flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr); 34 extern void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr, 35 int psize); 36 #else 37 #define radix__flush_tlb_mm(mm) radix__local_flush_tlb_mm(mm) 38 #define radix__flush_all_mm(mm) radix__local_flush_all_mm(mm) 39 #define radix__flush_tlb_page(vma,addr) radix__local_flush_tlb_page(vma,addr) 40 #define radix__flush_tlb_page_psize(mm,addr,p) radix__local_flush_tlb_page_psize(mm,addr,p) 41 #endif 42 extern void radix__flush_tlb_pwc(struct mmu_gather *tlb, unsigned long addr); 43 extern void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr); 44 extern void radix__flush_tlb_lpid_va(unsigned long lpid, unsigned long gpa, 45 unsigned long page_size); 46 extern void radix__flush_tlb_lpid(unsigned long lpid); 47 extern void radix__flush_tlb_all(void); 48 extern void radix__flush_tlb_pte_p9_dd1(unsigned long old_pte, struct mm_struct *mm, 49 unsigned long address); 50 #endif 51