Using kernel > 2.1.48 with 386/387 IRQ13 systems (lock from interrupt context)

root (root@mangue.ibm.net)
Wed, 27 Aug 1997 13:01:42 +0200 (MET DST)


Hello,

I hope that is the right list to report this problem.

With an IRQ13 math coprocessor, the linux kernel (at least since version
2.1.48, still in 2.1.51) does not boot correctly, it displays
continously after the IDE disk geometry the message "lock from interrupt
context" and an address. This does not append if the parameter "no387"
is given at lilo boot and the kernel is compiled with math coprocessor
emulation.

The problem is located in file arch/i386/kernel/traps.c in function :
void math_error(void)
Because the function is (seems to be) called from an IRQ (IRQ13) and not
from an exception (exception 16 for 486DX+ systems) the calls to
"lock_kernel();" and "unlock_kernel();" are not necessary (because the
kernel will not resynchronise inside an IRQ) and moreover calling those
function displays the error message "lock from interrupt context"
(see file include/asm-i386/smp_lock.h).

Unfortunately that does not seems to be the only problem, adding an
"if (ignore_irq13)" before these two calls makes a system which locks at
the same booting point, but now it does not display any message.
(ignore_irq13 is set when an exception 16 math coprocessor system is
detected)
There is probably also a problem when calling "force_sig(SIGFPE, task);"
inside an IRQ - I am not able to check this.

My patch - that is really a dirty patch - is to add at very beginning
of "void math_error(void)" the line "if (!ignore_irq13) return;" to
have a booting system; someone more aware of this part of the kernel
should have a look here.

Hoping that will help to have an even better Linux,
Etienne LORRAIN (in holiday until September 1st).

-- Personnal E-mail : etienne.lorrain@ibm.net
-- Professionnal E-Mail : lorrain@lms.ditv-philips.fr
------------- On ne voit bien qu'avec le coeur, --------------------
----- l'essentiel est invisible pour les yeux . St Exupery ---------