Date: Fri, 29 Sep 1995 18:09:07 -0700 From: deborah@microunity.com (Deborah Gronke Bennett) To: Terry Lambert <terry@lambert.org> Cc: freebsd-hackers@freebsd.org Subject: Re: spl'ing to a specific interrupt level Message-ID: <9509291809.ZM29816@gallifrey.microunity.com> In-Reply-To: Terry Lambert <terry@lambert.org> "Re: spl'ing to a specific interrupt level" (Sep 29, 4:37pm) References: <199509292337.QAA15601@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > It's a programmed I/O device which is a bridge from the PC > > to a proprietary serial communications bus. It's kind of like > > a generic programmed port device, so we can use a program > > on the PC to write stuff onto this proprietary serial bus. > > If it gets an interrupt, it gets a priority level. > > > If I have to add it to an interrupt class, I suppose it's > > closest to a tty-style device (I notice that the lpt device > > uses tty). However, I am still wondering if there's any way > > to just block interrupts at my level and below, rather than > > block out everything which is on the ttytab list. > > I don't think I understand; you want to prioritize your driver below > the standard tty drivers? I don't think that's wise; I'd just use > spltty. > Here is what I understand about the FreeBSD interrupt system: (btw, my device is an isa device) from isa_configure, via config_isadev_c, my driver probe routine is called. If it succeeds, (id_alive is true) then some time later my attach routine is called. Just before register_intr is called to add my interrupt service routine to the proper level, INTRMASK is called to add my irq level to one of tty_imask, bio_imask, net_imask or SWI_CLOCK_MASK. (Which one depends on the keyword in my config line). My understanding of the splXXX routines is that you call them to block critical sections which could somehow depend on each other - that's why you have the classes of bio (disk devices), net (network) and tty (serial devices). My quandry is that I don't want to block anything else I don't need to - I just want a routine to call to raise the spl level to my level (whatever I put after the "irq" on my config line). Is my only solution in this case to call splsoftclock? So, to answer your question, what I want to do is not to prioritize my device with respect to any other device - I just want a way to block my critical sections. Am I making this any clearer now? -deborah bennett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9509291809.ZM29816>