]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/init_64.c
c_p_a(): do a simple self test at boot
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / init_64.c
index 8198840c3dcba73cc156719d45f6126a7b46b0f8..0fd9d7f77786193a7fc77f18e1093fa150118d84 100644 (file)
@@ -606,6 +606,16 @@ void mark_rodata_ro(void)
         * of who is the culprit.
         */
        global_flush_tlb();
+
+#ifdef CONFIG_CPA_DEBUG
+       printk("Testing CPA: undo %lx-%lx\n", start, end);
+       change_page_attr_addr(start, (end - start) >> PAGE_SHIFT, PAGE_KERNEL);
+       global_flush_tlb();
+
+       printk("Testing CPA: again\n");
+       change_page_attr_addr(start, (end - start) >> PAGE_SHIFT, PAGE_KERNEL_RO);
+       global_flush_tlb();
+#endif
 }
 #endif