Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jan 1997 04:56:15 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        julian@whistle.com, terry@lambert.org
Cc:        bde@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Bruce! HHHEEELLLLPPPP!
Message-ID:  <199701241756.EAA24457@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> I can run the test program once which links the nodes up and 
>> sends some messages around, and then shuts down.
>> the second time I do that the system hangs.

Program or lkm shuts down?

>I think it's a case of unregistration being required, not masking;
>Bruce can correct me, but I think a masked interrupt which occurs
>while masked is delivered at unmask time.  This is a scary thought,
>since it bears on the question "how do I disable an interrupt
>without potentially causing it to occur following unregistration?".
>Probably this will have to be done in the routing/delivery code
>instead of at the hardwre level (mask it, disable it, unmask it,
>and eat it if it subsequently occurs).

Lots of things aren't quite right for unregistering modules and
interrupts, but unexpected interrupts from failing to service or mask
interrupts before unregistering them are sent to the stray interrupt
handler where they shouldn't do much damage.  See eisaconf.c for
almost the correct order (there is still problem if there is a pending
interrupt.  The problem is increased by masking interrupts using splfoo().
Pending interrupts are delivered after the ipl is reduced sufficiently,
so it doesn't quite work to do:

	s = splfoo();
		<-- if an interrupt occurs here...
	disable_foo_interrupts();
	eisa_release_intr(...);
	splx(s);
		<-- ...it will be delivered here

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701241756.EAA24457>