]> err.no Git - linux-2.6/blobdiff - arch/x86/mm/init_32.c
x86 mmiotrace: move files into arch/x86/mm/.
[linux-2.6] / arch / x86 / mm / init_32.c
index ec30d10154b657a63ab07b5e25b4298c10f4aabe..f96eca21ad8fe4adb65f24856cab2a4b62af7c74 100644 (file)
@@ -710,6 +710,8 @@ void mark_rodata_ro(void)
        unsigned long start = PFN_ALIGN(_text);
        unsigned long size = PFN_ALIGN(_etext) - start;
 
+#ifndef CONFIG_DYNAMIC_FTRACE
+       /* Dynamic tracing modifies the kernel text section */
        set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);
        printk(KERN_INFO "Write protecting the kernel text: %luk\n",
                size >> 10);
@@ -722,6 +724,8 @@ void mark_rodata_ro(void)
        printk(KERN_INFO "Testing CPA: write protecting again\n");
        set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT);
 #endif
+#endif /* CONFIG_DYNAMIC_FTRACE */
+
        start += size;
        size = (unsigned long)__end_rodata - start;
        set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT);