summaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-05-14 11:33:55 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-05-14 11:33:55 +1000
commita10383e5c81d840b07cc9f8f73ec788842420b95 (patch)
tree5030f0933d35ec06288dbe643d739b85f482a8c4 /init/main.c
parentd8c6eb1bbba38150aa94eb7df7eb4891068fb207 (diff)
parentfbacd62d91b35f652c62d2220c0873cbb4e9e08d (diff)
Merge branch 'quilt/driver-core'
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index f406fefa626c..88d52b99e999 100644
--- a/init/main.c
+++ b/init/main.c
@@ -789,12 +789,21 @@ static void run_init_process(char *init_filename)
kernel_execve(init_filename, argv_init, envp_init);
}
+/*
+ * __init/__init_data sections are turned into normal
+ * dynamically allocated memory later in boot. When
+ * this is 0, the memory is for the __init purposes,
+ * when it it some other value, the memory is dynamic.
+ */
+int initmem_now_dynamic;
+
/* This is a non __init function. Force it to be noinline otherwise gcc
* makes it inline to init() and it becomes part of init.text section
*/
static int noinline init_post(void)
{
free_initmem();
+ initmem_now_dynamic = 1;
unlock_kernel();
mark_rodata_ro();
system_state = SYSTEM_RUNNING;