| /linux/include/linux/ |
| H A D | mmap_lock.h | 15 #include <linux/sched/mm.h> 26 void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write); 27 void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write, 29 void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write); 31 static inline void __mmap_lock_trace_start_locking(struct mm_struct *mm, in __mmap_lock_trace_start_locking() argument 35 __mmap_lock_do_trace_start_locking(mm, write); in __mmap_lock_trace_start_locking() 38 static inline void __mmap_lock_trace_acquire_returned(struct mm_struct *mm, in __mmap_lock_trace_acquire_returned() argument 42 __mmap_lock_do_trace_acquire_returned(mm, write, success); in __mmap_lock_trace_acquire_returned() 45 static inline void __mmap_lock_trace_released(struct mm_struct *mm, bool write) in __mmap_lock_trace_released() argument 48 __mmap_lock_do_trace_released(mm, write); in __mmap_lock_trace_released() [all …]
|
| H A D | ksm.h | 12 #include <linux/mm.h> 20 vm_flags_t ksm_vma_flags(const struct mm_struct *mm, const struct file *file, 22 int ksm_enable_merge_any(struct mm_struct *mm); 23 int ksm_disable_merge_any(struct mm_struct *mm); 24 int ksm_disable(struct mm_struct *mm); 26 int __ksm_enter(struct mm_struct *mm); 27 void __ksm_exit(struct mm_struct *mm); 37 static inline void ksm_map_zero_page(struct mm_struct *mm) in ksm_map_zero_page() argument 40 atomic_long_inc(&mm->ksm_zero_pages); in ksm_map_zero_page() 43 static inline void ksm_might_unmap_zero_page(struct mm_struct *mm, pte_t pte) in ksm_might_unmap_zero_page() argument [all …]
|
| /linux/arch/s390/include/asm/ |
| H A D | pgalloc.h | 18 #include <linux/mm.h> 30 struct ptdesc *page_table_alloc_pgste_noprof(struct mm_struct *mm); 39 int crst_table_upgrade(struct mm_struct *mm, unsigned long limit); 41 static inline unsigned long check_asce_limit(struct mm_struct *mm, unsigned long addr, in check_asce_limit() argument 46 if (addr + len > mm->context.asce_limit && in check_asce_limit() 48 rc = crst_table_upgrade(mm, addr + len); in check_asce_limit() 55 static inline p4d_t *p4d_alloc_one_noprof(struct mm_struct *mm, unsigned long address) in p4d_alloc_one_noprof() argument 57 unsigned long *table = crst_table_alloc_noprof(mm); in p4d_alloc_one_noprof() 68 static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d) in p4d_free() argument 70 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/arch/s390/mm/ |
| H A D | pgtable.c | 13 #include <linux/mm.h> 40 static inline void ptep_ipte_local(struct mm_struct *mm, unsigned long addr, in ptep_ipte_local() argument 47 asce = READ_ONCE(mm->context.gmap_asce); in ptep_ipte_local() 51 asce = asce ? : mm->context.asce; in ptep_ipte_local() 60 static inline void ptep_ipte_global(struct mm_struct *mm, unsigned long addr, in ptep_ipte_global() argument 67 asce = READ_ONCE(mm->context.gmap_asce); in ptep_ipte_global() 71 asce = asce ? : mm->context.asce; in ptep_ipte_global() 80 static inline pte_t ptep_flush_direct(struct mm_struct *mm, in ptep_flush_direct() argument 89 atomic_inc(&mm->context.flush_count); in ptep_flush_direct() 91 cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) in ptep_flush_direct() [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 | 57 TP_PROTO(struct mm_struct *mm, struct folio *folio, 60 TP_ARGS(mm, folio, referenced, none_or_zero, status, unmapped), 63 __field(struct mm_struct *, mm) 72 __entry->mm = mm; 80 TP_printk("mm=%p, scan_pfn=0x%lx, referenced=%d, none_or_zero=%d, status=%s, unmapped=%d", 81 __entry->mm, 91 TP_PROTO(struct mm_struct *mm, int isolated, int status), 93 TP_ARGS(mm, isolated, status), 96 __field(struct mm_struct *, mm) 102 __entry->mm = mm; [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/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> 157 pr_emerg("vma %px start %px end %px mm %px\n" in dump_vma() 175 void dump_mm(const struct mm_struct *mm) in dump_mm() argument 177 pr_emerg("mm %px task_size %lu\n" in dump_mm() 202 mm, mm->task_size, in dump_mm() 203 mm->mmap_base, mm->mmap_legacy_base, in dump_mm() 204 mm->pgd, atomic_read(&mm->mm_users), in dump_mm() 205 atomic_read(&mm->mm_count), in dump_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/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> 117 #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, star in alloc_and_link_vma() 211 try_merge_new_vma(struct mm_struct * mm,struct vma_merge_struct * vmg,unsigned long start,unsigned long end,pgoff_t pgoff,vm_flags_t flags,bool * was_merged) try_merge_new_vma() argument 249 cleanup_mm(struct mm_struct * mm,struct vma_iterator * vmi) cleanup_mm() argument 305 struct mm_struct mm = {}; test_simple_merge() local 339 struct mm_struct mm = {}; test_simple_modify() local 398 struct mm_struct mm = {}; test_simple_expand() local 426 struct mm_struct mm = {}; test_simple_shrink() local 447 struct mm_struct mm = {}; test_merge_new() local 643 struct mm_struct mm = {}; test_vma_merge_special_flags() local 715 struct mm_struct mm = {}; test_vma_merge_with_close() local 924 struct mm_struct mm = {}; test_vma_merge_new_with_close() local 979 struct mm_struct mm = {}; test_merge_existing() local 1209 struct mm_struct mm = {}; test_anon_vma_non_mergeable() local 1296 struct mm_struct mm = {}; test_dup_anon_vma() local 1456 struct mm_struct mm = {}; test_vmi_prealloc_fail() local 1522 struct mm_struct mm = {}; test_merge_extend() local 1552 struct mm_struct mm = {}; test_copy_vma() local 1585 struct mm_struct mm = {}; test_expand_only_mode() local 1624 struct mm_struct mm = {}; test_mmap_region_basic() local [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/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/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/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/gpu/drm/amd/amdkfd/ |
| H A D | kfd_mqd_manager_v9.c | 37 static void update_mqd(struct mqd_manager *mm, void *mqd, 41 static uint64_t mqd_stride_v9(struct mqd_manager *mm, in mqd_stride_v9() argument 44 if (mm->dev->kfd->cwsr_enabled && in mqd_stride_v9() 49 return mm->mqd_size; in mqd_stride_v9() 62 static void update_cu_mask(struct mqd_manager *mm, void *mqd, in update_cu_mask() argument 71 mqd_symmetrically_map_cu_mask(mm, in update_cu_mask() 80 if (KFD_GC_VERSION(mm->dev) != IP_VERSION(9, 4, 3) && in update_cu_mask() 81 KFD_GC_VERSION(mm->dev) != IP_VERSION(9, 4, 4) && in update_cu_mask() 82 KFD_GC_VERSION(mm->dev) != IP_VERSION(9, 5, 0)) { in update_cu_mask() 160 static void init_mqd(struct mqd_manager *mm, void **mqd, in init_mqd() argument [all …]
|