]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - init/main.c
[PATCH] x86/x86_64: mark rodata section read only: generic infrastructure
[linux-2.6-omap-h63xx.git] / init / main.c
index 54aaf561cf6626fc09acadf4b1ece9a12bb217cb..2ed3638deec7c996a5807c1ff18494ab5b576850 100644 (file)
@@ -52,6 +52,7 @@
 #include <asm/bugs.h>
 #include <asm/setup.h>
 #include <asm/sections.h>
+#include <asm/cacheflush.h>
 
 /*
  * This is one of the first .c files built. Error out early
@@ -99,6 +100,9 @@ extern void acpi_early_init(void);
 #else
 static inline void acpi_early_init(void) { }
 #endif
+#ifndef CONFIG_DEBUG_RODATA
+static inline void mark_rodata_ro(void) { }
+#endif
 
 #ifdef CONFIG_TC
 extern void tc_init(void);
@@ -708,6 +712,7 @@ static int init(void * unused)
         */
        free_initmem();
        unlock_kernel();
+       mark_rodata_ro();
        system_state = SYSTEM_RUNNING;
        numa_default_policy();