From owner-freebsd-new-bus Sun Nov 28 23:21:41 1999 Delivered-To: freebsd-new-bus@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 008F315343 for ; Sun, 28 Nov 1999 23:21:38 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id AAA03305 for ; Mon, 29 Nov 1999 00:21:37 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA90820 for ; Mon, 29 Nov 1999 00:21:56 -0700 (MST) Message-Id: <199911290721.AAA90820@harmony.village.org> To: new-bus@freebsd.org Subject: Interrupt irq activation question Date: Mon, 29 Nov 1999 00:21:56 -0700 From: Warner Losh Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message