tech-kern archive

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

Re: proposal for bus_dma(9) change



On Wed, 4 Mar 2009, Manuel Bouyer wrote:

On Wed, Mar 04, 2009 at 12:28:15PM +0000, David Brownlee wrote:
How can you find all MD bus_dmamap_create() implementation in whole
MI/MD source tree?

        I would suspect by a similar process of finding the calls in
        the source tree :)

        There are 698 references to bus_dmamap_create through the
        tree, 29 are defines, 486 are of the form 'if (bus_dmamap_create'
        or 'foo = bus_dmamap_create', and a fair chunk of the rest are
        in printfs, comments, or other misc areas.

        I'd estimate there would be fewer references to check in the
        implementations than the callers.

the problem is that a simple grep doesn't give you all implementations.
Some of then are referenced though function pointers; finding all of them
requires more work.

        Going off on a small tangent here - would there be any sane way of
        having code (under DEBUG) which after a bus_space implementation
        is defined would automatically call it with a known bad set of
        parameters and check the return values? Or possibly have a kernel
        module which could do the same? Some form of 'atf for the kernel'?

--
                David/absolute       -- www.NetBSD.org: No hype required --


Home | Main Index | Thread Index | Old Index