Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2006 15:37:24 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 94334 for review
Message-ID:  <200603311537.26612.jhb@freebsd.org>
In-Reply-To: <F2830856-3349-4EA5-B7FC-C927950FE741@xcllnt.net>
References:  <200603302348.k2UNmDJd096792@repoman.freebsd.org> <200603310851.42196.jhb@freebsd.org> <F2830856-3349-4EA5-B7FC-C927950FE741@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 31 March 2006 12:37, Marcel Moolenaar wrote:
> 
> On Mar 31, 2006, at 5:51 AM, John Baldwin wrote:
> 
> > On Thursday 30 March 2006 06:48 pm, Marcel Moolenaar wrote:
> >> http://perforce.freebsd.org/chv.cgi?CH=94334
> >>
> >> Change 94334 by marcel@marcel_nfs on 2006/03/30 23:47:36
> >>
> >> 	Strip-down puc(4):
> >> 	o  Remove PUC_PORT_TYPE_UART: we always use uart(4) now, so we
> >> 	   can use PUC_PORT_TYPE_COM for that.
> >> 	o  Remove PUC_PORT_UART_*: we don't support UART sub-types. All
> >> 	   UARTs are standard ns8250 again.
> >> 	o  Remove PUC_FLAGS_MEMORY and PUC_FLAGS_ALTRES: we try I/O ports
> >> 	   first and if that fails, we try memory.
> >> 	o  Remove PUC_FASTINTR: we try setting up a fast handler first,
> >> 	   and if that fails we try a MPSAFE one.
> >
> > Unfortunately that algorithm doesn't work in the case of a shared  
> > interrupt
> > if puc is the first device to attach.  The other devices then just  
> > "lose".
> 
> It's the standard algorithm I use. I expect the platform to either
> share a fast interrupt handler with a non-fast handler or silently
> downgrade my fast handler to a mpsafe one if later events demand
> this. All I can indicate in my driver is what I'm capable of. The
> MD interrupt code should do what needs to be done based on that
> and the surrounding environment and subsequent events. I have no
> visibility over and/or knowledge about that and cannot program
> for it then.

None of the platforms have ever done the downgrade thing FWIW.  Only
ppc doesn't share INTR_FAST now, so I think you could probably just
always use INTR_FAST.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603311537.26612.jhb>