* Re: 2.5.29: bug in ide and hd kernel option handling
@ 2002-08-01 1:01 Mikael Pettersson
2002-08-01 10:14 ` Marcin Dalecki
0 siblings, 1 reply; 4+ messages in thread
From: Mikael Pettersson @ 2002-08-01 1:01 UTC (permalink / raw)
To: linux-kernel; +Cc: gerald, martin
On Tue, 30 Jul 2002, I wrote:
> On my 486 test box (ISA/VLB only, CONFIG_PCI=n), passing any
> any ide or hd kernel option (like idebus=33) to 2.5.29 results
> in a kernel hang at boot: I get the initial "Uncompressing ..
> booting .." and then nothing.
Problem partially identified.
With CONFIG_PCI=n, include/asm-i386/ide.h:ide_init_default_hwifs()
is defined to ide_register_hw() the PC's standard IDE ports, but
with CONFIG_PCI=y, it's empty.
When drivers/ide/main.c:ide_setup() is called for some "ide..."
kernel option, it starts by calling init_global_data(), which
in turn calls ide_init_default_hwifs(). When CONFIG_PCI=n so
ide_init_default_hwifs() isn't empty, the kernel either hangs
or reboots at that point.
init_global_data() and ide_init_default_hwifs() can also be called
much later from 'module_init(init_ata)'. In that case there is no
hang or reboot -- so my guess is that the initialisation does something
which normally works but is illegal and causes a fault when done
at __setup()-time.
I tested every kernel from 2.5.29 and back, and the problem started
with 2.5.5.
As a workaround I applied the patch below to unconditionally
make ide_init_default_hwifs() do nothing. This solved my problem
and doesn't seem to have had any bad side-effects: the kernel still
finds all standard IDE ports on my 486.
/Mikael
--- linux-2.5.29/include/asm-i386/ide.h.~1~ Sat Jul 20 23:49:45 2002
+++ linux-2.5.29/include/asm-i386/ide.h Thu Aug 1 02:20:31 2002
@@ -65,7 +65,7 @@
static __inline__ void ide_init_default_hwifs(void)
{
-#ifndef CONFIG_PCI
+#if 0 && !defined(CONFIG_PCI)
hw_regs_t hw;
int index;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: 2.5.29: bug in ide and hd kernel option handling
2002-08-01 1:01 2.5.29: bug in ide and hd kernel option handling Mikael Pettersson
@ 2002-08-01 10:14 ` Marcin Dalecki
0 siblings, 0 replies; 4+ messages in thread
From: Marcin Dalecki @ 2002-08-01 10:14 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel, gerald, martin
Mikael Pettersson wrote:
> On Tue, 30 Jul 2002, I wrote:
>
>>On my 486 test box (ISA/VLB only, CONFIG_PCI=n), passing any
>>any ide or hd kernel option (like idebus=33) to 2.5.29 results
>>in a kernel hang at boot: I get the initial "Uncompressing ..
>>booting .." and then nothing.
>
>
> Problem partially identified.
>
> With CONFIG_PCI=n, include/asm-i386/ide.h:ide_init_default_hwifs()
> is defined to ide_register_hw() the PC's standard IDE ports, but
> with CONFIG_PCI=y, it's empty.
>
> When drivers/ide/main.c:ide_setup() is called for some "ide..."
> kernel option, it starts by calling init_global_data(), which
> in turn calls ide_init_default_hwifs(). When CONFIG_PCI=n so
> ide_init_default_hwifs() isn't empty, the kernel either hangs
> or reboots at that point.
>
> init_global_data() and ide_init_default_hwifs() can also be called
> much later from 'module_init(init_ata)'. In that case there is no
> hang or reboot -- so my guess is that the initialisation does something
> which normally works but is illegal and causes a fault when done
> at __setup()-time.
>
> I tested every kernel from 2.5.29 and back, and the problem started
> with 2.5.5.
>
> As a workaround I applied the patch below to unconditionally
> make ide_init_default_hwifs() do nothing. This solved my problem
> and doesn't seem to have had any bad side-effects: the kernel still
> finds all standard IDE ports on my 486.
Ahh. Thats actually insightfull. OK some other archs even default to the
same if PCI bus support is enabled at all. I will have to test the
effects of this approach in bochs to see how it lives with "legacy"
host chips. Maybe this whole ide_init_default_hwifs can go completely
away then... (If anything it should be fallback only.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.5.29: bug in ide and hd kernel option handling
@ 2002-07-30 1:19 Gerald Champagne
0 siblings, 0 replies; 4+ messages in thread
From: Gerald Champagne @ 2002-07-30 1:19 UTC (permalink / raw)
To: mikpe; +Cc: linux-kernel
Well, that would most likely be my fault. I made some small changes to
the parameter parsing code recently.
> On my 486 test box (ISA/VLB only, CONFIG_PCI=n), passing any
> any ide or hd kernel option (like idebus=33) to 2.5.29 results
> in a kernel hang at boot: I get the initial "Uncompressing ..
> booting .." and then nothing.
The no display symptom makes sense if there's a problem in a setup
routine. These routines are called before console_init. Printk's
before console_init are queued up and only displayed after console_init
is called. If the kernel hangs before this point, nothing is displayed.
> With 2.5.27, the kernel instantly rebooted itself instead.
The changes went in in 2.5.27.
Can you please send my your .config file? I'll look at this tonight.
Thanks.
Gerald
^ permalink raw reply [flat|nested] 4+ messages in thread
* 2.5.29: bug in ide and hd kernel option handling
@ 2002-07-29 23:53 Mikael Pettersson
0 siblings, 0 replies; 4+ messages in thread
From: Mikael Pettersson @ 2002-07-29 23:53 UTC (permalink / raw)
To: linux-kernel; +Cc: martin
On my 486 test box (ISA/VLB only, CONFIG_PCI=n), passing any
any ide or hd kernel option (like idebus=33) to 2.5.29 results
in a kernel hang at boot: I get the initial "Uncompressing ..
booting .." and then nothing.
With 2.5.27, the kernel instantly rebooted itself instead.
I don't know when this problem appeared. I only recently starting
experimenting with ide kernel options in an attempt to get an
old qd6580 controller card going -- alas the second channel
never wants to show up :-(
/Mikael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-08-01 10:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-01 1:01 2.5.29: bug in ide and hd kernel option handling Mikael Pettersson
2002-08-01 10:14 ` Marcin Dalecki
-- strict thread matches above, loose matches on Subject: below --
2002-07-30 1:19 Gerald Champagne
2002-07-29 23:53 Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox