[Cbe-oss-dev] Spider DMA wrongness

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Nov 7 17:09:57 EST 2006


That reminds me... our direct DMA ops are a bit dodgy.

static int pci_direct_dma_supported(struct device *dev, u64 mask)
{
        return mask < 0x100000000ull;
}

What do that mean ?

More specifically, what is that mask value supposed to be ? And what is
the polarity of the result from that function ? Because if it's the
driver DMA mask, then a device that can do 64 bits will get a 0 out of
that function while a device who can only do, for example, 30bits will
get an 1...

If it's the device DMA mask, then shouldn't we test wether it's big
enough to enclose all available memory ? If not, then we fail.

Ben.





More information about the cbe-oss-dev mailing list