Fixing bus_dma_tag_create(NULL, ?).
marius at alchemy.franken.de
Mon Oct 31 19:45:03 UTC 2011
On Mon, Oct 31, 2011 at 02:52:58PM +0100, Edward Tomasz Napiera?a wrote:
> On sparc64, calling bus_dma_tag_create(9) with NULL tag will result in instant
> panic due to KASSERT. Patch below fixes all the instances I could find. It also fixes
> several places unrelated to sparc64, just to give a good example.
> Now, the problem is - the changes are trivial and mechanical, but I have no way
> to test most of it, simply because I don't have hardware handled by these drivers.
> And I'm not really sure how to proceed from this point. Any ideas?
> Patch can be found at:
I prefer to leave the NULL parent tag usage in as a marker that a driver
hasn't been reviewed and fixed to also work on !x86 as typically drivers
only written with x86 in mind also have other bus_dma(9) and endianness
related bugs, miss bus barriers, have alignment issues or even aren't
actually 64-bit clean etc. Also I think it's better that a users gets
a clean panic when trying to use such a driver than a randomly broken
driver that could cause data corruption etc. I won't stop you from
committing that patch though. It certainly doesn't matter to commit it
untested for asr(4), which likely will be i386-only forever, as well as
blkfront(4) and ndis(4).
More information about the freebsd-sparc64