diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-25 19:29:51 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 12:37:27 -0400 |
commit | 312717f15ac7095c3ea98d487276781535ca7c0b (patch) | |
tree | 091a03eade792294600970ba1c556ce79e059ba3 /arch | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) |
c6x: use boot_command_line instead of private c6x_command_line
Save some pointless copying of the kernel command line and just use
boot_command_line instead.
Also remove default_command_line as it is not referenced anywhere, and
the DT code already handles the default command line.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Mark Salter <msalter@redhat.com>
Acked-by: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: linux-c6x-dev@linux-c6x.org
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/c6x/include/asm/setup.h | 2 | ||||
-rw-r--r-- | arch/c6x/kernel/devicetree.c | 2 | ||||
-rw-r--r-- | arch/c6x/kernel/setup.c | 11 | ||||
-rw-r--r-- | arch/c6x/kernel/vmlinux.lds.S | 6 |
4 files changed, 2 insertions, 19 deletions
diff --git a/arch/c6x/include/asm/setup.h b/arch/c6x/include/asm/setup.h index ecead15872a6..696804475f55 100644 --- a/arch/c6x/include/asm/setup.h +++ b/arch/c6x/include/asm/setup.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #include <uapi/asm/setup.h> | 14 | #include <uapi/asm/setup.h> |
15 | 15 | ||
16 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
17 | extern char c6x_command_line[COMMAND_LINE_SIZE]; | ||
18 | |||
19 | extern int c6x_add_memory(phys_addr_t start, unsigned long size); | 17 | extern int c6x_add_memory(phys_addr_t start, unsigned long size); |
20 | 18 | ||
21 | extern unsigned long ram_start; | 19 | extern unsigned long ram_start; |
diff --git a/arch/c6x/kernel/devicetree.c b/arch/c6x/kernel/devicetree.c index 9e15ab9199b2..5e8c838c1dde 100644 --- a/arch/c6x/kernel/devicetree.c +++ b/arch/c6x/kernel/devicetree.c | |||
@@ -24,7 +24,7 @@ void __init early_init_devtree(void *params) | |||
24 | * device-tree, including the platform type, initrd location and | 24 | * device-tree, including the platform type, initrd location and |
25 | * size and more ... | 25 | * size and more ... |
26 | */ | 26 | */ |
27 | of_scan_flat_dt(early_init_dt_scan_chosen, c6x_command_line); | 27 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); |
28 | 28 | ||
29 | /* Scan memory nodes and rebuild MEMBLOCKs */ | 29 | /* Scan memory nodes and rebuild MEMBLOCKs */ |
30 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 30 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index f4e72bd8c103..0e5a812907d9 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c | |||
@@ -68,13 +68,6 @@ unsigned long ram_end; | |||
68 | static unsigned long dma_start __initdata; | 68 | static unsigned long dma_start __initdata; |
69 | static unsigned long dma_size __initdata; | 69 | static unsigned long dma_size __initdata; |
70 | 70 | ||
71 | char c6x_command_line[COMMAND_LINE_SIZE]; | ||
72 | |||
73 | #if defined(CONFIG_CMDLINE_BOOL) | ||
74 | static const char default_command_line[COMMAND_LINE_SIZE] __section(.cmdline) = | ||
75 | CONFIG_CMDLINE; | ||
76 | #endif | ||
77 | |||
78 | struct cpuinfo_c6x { | 71 | struct cpuinfo_c6x { |
79 | const char *cpu_name; | 72 | const char *cpu_name; |
80 | const char *cpu_voltage; | 73 | const char *cpu_voltage; |
@@ -296,8 +289,6 @@ notrace void __init machine_init(unsigned long dt_ptr) | |||
296 | /* Do some early initialization based on the flat device tree */ | 289 | /* Do some early initialization based on the flat device tree */ |
297 | early_init_devtree(fdt); | 290 | early_init_devtree(fdt); |
298 | 291 | ||
299 | /* parse_early_param needs a boot_command_line */ | ||
300 | strlcpy(boot_command_line, c6x_command_line, COMMAND_LINE_SIZE); | ||
301 | parse_early_param(); | 292 | parse_early_param(); |
302 | } | 293 | } |
303 | 294 | ||
@@ -309,7 +300,7 @@ void __init setup_arch(char **cmdline_p) | |||
309 | printk(KERN_INFO "Initializing kernel\n"); | 300 | printk(KERN_INFO "Initializing kernel\n"); |
310 | 301 | ||
311 | /* Initialize command line */ | 302 | /* Initialize command line */ |
312 | *cmdline_p = c6x_command_line; | 303 | *cmdline_p = boot_command_line; |
313 | 304 | ||
314 | memory_end = ram_end; | 305 | memory_end = ram_end; |
315 | memory_end &= ~(PAGE_SIZE - 1); | 306 | memory_end &= ~(PAGE_SIZE - 1); |
diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index 279d80725128..5a6e141d1641 100644 --- a/arch/c6x/kernel/vmlinux.lds.S +++ b/arch/c6x/kernel/vmlinux.lds.S | |||
@@ -37,12 +37,6 @@ SECTIONS | |||
37 | _vectors_end = .; | 37 | _vectors_end = .; |
38 | } | 38 | } |
39 | 39 | ||
40 | . = ALIGN(0x1000); | ||
41 | .cmdline : | ||
42 | { | ||
43 | *(.cmdline) | ||
44 | } | ||
45 | |||
46 | /* | 40 | /* |
47 | * This section contains data which may be shared with other | 41 | * This section contains data which may be shared with other |
48 | * cores. It needs to be a fixed offset from PAGE_OFFSET | 42 | * cores. It needs to be a fixed offset from PAGE_OFFSET |