aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index f664bc1c4093..8ca0d8566fc8 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -575,14 +575,6 @@ static int __change_page_attr(struct cpa_data *cpa, int primary)
575 address = cpa->vaddr[cpa->curpage]; 575 address = cpa->vaddr[cpa->curpage];
576 else 576 else
577 address = *cpa->vaddr; 577 address = *cpa->vaddr;
578
579 /*
580 * If we're called with lazy mmu updates enabled, the
581 * in-memory pte state may be stale. Flush pending updates to
582 * bring them up to date.
583 */
584 arch_flush_lazy_mmu_mode();
585
586repeat: 578repeat:
587 kpte = lookup_address(address, &level); 579 kpte = lookup_address(address, &level);
588 if (!kpte) 580 if (!kpte)
@@ -819,6 +811,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
819 811
820 vm_unmap_aliases(); 812 vm_unmap_aliases();
821 813
814 /*
815 * If we're called with lazy mmu updates enabled, the
816 * in-memory pte state may be stale. Flush pending updates to
817 * bring them up to date.
818 */
819 arch_flush_lazy_mmu_mode();
820
822 cpa.vaddr = addr; 821 cpa.vaddr = addr;
823 cpa.numpages = numpages; 822 cpa.numpages = numpages;
824 cpa.mask_set = mask_set; 823 cpa.mask_set = mask_set;