Lines Matching +full:mm +full:- +full:0

1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/mm.h>
29 /* Global TLB flush for the mm */ in __tlb_flush_idte()
30 asm volatile("idte 0,%1,%0" : : "a" (opt), "a" (asce) : "cc"); in __tlb_flush_idte()
38 unsigned int dummy = 0; in __tlb_flush_global()
40 csp(&dummy, 0, 0); in __tlb_flush_global()
44 * Flush TLB entries for a specific mm on all CPUs (in case gmap is used
47 static inline void __tlb_flush_mm(struct mm_struct *mm) in __tlb_flush_mm() argument
52 atomic_inc(&mm->context.flush_count); in __tlb_flush_mm()
54 cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask); in __tlb_flush_mm()
56 gmap_asce = READ_ONCE(mm->context.gmap_asce); in __tlb_flush_mm()
57 if (cpu_has_idte() && gmap_asce != -1UL) { in __tlb_flush_mm()
60 __tlb_flush_idte(mm->context.asce); in __tlb_flush_mm()
65 atomic_dec(&mm->context.flush_count); in __tlb_flush_mm()
77 static inline void __tlb_flush_mm_lazy(struct mm_struct * mm) in __tlb_flush_mm_lazy() argument
79 spin_lock(&mm->context.lock); in __tlb_flush_mm_lazy()
80 if (mm->context.flush_mm) { in __tlb_flush_mm_lazy()
81 mm->context.flush_mm = 0; in __tlb_flush_mm_lazy()
82 __tlb_flush_mm(mm); in __tlb_flush_mm_lazy()
84 spin_unlock(&mm->context.lock); in __tlb_flush_mm_lazy()
89 * flush_tlb() - flushes the current mm struct TLBs
90 * flush_tlb_all() - flushes all processes TLBs
91 * flush_tlb_mm(mm) - flushes the specified mm context TLB's
92 * flush_tlb_page(vma, vmaddr) - flushes one page
93 * flush_tlb_range(vma, start, end) - flushes a range of pages
94 * flush_tlb_kernel_range(start, end) - flushes a range of kernel pages
101 * ptep_get_and_clear do not flush the TLBs directly if the mm has
105 #define flush_tlb() do { } while (0)
106 #define flush_tlb_all() do { } while (0)
107 #define flush_tlb_page(vma, addr) do { } while (0)
109 static inline void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument
111 __tlb_flush_mm_lazy(mm); in flush_tlb_mm()
117 __tlb_flush_mm_lazy(vma->vm_mm); in flush_tlb_range()