Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 1999 12:41:07 -0600
From:      Warner Losh <imp@village.org>
To:        mjacob@feral.com
Cc:        arch@freebsd.org
Subject:   Re: Racing interrupts 
Message-ID:  <199910251841.MAA42028@harmony.village.org>
In-Reply-To: Your message of "Sun, 24 Oct 1999 20:26:13 PDT." <Pine.BSF.4.10.9910242017170.89788-100000@beppo.feral.com> 
References:  <Pine.BSF.4.10.9910242017170.89788-100000@beppo.feral.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.10.9910242017170.89788-100000@beppo.feral.com> Matthew Jacob writes:
: 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.

Yes.  That is correct.

: 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.

Hmmm.  I could do this, but do not know of any way of mapping I/O
ports sanely.  The problem appears to be driver busy waits for bits to
become active.  At least that's what it appears to be in the few I've
seen.  Most of the problems would be solved if I could detach the
device before unmapping the interrupts, which is the part I needed to
think about...  Or rather look hard at the code to see why it is doing
what it is doing and fix it...

: 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?

newbus provides methods, but that is about it..  However, methods are
easily ignored/defaulted so one can send arbitrary method call message
to a tree or subtree and have sane things happen.

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?199910251841.MAA42028>