From owner-freebsd-arch Sun Oct 24 20:27: 3 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 339A6151BD for ; Sun, 24 Oct 1999 20:26:42 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id FAA19820 for ; Mon, 25 Oct 1999 05:26:38 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id FAA12383 for freebsd-arch@freebsd.org; Mon, 25 Oct 1999 05:26:37 +0200 (MET DST) Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 3FCD714A24 for ; Sun, 24 Oct 1999 20:26:18 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from beppo.feral.com (beppo [192.67.166.79]) by feral.com (8.8.7/8.8.7) with ESMTP id UAA29980; Sun, 24 Oct 1999 20:26:15 -0700 Date: Sun, 24 Oct 1999 20:26:13 -0700 (PDT) From: Matthew Jacob Reply-To: mjacob@feral.com To: Warner Losh Cc: arch@freebsd.org Subject: Re: Racing interrupts In-Reply-To: <199910240608.AAA34462@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > What I really want is a kernel signal mechanism which will start a > rundown of the driver thread which is not allowed to touch hardware, > but can only free resources used by the driver. We have lots of tight > loops in drivers in the kernel and it seems unwise to pessimize those > so that this race can be dealt with... Presumably the interrupt that notifies one that a card has been pulled is actually then managed by the bus device driver for that bus. This should ensure that the the bus nexus controlller is notified that the state of the hardware is changed. This does nothing for threads that were active at the time of the interrupt. In this case, either the hardware is sane enough to continue to provide some rational non-faulting access (in the case of memory mapping), or you have to design a framework such that when the interrupt occurs, and the nexus driver now knows how to remap any memory mappings so that a safe non-faulting (if nonsensical) access can occur. Then some additional mechanism which notifies the actual node driver that things have changed will be invoked. For systems I'm more familiar with, explicit obligate parent-child relationships have these specific notification mechanisms specified on a per parent-child type basis. It's hard to generalize such mechanisms into a usable general event notification mechanism because each bus has different possible async events. A PC cardbus has removal/insertion, a fibre channel arbitrated loop has LIP and then (re)arbitration for AL_PAs- who knows what Compact PCI provides? What does newbus provide for this? -matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message