All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string
@ 2014-10-06 16:06 Dave Kleikamp
  2014-10-07  4:23 ` David Miller
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Dave Kleikamp @ 2014-10-06 16:06 UTC (permalink / raw)
  To: sparclinux

sparc64 defines COMMAND_LINE_SIZE to be 2048, but the boot string is
hard-coded to be 256 bytes long.

based on a patch by Bob Picco

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Bob Picco <bob.picco@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/prom/bootstr_64.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/prom/bootstr_64.c b/arch/sparc/prom/bootstr_64.c
index ab9ccc6..4b9d73c 100644
--- a/arch/sparc/prom/bootstr_64.c
+++ b/arch/sparc/prom/bootstr_64.c
@@ -8,19 +8,19 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <asm/oplib.h>
+#include <asm/setup.h>
 
 /* WARNING: The boot loader knows that these next three variables come one right
  *          after another in the .data section.  Do not move this stuff into
  *          the .bss section or it will break things.
  */
 
-#define BARG_LEN  256
 struct {
 	int bootstr_len;
 	int bootstr_valid;
-	char bootstr_buf[BARG_LEN];
+	char bootstr_buf[COMMAND_LINE_SIZE];
 } bootstr_info = {
-	.bootstr_len = BARG_LEN,
+	.bootstr_len = COMMAND_LINE_SIZE,
 #ifdef CONFIG_CMDLINE
 	.bootstr_valid = 1,
 	.bootstr_buf = CONFIG_CMDLINE,
@@ -34,7 +34,7 @@ prom_getbootargs(void)
 	if (bootstr_info.bootstr_valid)
 		return bootstr_info.bootstr_buf;
 	prom_getstring(prom_chosen_node, "bootargs",
-		       bootstr_info.bootstr_buf, BARG_LEN);
+		       bootstr_info.bootstr_buf, COMMAND_LINE_SIZE);
 	bootstr_info.bootstr_valid = 1;
 	return bootstr_info.bootstr_buf;
 }
-- 
2.1.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-07 19:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-06 16:06 [PATCH] sparc64: use COMMAND_LINE_SIZE for boot string Dave Kleikamp
2014-10-07  4:23 ` David Miller
2014-10-07 12:44 ` Dave Kleikamp
2014-10-07 13:23 ` Dave Kleikamp
2014-10-07 18:38 ` Kjetil Oftedal
2014-10-07 18:49 ` Dave Kleikamp
2014-10-07 18:54 ` David Miller
2014-10-07 19:03 ` David Miller
2014-10-07 19:19 ` Dave Kleikamp
2014-10-07 19:23 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.