From owner-freebsd-new-bus Tue Nov 30 14:14: 7 1999 Delivered-To: freebsd-new-bus@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 93FBB157FF for ; Tue, 30 Nov 1999 14:13:43 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id WAA75085; Tue, 30 Nov 1999 22:19:00 GMT (envelope-from dfr@nlsystems.com) Date: Tue, 30 Nov 1999 22:18:59 +0000 (GMT) From: Doug Rabson To: Warner Losh Cc: new-bus@freebsd.org Subject: Re: Interrupt irq activation question In-Reply-To: <199911290721.AAA90820@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 29 Nov 1999, Warner Losh wrote: > > In my pccard_nbk I turned on interrupts when the IRQ resource was > activated. In my newconfig pccard code, I'd like to do the same > thing. I notice that the NetBSD code base turns them on/off in its > intr_establish/intr_disestablish routines, which basically map to our > bus_intr_setup and bus_intr_teardown methods. It got me thinking. Do > I want to do them in the activate phase, or later in the establish > phase. > > The advantage of doing them in the activate phase is that devices like > sio that try to probe for the interrupt used can activate the > interrupt w/o registering an actual interrupt handler for the device > and somehow check to see if that interrupt is responding. > > The advantage for doing them in the setup/teardown methods is that I > suppose this violates POLA less and might result in fewer stray > interrupts. > > Any opinions on the matter? I seem to recall that Doug Rabson once > told me activate/deactivate was the architecturally pure way to do > this. I cannot find his email that told me this, so I thought I'd ask > here in an archived forum. I think that doing this in activate/deactivate was Garrett's intention. Practically, its difficult to activate the irq without a handler in all cases. For pci, its really bad to trigger an interrupt without a handler... -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message