aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init/main.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/init/main.c b/init/main.c
index e8ae1fef0908..bb1aed928f21 100644
--- a/init/main.c
+++ b/init/main.c
@@ -6,7 +6,7 @@
6 * GK 2/5/95 - Changed to support mounting root fs via NFS 6 * GK 2/5/95 - Changed to support mounting root fs via NFS
7 * Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96 7 * Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96
8 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96 8 * Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
9 * Simplified starting of init: Michael A. Griffith <grif@acm.org> 9 * Simplified starting of init: Michael A. Griffith <grif@acm.org>
10 */ 10 */
11 11
12#define DEBUG /* Enable initcall_debug */ 12#define DEBUG /* Enable initcall_debug */
@@ -136,7 +136,7 @@ static char *ramdisk_execute_command;
136 * Used to generate warnings if static_key manipulation functions are used 136 * Used to generate warnings if static_key manipulation functions are used
137 * before jump_label_init is called. 137 * before jump_label_init is called.
138 */ 138 */
139bool static_key_initialized __read_mostly = false; 139bool static_key_initialized __read_mostly;
140EXPORT_SYMBOL_GPL(static_key_initialized); 140EXPORT_SYMBOL_GPL(static_key_initialized);
141 141
142/* 142/*
@@ -159,8 +159,8 @@ static int __init set_reset_devices(char *str)
159 159
160__setup("reset_devices", set_reset_devices); 160__setup("reset_devices", set_reset_devices);
161 161
162static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; 162static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
163const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; 163const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
164static const char *panic_later, *panic_param; 164static const char *panic_later, *panic_param;
165 165
166extern const struct obs_kernel_param __setup_start[], __setup_end[]; 166extern const struct obs_kernel_param __setup_start[], __setup_end[];
@@ -199,7 +199,6 @@ static int __init obsolete_checksetup(char *line)
199 * still work even if initially too large, it will just take slightly longer 199 * still work even if initially too large, it will just take slightly longer
200 */ 200 */
201unsigned long loops_per_jiffy = (1<<12); 201unsigned long loops_per_jiffy = (1<<12);
202
203EXPORT_SYMBOL(loops_per_jiffy); 202EXPORT_SYMBOL(loops_per_jiffy);
204 203
205static int __init debug_kernel(char *str) 204static int __init debug_kernel(char *str)
@@ -376,8 +375,8 @@ static void __init setup_command_line(char *command_line)
376 initcall_command_line = 375 initcall_command_line =
377 memblock_virt_alloc(strlen(boot_command_line) + 1, 0); 376 memblock_virt_alloc(strlen(boot_command_line) + 1, 0);
378 static_command_line = memblock_virt_alloc(strlen(command_line) + 1, 0); 377 static_command_line = memblock_virt_alloc(strlen(command_line) + 1, 0);
379 strcpy (saved_command_line, boot_command_line); 378 strcpy(saved_command_line, boot_command_line);
380 strcpy (static_command_line, command_line); 379 strcpy(static_command_line, command_line);
381} 380}
382 381
383/* 382/*
@@ -445,8 +444,8 @@ void __init parse_early_options(char *cmdline)
445/* Arch code calls this early on, or if not, just before other parsing. */ 444/* Arch code calls this early on, or if not, just before other parsing. */
446void __init parse_early_param(void) 445void __init parse_early_param(void)
447{ 446{
448 static __initdata int done = 0; 447 static int done __initdata;
449 static __initdata char tmp_cmdline[COMMAND_LINE_SIZE]; 448 static char tmp_cmdline[COMMAND_LINE_SIZE] __initdata;
450 449
451 if (done) 450 if (done)
452 return; 451 return;
@@ -500,7 +499,8 @@ static void __init mm_init(void)
500 499
501asmlinkage __visible void __init start_kernel(void) 500asmlinkage __visible void __init start_kernel(void)
502{ 501{
503 char * command_line, *after_dashes; 502 char *command_line;
503 char *after_dashes;
504 extern const struct kernel_param __start___param[], __stop___param[]; 504 extern const struct kernel_param __start___param[], __stop___param[];
505 505
506 /* 506 /*
@@ -572,7 +572,8 @@ asmlinkage __visible void __init start_kernel(void)
572 * fragile until we cpu_idle() for the first time. 572 * fragile until we cpu_idle() for the first time.
573 */ 573 */
574 preempt_disable(); 574 preempt_disable();
575 if (WARN(!irqs_disabled(), "Interrupts were enabled *very* early, fixing it\n")) 575 if (WARN(!irqs_disabled(),
576 "Interrupts were enabled *very* early, fixing it\n"))
576 local_irq_disable(); 577 local_irq_disable();
577 idr_init_cache(); 578 idr_init_cache();
578 rcu_init(); 579 rcu_init();