From owner-freebsd-current Mon Jul 26 11:21:57 1999 Delivered-To: freebsd-current@freebsd.org Received: from reliam.teaser.fr (reliam.teaser.fr [194.51.80.12]) by hub.freebsd.org (Postfix) with ESMTP id C7DA114F89 for ; Mon, 26 Jul 1999 11:21:50 -0700 (PDT) (envelope-from nsouch@teaser.fr) Received: from teaser.fr (ppp1087-ft.teaser.fr [194.206.156.40]) by reliam.teaser.fr (8.9.3/8.9.3) with ESMTP id UAA05626; Mon, 26 Jul 1999 20:21:21 +0200 (MET DST) Received: (from nsouch@localhost) by teaser.fr (8.9.3/8.9.1) id UAA00685; Mon, 26 Jul 1999 20:24:42 +0200 (CEST) (envelope-from nsouch) Message-ID: <19990726202441.57962@breizh.teaser.fr> Date: Mon, 26 Jul 1999 20:24:41 +0200 From: Nicolas Souchu To: Bruce Evans Cc: current@FreeBSD.ORG, des@flood.ping.uio.no, obrien@NUXI.com, sobomax@altavista.net Subject: Re: PLIP is still broken :( References: <199907251904.FAA12887@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199907251904.FAA12887@godzilla.zeta.org.au>; from Bruce Evans on Mon, Jul 26, 1999 at 05:04:42AM +1000 X-Operating-System: FreeBSD breizh 4.0-CURRENT FreeBSD 4.0-CURRENT Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Jul 26, 1999 at 05:04:42AM +1000, Bruce Evans wrote: > >>>Otherwise, >>>the generic code is missing mainly update of the interrupt masks when >>>an interrupt is unregistered. >> >>For the low level side, we could consider something like the following code. >>But this shall be called by the nexus layer and then needs generic newbus >>support (as you said above, didn't you?). > >>/* >> * Switch an irq from a maskptr to another without unregistering the irq >> * handler. >> * This function is supposed to work with only one handler per irq. >> */ >>void >>switch_masks(intrmask_t *oldmaskptr, intrmask_t *newmaskptr, int irq) >.... > >I don't like most of this. Driver level code won't even know the >correct maskptrs. (irq, maskptr) pairs depend on i386 implementation >details for uniqueness. Use { s = splhigh(); BUS_TEARDOWN_INTR(...); >BUS_SETUP_INTR(...); splx(s); } until/unless the newbus level provides This is what I meant when I said the nexus layer shall do the switch_masks() call. The current implementation of SETUP_INTR/TEARDOWN involves the overhead of unregistering and registering the interrupt. This is why I propose switch_masks() which doesn't. Moreover, in the ppbus model, the ppc_intr() function is _always_ the registered interrupt handler and it dispatches the interrupt depending on the device driver which currently owns the bus when the interrupt occurs. >a better interface. The problem with the masks not being updated when >interrupts are unregistered should be fixed in update*_masks(). I agree if unregistering/registering is declared better than switching masks for the current registered handler. > >Bruce > -- nsouch@teaser.fr / nsouch@freebsd.org FreeBSD - Turning PCs into workstations - http://www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message