提交 0e4aa9c2 编写于 作者: A Amos Waterland 提交者: Paul Mackerras

[POWERPC] Fix builtin command line interaction with firmware

It seems that prom_init's early_cmdline_parse is broken on at least
Apple 970 xserves and IBM JS20 blades with SLOF.  The firmware of these
machines returns -1 and 1 respectively when getprop is called for the
bootargs property of /chosen, causing Linux to ignore its builtin
command line in favor of a null string.  This patch makes Linux use its
builtin command line if getprop returns an error or a null string.
Signed-off-by: NAmos Waterland <apw@us.ibm.com>
Acked-by: NSegher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 6fe87675
...@@ -567,7 +567,7 @@ static void __init early_cmdline_parse(void) ...@@ -567,7 +567,7 @@ static void __init early_cmdline_parse(void)
if ((long)_prom->chosen > 0) if ((long)_prom->chosen > 0)
l = prom_getprop(_prom->chosen, "bootargs", p, COMMAND_LINE_SIZE-1); l = prom_getprop(_prom->chosen, "bootargs", p, COMMAND_LINE_SIZE-1);
#ifdef CONFIG_CMDLINE #ifdef CONFIG_CMDLINE
if (l == 0) /* dbl check */ if (l <= 0 || p[0] == '\0') /* dbl check */
strlcpy(RELOC(prom_cmd_line), strlcpy(RELOC(prom_cmd_line),
RELOC(CONFIG_CMDLINE), sizeof(prom_cmd_line)); RELOC(CONFIG_CMDLINE), sizeof(prom_cmd_line));
#endif /* CONFIG_CMDLINE */ #endif /* CONFIG_CMDLINE */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册