From: Alon Bar-Lev <alon.barlev@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, "Bernhard Walle" <bwalle@suse.de>,
Jeff Dike <jdike@addtoit.com>
Subject: [PATCH] Dynamic kernel command-line - fixups
Date: Sat, 27 Jan 2007 22:49:26 +0200 [thread overview]
Message-ID: <200701272249.28163.alon.barlev@gmail.com> (raw)
In-Reply-To: <20070127004411.b0d5872e.akpm@osdl.org>
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. ]]]
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/ia64/kernel/efi.c linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/ia64/kernel/efi.c
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/ia64/kernel/efi.c 2007-01-22 23:32:30.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/ia64/kernel/efi.c 2007-01-27 21:56:07.000000000 +0200
@@ -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... */
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/ia64/kernel/sal.c linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/ia64/kernel/sal.c
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/ia64/kernel/sal.c 2007-01-22 23:32:30.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/ia64/kernel/sal.c 2007-01-27 21:57:07.000000000 +0200
@@ -194,7 +194,6 @@ static void __init
chk_nointroute_opt(void)
{
char *cp;
- extern char __initdata boot_command_line[];
for (cp = boot_command_line; *cp; ) {
if (memcmp(cp, "nointroute", 10) == 0) {
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/parisc/mm/init.c linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/parisc/mm/init.c
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/parisc/mm/init.c 2007-01-22 23:32:30.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/parisc/mm/init.c 2007-01-27 22:06:51.000000000 +0200
@@ -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 */
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/um/include/user_util.h linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/um/include/user_util.h
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/um/include/user_util.h 2007-01-22 23:32:31.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/um/include/user_util.h 2007-01-27 21:57:41.000000000 +0200
@@ -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;
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/um/kernel/um_arch.c linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/um/kernel/um_arch.c
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/um/kernel/um_arch.c 2007-01-22 23:32:31.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/um/kernel/um_arch.c 2007-01-27 22:28:48.000000000 +0200
@@ -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;
diff -urNp linux-2.6.20-rc4-mm1.dyn-cmdline/arch/x86_64/kernel/head64.c linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/x86_64/kernel/head64.c
--- linux-2.6.20-rc4-mm1.dyn-cmdline/arch/x86_64/kernel/head64.c 2007-01-22 23:32:31.000000000 +0200
+++ linux-2.6.20-rc4-mm1.dyn-cmdline.fixups/arch/x86_64/kernel/head64.c 2007-01-27 21:57:26.000000000 +0200
@@ -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;
prev parent reply other threads:[~2007-01-27 20:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200701230010.34323.alon.barlev@gmail.com>
[not found] ` <200701230014.06793.alon.barlev@gmail.com>
2007-01-27 8:24 ` [PATCH 10/26] Dynamic kernel command-line - ia64 Andrew Morton
2007-01-27 8:34 ` Alon Bar-Lev
2007-01-27 8:44 ` Andrew Morton
2007-01-27 20:49 ` Alon Bar-Lev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701272249.28163.alon.barlev@gmail.com \
--to=alon.barlev@gmail.com \
--cc=akpm@osdl.org \
--cc=bwalle@suse.de \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.