tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bus_dmamap_unload and interrupt priority



Is the current IPL any part of bus_dmamap_unload()'s interface
contract?  Has it ever been?  I'm trying to track down a crash and it
looks to me as though it's happening inside bus_dmamap_unload, and the
nature of the crash leads me to suspect it's priority-level related:
it's the "should be able to take ipis" KASSERT in pmap_load() tripping,
and the bus_dmamap_unload() call is being made at splhigh.

This is on 5.2 amd64, but the manpage available at
http://netbsd.gw.com/cgi-bin/man-cgi?bus_dmamap_unload+9+NetBSD-current
is as silent, as far as I can see, as the 5.2 one on the question of
whether bus_dmamap_unload cares about what IPL it's called at.

Just to keep things interesting, it crashes only occasionally; most of
the time it sails right through that call.

I'm going to try to defer the sync-and-unload until later, after the
splx, but it seems to me that if this matters it really _should_ be
mentioned in the documentation.  Alternatively, if it shouldn't matter
and this is a bug, I'd like to know it.  Or, if someone thinks that it
isn't a problem to call bus_dmamap_unload at splhigh and the crash must
be due to something else, that would be useful information too.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index