* [start_kernel] Suggest to move parse_args() before trap_init()
@ 2004-03-01 9:36 Zhu, Yi
2004-03-01 10:56 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Zhu, Yi @ 2004-03-01 9:36 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi,
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();
Thanks,
--
-----------------------------------------------------------------
Opinions expressed are those of the author and do not represent
Intel Corp.
Zhu Yi (Chuyee)
GnuPG v1.0.6 (GNU/Linux)
http://cn.geocities.com/chewie_chuyee/gpg.txt or
$ gpg --keyserver wwwkeys.pgp.net --recv-keys 71C34820
1024D/71C34820 C939 2B0B FBCE 1D51 109A 55E5 8650 DB90 71C3 4820
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [start_kernel] Suggest to move parse_args() before trap_init()
2004-03-01 9:36 [start_kernel] Suggest to move parse_args() before trap_init() Zhu, Yi
@ 2004-03-01 10:56 ` Andrew Morton
[not found] ` <20040301025637.338f41cf.akpm@osdl.org.suse.lists.linux.kernel>
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2004-03-01 10:56 UTC (permalink / raw)
To: Zhu, Yi; +Cc: linux-kernel
"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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [start_kernel] Suggest to move parse_args() before trap_init()
@ 2004-03-02 1:49 Mikael Pettersson
0 siblings, 0 replies; 7+ messages in thread
From: Mikael Pettersson @ 2004-03-02 1:49 UTC (permalink / raw)
To: ak, davej; +Cc: akpm, linux-kernel, yi.zhu
On Mon, 1 Mar 2004 20:54:26 +0000, Dave Jones wrote:
>On Mon, Mar 01, 2004 at 09:46:38PM +0100, Andi Kleen wrote:
>
> > > 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.
> >
> > The standard way to fix this is to add an explicit check for lapic
> > to the early argument parsing in setup.c (but keep the __setup so that
> > no unknown argument is reported).
>
>This just got me thinking of a sort-of related problem.
>Some laptops hang when local apic is enabled, and we couldn't
>blacklist them in 2.4 due to us not doing the dmi scan early enough.
>
>Did that get fixed in 2.6 ?
My patch for early DMI scan and local APIC blacklisting
was included in 2.5.6 and 2.4.19. This was done mainly
to handle all those broken Dell laptops.
/Mikael
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-03-02 1:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-01 9:36 [start_kernel] Suggest to move parse_args() before trap_init() Zhu, Yi
2004-03-01 10:56 ` Andrew Morton
[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
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®