aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-06 03:12:01 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:36 -0500
commit37b73c828185731f6236a6387c02d7b08c150810 (patch)
tree312b9f082f78072aba62ee2230e417928156873e /init/main.c
parentd89c145c0344fe2180336af6a309a59a8bc8c1c0 (diff)
[PATCH] x86/x86_64: mark rodata section read only: generic infrastructure
Generic prep-work for marking the .rodata section readonly: * Align the rodata section at 4Kb boundary * call the mark_rodata_ro() function when available Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 54aaf561cf66..2ed3638deec7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -52,6 +52,7 @@
52#include <asm/bugs.h> 52#include <asm/bugs.h>
53#include <asm/setup.h> 53#include <asm/setup.h>
54#include <asm/sections.h> 54#include <asm/sections.h>
55#include <asm/cacheflush.h>
55 56
56/* 57/*
57 * This is one of the first .c files built. Error out early 58 * This is one of the first .c files built. Error out early
@@ -99,6 +100,9 @@ extern void acpi_early_init(void);
99#else 100#else
100static inline void acpi_early_init(void) { } 101static inline void acpi_early_init(void) { }
101#endif 102#endif
103#ifndef CONFIG_DEBUG_RODATA
104static inline void mark_rodata_ro(void) { }
105#endif
102 106
103#ifdef CONFIG_TC 107#ifdef CONFIG_TC
104extern void tc_init(void); 108extern void tc_init(void);
@@ -708,6 +712,7 @@ static int init(void * unused)
708 */ 712 */
709 free_initmem(); 713 free_initmem();
710 unlock_kernel(); 714 unlock_kernel();
715 mark_rodata_ro();
711 system_state = SYSTEM_RUNNING; 716 system_state = SYSTEM_RUNNING;
712 numa_default_policy(); 717 numa_default_policy();
713 718