2002-10-14 14:43:59

by Paul Komkoff

[permalink] [raw]
Subject: kernel BUG at arch/i386/kernel/apm.c:1699!

------------[ cut here ]------------
kernel BUG at arch/i386/kernel/apm.c:1699!

#ifdef CONFIG_SMP
/* 2002/08/01 - WT
* This is to avoid random crashes at boot time during initialization
* on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D.
* Some bioses don't like being called from CPU != 0.
* Method suggested by Ingo Molnar.
*/
if (smp_processor_id() != 0) {
current->cpus_allowed = 1;
schedule();
if (unlikely(smp_processor_id() != 0))
BUG();
}
#endif

Why ? :()

2.5.42-mm2, 2xPPro-233, etc ...


--
Paul P 'Stingray' Komkoff 'Greatest' Jr /// (icq)23200764 /// (http)stingr.net
When you're invisible, the only one really watching you is you (my keychain)


2002-10-14 21:27:54

by J.A. Magallon

[permalink] [raw]
Subject: Re: kernel BUG at arch/i386/kernel/apm.c:1699!


On 2002.10.14 Paul P Komkoff Jr wrote:
>------------[ cut here ]------------
>kernel BUG at arch/i386/kernel/apm.c:1699!
>
>#ifdef CONFIG_SMP
> /* 2002/08/01 - WT
> * This is to avoid random crashes at boot time during initialization
> * on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D.
> * Some bioses don't like being called from CPU != 0.
> * Method suggested by Ingo Molnar.
> */
> if (smp_processor_id() != 0) {
> current->cpus_allowed = 1;
> schedule();
> if (unlikely(smp_processor_id() != 0))
> BUG();
> }
>#endif
>
>Why ? :()
>
>2.5.42-mm2, 2xPPro-233, etc ...
>

Bug in apm vs O1-scheduler. The apm task is moved from processor 0.
I took the fix from -ac tree. Just diff kernel/apm.c from -mm and from
-ac. That worked for me for 2.4 kernels. Perhaps 2.5 needs some additional
fix in other files. (err, I suppose that fix is in Alan's 2.5 tee also...)

Hope this helps.

Anyways, patch for 2.4 attached. I suppose it won't apply on 2.5, but you
can try...

--
J.A. Magallon <[email protected]> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.20-pre10-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-2mdk))


Attachments:
(No filename) (1.36 kB)
17-apm-O1-sched.bz2 (2.38 kB)
Download all attachments