]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: use COMMAND_LINE_SIZE for boot string
authorAllen Pais <allen.pais@oracle.com>
Sat, 6 Feb 2016 05:14:23 +0000 (10:44 +0530)
committerAllen Pais <allen.pais@oracle.com>
Thu, 15 Sep 2016 06:34:01 +0000 (12:04 +0530)
    Orabug: 19722011

    original patch by Bob Picco

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: Bob Picco <bob.picco@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
(cherry picked from commit 1a9bf6b57dbfcc4ec8e8d98bd20b7975f4b4934f)
(cherry picked from commit 017214c5742ee92e3270024c4cce1cecb793ac1c)

arch/sparc/prom/bootstr_64.c

index 7149e77714a4a45b3ffb96e1388adca25577cca6..a4909445d9861803024ce3c86d3ca4e0ce5e08f3 100644 (file)
@@ -8,6 +8,7 @@
 #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
 /* We limit BARG_LEN to 1024 because this is the size of the
  * 'barg_out' command line buffer in the SILO bootloader.
  */
-#define BARG_LEN 1024
 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,
@@ -37,7 +37,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;
 }