From owner-freebsd-current Tue May 27 04:40:01 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA09088 for current-outgoing; Tue, 27 May 1997 04:40:01 -0700 (PDT) Received: from Sisyphos.MI.Uni-Koeln.DE (Sisyphos.MI.Uni-Koeln.DE [134.95.212.10]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id EAA09056 for ; Tue, 27 May 1997 04:39:51 -0700 (PDT) Received: from x14.mi.uni-koeln.de (annexr3-9.slip.Uni-Koeln.DE) by Sisyphos.MI.Uni-Koeln.DE with SMTP id AA22078 (5.67b/IDA-1.5 for ); Tue, 27 May 1997 13:39:36 +0200 Received: (from se@localhost) by x14.mi.uni-koeln.de (8.8.5/8.6.9) id NAA01344; Tue, 27 May 1997 13:39:34 +0200 (CEST) X-Face: " Date: Tue, 27 May 1997 13:39:33 +0200 From: Stefan Esser To: Bruce Evans Cc: gurney_j@resnet.uoregon.edu, current@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys interrupt.h src/sys/kern kern_intr.c References: <199705271118.VAA05558@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.74 In-Reply-To: <199705271118.VAA05558@godzilla.zeta.org.au>; from Bruce Evans on Tue, May 27, 1997 at 09:18:52PM +1000 Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On May 27, Bruce Evans wrote: > >driver's handler in turn. There is no provision to deal > >with Edge triggered shared interrupts, though. Your > >driver will have to make sure, that the interrupt pin > >sees a new Edge after you leave the multiplex handler, > >or you will never again see an IRQ. This is normally > >done by looping until the interrupt line has become > >inactive, and this loop should go into the low level > >(coded in assembler) interrupt code, IMHO ... > > No, the loop is best done in individual drivers. The low level > code can't read the interrupt pin, at least for the ICU case, > and drivers can more easily keep track of their state if they > do they loop themselves. The only reason to return to the But it doesn't suffice, that each driver loops as long as is responsible for the activation of the interrupt line. Before all devices have been serviced, the first one may have asserted the IRQ signal again, and if there is no loop over all devices, until none of them required service, this will quickly hang your system ... > low level is to give other interrupt handlers a chance to run, > which is only worth doing if all the drivers cooperate, but > none do. Hmmm, I was hoping for a way to do the multiplexing from a common pseudo interrupt handler. The original PCI shared interrupt code expected the driver's interrupt handler to return an indication of whether there was any work to do. The multiplexer would loop as long as at least one driver reported it was called for a reason ... :) I had been hoping that the low level code could be made to check a flag, which if set would require the ICU to be queried about the interrupt pin state. But I've got to admit, that it has been too long since I programmed an 8259, and that I don't remember if you could read out the level applied to some edge triggered IRQ pin ... (And you seem to tell me, that there is no way to do this ... Too bad!) How about adding a second type of interrupt multiplexer, which does expect the device's handler to return a status indicating whether this device caused the interrupt ... This multiplexer would only be installed for edge-triggered IRQ lines, and the faster one that just does a single poll pass over all devices would be used for PCI/EISA with level triggered interrupts ... ? Regards, STefan