* Use pte_alloc() instead of pte_alloc_map(). We can't run * pte_offset_map() on pmds where a huge pmd might be created * from a different thread. * * pte_alloc_map() is safe to use under down_write(mmap_sem) or when * parallel threads are excluded by other means. * * ...
arm: adjust_pte() use pte_offset_map_rw_nolock() mm: handle_pte_fault() use pte_offset_map_rw_nolock() mm: khugepaged: collapse_pte_mapped_thp() use pte_offset_map_rw_nolock() mm: copy_pte_range() use pte_offset_map_rw_nolock() mm: mremap: move_ptes() use pte_offset_...
因为从handle_mm_fault从pte_offset_map获取pte,它似乎返回ARM PTE,如果我错了,请纠正我。 实际上,这些似乎是新问题。我已经更新了答案。您寻求的魔力是cpu_set_pte_ext,它类似于C ++虚拟函数,并且对于可变ARM MMU位布局(新CPU类型具有扩展功能)的实现方式不同。但是,在编写Linux PTE和ARM PTE(+2048)时,它们...
pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, vmf->address, &vmf->ptl); ->pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. ...
page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (!pte_none(*page_table)) goto unlock; goto setpte; } /*如果是写操作,则要分配一个新的页*/ /* Allocate our own private page. */ if (unlikely(anon_vma_prepare(vma)))//分配一个anon_vma实例 ...
pte_t *pte_offset_map_ro_nolock(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, spinlock_t **ptlp); pte_t *pte_offset_map_rw_nolock(struct mm_struct *mm, pmd_t *pmd, diff --git a/mm/pgtable-generic.c b/mm/pgtable-generic.c ...
pmd = pmd_offset(pud, address);if(pmd_none(*pmd))return-EFAULT; VM_BUG_ON(pmd_trans_huge(*pmd)); pte = pte_offset_map(pmd, address);if(pte_none(*pte))gotounmap; *vma = get_gate_vma(mm);if(!page)gotoout; *page = vm_normal_page(*vma, address, *pte);if(!*page) {if(...
page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (!pte_same(*page_table, orig_pte)) { unlock_page(old_page); page_cache_release(old_page); goto unlock; } page_cache_release(old_page); } /*确定没有其他进程竞争,则进行reuse判断,通过reuse_swap_page()函数判断 ...
dst_pte = pte_offset_map_lock(dst_mm, dst_pmd, dst_addr, &ptl);if(dst_vma->vm_file) {/* the shmem MAP_PRIVATE case requires checking the i_size */inode = dst_vma->vm_file->f_inode; offset = linear_page_index(dst_vma, dst_addr); ...
page_table = pte_offset_map_lock(mm, pmd, address, &ptl); if (!pte_none(*page_table)) goto unlock; goto setpte; } /*如果是写操作,则要分配一个新的页*/ /* Allocate our own private page. */ if (unlikely(anon_vma_prepare(vma)))//分配一个anon_vma实例 ...