Subject: Re: Splitting sa1111 support codes.
To: None <bsh@netbsd.org>
From: IWAMOTO Toshihiro <toshii@netbsd.org>
List: port-arm
Date: 04/26/2003 20:32:55
I don't like this portion of your patch.
The other parts seems okay, though I haven't looked at carefully.
hpcarm's softintr is capable of handling all IPL levels,
so I think this code should be in softintr_establish in
sys/arm/arm/softintr.c.
At Fri, 25 Apr 2003 18:48:32 +0900,
bsh@netbsd.org wrote:
>
> Hi,
>
> I want to modify some files under sys/arch/arm/sa11x0 as in
> following patch, so that common codes can be shared cleanly among
> hpcarm and other platforms that have SA1111 companion chip.
> diff -N --exclude=CVS -ru current/src/sys/arch/arm/sa11x0/sa1111.c new/src/sys/arch/arm/sa11x0/sa1111.c
> --- current/src/sys/arch/arm/sa11x0/sa1111.c Thu Oct 10 15:29:16 2002
> +++ new/src/sys/arch/arm/sa11x0/sa1111.c Fri Apr 18 18:03:16 2003
> @@ -276,7 +164,15 @@
> panic("sacc_intr_establish: type must be unique");
>
> /* install intr handler */
> -#ifdef hpcarm
> +#if defined(__HAVE_GENERIC_SOFT_INTERRUPTS)
> + /* map interrupt level to appropriate softinterrupt level */
> + if (level >= IPL_SOFTSERIAL)
> + level = IPL_SOFTSERIAL;
> + else if(level >= IPL_SOFTNET)
> + level = IPL_SOFTNET;
> + ih->ih_soft = softintr_establish(level, (void (*)(void *)) ih_fun,
> + ih_arg);
> +#else /* hpcarm */
> ih->ih_soft = softintr_establish(level, (void (*)(void *)) ih_fun,
> ih_arg);
> #endif
--
IWAMOTO Toshihiro