Subject: Re: port-shark/22355 [was: Help needed to fix NetBSD/shark]
To: Izumi Tsutsui <>
From: Chris Gilbert <>
List: port-arm
Date: 08/05/2007 11:26:52
Izumi Tsutsui wrote:
> I wrote:
>> wrote:
>>> That's definetly wrong.  jmmv's found that the attached isa_irq.S patch
>>> helps, but still causes hangs.
>> Hmm, the patch makes kernel boot into single user
>> (i.e. now it can mount nfsroot via dhcp),
>> but it hangs during /etc/rc script.
>> There is no assertion in cpu_idle(9) and
>> I can't get ddb(4) prompt even on serial console,
>> so maybe it's a different problem. (spl race?)
> The attached one seems working fine.

Yes, it's achieving pretty much the same thing.

What worries me, and a version with more debugging that jmmv ran showed
errors that clockintr doesn't reset the the spl level after every call,
which is why the mask is wrong.

So these patches are just hiding an underlying bug somewhere else by
reseting the spl_mask after interrupt routines are called, however the
mask should have been reset back by an splx call.

> Calling raisespl()/splx() from irq_entry() might be problematic?
> (note I have few knowledge about ARM asm..)

Having looked over the code in arm/arm32/spl.S I don't think it should
be problematic, but perhaps it's safer in irq code not to make too many
external calls.