diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index 552ae3d69435..ff17850a52d9 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -950,7 +950,7 @@ static inline int copy_pmd_range(struct mm_struct *dst_mm, struct mm_struct *src | |||
950 | src_pmd = pmd_offset(src_pud, addr); | 950 | src_pmd = pmd_offset(src_pud, addr); |
951 | do { | 951 | do { |
952 | next = pmd_addr_end(addr, end); | 952 | next = pmd_addr_end(addr, end); |
953 | if (pmd_trans_huge(*src_pmd)) { | 953 | if (pmd_trans_huge(*src_pmd) || pmd_devmap(*src_pmd)) { |
954 | int err; | 954 | int err; |
955 | VM_BUG_ON(next-addr != HPAGE_PMD_SIZE); | 955 | VM_BUG_ON(next-addr != HPAGE_PMD_SIZE); |
956 | err = copy_huge_pmd(dst_mm, src_mm, | 956 | err = copy_huge_pmd(dst_mm, src_mm, |
@@ -1177,7 +1177,7 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, | |||
1177 | pmd = pmd_offset(pud, addr); | 1177 | pmd = pmd_offset(pud, addr); |
1178 | do { | 1178 | do { |
1179 | next = pmd_addr_end(addr, end); | 1179 | next = pmd_addr_end(addr, end); |
1180 | if (pmd_trans_huge(*pmd)) { | 1180 | if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) { |
1181 | if (next - addr != HPAGE_PMD_SIZE) { | 1181 | if (next - addr != HPAGE_PMD_SIZE) { |
1182 | #ifdef CONFIG_DEBUG_VM | 1182 | #ifdef CONFIG_DEBUG_VM |
1183 | if (!rwsem_is_locked(&tlb->mm->mmap_sem)) { | 1183 | if (!rwsem_is_locked(&tlb->mm->mmap_sem)) { |
@@ -3375,7 +3375,7 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3375 | int ret; | 3375 | int ret; |
3376 | 3376 | ||
3377 | barrier(); | 3377 | barrier(); |
3378 | if (pmd_trans_huge(orig_pmd)) { | 3378 | if (pmd_trans_huge(orig_pmd) || pmd_devmap(orig_pmd)) { |
3379 | unsigned int dirty = flags & FAULT_FLAG_WRITE; | 3379 | unsigned int dirty = flags & FAULT_FLAG_WRITE; |
3380 | 3380 | ||
3381 | if (pmd_protnone(orig_pmd)) | 3381 | if (pmd_protnone(orig_pmd)) |
@@ -3404,7 +3404,7 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3404 | unlikely(__pte_alloc(mm, vma, pmd, address))) | 3404 | unlikely(__pte_alloc(mm, vma, pmd, address))) |
3405 | return VM_FAULT_OOM; | 3405 | return VM_FAULT_OOM; |
3406 | /* if an huge pmd materialized from under us just retry later */ | 3406 | /* if an huge pmd materialized from under us just retry later */ |
3407 | if (unlikely(pmd_trans_huge(*pmd))) | 3407 | if (unlikely(pmd_trans_huge(*pmd) || pmd_devmap(*pmd))) |
3408 | return 0; | 3408 | return 0; |
3409 | /* | 3409 | /* |
3410 | * A regular pmd is established and it can't morph into a huge pmd | 3410 | * A regular pmd is established and it can't morph into a huge pmd |