1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_TLBFLUSH_RADIX_H
3 #define _ASM_POWERPC_TLBFLUSH_RADIX_H
9 static inline int mmu_get_ap(int psize
)
11 return mmu_psize_defs
[psize
].ap
;
14 #ifdef CONFIG_PPC_RADIX_MMU
15 extern void radix__tlbiel_all(unsigned int action
);
16 extern void radix__flush_tlb_lpid_page(unsigned int lpid
,
18 unsigned long page_size
);
19 extern void radix__flush_pwc_lpid(unsigned int lpid
);
20 extern void radix__flush_all_lpid(unsigned int lpid
);
21 extern void radix__flush_all_lpid_guest(unsigned int lpid
);
23 static inline void radix__tlbiel_all(unsigned int action
) { WARN_ON(1); };
24 static inline void radix__flush_tlb_lpid_page(unsigned int lpid
,
26 unsigned long page_size
)
30 static inline void radix__flush_pwc_lpid(unsigned int lpid
)
34 static inline void radix__flush_all_lpid(unsigned int lpid
)
38 static inline void radix__flush_all_lpid_guest(unsigned int lpid
)
44 extern void radix__flush_hugetlb_tlb_range(struct vm_area_struct
*vma
,
45 unsigned long start
, unsigned long end
);
46 extern void radix__flush_tlb_range_psize(struct mm_struct
*mm
, unsigned long start
,
47 unsigned long end
, int psize
);
48 extern void radix__flush_pmd_tlb_range(struct vm_area_struct
*vma
,
49 unsigned long start
, unsigned long end
);
50 extern void radix__flush_tlb_range(struct vm_area_struct
*vma
, unsigned long start
,
52 extern void radix__flush_tlb_kernel_range(unsigned long start
, unsigned long end
);
54 extern void radix__local_flush_tlb_mm(struct mm_struct
*mm
);
55 extern void radix__local_flush_all_mm(struct mm_struct
*mm
);
56 extern void radix__local_flush_tlb_page(struct vm_area_struct
*vma
, unsigned long vmaddr
);
57 extern void radix__local_flush_tlb_page_psize(struct mm_struct
*mm
, unsigned long vmaddr
,
59 extern void radix__tlb_flush(struct mmu_gather
*tlb
);
61 extern void radix__flush_tlb_mm(struct mm_struct
*mm
);
62 extern void radix__flush_all_mm(struct mm_struct
*mm
);
63 extern void radix__flush_tlb_page(struct vm_area_struct
*vma
, unsigned long vmaddr
);
64 extern void radix__flush_tlb_page_psize(struct mm_struct
*mm
, unsigned long vmaddr
,
67 #define radix__flush_tlb_mm(mm) radix__local_flush_tlb_mm(mm)
68 #define radix__flush_all_mm(mm) radix__local_flush_all_mm(mm)
69 #define radix__flush_tlb_page(vma,addr) radix__local_flush_tlb_page(vma,addr)
70 #define radix__flush_tlb_page_psize(mm,addr,p) radix__local_flush_tlb_page_psize(mm,addr,p)
72 extern void radix__flush_tlb_pwc(struct mmu_gather
*tlb
, unsigned long addr
);
73 extern void radix__flush_tlb_collapsed_pmd(struct mm_struct
*mm
, unsigned long addr
);
74 extern void radix__flush_tlb_all(void);