From: trini@kernel.crashing.org
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, davidm@hpl.hp.com
Subject: [patch 9/22] __early_param for ia64
Date: Wed, 24 Mar 2004 18:59:04 -0500 [thread overview]
Message-ID: <20040324235904.JMM2477.fed1mtao01.cox.net@localhost.localdomain> (raw)
CC: davidm@hpl.hp.com
- Remove saved_command_line (and saving of the command line).
- Call parse_early_options
- Convert mem= to __early_param.
---
linux-2.6-early_setup-trini/arch/ia64/kernel/efi.c | 34 +++++--------
linux-2.6-early_setup-trini/arch/ia64/kernel/setup.c | 4 -
linux-2.6-early_setup-trini/arch/ia64/kernel/vmlinux.lds.S | 6 ++
3 files changed, 21 insertions(+), 23 deletions(-)
diff -puN arch/ia64/kernel/efi.c~ia64 arch/ia64/kernel/efi.c
--- linux-2.6-early_setup/arch/ia64/kernel/efi.c~ia64 2004-03-24 16:15:07.152577112 -0700
+++ linux-2.6-early_setup-trini/arch/ia64/kernel/efi.c 2004-03-24 16:15:07.159575536 -0700
@@ -469,6 +469,19 @@ efi_map_pal_code (void)
}
}
+static int __init
+early_mem(char *cp)
+{
+ mem_limit = memparse(cp, &cp) - 1;
+
+ if (mem_limit != ~0UL)
+ printk(KERN_INFO "Ignoring memory above %luMB\n",
+ mem_limit >> 20);
+
+ return 0;
+}
+__early_param("mem=", early_mem);
+
void __init
efi_init (void)
{
@@ -476,28 +489,9 @@ efi_init (void)
efi_config_table_t *config_tables;
efi_char16_t *c16;
u64 efi_desc_size;
- char *cp, *end, vendor[100] = "unknown";
- extern char saved_command_line[];
+ char vendor[100] = "unknown";
int i;
- /* it's too early to be able to use the standard kernel command line support... */
- for (cp = saved_command_line; *cp; ) {
- if (memcmp(cp, "mem=", 4) == 0) {
- cp += 4;
- mem_limit = memparse(cp, &end) - 1;
- if (end != cp)
- break;
- cp = end;
- } else {
- while (*cp != ' ' && *cp)
- ++cp;
- while (*cp == ' ')
- ++cp;
- }
- }
- if (mem_limit != ~0UL)
- printk(KERN_INFO "Ignoring memory above %luMB\n", mem_limit >> 20);
-
efi.systab = __va(ia64_boot_param->efi_systab);
/*
diff -puN arch/ia64/kernel/setup.c~ia64 arch/ia64/kernel/setup.c
--- linux-2.6-early_setup/arch/ia64/kernel/setup.c~ia64 2004-03-24 16:15:07.154576662 -0700
+++ linux-2.6-early_setup-trini/arch/ia64/kernel/setup.c 2004-03-24 16:15:07.160575311 -0700
@@ -90,8 +90,6 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask)
#define COMMAND_LINE_SIZE 512
-char saved_command_line[COMMAND_LINE_SIZE]; /* used in proc filesystem */
-
/*
* We use a special marker for the end of memory and it uses the extra (+1) slot
*/
@@ -259,7 +257,7 @@ setup_arch (char **cmdline_p)
ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
*cmdline_p = __va(ia64_boot_param->command_line);
- strlcpy(saved_command_line, *cmdline_p, sizeof(saved_command_line));
+ parse_early_options(cmdline_p);
efi_init();
diff -puN arch/ia64/kernel/vmlinux.lds.S~ia64 arch/ia64/kernel/vmlinux.lds.S
--- linux-2.6-early_setup/arch/ia64/kernel/vmlinux.lds.S~ia64 2004-03-24 16:15:07.156576212 -0700
+++ linux-2.6-early_setup-trini/arch/ia64/kernel/vmlinux.lds.S 2004-03-24 16:15:07.160575311 -0700
@@ -128,6 +128,12 @@ SECTIONS
*(.init.setup)
__setup_end = .;
}
+ __early_param : AT(ADDR(__early_param) - LOAD_OFFSET)
+ {
+ __early_begin = .;
+ *(__early_param)
+ __early_end = .;
+ }
__param : AT(ADDR(__param) - LOAD_OFFSET)
{
__start___param = .;
_
next reply other threads:[~2004-03-25 0:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-24 23:59 trini [this message]
2004-03-25 0:11 ` David Mosberger
2004-03-25 0:22 ` Tom Rini
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=20040324235904.JMM2477.fed1mtao01.cox.net@localhost.localdomain \
--to=trini@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=davidm@hpl.hp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®