From: Andrew Morton <akpm@osdl.org>
To: "Zhu, Yi" <yi.zhu@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [start_kernel] Suggest to move parse_args() before trap_init()
Date: Mon, 1 Mar 2004 02:56:37 -0800 [thread overview]
Message-ID: <20040301025637.338f41cf.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0403011721220.2367-100000@mazda.sh.intel.com>
"Zhu, Yi" <yi.zhu@intel.com> wrote:
>
> I'm not sure it is _correct_ to move parse_args() before trap_init() in
> start_kernel(). Is there any potencial dependencies? I did this on my P4 UP
> box, it boots OK.
>
> My issue is if the parse_args() runs after trap_init(), the kernel
> parameter "lapic" and "nolapic" takes no effect. Because lapic_enable()
> is called after init_apic_mappings().
>
>
> --- init/main.c.orig 2004-03-01 16:54:23.000000000 +0800
> +++ init/main.c 2004-03-01 16:54:45.000000000 +0800
> @@ -416,11 +416,11 @@
>
> build_all_zonelists();
> page_alloc_init();
> - trap_init();
> printk("Kernel command line: %s\n", saved_command_line);
> parse_args("Booting kernel", command_line, __start___param,
> __stop___param - __start___param,
> &unknown_bootoption);
> + trap_init();
> sort_main_extable();
> rcu_init();
> init_IRQ();
I think the only problem with this is if we get a fault during
parse_args(), the kernel flies off into outer space. So you lose some
debuggability when using an early console.
But 2.4 does trap_init() after parse_args() and nobody has complained, as
did 2.6 until recently. So the change is probably OK.
next prev parent reply other threads:[~2004-03-01 10:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-01 9:36 Zhu, Yi
2004-03-01 10:56 ` Andrew Morton [this message]
[not found] ` <20040301025637.338f41cf.akpm@osdl.org.suse.lists.linux.kernel>
2004-03-01 20:46 ` Andi Kleen
2004-03-01 20:54 ` Dave Jones
2004-03-01 21:14 ` Andi Kleen
2004-03-01 21:15 ` Dave Hansen
2004-03-02 1:49 Mikael Pettersson
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=20040301025637.338f41cf.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yi.zhu@intel.com \
/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®