Home
last modified time | relevance | path

Searched refs:vm_flags (Results 1 – 25 of 29) sorted by relevance

12

/mm/
Dmmap.c106 pgprot_t vm_get_page_prot(unsigned long vm_flags) in vm_get_page_prot() argument
108 pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags & in vm_get_page_prot()
110 pgprot_val(arch_vm_get_page_prot(vm_flags))); in vm_get_page_prot()
116 static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) in vm_pgprot_modify() argument
118 return pgprot_modify(oldprot, vm_get_page_prot(vm_flags)); in vm_pgprot_modify()
124 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local
127 vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags); in vma_set_page_prot()
129 vm_flags &= ~VM_SHARED; in vma_set_page_prot()
130 vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags); in vma_set_page_prot()
142 if (vma->vm_flags & VM_DENYWRITE) in __remove_shared_vm_struct()
[all …]
Dmremap.c327 unsigned long vm_flags = vma->vm_flags; in move_vma() local
351 MADV_UNMERGEABLE, &vm_flags); in move_vma()
388 if (vm_flags & VM_ACCOUNT) { in move_vma()
389 vma->vm_flags &= ~VM_ACCOUNT; in move_vma()
406 vm_stat_account(mm, vma->vm_flags, new_len >> PAGE_SHIFT); in move_vma()
409 if (unlikely(vma->vm_flags & VM_PFNMAP)) in move_vma()
421 vma->vm_flags |= VM_ACCOUNT; in move_vma()
423 vma->vm_next->vm_flags |= VM_ACCOUNT; in move_vma()
426 if (vm_flags & VM_LOCKED) { in move_vma()
452 if (!old_len && !(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) { in vma_to_resize()
[all …]
Dnommu.c127 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) in follow_pfn()
169 vma->vm_flags |= VM_USERMAP; in vmalloc_user()
563 if (region->vm_flags & VM_MAPPED_COPY) in __put_nommu_region()
950 unsigned long vm_flags; in determine_vm_flags() local
952 vm_flags = calc_vm_prot_bits(prot, 0) | calc_vm_flag_bits(flags); in determine_vm_flags()
957 vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; in determine_vm_flags()
959 vm_flags |= VM_MAYSHARE; in determine_vm_flags()
964 vm_flags |= VM_MAYSHARE | (capabilities & NOMMU_VMFLAGS); in determine_vm_flags()
966 vm_flags |= VM_SHARED; in determine_vm_flags()
974 vm_flags &= ~VM_MAYSHARE; in determine_vm_flags()
[all …]
Dmprotect.c64 if (prot_numa && !(vma->vm_flags & VM_SHARED) && in change_pte_range()
88 if (is_cow_mapping(vma->vm_flags) && in change_pte_range()
120 !(vma->vm_flags & VM_SOFTDIRTY))) { in change_pte_range()
377 unsigned long oldflags = vma->vm_flags; in mprotect_fixup()
395 (vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in mprotect_fixup()
434 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup()
457 vma->vm_flags = newflags; in mprotect_fixup()
536 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_mprotect_pkey()
544 if (!(vma->vm_flags & VM_GROWSUP)) in do_mprotect_pkey()
559 if (rier && (vma->vm_flags & VM_MAYEXEC)) in do_mprotect_pkey()
[all …]
Dmlock.c448 vma->vm_flags &= VM_LOCKED_CLEAR_MASK; in munlock_vma_pages_range()
527 vm_flags_t old_flags = vma->vm_flags; in mlock_fixup()
529 if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) || in mlock_fixup()
574 vma->vm_flags = newflags; in mlock_fixup()
606 vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_vma_lock_flags()
657 if (vma->vm_flags & VM_LOCKED) { in count_mm_mlocked_page_nr()
725 vm_flags_t vm_flags = VM_LOCKED; in SYSCALL_DEFINE3() local
731 vm_flags |= VM_LOCKONFAULT; in SYSCALL_DEFINE3()
733 return do_mlock(start, len, vm_flags); in SYSCALL_DEFINE3()
788 newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_mlockall_flags()
Dgup.c179 return is_cow_mapping(vma->vm_flags) && (flags & FOLL_GET); in should_force_cow_break()
292 if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) { in follow_page_pte()
346 if (pmd_huge(pmdval) && vma->vm_flags & VM_HUGETLB) { in follow_pmd_mask()
456 if (pud_huge(*pud) && vma->vm_flags & VM_HUGETLB) { in follow_pud_mask()
691 if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE)) in faultin_page()
698 vm_flags_t vm_flags = vma->vm_flags; in check_vma_flags() local
702 if (vm_flags & (VM_IO | VM_PFNMAP)) in check_vma_flags()
709 if (!(vm_flags & VM_WRITE)) { in check_vma_flags()
721 if (!is_cow_mapping(vm_flags)) in check_vma_flags()
724 } else if (!(vm_flags & VM_READ)) { in check_vma_flags()
[all …]
Dmemory.c553 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); in print_bad_pte()
615 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) in vm_normal_page()
628 if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { in vm_normal_page()
629 if (vma->vm_flags & VM_MIXEDMAP) { in vm_normal_page()
638 if (!is_cow_mapping(vma->vm_flags)) in vm_normal_page()
671 if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { in vm_normal_page_pmd()
672 if (vma->vm_flags & VM_MIXEDMAP) { in vm_normal_page_pmd()
681 if (!is_cow_mapping(vma->vm_flags)) in vm_normal_page_pmd()
713 unsigned long vm_flags = vma->vm_flags; in copy_one_pte() local
740 is_cow_mapping(vm_flags)) { in copy_one_pte()
[all …]
Drmap.c757 unsigned long vm_flags; member
777 if (vma->vm_flags & VM_LOCKED) { in page_referenced_one()
779 pra->vm_flags |= VM_LOCKED; in page_referenced_one()
794 if (likely(!(vma->vm_flags & VM_SEQ_READ))) in page_referenced_one()
816 pra->vm_flags |= vma->vm_flags; in page_referenced_one()
851 unsigned long *vm_flags) in page_referenced() argument
865 *vm_flags = 0; in page_referenced()
888 *vm_flags = pra.vm_flags; in page_referenced()
972 if (vma->vm_flags & VM_SHARED) in invalid_mkclean_vma()
1378 if ((flags & TTU_MUNLOCK) && !(vma->vm_flags & VM_LOCKED)) in try_to_unmap_one()
[all …]
Duserfaultfd.c75 if (dst_vma->vm_flags & VM_WRITE) in mcopy_atomic_pte()
183 int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
184 int vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
246 vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
426 if (!(dst_vma->vm_flags & VM_SHARED)) { in mfill_atomic_pte()
512 dst_vma->vm_flags & VM_SHARED)) in __mcopy_atomic()
532 if (!(dst_vma->vm_flags & VM_SHARED) && in __mcopy_atomic()
Dkhugepaged.c317 unsigned long *vm_flags, int advice) in hugepage_madvise() argument
330 *vm_flags &= ~VM_NOHUGEPAGE; in hugepage_madvise()
331 *vm_flags |= VM_HUGEPAGE; in hugepage_madvise()
337 if (!(*vm_flags & VM_NO_KHUGEPAGED) && in hugepage_madvise()
338 khugepaged_enter_vma_merge(vma, *vm_flags)) in hugepage_madvise()
342 *vm_flags &= ~VM_HUGEPAGE; in hugepage_madvise()
343 *vm_flags |= VM_NOHUGEPAGE; in hugepage_madvise()
411 unsigned long vm_flags) in hugepage_vma_check() argument
413 if ((!(vm_flags & VM_HUGEPAGE) && !khugepaged_always()) || in hugepage_vma_check()
414 (vm_flags & VM_NOHUGEPAGE) || in hugepage_vma_check()
[all …]
Dhugetlb.c781 if (vma->vm_flags & VM_MAYSHARE) { in vma_resv_map()
796 VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma); in set_vma_resv_map()
805 VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma); in set_vma_resv_flags()
821 if (!(vma->vm_flags & VM_MAYSHARE)) in reset_vma_resv_huge_pages()
828 if (vma->vm_flags & VM_NORESERVE) { in vma_has_reserves()
838 if (vma->vm_flags & VM_MAYSHARE && chg == 0) in vma_has_reserves()
845 if (vma->vm_flags & VM_MAYSHARE) { in vma_has_reserves()
2054 if (vma->vm_flags & VM_MAYSHARE) in __vma_reservation_common()
2065 if (vma->vm_flags & VM_MAYSHARE) in __vma_reservation_common()
3491 cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; in copy_hugetlb_page_range()
[all …]
Dmadvise.c72 unsigned long new_flags = vma->vm_flags; in madvise_behavior()
88 if (vma->vm_flags & VM_IO) { in madvise_behavior()
96 if (vma->vm_file || vma->vm_flags & VM_SHARED) { in madvise_behavior()
129 if (new_flags == vma->vm_flags) { in madvise_behavior()
169 vma->vm_flags = new_flags; in madvise_behavior()
833 if (vma->vm_flags & VM_LOCKED) in madvise_remove()
842 if ((vma->vm_flags & (VM_SHARED|VM_WRITE)) != (VM_SHARED|VM_WRITE)) in madvise_remove()
Dmsync.c79 (vma->vm_flags & VM_LOCKED)) { in SYSCALL_DEFINE3()
89 (vma->vm_flags & VM_SHARED)) { in SYSCALL_DEFINE3()
Dhuge_memory.c489 if (likely(vma->vm_flags & VM_WRITE)) in maybe_pmd_mkwrite()
669 const bool vma_madvised = !!(vma->vm_flags & VM_HUGEPAGE); in alloc_hugepage_direct_gfpmask()
721 if (unlikely(khugepaged_enter(vma, vma->vm_flags))) in do_huge_pmd_anonymous_page()
830 BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in vmf_insert_pfn_pmd()
832 BUG_ON((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) == in vmf_insert_pfn_pmd()
834 BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags)); in vmf_insert_pfn_pmd()
855 if (likely(vma->vm_flags & VM_WRITE)) in maybe_pud_mkwrite()
907 BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in vmf_insert_pfn_pud()
909 BUG_ON((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) == in vmf_insert_pfn_pud()
911 BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags)); in vmf_insert_pfn_pud()
[all …]
Dksm.c528 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in find_mergeable_vma()
984 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in unmerge_and_remove_all_rmap_items()
1255 if ((vma->vm_flags & VM_LOCKED) && kpage && !err) { in try_to_merge_one_page()
2296 if (!(vma->vm_flags & VM_MERGEABLE)) in scan_get_next_rmap_item()
2438 unsigned long end, int advice, unsigned long *vm_flags) in ksm_madvise() argument
2448 if (*vm_flags & (VM_MERGEABLE | VM_SHARED | VM_MAYSHARE | in ksm_madvise()
2457 if (*vm_flags & VM_SAO) in ksm_madvise()
2461 if (*vm_flags & VM_SPARC_ADI) in ksm_madvise()
2471 *vm_flags |= VM_MERGEABLE; in ksm_madvise()
2475 if (!(*vm_flags & VM_MERGEABLE)) in ksm_madvise()
[all …]
Ddebug.c132 vma->vm_flags, &vma->vm_flags); in dump_vma()
Dframe_vector.c71 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) { in get_vaddr_frames()
Dhmm.c295 if (write_fault && walk->vma && !(walk->vma->vm_flags & VM_WRITE)) in hmm_vma_walk_hole_()
907 if (vma == NULL || (vma->vm_flags & device_vma)) in hmm_range_fault()
910 if (!(vma->vm_flags & VM_READ)) { in hmm_range_fault()
Dvmscan.c1038 unsigned long vm_flags; in page_check_references() local
1041 &vm_flags); in page_check_references()
1048 if (vm_flags & VM_LOCKED) in page_check_references()
1080 if (vm_flags & VM_EXEC) in page_check_references()
2057 unsigned long vm_flags; in shrink_active_list() local
2103 &vm_flags) != 0) { in shrink_active_list()
2113 if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) { in shrink_active_list()
Dmigrate.c272 if (vma->vm_flags & VM_LOCKED && !PageTransCompound(new)) in remove_migration_pte()
1990 (vma->vm_flags & VM_EXEC)) in migrate_misplaced_page()
2679 (args->vma->vm_flags & VM_SPECIAL) || vma_is_dax(args->vma)) in migrate_vma_setup()
2781 swp_entry = make_device_private_entry(page, vma->vm_flags & VM_WRITE); in migrate_vma_insert_page()
2793 if (vma->vm_flags & VM_WRITE) in migrate_vma_insert_page()
Dshmem.c2065 if ((vma->vm_flags & VM_NOHUGEPAGE) || in shmem_fault()
2068 else if (vma->vm_flags & VM_HUGEPAGE) in shmem_fault()
2227 khugepaged_enter(vma, vma->vm_flags); in shmem_mmap()
2384 if (dst_vma->vm_flags & VM_WRITE) in shmem_mfill_atomic_pte()
4019 if ((vma->vm_flags & VM_NOHUGEPAGE) || in shmem_huge_enabled()
4040 return (vma->vm_flags & VM_HUGEPAGE); in shmem_huge_enabled()
4206 file = shmem_kernel_file_setup("dev/zero", size, vma->vm_flags); in shmem_zero_setup()
4218 khugepaged_enter(vma, vma->vm_flags); in shmem_zero_setup()
Dfilemap.c2550 if (vmf->vma->vm_flags & VM_RAND_READ) in do_sync_mmap_readahead()
2555 if (vmf->vma->vm_flags & VM_SEQ_READ) { in do_sync_mmap_readahead()
2599 if (vmf->vma->vm_flags & VM_RAND_READ || !ra->ra_pages) in do_async_mmap_readahead()
2879 if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) in generic_file_readonly_mmap()
Dpagewalk.c242 if (vma->vm_flags & VM_PFNMAP) { in walk_page_test()
Dmmu_notifier.c544 return range->vma->vm_flags & VM_READ; in mmu_notifier_range_update_to_read_only()
Dinternal.h44 return !(vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)); in can_madv_lru_vma()

12