+/* Check for early params. */
+static int __init do_early_param(char *param, char *val)
+{
+ struct obs_kernel_param *p;
+ extern struct obs_kernel_param __setup_start, __setup_end;
+
+ for (p = &__setup_start; p < &__setup_end; p++) {
+ if (p->early && strcmp(param, p->str) == 0) {
+ if (p->setup_func(val) != 0)
+ printk(KERN_WARNING
+ "Malformed early option '%s'\n", param);
+ }
+ }
+ /* We accept everything at this stage. */
+ return 0;
+}
+
+/* Arch code calls this early on, or if not, just before other parsing. */
+void __init parse_early_param(void)
+{
+ static __initdata int done = 0;
+ static __initdata char tmp_cmdline[COMMAND_LINE_SIZE];
+
+ if (done)
+ return;
+
+ /* All fall through to do_early_param. */
+ strlcpy(tmp_cmdline, saved_command_line, COMMAND_LINE_SIZE);
+ parse_args("early options", tmp_cmdline, NULL, 0, do_early_param);
+ done = 1;
+}
+