/linux/include/linux/ |
H A D | mmap_lock.h | 25 void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write); 26 void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write, 28 void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write); 30 static inline void __mmap_lock_trace_start_locking(struct mm_struct *mm, in __mmap_lock_trace_start_locking() argument 34 __mmap_lock_do_trace_start_locking(mm, write); in __mmap_lock_trace_start_locking() 37 static inline void __mmap_lock_trace_acquire_returned(struct mm_struct *mm, in __mmap_lock_trace_acquire_returned() argument 41 __mmap_lock_do_trace_acquire_returned(mm, write, success); in __mmap_lock_trace_acquire_returned() 44 static inline void __mmap_lock_trace_released(struct mm_struct *mm, bool write) in __mmap_lock_trace_released() argument 47 __mmap_lock_do_trace_released(mm, write); in __mmap_lock_trace_released() 52 static inline void __mmap_lock_trace_start_locking(struct mm_struct *mm, in __mmap_lock_trace_start_locking() argument [all …]
|
H A D | page_table_check.h | 17 void __page_table_check_pte_clear(struct mm_struct *mm, pte_t pte); 18 void __page_table_check_pmd_clear(struct mm_struct *mm, pmd_t pmd); 19 void __page_table_check_pud_clear(struct mm_struct *mm, pud_t pud); 20 void __page_table_check_ptes_set(struct mm_struct *mm, pte_t *ptep, pte_t pte, 22 void __page_table_check_pmds_set(struct mm_struct *mm, pmd_t *pmdp, pmd_t pmd, 24 void __page_table_check_puds_set(struct mm_struct *mm, pud_t *pudp, pud_t pud, 26 void __page_table_check_pte_clear_range(struct mm_struct *mm, 46 static inline void page_table_check_pte_clear(struct mm_struct *mm, pte_t pte) in page_table_check_pte_clear() 51 __page_table_check_pte_clear(mm, pte); 54 static inline void page_table_check_pmd_clear(struct mm_struct *mm, pmd_ in page_table_check_pmd_clear() 44 page_table_check_pte_clear(struct mm_struct * mm,pte_t pte) page_table_check_pte_clear() argument 52 page_table_check_pmd_clear(struct mm_struct * mm,pmd_t pmd) page_table_check_pmd_clear() argument 60 page_table_check_pud_clear(struct mm_struct * mm,pud_t pud) page_table_check_pud_clear() argument 68 page_table_check_ptes_set(struct mm_struct * mm,pte_t * ptep,pte_t pte,unsigned int nr) page_table_check_ptes_set() argument 77 page_table_check_pmd_set(struct mm_struct * mm,pmd_t * pmdp,pmd_t pmd) page_table_check_pmd_set() argument 86 page_table_check_pud_set(struct mm_struct * mm,pud_t * pudp,pud_t pud) page_table_check_pud_set() argument 95 page_table_check_pte_clear_range(struct mm_struct * mm,unsigned long addr,pmd_t pmd) page_table_check_pte_clear_range() argument 115 page_table_check_pte_clear(struct mm_struct * mm,pte_t pte) page_table_check_pte_clear() argument 119 page_table_check_pmd_clear(struct mm_struct * mm,pmd_t pmd) page_table_check_pmd_clear() argument 123 page_table_check_pud_clear(struct mm_struct * mm,pud_t pud) page_table_check_pud_clear() argument 127 page_table_check_ptes_set(struct mm_struct * mm,pte_t * ptep,pte_t pte,unsigned int nr) page_table_check_ptes_set() argument 132 page_table_check_pmd_set(struct mm_struct * mm,pmd_t * pmdp,pmd_t pmd) page_table_check_pmd_set() argument 137 page_table_check_pud_set(struct mm_struct * mm,pud_t * pudp,pud_t pud) page_table_check_pud_set() argument 142 page_table_check_pte_clear_range(struct mm_struct * mm,unsigned long addr,pmd_t pmd) page_table_check_pte_clear_range() argument [all...] |
/linux/arch/s390/include/asm/ |
H A D | pgalloc.h | 18 #include <linux/mm.h> 26 struct ptdesc *page_table_alloc_pgste(struct mm_struct *mm); 35 int crst_table_upgrade(struct mm_struct *mm, unsigned long limit); 37 static inline unsigned long check_asce_limit(struct mm_struct *mm, unsigned long addr, in check_asce_limit() argument 42 if (addr + len > mm->context.asce_limit && in check_asce_limit() 44 rc = crst_table_upgrade(mm, addr + len); in check_asce_limit() 51 static inline p4d_t *p4d_alloc_one(struct mm_struct *mm, unsigned long address) in p4d_alloc_one() argument 53 unsigned long *table = crst_table_alloc(mm); in p4d_alloc_one() 63 static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d) in p4d_free() argument 65 if (mm_p4d_folded(mm)) in p4d_free() [all …]
|
/linux/arch/powerpc/include/asm/ |
H A D | mmu_context.h | 7 #include <linux/mm.h> 18 extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); 20 extern void destroy_context(struct mm_struct *mm); 24 extern bool mm_iommu_preregistered(struct mm_struct *mm); 25 extern long mm_iommu_new(struct mm_struct *mm, 28 extern long mm_iommu_newdev(struct mm_struct *mm, unsigned long ua, 31 extern long mm_iommu_put(struct mm_struct *mm, 33 extern void mm_iommu_init(struct mm_struct *mm); 34 extern struct mm_iommu_table_group_mem_t *mm_iommu_lookup(struct mm_struct *mm, 36 extern struct mm_iommu_table_group_mem_t *mm_iommu_get(struct mm_struct *mm, [all …]
|
/linux/Documentation/core-api/ |
H A D | mm-api.rst | 14 .. kernel-doc:: mm/gup.c 40 .. kernel-doc:: mm/slub.c 43 .. kernel-doc:: mm/slab_common.c 46 .. kernel-doc:: mm/util.c 52 .. kernel-doc:: mm/vmalloc.c 61 .. kernel-doc:: mm/filemap.c 67 .. kernel-doc:: mm/readahead.c 70 .. kernel-doc:: mm/readahead.c 76 .. kernel-doc:: mm/page-writeback.c 82 .. kernel-doc:: mm/truncate.c [all …]
|
/linux/include/trace/events/ |
H A D | ksm.h | 71 * @mm: address of the mm object of the process 77 TP_PROTO(void *mm), 79 TP_ARGS(mm), 82 __field(void *, mm) 86 __entry->mm = mm; 89 TP_printk("mm %p", __entry->mm) 95 * @mm: address of the mm object of the process 101 TP_PROTO(void *mm), 103 TP_ARGS(mm) 109 * @mm: address of the mm object of the process [all …]
|
H A D | huge_memory.h | 58 TP_PROTO(struct mm_struct *mm, struct folio *folio, bool writable, 61 TP_ARGS(mm, folio, writable, referenced, none_or_zero, status, unmapped), 64 __field(struct mm_struct *, mm) 74 __entry->mm = mm; 83 …TP_printk("mm=%p, scan_pfn=0x%lx, writable=%d, referenced=%d, none_or_zero=%d, status=%s, unmapped… 84 __entry->mm, 95 TP_PROTO(struct mm_struct *mm, int isolated, int status), 97 TP_ARGS(mm, isolated, status), 100 __field(struct mm_struct *, mm) 106 __entry->mm = mm; [all …]
|
/linux/mm/ |
H A D | mmu_notifier.c | 3 * linux/mm/mmu_notifier.c 13 #include <linux/mm.h> 19 #include <linux/sched/mm.h> 35 * mm->notifier_subscriptions inside the mm_take_all_locks() protected 40 /* all mmu notifiers registered in this mm are queued in this list */ 56 * this mm, such that PTES cannot be read into SPTEs (shadow PTEs) while any 59 * Note that the core mm creates nested invalidate_range_start()/end() regions 62 * progress on the mm side. 69 * - mm->active_invalidate_ranges != 0 75 * - mm->active_invalidate_ranges != 0 [all …]
|
H A D | debug.c | 3 * mm/debug.c 5 * mm/ specific debug routines. 10 #include <linux/mm.h> 191 pr_emerg("vma %px start %px end %px mm %px\n" in dump_vma() 209 void dump_mm(const struct mm_struct *mm) in dump_mm() argument 211 pr_emerg("mm %px task_size %lu\n" in dump_mm() 236 mm, mm->task_size, in dump_mm() 237 mm->mmap_base, mm->mmap_legacy_base, in dump_mm() 238 mm->pgd, atomic_read(&mm->mm_users), in dump_mm() 239 atomic_read(&mm->mm_count), in dump_mm() [all …]
|
H A D | mmap.c | 3 * mm/mmap.c 15 #include <linux/mm.h> 48 #include <linux/sched/mm.h> 111 return mlock_future_ok(current->mm, current->mm->def_flags, len) in check_brk_limits() 118 struct mm_struct *mm = current->mm; in SYSCALL_DEFINE1() local 125 if (mmap_write_lock_killable(mm)) in SYSCALL_DEFINE1() 128 origbrk = mm->brk; in SYSCALL_DEFINE1() 133 * randomize_va_space to 2, which will still cause mm->start_brk in SYSCALL_DEFINE1() 137 min_brk = mm->start_brk; in SYSCALL_DEFINE1() 139 min_brk = mm->end_data; in SYSCALL_DEFINE1() [all …]
|
/linux/arch/m68k/include/asm/ |
H A D | mmu_context.h | 28 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument 32 if (mm->context != NO_CONTEXT) in get_mmu_context() 45 mm->context = ctx; in get_mmu_context() 46 context_mm[ctx] = mm; in get_mmu_context() 52 #define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0) argument 58 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument 60 if (mm->context != NO_CONTEXT) { in destroy_context() 61 clear_bit(mm->context, context_map); in destroy_context() 62 mm->context = NO_CONTEXT; in destroy_context() 75 get_mmu_context(tsk->mm); in switch_mm() [all …]
|
/linux/arch/arm/include/asm/ |
H A D | mmu_context.h | 24 void __check_vmalloc_seq(struct mm_struct *mm); 27 static inline void check_vmalloc_seq(struct mm_struct *mm) in check_vmalloc_seq() argument 30 unlikely(atomic_read(&mm->context.vmalloc_seq) != in check_vmalloc_seq() 32 __check_vmalloc_seq(mm); in check_vmalloc_seq() 38 void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk); 42 init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument 44 atomic64_set(&mm->context.id, 0); in init_new_context() 49 void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, 52 static inline void a15_erratum_get_cpumask(int this_cpu, struct mm_struct *mm, in a15_erratum_get_cpumask() argument 62 static inline void check_and_switch_context(struct mm_struct *mm, in check_and_switch_context() argument [all …]
|
/linux/include/asm-generic/ |
H A D | pgalloc.h | 12 * @mm: the mm_struct of the current context 19 static inline pte_t *__pte_alloc_one_kernel_noprof(struct mm_struct *mm) in __pte_alloc_one_kernel_noprof() argument 26 if (!pagetable_pte_ctor(mm, ptdesc)) { in __pte_alloc_one_kernel_noprof() 38 * @mm: the mm_struct of the current context 42 static inline pte_t *pte_alloc_one_kernel_noprof(struct mm_struct *mm) in pte_alloc_one_kernel_noprof() argument 44 return __pte_alloc_one_kernel_noprof(mm); in pte_alloc_one_kernel_noprof() 51 * @mm: the mm_struct of the current context 54 static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) in pte_free_kernel() argument 61 * @mm: the mm_struct of the current context 71 static inline pgtable_t __pte_alloc_one_noprof(struct mm_struct *mm, gfp_t gfp) in __pte_alloc_one_noprof() argument [all …]
|
H A D | mmu_context.h | 15 * @mm: the currently active mm context which is becoming lazy 18 * tsk->mm will be NULL 21 static inline void enter_lazy_tlb(struct mm_struct *mm, in enter_lazy_tlb() argument 29 * @tsk: task struct for the mm 30 * @mm: the new mm struct 35 struct mm_struct *mm) in init_new_context() argument 42 * destroy_context - Undo init_new_context when the mm is going away 43 * @mm: old mm struct 46 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument 52 * activate_mm - called after exec switches the current task to a new mm, to switch to it [all …]
|
/linux/fs/proc/ |
H A D | task_nommu.c | 3 #include <linux/mm.h> 11 #include <linux/sched/mm.h> 21 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument 23 VMA_ITERATOR(vmi, mm, 0); in task_mem() 28 mmap_read_lock(mm); in task_mem() 40 if (atomic_read(&mm->mm_count) > 1 || in task_mem() 50 if (atomic_read(&mm->mm_count) > 1) in task_mem() 51 sbytes += kobjsize(mm); in task_mem() 53 bytes += kobjsize(mm); in task_mem() 72 mmap_read_unlock(mm); in task_mem() [all …]
|
/linux/kernel/ |
H A D | fork.c | 12 * management can be a bitch. See 'mm/memory.c': 'copy_page_range()' 18 #include <linux/sched/mm.h> 45 #include <linux/mm.h> 116 #include "../mm/internal.h" 434 /* SLAB cache for mm_struct structures (tsk->mm) */ 516 void dup_mm_exe_file(struct mm_struct *mm, struct mm_struct *oldmm) in dup_mm_exe_file() argument 521 RCU_INIT_POINTER(mm->exe_file, exe_file); in dup_mm_exe_file() 531 static inline int mm_alloc_pgd(struct mm_struct *mm) in mm_alloc_pgd() argument 533 mm->pgd = pgd_alloc(mm); in mm_alloc_pgd() 534 if (unlikely(!mm->pgd)) in mm_alloc_pgd() [all …]
|
/linux/tools/testing/vma/ |
H A D | vma.c | 13 #include "../../../mm/vma.h" 31 #include "../../../mm/vma_init.c" 32 #include "../../../mm/vma_exec.c" 33 #include "../../../mm/vma.c" 64 static struct vm_area_struct *alloc_vma(struct mm_struct *mm, in alloc_vma() argument 70 struct vm_area_struct *ret = vm_area_alloc(mm); in alloc_vma() 85 static int attach_vma(struct mm_struct *mm, struct vm_area_struct *vma) in attach_vma() argument 89 res = vma_link(mm, vma); in attach_vma() 102 static struct vm_area_struct *alloc_and_link_vma(struct mm_struct *mm, in alloc_and_link_vma() argument 108 struct vm_area_struct *vma = alloc_vma(mm, start, end, pgoff, flags); in alloc_and_link_vma() [all …]
|
/linux/drivers/gpu/drm/tests/ |
H A D | drm_mm_test.c | 38 static bool assert_no_holes(struct kunit *test, const struct drm_mm *mm) in assert_no_holes() argument 45 drm_mm_for_each_hole(hole, mm, hole_start, hole_end) in assert_no_holes() 53 drm_mm_for_each_node(hole, mm) { in assert_no_holes() 63 static bool assert_one_hole(struct kunit *test, const struct drm_mm *mm, u64 start, u64 end) in assert_one_hole() argument 74 drm_mm_for_each_hole(hole, mm, hole_start, hole_end) { in assert_one_hole() 78 "empty mm has incorrect hole, found (%llx, %llx), expect (%llx, %llx)\n", in assert_one_hole() 103 static bool assert_node(struct kunit *test, struct drm_mm_node *node, struct drm_mm *mm, in assert_node() argument 108 if (!drm_mm_node_allocated(node) || node->mm != mm) { in assert_node() 138 struct drm_mm mm; in drm_test_mm_init() local 142 memset(&mm, 0, sizeof(mm)); in drm_test_mm_init() [all …]
|
/linux/drivers/net/ethernet/mscc/ |
H A D | ocelot_mm.c | 55 struct ocelot_mm_state *mm = &ocelot->mm[port]; in ocelot_port_update_active_preemptible_tcs() local 66 ocelot_port->speed == SPEED_1000) && mm->tx_active) in ocelot_port_update_active_preemptible_tcs() 67 val = mm->preemptible_tcs; in ocelot_port_update_active_preemptible_tcs() 75 mm->active_preemptible_tcs = val; in ocelot_port_update_active_preemptible_tcs() 79 "port %d %s/%s, MM TX %s, preemptible TCs 0x%x, active 0x%x\n", in ocelot_port_update_active_preemptible_tcs() 82 mm->tx_active ? "active" : "inactive", mm->preemptible_tcs, in ocelot_port_update_active_preemptible_tcs() 83 mm->active_preemptible_tcs); in ocelot_port_update_active_preemptible_tcs() 93 struct ocelot_mm_state *mm = &ocelot->mm[port]; in ocelot_port_change_fp() local 97 if (mm->preemptible_tcs == preemptible_tcs) in ocelot_port_change_fp() 100 mm->preemptible_tcs = preemptible_tcs; in ocelot_port_change_fp() [all …]
|
/linux/arch/x86/kernel/ |
H A D | ldt.c | 19 #include <linux/mm.h> 42 void load_mm_ldt(struct mm_struct *mm) in load_mm_ldt() argument 47 ldt = READ_ONCE(mm->context.ldt); in load_mm_ldt() 50 * Any change to mm->context.ldt is followed by an IPI to all in load_mm_ldt() 51 * CPUs with the mm active. The LDT will not be freed until in load_mm_ldt() 93 * Load the LDT if either the old or new mm had an LDT. in switch_ldt() 95 * An mm will never go from having an LDT to not having an LDT. Two in switch_ldt() 138 struct mm_struct *mm = __mm; in flush_ldt() local 140 if (this_cpu_read(cpu_tlbstate.loaded_mm) != mm) in flush_ldt() 143 load_mm_ldt(mm); in flush_ldt() [all …]
|
/linux/rust/helpers/ |
H A D | mm.c | 3 #include <linux/mm.h> 4 #include <linux/sched/mm.h> 6 void rust_helper_mmgrab(struct mm_struct *mm) in rust_helper_mmgrab() argument 8 mmgrab(mm); in rust_helper_mmgrab() 11 void rust_helper_mmdrop(struct mm_struct *mm) in rust_helper_mmdrop() argument 13 mmdrop(mm); in rust_helper_mmdrop() 16 void rust_helper_mmget(struct mm_struct *mm) in rust_helper_mmget() argument 18 mmget(mm); in rust_helper_mmget() 21 bool rust_helper_mmget_not_zero(struct mm_struct *mm) in rust_helper_mmget_not_zero() argument 23 return mmget_not_zero(mm); in rust_helper_mmget_not_zero() [all …]
|
/linux/arch/x86/include/asm/ |
H A D | pgalloc.h | 6 #include <linux/mm.h> /* for struct page */ 15 static inline int __paravirt_pgd_alloc(struct mm_struct *mm) { return 0; } in __paravirt_pgd_alloc() argument 20 #define paravirt_pgd_alloc(mm) __paravirt_pgd_alloc(mm) argument 21 static inline void paravirt_pgd_free(struct mm_struct *mm, pgd_t *pgd) {} in paravirt_pgd_free() argument 22 static inline void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pte() argument 23 static inline void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pmd() argument 26 static inline void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_pud() argument 27 static inline void paravirt_alloc_p4d(struct mm_struct *mm, unsigned long pfn) {} in paravirt_alloc_p4d() argument 50 extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); 62 static inline void pmd_populate_kernel(struct mm_struct *mm, in pmd_populate_kernel() argument [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/core/ |
H A D | mm.c | 24 #include <core/mm.h> 26 #define node(root, dir) ((root)->nl_entry.dir == &mm->nodes) ? NULL : \ 30 nvkm_mm_dump(struct nvkm_mm *mm, const char *header) in nvkm_mm_dump() argument 36 list_for_each_entry(node, &mm->nodes, nl_entry) { in nvkm_mm_dump() 41 list_for_each_entry(node, &mm->free, fl_entry) { in nvkm_mm_dump() 48 nvkm_mm_free(struct nvkm_mm *mm, struct nvkm_mm_node **pthis) in nvkm_mm_free() argument 72 list_for_each_entry(prev, &mm->free, fl_entry) { in nvkm_mm_free() 86 region_head(struct nvkm_mm *mm, struct nvkm_mm_node *a, u32 size) in region_head() argument 111 nvkm_mm_head(struct nvkm_mm *mm, u8 heap, u8 type, u32 size_max, u32 size_min, in nvkm_mm_head() argument 121 list_for_each_entry(this, &mm->free, fl_entry) { in nvkm_mm_head() [all …]
|
/linux/arch/sparc/mm/ |
H A D | tsb.c | 2 /* arch/sparc64/mm/tsb.c 121 struct mm_struct *mm = tb->mm; in flush_tsb_user() local 124 spin_lock_irqsave(&mm->context.lock, flags); in flush_tsb_user() 127 base = (unsigned long) mm->context.tsb_block[MM_TSB_BASE].tsb; in flush_tsb_user() 128 nentries = mm->context.tsb_block[MM_TSB_BASE].tsb_nentries; in flush_tsb_user() 140 else if (mm->context.tsb_block[MM_TSB_HUGE].tsb) { in flush_tsb_user() 141 base = (unsigned long) mm->context.tsb_block[MM_TSB_HUGE].tsb; in flush_tsb_user() 142 nentries = mm->context.tsb_block[MM_TSB_HUGE].tsb_nentries; in flush_tsb_user() 149 spin_unlock_irqrestore(&mm->context.lock, flags); in flush_tsb_user() 152 void flush_tsb_user_page(struct mm_struct *mm, unsigned long vaddr, in flush_tsb_user_page() argument [all …]
|
/linux/drivers/iommu/ |
H A D | iommu-sva.c | 7 #include <linux/sched/mm.h> 14 struct mm_struct *mm); 16 /* Allocate a PASID for the mm within range (inclusive) */ 17 static struct iommu_mm_data *iommu_alloc_mm_data(struct mm_struct *mm, struct device *dev) in iommu_alloc_mm_data() argument 24 if (!arch_pgtable_dma_compat(mm)) in iommu_alloc_mm_data() 27 iommu_mm = mm->iommu_mm; in iommu_alloc_mm_data() 28 /* Is a PASID already associated with this mm? */ in iommu_alloc_mm_data() 47 * Make sure the write to mm->iommu_mm is not reordered in front of in iommu_alloc_mm_data() 51 smp_store_release(&mm->iommu_mm, iommu_mm); in iommu_alloc_mm_data() 58 * @mm: the mm to bind, caller must hold a reference to mm_users [all …]
|