[parisc-linux] traps.c 2.4 alignement [was: 2.6.0-test6-pa6 on b2k finaly crash]

Joel Soete soete.joel@tiscali.be
Tue, 7 Oct 2003 17:47:40 +0200


--========/3F5CC41F0000EF9B/mail.tiscali.be
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

 
>> But, as we could awaiting when such code=13 (conditional trap iirc), occurs
>> in kernel mode (as on my b2k or Max's c3k) the kernel
>>hang without advise
>> :(
>
>It happens in "kernel mode" ?

Even thought it shouldn't happen but would just help in case of unthinkable
bug :)

> That should trigger an oops? It's a SIGFPE for the kernel :)

Yes it should as far as i can follow force_sig_info() it would 'schedule'
a SIGFPE. But in this very particular situation of the early boot, imho the
scheduler is not yet launched.

So may be this second draft would help more in this case?
(I hope that attachement will be readable?)

Thanks again,
    Joel


-------------------------------------------------------------------------
L'Internet rapide, c'est pour tout le monde. Tiscali ADSL, 19,50 Euro
pendant 3 mois! http://reg.tiscali.be/default.asp?lg=fr 



--========/3F5CC41F0000EF9B/mail.tiscali.be
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Traps-2.4-Align-2"

ZGlmZiAtTmF1ciBsaW51eC0yLjYuMC10ZXN0Ni1wYTYub3JpZy9hcmNoL3BhcmlzYy9rZXJuZWwv
dHJhcHMuYyBsaW51eC0yLjYuMC10ZXN0Ni1wYTYudGVzdC9hcmNoL3BhcmlzYy9rZXJuZWwvdHJh
cHMuYwotLS0gbGludXgtMi42LjAtdGVzdDYtcGE2Lm9yaWcvYXJjaC9wYXJpc2Mva2VybmVsL3Ry
YXBzLmMJMjAwMy0xMC0wNyAxODoxNTo0MS4wMDAwMDAwMDAgKzAyMDAKKysrIGxpbnV4LTIuNi4w
LXRlc3Q2LXBhNi50ZXN0L2FyY2gvcGFyaXNjL2tlcm5lbC90cmFwcy5jCTIwMDMtMTAtMDcgMTg6
MTQ6MzEuMDAwMDAwMDAwICswMjAwCkBAIC00NCw3ICs0NCw3IEBACiAjZGVm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