Dynamic kernel command-line - ia64
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · On Tue, 23 Jan 2007 00:14:06 +0200 Alon Bar-Lev <[email protected]> wrote:
1. Rename
saved_command_lineintoboot_command_line.
2. Setcommand_lineas__initdata.Signed-off-by Alon Bar-Lev <[email protected]>---
diff -urNp
linux-2.6.20-rc4-mm1.org/arch/ia64/kernel/efi.clinux-2.6.20-rc4-mm1/arch/ia64/kernel/efi.carch/ia64/kernel/efi.c +0
-0@@ -413,11 +413,11 @@ efi_init (void)efi_char16_t *c16;u64 efi_desc_size;
arch/ia64/kernel/efi.c efi_init (void) · line 422
Quoted 10 lines
arch/ia64/kernel/efi.c +2
-2char *cp, vendor[100 ] ="unknown" ; -extern char saved_command_line[]; +extern char __initdata boot_command_line[];int i;chk_nointroute_opt (void) {char *cp; -extern char saved_command_line[]; +extern char __initdata boot_command_line[];
no no no no no no no. Just because some whacked-out weenie went and put extern declarations in .c files doesn't mean that we should copy them.
It doesn't even compile.
arch/ia64/kernel/efi.c: In function `efi_init':arch/ia64/kernel/efi.c:416: error: section attribute cannot be specified for local variables
Please. Go through the entire patchset, yank all those wrong private declarations of boot_command_line[] and put a *single, kernel-wide* declaration into a single, shared header file.
Thanks.
Quoted 4 lines · Andrew Morton
no no no no no no no. Just because some whacked-out weenie went and put extern declarations in .c files doesn't mean that we should copy them.
It doesn't even compile.
Sorry... I don't have all environments.
Quoted 3 lines
Please. Go through the entire patchset, yank all those wrong private declarations of boot_command_line[] and put a *single, kernel-wide* declaration into a single, shared header file.
I thought of this, while I was making the patch, I could not understand why the maintainer did not simply #include <linux/init.h>
I can add this to any module which declares this by-itself but because I cannot test all arch, I am afraid it will cause more problems.
Preparing a patch... :)
Best Regards,
Alon Bar-Lev.
Quoted 6 lines · On Sat, 27 Jan 2007 10:34:27 +0200 "Alon Bar-Lev" <[email protected]> wrote:
Quoted 3 lines
Please. Go through the entire patchset, yank all those wrong private declarations of boot_command_line[] and put a *single, kernel-wide* declaration into a single, shared header file.
I thought of this, while I was making the patch, I could not understand why the maintainer did not simply #include <
linux/init.h>
"ooh, I'll get in trouble if I edit a non-arch file, and it's a hassle to add another file to my changeset and I can't be assed testing other architectures and nobody's looking so I'll just sneak it in there".
Quoted 4 lines
I can add this to any module which declares this by-itself but because I cannot test all arch, I am afraid it will cause more problems.
Preparing a patch... :)
Against next -mm, please.
PATCH 1/1 Dynamic kernel command-line - fixups
Remove in-source externs, linux/init.h is included in all cases. This is a fixups for "Dynamic kernel command-line" patch.
It includes the ia64 fixup already added.
It also includes some uml __init fixups so that we can __initdata also its command_line.
[[[ I will resubmit it to next mm version as you requested, I don't mean to bother you. if you find this simple enough you have an option to include this. ]]]
---
arch/ia64/kernel/efi.c +0 -1
@@ -413,7 +413,6 @@ efi_init (void)efi_char16_t *c16;u64 efi_desc_size;char *cp, vendor[100 ] ="unknown" ; -extern char __initdata boot_command_line[];int i;/* it's too early to be able to use the standard kernel command line support... */
arch/ia64/kernel/sal.c +0 -1
@@ -194,7 +194,6 @@ static void __initchk_nointroute_opt (void) {char *cp; -extern char __initdata boot_command_line[];for (cp = boot_command_line; *cp; ) {if (memcmp (cp,"nointroute" ,10 ) ==0 ) {
arch/parisc/mm/init.c +0 -1
@@ -77,7 +77,6 @@ static void __init mem_limit_func(void) {char *cp, *end;unsigned long limit; -extern char __initdata boot_command_line[];/* We need this before __setup() functions are called */
arch/um/include/user_util.h +0 -2
@@ -38,8 +38,6 @@ extern unsigned long long highmem;extern char host_info[]; -extern char __initdata boot_command_line[]; -extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;extern unsigned long _unprotected_end;extern unsigned long brk_start;
arch/um/kernel/um_arch.c +3 -3
@@ -44,9 +44,9 @@#define DEFAULT_COMMAND_LINE "root=98:0"/* Changed in linux_main and setup_arch, which run before SMP is started */ -static char command_line[COMMAND_LINE_SIZE ] = {0 }; +static char __initdata command_line[COMMAND_LINE_SIZE ] = {0 }; -static void add_arg (char *arg) +static void __init add_arg (char *arg) {if (strlen (command_line) +strlen (arg) +1 >COMMAND_LINE_SIZE ) {printf ("add_arg: Too many command line arguments!\n" );
@@ -331,7 +331,7 @@ EXPORT_SYMBOL(end_iomem);extern char __binary_start; -int linux_main (int argc,char **argv) +int __init linux_main (int argc,char **argv) {unsigned long avail, diff;unsigned long virtmem_size, max_physmem;
arch/x86_64/kernel/head64.c +0 -2
@@ -34,8 +34,6 @@ static void __init clear_bss(void)#define OLD_CL_BASE_ADDR 0x90000#define OLD_CL_OFFSET 0x90022 -extern char __initdata boot_command_line[]; -static void __init copy_bootdata (char *real_mode_data) {int new_data;