aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:34:07 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:34:07 -0500
commitd7c8f21a8cad0228c7c5ce2bb6dbd95d1ee49d13 (patch)
treed1e305bec62022a0bec82a3499a372c2c7c40583 /arch/x86/mm/init_64.c
parentd1028a154c65d7fadd1b2d0276c077014d401ec7 (diff)
x86: cpa: move flush to cpa
The set_memory_* and set_pages_* family of API's currently requires the callers to do a global tlb flush after the function call; forgetting this is a very nasty deathtrap. This patch moves the global tlb flush into each of the callers Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 4757be7b5e55..9b69fa54a831 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -610,22 +610,12 @@ void mark_rodata_ro(void)
610 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", 610 printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
611 (end - start) >> 10); 611 (end - start) >> 10);
612 612
613 /*
614 * set_memory_*() requires a global_flush_tlb() call after it.
615 * We do this after the printk so that if something went wrong in the
616 * change, the printk gets out at least to give a better debug hint
617 * of who is the culprit.
618 */
619 global_flush_tlb();
620
621#ifdef CONFIG_CPA_DEBUG 613#ifdef CONFIG_CPA_DEBUG
622 printk("Testing CPA: undo %lx-%lx\n", start, end); 614 printk("Testing CPA: undo %lx-%lx\n", start, end);
623 set_memory_rw(start, (end-start) >> PAGE_SHIFT); 615 set_memory_rw(start, (end-start) >> PAGE_SHIFT);
624 global_flush_tlb();
625 616
626 printk("Testing CPA: again\n"); 617 printk("Testing CPA: again\n");
627 set_memory_ro(start, (end-start) >> PAGE_SHIFT); 618 set_memory_ro(start, (end-start) >> PAGE_SHIFT);
628 global_flush_tlb();
629#endif 619#endif
630} 620}
631#endif 621#endif