Subject: Re: Patch: Generic TODR for ARM ports
To: None <port-hpcarm@netbsd.org>
From: Peter Postma <peter@pointless.nl>
List: port-hpcarm
Date: 09/24/2006 20:54:49
On Mon, Sep 18, 2006 at 07:58:51PM +0200, Peter Postma wrote:
> On Sun, Sep 17, 2006 at 07:37:26PM -0700, Garrett D'Amore wrote:
> > Peter Postma wrote:
> > > On Sun, Sep 17, 2006 at 09:15:55AM -0700, Garrett D'Amore wrote:
> > >> The double selection messages suggest that you need to update the kernel
> > >> from CVS.  A change was made to todr to prevent tc_windup() from getting
> > >> called with interrupts enabled -- I think that is what has happened
> > >> here.  (You should not see double messages like this.)
> > >
> > > I believe that I'm up to date :-) which revisions should I have?
> > 
> > 1.12 of kern_tc.c is what you need.
> > 
> > This version calls tc_windup() inside splclock().  Earlier versions didn't.
> 
> I'm at 1.12. I debugged a bit and it seems that when I change the splclock()
> to splhigh(), the double messages are gone. So this might be a hpcarm
> specific problem.
> 

A simple work-around is to replace the following line in hpcarm/intr.c:

spl_masks[_SPL_CLOCK]      = imask[IPL_CLOCK];

with

spl_masks[_SPL_CLOCK]      = imask[IPL_HIGH];


I wonder if this would be acceptable as _temporary_ fix?
A too much blocking splclock seems better to me as a not blocking clock
interrupts splclock.

-- 
Peter Postma