| 函数逻辑报告 | 
| Source Code: mm\hugetlb.c | Create Date:2022-07-27 17:01:32 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:hugetlb_change_protection
函数原型:unsigned long hugetlb_change_protection(struct vm_area_struct *vma, unsigned long address, unsigned long end, pgprot_t newprot)
返回类型:unsigned long
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct vm_area_struct * | vma | |
| unsigned long | address | |
| unsigned long | end | |
| pgprot_t | newprot | 
| 4454 | h等于hstate_vma(vma) | 
| 4455 | pages等于0 | 
| 4456 | bool shared_pmd = false | 
| 4464 | mmu_notifier_range_init( & range, MMU_NOTIFY_PROTECTION_VMA, 0, vma, mm, start, end) | 
| 4466 | adjust_range_if_pmd_sharing_possible(vma, & start, & end) | 
| 4469 | flush_cache_range(vma, start, end) | 
| 4471 | mmu_notifier_invalidate_range_start( & range) | 
| 4472 | i_mmap_lock_write(f_mapping) | 
| 4475 | ptep等于huge_pte_offset(mm, address, huge_page_size(h)) | 
| 4476 | 如果非ptep则继续下一循环 | 
| 4478 | ptl等于huge_pte_lock(h, mm, ptep) | 
| 4479 | 如果huge_pmd_unshare(mm, & address, ptep)则 | 
| 4485 | pte等于huge_ptep_get(ptep) | 
| 4486 | 如果此条件成立可能性小(为编译器优化)(is_hugetlb_entry_hwpoisoned(pte))则 | 
| 4487 | 自旋锁解锁 | 
| 4488 | 继续下一循环 | 
| 4490 | 如果此条件成立可能性小(为编译器优化)(is_hugetlb_entry_migration(pte))则 | 
| 4491 | entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t. | 
| 4493 | 如果is_write_migration_entry(entry)则 | 
| 4496 | make_migration_entry_read( & entry) | 
| 4497 | newpte等于Convert the arch-independent representation of a swp_entry_t into the* arch-dependent pte representation. | 
| 4498 | set_huge_swap_pte_at(mm, address, ptep, newpte, huge_page_size(h)) | 
| 4500 | pages自加 | 
| 4502 | 自旋锁解锁 | 
| 4503 | 继续下一循环 | 
| 4505 | 如果非huge_pte_none(pte)则 | 
| 4508 | old_pte等于huge_ptep_modify_prot_start(vma, address, ptep) | 
| 4509 | pte等于pte_mkhuge(huge_pte_modify(old_pte, newprot)) | 
| 4510 | pte等于arch_make_huge_pte(pte, vma, NULL, 0) | 
| 4512 | pages自加 | 
| 4514 | 自旋锁解锁 | 
| 4523 | 如果shared_pmd则ARCHes with special requirements for evicting HUGETLB backing TLB entries can* implement this.(vma, start, end) | 
| 4525 | 否则ARCHes with special requirements for evicting HUGETLB backing TLB entries can* implement this.(vma, start, end) | 
| 4533 | i_mmap_unlock_write(f_mapping) | 
| 4534 | mmu_notifier_invalidate_range_end( & range) | 
| 名称 | 描述 | 
|---|---|
| change_protection | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |