Subject: Re: Joranda 720 and bluetooth
To: None <port-hpcarm@netbsd.org>
From: IWAMOTO Toshihiro <toshii@w.email.ne.jp>
List: tech-kern
Date: 07/15/2006 22:01:53
At Fri, 14 Jul 2006 11:04:00 +0200,
Peter Postma wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> On Wed, Jul 12, 2006 at 12:44:50PM +0200, wrzymski wrote:
> > Looks hpcarm is missing splraiseipl. This 3com card 3CRWB6096 have
> > pocketpc 2002 drivers that should work under HPC 2000 after small cabs
> > and dlls hacks. I don't have card yet but with netbsd support it could
> > be graet expansion for Jornada.
> > 
> 
> The attached diff should fix that. The hpcarm interrupt code looks a bit
> old when compared to other arm ports, maybe it needs to be reworked.

I heard splraiseipl is a new API and isn't ready for general
consumption.

> [2 raiseipl.diff <text/plain; us-ascii (7bit)>]
> Index: hpcarm/intr.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/hpcarm/hpcarm/intr.c,v
> retrieving revision 1.10
> diff -u -r1.10 intr.c
> --- hpcarm/intr.c	11 Dec 2005 12:17:33 -0000	1.10
> +++ hpcarm/intr.c	12 Jul 2006 21:19:22 -0000
> @@ -155,6 +155,17 @@
>  u_int spl_smasks[_SPL_LEVELS];
>  int safepri = _SPL_0;
>  
> +int
> +splraiseipl(int ipl)
> +{
> +	int old;
> +
> +	old = current_spl_level;
> +	current_spl_level |= imask[ipl];
> +
> +	return old;
> +}
> +

IIRC, current_spl_level is not a bitmask.
Moreover, if you change a spl level, a hardware interrupt mask needs
to be set by calling irq_setmasks().

--
IWAMOTO Toshihiro