162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef __ASM_SH_TLBFLUSH_H 362306a36Sopenharmony_ci#define __ASM_SH_TLBFLUSH_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * TLB flushing: 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * - flush_tlb_all() flushes all processes TLBs 962306a36Sopenharmony_ci * - flush_tlb_mm(mm) flushes the specified mm context TLB's 1062306a36Sopenharmony_ci * - flush_tlb_page(vma, vmaddr) flushes one page 1162306a36Sopenharmony_ci * - flush_tlb_range(vma, start, end) flushes a range of pages 1262306a36Sopenharmony_ci * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 1362306a36Sopenharmony_ci */ 1462306a36Sopenharmony_ciextern void local_flush_tlb_all(void); 1562306a36Sopenharmony_ciextern void local_flush_tlb_mm(struct mm_struct *mm); 1662306a36Sopenharmony_ciextern void local_flush_tlb_range(struct vm_area_struct *vma, 1762306a36Sopenharmony_ci unsigned long start, 1862306a36Sopenharmony_ci unsigned long end); 1962306a36Sopenharmony_ciextern void local_flush_tlb_page(struct vm_area_struct *vma, 2062306a36Sopenharmony_ci unsigned long page); 2162306a36Sopenharmony_ciextern void local_flush_tlb_kernel_range(unsigned long start, 2262306a36Sopenharmony_ci unsigned long end); 2362306a36Sopenharmony_ciextern void local_flush_tlb_one(unsigned long asid, unsigned long page); 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciextern void __flush_tlb_global(void); 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci#ifdef CONFIG_SMP 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciextern void flush_tlb_all(void); 3062306a36Sopenharmony_ciextern void flush_tlb_mm(struct mm_struct *mm); 3162306a36Sopenharmony_ciextern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, 3262306a36Sopenharmony_ci unsigned long end); 3362306a36Sopenharmony_ciextern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); 3462306a36Sopenharmony_ciextern void flush_tlb_kernel_range(unsigned long start, unsigned long end); 3562306a36Sopenharmony_ciextern void flush_tlb_one(unsigned long asid, unsigned long page); 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#else 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define flush_tlb_all() local_flush_tlb_all() 4062306a36Sopenharmony_ci#define flush_tlb_mm(mm) local_flush_tlb_mm(mm) 4162306a36Sopenharmony_ci#define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) 4262306a36Sopenharmony_ci#define flush_tlb_one(asid, page) local_flush_tlb_one(asid, page) 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define flush_tlb_range(vma, start, end) \ 4562306a36Sopenharmony_ci local_flush_tlb_range(vma, start, end) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define flush_tlb_kernel_range(start, end) \ 4862306a36Sopenharmony_ci local_flush_tlb_kernel_range(start, end) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#endif /* CONFIG_SMP */ 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#endif /* __ASM_SH_TLBFLUSH_H */ 53