aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-02-12 15:16:09 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-02-12 17:11:58 -0500
commit7ad9de6ac83bd825996d2de98c92e0f425c31050 (patch)
tree7a4fb15f5b3995a731099b9b110e197da339d022
parent34b0900d323122113683685b200aae9f9b75e63b (diff)
x86: CPA avoid repeated lazy mmu flush
Impact: Flush the lazy MMU only once Pending mmu updates only need to be flushed once to bring the in-memory pagetable state up to date. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-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;