Subject: Re: Help needed to fix NetBSD/shark
To: Izumi Tsutsui <>
From: Julio M. Merino Vidal <>
List: port-arm
Date: 08/01/2007 17:38:35
On 30/07/2007, at 16:14, Izumi Tsutsui wrote:

> wrote:
>> According to the PR, delivering events through a serial
>> console may show some progress (which I believe and will explain
>> below), but I don't have one to try.
> ddb trace after break on serial console shows:

Hmm, didn't think of ddb.  I have made the keyboard interrupt work  
(as explained earlier, by adding a very gross hack to  
isa_irqhandler.c) and could get output very similar to yours.

Breaking into ddb tells me:

evcnt type 1: soft clock = 290
evcnt type 1: isa irq 1 = 24
evcnt type 1: isa irq 14 = 22

Then, using 'cont' and returning to ddb after a minute or so does not  
show any changes to the above values except for the irq 1 being  
incremented by three or so.  Which makes me assume that irq 1 is the  

> evcnt type 1: soft clock = 17
> evcnt type 1: soft net = 1
> evcnt type 1: soft serial = 12
> evcnt type 1: isa irq  4 = 12
> evcnt type 1: isa irq  5 = 2
> db>
> Looks a kernel jumps into cpu_idle(9) at IPL_CLOCK?

I don't know... I added some checks (a global var) to see if cpu_idle  
was being called from somewhere inside clockintr and that was not the  

However, adding a printf to cpu_idle also fixes the problem as  
strange as it may seem.  But removing the contents of the current  
cpu_idle function does not help (to avoid the power management it  

Julio M. Merino Vidal <>