Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 1997 10:15:06 +0200
From:      Stefan Esser <se@FreeBSD.ORG>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        current@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/sys interrupt.h src/sys/kern kern_intr.c
Message-ID:  <19970527101506.23125@x14.mi.uni-koeln.de>
In-Reply-To: <19970527004020.12865@hydrogen.nike.efn.org>; from John-Mark Gurney on Tue, May 27, 1997 at 12:40:20AM -0700
References:  <199705261437.HAA28793@freefall.freebsd.org> <19970527004020.12865@hydrogen.nike.efn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 27, John-Mark Gurney <jmg@hydrogen.nike.efn.org> wrote:
> Stefan Esser scribbled this message on May 26:
> >   Add support for shared interrupts to the kernel. This code is meant
> >   be (eventually) architecture independent. It provides an emulation
> 
> does this mean it will also work with ISA irq's?  i.e. call the interupt
> routine for each device?  the reason I ask is that I am working on getting
> sio to just probe the devices on the specific irq, and it would be nice to
> use something this generic...

Well, the proposed new interface are the "intr_create()" 
and "intr_connect()" functions. 

The first one takes the same parameters that used to be 
supplied to register_intr(), but accepts a new "INTR_EXCL" 
option in the flags parameter. This function returns an
pointer to a dynamically allocated interrupt descriptor 
structure, which is to be treated as opaque by the drivers.

A driver can then call intr_connect() to activate the 
interrupt handler as previously defined by create_intr.

Now, regarding your question: There is now a shared 
interrupt multiplexer, that will be installed instead of 
the first interrupt handler, and which will call each 
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 ...

You'd need to specify a flag to create_intr() in that 
case, which would be accessible to the low level handler,
and which would make it just call the same driver handler
over and over again, until the IRQ line is inactive.

I could work out patches that do this for you to test,
or somebody who is more familiar with the low level int
code could jump in ...

Regards, STefan



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