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

1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/mm.h>
27 /* Global TLB flush for the mm */ in __tlb_flush_idte()
28 asm volatile("idte 0,%1,%0" : : "a" (opt), "a" (asce) : "cc"); in __tlb_flush_idte()
36 unsigned int dummy = 0; in __tlb_flush_global()
38 csp(&dummy, 0, 0); in __tlb_flush_global()
42 * Flush TLB entries for a specific mm on all CPUs (in case gmap is used
45 static inline void __tlb_flush_mm(struct mm_struct *mm) in __tlb_flush_mm() argument
50 atomic_inc(&mm->context.flush_count); in __tlb_flush_mm()
52 cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask); in __tlb_flush_mm()
54 gmap_asce = READ_ONCE(mm->context.gmap_asce); in __tlb_flush_mm()
55 if (MACHINE_HAS_IDTE && gmap_asce != -1UL) { in __tlb_flush_mm()
58 __tlb_flush_idte(mm->context.asce); in __tlb_flush_mm()
63 atomic_dec(&mm->context.flush_count); in __tlb_flush_mm()
75 static inline void __tlb_flush_mm_lazy(struct mm_struct * mm) in __tlb_flush_mm_lazy() argument
77 spin_lock(&mm->context.lock); in __tlb_flush_mm_lazy()
78 if (mm->context.flush_mm) { in __tlb_flush_mm_lazy()
79 mm->context.flush_mm = 0; in __tlb_flush_mm_lazy()
80 __tlb_flush_mm(mm); in __tlb_flush_mm_lazy()
82 spin_unlock(&mm->context.lock); in __tlb_flush_mm_lazy()
87 * flush_tlb() - flushes the current mm struct TLBs
88 * flush_tlb_all() - flushes all processes TLBs
89 * flush_tlb_mm(mm) - flushes the specified mm context TLB's
90 * flush_tlb_page(vma, vmaddr) - flushes one page
91 * flush_tlb_range(vma, start, end) - flushes a range of pages
92 * flush_tlb_kernel_range(start, end) - flushes a range of kernel pages
99 * ptep_get_and_clear do not flush the TLBs directly if the mm has
103 #define flush_tlb() do { } while (0)
104 #define flush_tlb_all() do { } while (0)
105 #define flush_tlb_page(vma, addr) do { } while (0)
107 static inline void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument
109 __tlb_flush_mm_lazy(mm); in flush_tlb_mm()
115 __tlb_flush_mm_lazy(vma->vm_mm); in flush_tlb_range()