1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (C) 2005-2017 Andes Technology Corporation
4 #ifndef _ASMNDS32_TLBFLUSH_H
5 #define _ASMNDS32_TLBFLUSH_H
7 #include <linux/spinlock.h>
9 #include <nds32_intrinsic.h>
11 static inline void local_flush_tlb_all(void)
13 __nds32__tlbop_flua();
17 static inline void local_flush_tlb_mm(struct mm_struct *mm)
19 __nds32__tlbop_flua();
23 static inline void local_flush_tlb_kernel_range(unsigned long start,
27 __nds32__tlbop_inv(start);
33 void local_flush_tlb_range(struct vm_area_struct *vma,
34 unsigned long start, unsigned long end);
35 void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
37 #define flush_tlb_all local_flush_tlb_all
38 #define flush_tlb_mm local_flush_tlb_mm
39 #define flush_tlb_range local_flush_tlb_range
40 #define flush_tlb_page local_flush_tlb_page
41 #define flush_tlb_kernel_range local_flush_tlb_kernel_range
43 void update_mmu_cache(struct vm_area_struct *vma,
44 unsigned long address, pte_t * pte);
45 void tlb_migrate_finish(struct mm_struct *mm);