projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'trace-v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux-2.6-microblaze.git]
/
init
/
main.c
diff --git
a/init/main.c
b/init/main.c
index
daad697
..
5c9a48d
100644
(file)
--- a/
init/main.c
+++ b/
init/main.c
@@
-153,10
+153,10
@@
static char *extra_init_args;
#ifdef CONFIG_BOOT_CONFIG
/* Is bootconfig on command line? */
static bool bootconfig_found;
#ifdef CONFIG_BOOT_CONFIG
/* Is bootconfig on command line? */
static bool bootconfig_found;
-static
bool initargs_found
;
+static
size_t initargs_offs
;
#else
# define bootconfig_found false
#else
# define bootconfig_found false
-# define initargs_
found false
+# define initargs_
offs 0
#endif
static char *execute_command;
#endif
static char *execute_command;
@@
-422,9
+422,9
@@
static void __init setup_boot_config(void)
if (IS_ERR(err) || !bootconfig_found)
return;
if (IS_ERR(err) || !bootconfig_found)
return;
- /* parse_args() stops at '--' and returns an address */
+ /* parse_args() stops at
the next param of
'--' and returns an address */
if (err)
if (err)
- initargs_
found = tru
e;
+ initargs_
offs = err - tmp_cmdlin
e;
if (!data) {
pr_err("'bootconfig' found on command line, but no bootconfig found\n");
if (!data) {
pr_err("'bootconfig' found on command line, but no bootconfig found\n");
@@
-468,7
+468,12
@@
static void __init setup_boot_config(void)
return;
}
return;
}
-#else
+static void __init exit_boot_config(void)
+{
+ xbc_destroy_all();
+}
+
+#else /* !CONFIG_BOOT_CONFIG */
static void __init setup_boot_config(void)
{
static void __init setup_boot_config(void)
{
@@
-481,7
+486,11
@@
static int __init warn_bootconfig(char *str)
pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOT_CONFIG is not set.\n");
return 0;
}
pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOT_CONFIG is not set.\n");
return 0;
}
-#endif
+
+#define exit_boot_config() do {} while (0)
+
+#endif /* CONFIG_BOOT_CONFIG */
+
early_param("bootconfig", warn_bootconfig);
/* Change NUL term back to "=", to make "param" the whole string. */
early_param("bootconfig", warn_bootconfig);
/* Change NUL term back to "=", to make "param" the whole string. */
@@
-646,16
+655,21
@@
static void __init setup_command_line(char *command_line)
* Append supplemental init boot args to saved_command_line
* so that user can check what command line options passed
* to init.
* Append supplemental init boot args to saved_command_line
* so that user can check what command line options passed
* to init.
+ * The order should always be
+ * " -- "[bootconfig init-param][cmdline init-param]
*/
*/
- len = strlen(saved_command_line);
- if (initargs_found) {
- saved_command_line[len++] = ' ';
+ if (initargs_offs) {
+ len = xlen + initargs_offs;
+ strcpy(saved_command_line + len, extra_init_args);
+ len += ilen - 4; /* strlen(extra_init_args) */
+ strcpy(saved_command_line + len,
+ boot_command_line + initargs_offs - 1);
} else {
} else {
+ len = strlen(saved_command_line);
strcpy(saved_command_line + len, " -- ");
len += 4;
strcpy(saved_command_line + len, " -- ");
len += 4;
+ strcpy(saved_command_line + len, extra_init_args);
}
}
-
- strcpy(saved_command_line + len, extra_init_args);
}
}
}
}
@@
-777,6
+791,8
@@
void __init __weak poking_init(void) { }
void __init __weak pgtable_cache_init(void) { }
void __init __weak pgtable_cache_init(void) { }
+void __init __weak trap_init(void) { }
+
bool initcall_debug;
core_param(initcall_debug, initcall_debug, bool, 0644);
bool initcall_debug;
core_param(initcall_debug, initcall_debug, bool, 0644);
@@
-1392,7
+1408,6
@@
static void __init do_basic_setup(void)
driver_init();
init_irq_proc();
do_ctors();
driver_init();
init_irq_proc();
do_ctors();
- usermodehelper_enable();
do_initcalls();
}
do_initcalls();
}
@@
-1493,6
+1508,7
@@
static int __ref kernel_init(void *unused)
kprobe_free_init_mem();
ftrace_free_init_mem();
kgdb_free_init_mem();
kprobe_free_init_mem();
ftrace_free_init_mem();
kgdb_free_init_mem();
+ exit_boot_config();
free_initmem();
mark_readonly();
free_initmem();
mark_readonly();