Date: Sat, 17 Mar 2001 11:03:26 -0700 From: Warner Losh <imp@harmony.village.org> To: John Baldwin <jhb@FreeBSD.ORG> Cc: Matthew Jacob <mjacob@feral.com>, arch@FreeBSD.ORG Subject: Re: man pages Message-ID: <200103171803.f2HI3Q945895@harmony.village.org> In-Reply-To: Your message of "Fri, 16 Mar 2001 14:31:18 PST." <XFMail.010316143118.jhb@FreeBSD.org> References: <XFMail.010316143118.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <XFMail.010316143118.jhb@FreeBSD.org> John Baldwin writes: : Actually, the cy(4) driver uses explicit enable_intr()'s as does : some of the 386 fpu code, and the pre-spinlock variant of the sio(4) : driver also used explicit enable_intr(). I'm not a big fan out of : it myself, but some things do need it. The manpages look good : though I'd be inclined personally to collapse them into a single : intr.9 manpage. Also, the actual functions are declared in : <machine/cpufunc.h>, and I didn't write these, I am just tweaking : them. :) I have a device that I've written a driver for. The device has a data pump <-> FIFO <-> DMA ENGINE on it. So far fairly standard. However, I get an interrupt when the first byte hits the FIFO. I then have a very small window to program the DMA ENGINE before the FIFO fills up. When I'm in my interrupt handler, I want to disable *ALL* interrupts so that I can do the complicated handsprings necessary to turn on the DMA ENGINE as fast as possible without *ANY* interruption. If I miss my window, I either miss data, or due to a hardware bug, I hang the PCI bus. This is an embedded system, so I don't have to worry about the mouse being responsive :-) I tried using splhigh(), but found that intr_disable() and intr_enable() in the old code proved to work more reliably in practice than splhigh(). No, I don't know why. Just wanted to show an example that needed it, not for syncronization, but to assume total control of the CPU and to make everyone else wait while I do my semi-time critical hardware frobbing. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103171803.f2HI3Q945895>