2003-03-05 06:27:32

by Jan Harkes

[permalink] [raw]
Subject: Local APIC support interacting badly with cardbus/orinoco

Hi,

I've been tracing a problem where my wavelan card causes lockups on my
thinkpad X20 laptop.

2.5.58 by itself can't load the cardbus modules, but after applying the
cardbus.c patch from 2.5.59 it works fine. 2.5.59 was broken in other
fun ways, but pulling the kernel/module.c changes out of 2.5.60 makes it
at least not Oops during boot. However, bringing up the wireless network
causes the system to lock up within a couple of minutes, where the code
seems to think that the cardbus card was removed.

Disabling "Local APIC support on uniprocessors" (X86_UP_APIC) seems to
solve the problem and 2.5.59 doesn't lock up at all. The most
interesting part of this is that with Local APIC configured the
following shows up in dmesg,

Mar 4 23:42:55 mentor kernel: Local APIC disabled by BIOS -- reenabling.
Mar 4 23:42:55 mentor kernel: Could not enable APIC!

Which made me think that the APIC code wasn't used, so I don't know how
any changes in that area could be responsible for the cardbus/orinoco
flakiness.

Jan


2003-03-05 13:07:14

by Mikael Pettersson

[permalink] [raw]
Subject: Re: Local APIC support interacting badly with cardbus/orinoco

Jan Harkes writes:
> I've been tracing a problem where my wavelan card causes lockups on my
> thinkpad X20 laptop.
>
> 2.5.58 by itself can't load the cardbus modules, but after applying the
> cardbus.c patch from 2.5.59 it works fine. 2.5.59 was broken in other
> fun ways, but pulling the kernel/module.c changes out of 2.5.60 makes it
> at least not Oops during boot. However, bringing up the wireless network
> causes the system to lock up within a couple of minutes, where the code
> seems to think that the cardbus card was removed.
>
> Disabling "Local APIC support on uniprocessors" (X86_UP_APIC) seems to
> solve the problem and 2.5.59 doesn't lock up at all. The most
> interesting part of this is that with Local APIC configured the
> following shows up in dmesg,
>
> Mar 4 23:42:55 mentor kernel: Local APIC disabled by BIOS -- reenabling.
> Mar 4 23:42:55 mentor kernel: Could not enable APIC!
>
> Which made me think that the APIC code wasn't used, so I don't know how
> any changes in that area could be responsible for the cardbus/orinoco
> flakiness.

The message means that you have one of those mobile P6 processors
where Intel actually removed the local APIC.
(`grep flags /proc/cpuinfo` should not contain "apic" in your case.)

So the local APIC really isn't being enabled or used, and any
instability is caused by something else.

Please try 2.5.63 or .64 instead. Your 2.5.58/.59/.60 hybrid is
getting old, and your mixing of stuff may itself cause problems.

2003-03-05 16:02:44

by Jan Harkes

[permalink] [raw]
Subject: Re: Local APIC support interacting badly with cardbus/orinoco

On Wed, Mar 05, 2003 at 02:17:36PM +0100, Mikael Pettersson wrote:
> Jan Harkes writes:
> > I've been tracing a problem where my wavelan card causes lockups on my
> > thinkpad X20 laptop.
> > Mar 4 23:42:55 mentor kernel: Local APIC disabled by BIOS -- reenabling.
> > Mar 4 23:42:55 mentor kernel: Could not enable APIC!
> >
> > Which made me think that the APIC code wasn't used, so I don't know how
> > any changes in that area could be responsible for the cardbus/orinoco
> > flakiness.
>
> The message means that you have one of those mobile P6 processors
> where Intel actually removed the local APIC.
> (`grep flags /proc/cpuinfo` should not contain "apic" in your case.)

Correct, cpuinfo tells me it is a Pentium III (Coppermine), and the apic
flag is not net.

> So the local APIC really isn't being enabled or used, and any
> instability is caused by something else.
>
> Please try 2.5.63 or .64 instead. Your 2.5.58/.59/.60 hybrid is
> getting old, and your mixing of stuff may itself cause problems.

2.5.57 - wavelan worked
2.5.58 - couldn't recognize the card
2.5.59 - Oops during boot when loading modules
2.5.60 - wavelan broken
2.5.61/62 - skipped these
2.5.63 - wavelan still broken

2.5.64 wasn't released yet, and noone seems to have reported a similar
problem. So I went back, trying 2.5.58 with enough patches from .59 that
it could load the card, and it worked. Then I tried 2.5.59 with just
enough patches to avoid the Oops during module loading and it didn't
work.

I am running 2.5.64 without Local APIC support and it seems to work.
I'll rebuild with Local APIC, which clearly shouldn't make a difference
because my CPU doesn't have one and see if the problem returns.

Jan

2003-03-05 20:43:49

by Jan Harkes

[permalink] [raw]
Subject: Re: Local APIC support interacting badly with cardbus/orinoco

On Wed, Mar 05, 2003 at 11:12:39AM -0500, Jan Harkes wrote:
> I am running 2.5.64 without Local APIC support and it seems to work.
> I'll rebuild with Local APIC, which clearly shouldn't make a difference
> because my CPU doesn't have one and see if the problem returns.

2.5.64 with Local APIC support enabled has already locked me out of my
system 3 times in less than 3 hours. Interestingly enough, it looks like
only the keyboard and the pcmcia slots are getting disabled, the power
led on the wavelan card turns off. A compile that was running just
continued on without a problem and the sysrq-unmount/sync/boot all
worked fine. So display and harddrive were fine.

Did not have any problem all morning when Local APIC support was not
enabled. Perhaps it can't be the problem because my cpu lacks the apic
in the first place, but it sure looks like it is related. I will run
without Local APIC support for a couple of hours now to make sure that
I wasn't just lucky this morning.

Jan

2003-03-06 20:51:55

by Jan Harkes

[permalink] [raw]
Subject: Re: Local APIC support interacting badly with cardbus/orinoco

On Wed, Mar 05, 2003 at 03:54:20PM -0500, Jan Harkes wrote:
> On Wed, Mar 05, 2003 at 11:12:39AM -0500, Jan Harkes wrote:
> > I am running 2.5.64 without Local APIC support and it seems to work.
> > I'll rebuild with Local APIC, which clearly shouldn't make a difference
> > because my CPU doesn't have one and see if the problem returns.
>
> 2.5.64 with Local APIC support enabled has already locked me out of my
> system 3 times in less than 3 hours. Interestingly enough, it looks like
> only the keyboard and the pcmcia slots are getting disabled, the power
> led on the wavelan card turns off. A compile that was running just
> continued on without a problem and the sysrq-unmount/sync/boot all
> worked fine. So display and harddrive were fine.
>
> Did not have any problem all morning when Local APIC support was not
> enabled. Perhaps it can't be the problem because my cpu lacks the apic
> in the first place, but it sure looks like it is related. I will run
> without Local APIC support for a couple of hours now to make sure that
> I wasn't just lucky this morning.

I've used my laptop + wavelan for at least 12 hours over the past day.
No lockups happened at all during this period. The only difference
between the two kernels is disabling the Local APIC configuration
option.

I'd say there is a pretty high chance that it is related.

Jan