Subject: Re: cpu_intr_p() does not exist for all ports
To: Martin Husemann <martin@duskware.de>
From: Andrew Doran <ad@netbsd.org>
List: current-users
Date: 12/06/2007 15:12:49
On Thu, Dec 06, 2007 at 03:31:04PM +0100, Martin Husemann wrote:

> On Thu, Dec 06, 2007 at 02:24:53PM +0000, Andrew Doran wrote:
> > It would break again the next time it is enabled. It also goes a bit beyond
> > the number of ports, because some ports have multiple flavours of interrupt
> > dispatch code.
> 
> What exactly does the predicate say? "This cpu is running on it's local 
> interrupt stack"? "We are in the bottom half of the kernel"? "We took
> some device interrupt and have not yet returned"?

The interrupt handling changes are described here:

	http://www.netbsd.org/~ad/smp/vmlocking.txt:

Note that only the interrupt changes have gone into -HEAD so far. I filed
this PR a few days ago after looking at the interrupt path (although obviously
I missed adding cpu_intr_p() while there):

	http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=37468

I have changed sparc to do the correct thing but sparc64 is missing the
calls. The simplest solution may be to add wrapper function if the interrupt
is registered at IPL_VM. x86 works like that:

	http://nxr.netbsd.org/source/xref/sys/arch/x86/x86/intr.c#572
	http://nxr.netbsd.org/source/xref/sys/arch/x86/x86/intr.c#611

Thanks,
Andrew