aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index f7b941c3b2c3..0d3369b900e9 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -752,15 +752,11 @@ void mark_rodata_ro(void)
752 printk("Write protecting the kernel text: %luk\n", size >> 10); 752 printk("Write protecting the kernel text: %luk\n", size >> 10);
753 753
754#ifdef CONFIG_CPA_DEBUG 754#ifdef CONFIG_CPA_DEBUG
755 global_flush_tlb();
756
757 printk("Testing CPA: Reverting %lx-%lx\n", start, start+size); 755 printk("Testing CPA: Reverting %lx-%lx\n", start, start+size);
758 set_pages_rw(virt_to_page(start), size>>PAGE_SHIFT); 756 set_pages_rw(virt_to_page(start), size>>PAGE_SHIFT);
759 global_flush_tlb();
760 757
761 printk("Testing CPA: write protecting again\n"); 758 printk("Testing CPA: write protecting again\n");
762 set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT); 759 set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT);
763 global_flush_tlb();
764#endif 760#endif
765 } 761 }
766#endif 762#endif
@@ -770,22 +766,12 @@ void mark_rodata_ro(void)
770 printk("Write protecting the kernel read-only data: %luk\n", 766 printk("Write protecting the kernel read-only data: %luk\n",
771 size >> 10); 767 size >> 10);
772 768
773 /*
774 * set_pages_*() requires a global_flush_tlb() call after it.
775 * We do this after the printk so that if something went wrong in the
776 * change, the printk gets out at least to give a better debug hint
777 * of who is the culprit.
778 */
779 global_flush_tlb();
780
781#ifdef CONFIG_CPA_DEBUG 769#ifdef CONFIG_CPA_DEBUG
782 printk("Testing CPA: undo %lx-%lx\n", start, start + size); 770 printk("Testing CPA: undo %lx-%lx\n", start, start + size);
783 set_pages_rw(virt_to_page(start), size >> PAGE_SHIFT); 771 set_pages_rw(virt_to_page(start), size >> PAGE_SHIFT);
784 global_flush_tlb();
785 772
786 printk("Testing CPA: write protecting again\n"); 773 printk("Testing CPA: write protecting again\n");
787 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); 774 set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
788 global_flush_tlb();
789#endif 775#endif
790} 776}
791#endif 777#endif