提交 c4304529 编写于 作者: A Atsushi Nemoto 提交者: Ralf Baechle

MIPS: Make local arrays with CL_SIZE static __initdata

Since commit 22242681 ("MIPS: Extend
COMMAND_LINE_SIZE"), CL_SIZE is 4096 and local array variables with this
size will cause an build failure with default CONFIG_FRAME_WARN settings.

Although current users of such array variables are all early bootstrap
code and not likely to cause real stack overflow (thread_info corruption),
it is preferable to  to declare these arrays static with __initdata.
Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 f8ac0425
...@@ -100,7 +100,7 @@ static __init void prom_init_console(void) ...@@ -100,7 +100,7 @@ static __init void prom_init_console(void)
static __init void prom_init_cmdline(void) static __init void prom_init_cmdline(void)
{ {
char buf[CL_SIZE]; static char buf[CL_SIZE] __initdata;
/* Get the kernel command line from CFE */ /* Get the kernel command line from CFE */
if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) { if (cfe_getenv("LINUX_CMDLINE", buf, CL_SIZE) >= 0) {
......
...@@ -54,7 +54,8 @@ static struct prom_pmemblock * __init prom_getmdesc(void) ...@@ -54,7 +54,8 @@ static struct prom_pmemblock * __init prom_getmdesc(void)
{ {
char *memsize_str; char *memsize_str;
unsigned int memsize; unsigned int memsize;
char cmdline[CL_SIZE], *ptr; char *ptr;
static char cmdline[CL_SIZE] __initdata;
/* otherwise look in the environment */ /* otherwise look in the environment */
memsize_str = prom_getenv("memsize"); memsize_str = prom_getenv("memsize");
......
...@@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag) ...@@ -69,7 +69,7 @@ static inline unsigned long tag2ul(char *arg, const char *tag)
void __init prom_setup_cmdline(void) void __init prom_setup_cmdline(void)
{ {
char cmd_line[CL_SIZE]; static char cmd_line[CL_SIZE] __initdata;
char *cp, *board; char *cp, *board;
int prom_argc; int prom_argc;
char **prom_argv, **prom_envp; char **prom_argv, **prom_envp;
......
...@@ -160,7 +160,7 @@ static void __init prom_init_cmdline(void) ...@@ -160,7 +160,7 @@ static void __init prom_init_cmdline(void)
int argc; int argc;
int *argv32; int *argv32;
int i; /* Always ignore the "-c" at argv[0] */ int i; /* Always ignore the "-c" at argv[0] */
char builtin[CL_SIZE]; static char builtin[CL_SIZE] __initdata;
if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) { if (fw_arg0 >= CKSEG0 || fw_arg1 < CKSEG0) {
/* /*
...@@ -315,7 +315,7 @@ static inline void txx9_cache_fixup(void) ...@@ -315,7 +315,7 @@ static inline void txx9_cache_fixup(void)
static void __init preprocess_cmdline(void) static void __init preprocess_cmdline(void)
{ {
char cmdline[CL_SIZE]; static char cmdline[CL_SIZE] __initdata;
char *s; char *s;
strcpy(cmdline, arcs_cmdline); strcpy(cmdline, arcs_cmdline);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册