RE: [RFC 5/8] param: arch_get_boot_command_line() (take II)

From: Luck, Tony
Date: Wed Dec 03 2008 - 16:21:30 EST

> I pulled your git tree. All my test configs build cleanly
> for ia64 ... but sadly the first kernel I tested (generic_defconfig)
> doesn't boot (no console output at all).
> I'll see if I can figure out what is going on.

Aha. You are now calling machvec_init_from_cmdline() too early (before
efi_init() and io_port_init()) ... so we croak accessing things
that have not been set up. Naive fix is to just move them from
setup_arch() to arch_get_boot_command_line(). I can't see how to
handle this more cleanly given that you do the rest of the
command line parsing before calling setup_arch().

With the addition of this patch ia64 bits are

Acked-by: Tony Luck <tony.luck@xxxxxxxxx>

diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 12ee0a1..0951971 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -534,6 +534,9 @@ void __init arch_get_boot_command_line(void)
strlcpy(boot_command_line, __va(ia64_boot_param->command_line),

+ efi_init();
+ io_port_init();
/* machvec needs to be parsed from the command line
* before parse_early_param() is called to ensure
@@ -552,9 +555,6 @@ void __init setup_arch(void)

ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);

- efi_init();
- io_port_init();
if (early_console_setup(boot_command_line) == 0)

This exacerbates a long standing `problem' that linux_banner
isn't the first thing printed ... with the above patch it
gets moved down even further to the sixth line:

$ dmesg
EFI v1.10 by INTEL: SALsystab=0x7fe0cce0 ACPI=0x7ff0d000 ACPI 2.0=0x7ff0c000 MPS=0x7ff0b000 SMBIOS=0xf0000
booting generic kernel on platform dig
Early serial console at I/O port 0x2f8 (options '115200')
console [uart0] enabled
Initializing cgroup subsys cpuset
Linux version 2.6.28-rc7-generic-smp (aegl@xxxxxxxxxxxxxxxxxxxxxxxx) (gcc version 4.3.1 (GCC) ) #2 SMP Wed Dec 3 11:27:26 PST 2008

Perhaps we also need to consider this patch to move it back
to a place of prominence?

diff --git a/init/main.c b/init/main.c
index 92ad2fe..38fcd41 100644
--- a/init/main.c
+++ b/init/main.c
@@ -538,6 +538,8 @@ asmlinkage void __init start_kernel(void)
char *static_command_line;

+ printk(KERN_NOTICE);
+ printk(linux_banner);
parse_args("Core params", boot_command_line, __start___core_param,
__stop___core_param - __start___core_param,
@@ -569,8 +571,6 @@ asmlinkage void __init start_kernel(void)
- printk(KERN_NOTICE);
- printk(linux_banner);
mm_init_owner(&init_mm, &init_task);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at