From owner-freebsd-hackers Fri Sep 29 18:10:06 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id SAA10382 for hackers-outgoing; Fri, 29 Sep 1995 18:10:06 -0700 Received: from muse.microunity.com (muse1.microunity.com [192.216.206.2]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id SAA10376 for ; Fri, 29 Sep 1995 18:10:02 -0700 Received: from gaea.microunity.com by muse.microunity.com (4.1/ericm1.1) id AA09498; Fri, 29 Sep 95 18:09:10 PDT Received: from gallifrey (gallifrey.microunity.com) by gaea.microunity.com (4.1/muse1.3) id AA28270; Fri, 29 Sep 95 18:09:08 PDT Received: by gallifrey (931110.SGI.ANONFTP/muse-sgi.2) for @gaea.microunity.com:freebsd-hackers@freebsd.org id AA29818; Fri, 29 Sep 95 18:09:07 -0700 From: deborah@microunity.com (Deborah Gronke Bennett) Message-Id: <9509291809.ZM29816@gallifrey.microunity.com> Date: Fri, 29 Sep 1995 18:09:07 -0700 In-Reply-To: Terry Lambert "Re: spl'ing to a specific interrupt level" (Sep 29, 4:37pm) References: <199509292337.QAA15601@phaeton.artisoft.com> X-Mailer: Z-Mail (3.1.0 22feb94 MediaMail) To: Terry Lambert Subject: Re: spl'ing to a specific interrupt level Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Sender: owner-hackers@freebsd.org Precedence: bulk > > > > 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