summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-02-12 21:16:09 +0100
committerThomas Gleixner <tglx@linutronix.de>2009-02-12 23:11:58 +0100
commit7ad9de6ac83bd825996d2de98c92e0f425c31050 (patch)
tree7a4fb15f5b3995a731099b9b110e197da339d022 /arch
parent34b0900d323122113683685b200aae9f9b75e63b (diff)
downloadop-kernel-dev-7ad9de6ac83bd825996d2de98c92e0f425c31050.zip
op-kernel-dev-7ad9de6ac83bd825996d2de98c92e0f425c31050.tar.gz
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>
Diffstat (limited to 'arch')
-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 f664bc1..8ca0d85 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)
address = cpa->vaddr[cpa->curpage];
else
address = *cpa->vaddr;
-
- /*
- * If we're called with lazy mmu updates enabled, the
- * in-memory pte state may be stale. Flush pending updates to
- * bring them up to date.
- */
- arch_flush_lazy_mmu_mode();
-
repeat:
kpte = lookup_address(address, &level);
if (!kpte)
@@ -819,6 +811,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
vm_unmap_aliases();
+ /*
+ * If we're called with lazy mmu updates enabled, the
+ * in-memory pte state may be stale. Flush pending updates to
+ * bring them up to date.
+ */
+ arch_flush_lazy_mmu_mode();
+
cpa.vaddr = addr;
cpa.numpages = numpages;
cpa.mask_set = mask_set;
OpenPOWER on IntegriCloud