Skip to contentSkip to conversation

Question about dma_alloc_coherent and iommu

DISCUSSION Robert Walsh 1 participant 1 message May 26, 2006

lore
Share & tools
lore
#0 lore raw

Hi there,

Our driver (the ipath driver in drivers/infiniband) uses dma_alloc_coherent to allocate buffers that our device will DMA into. We use a 64-bit DMA mask. Although we don't set a consistent DMA mask, it doesn't seem to matter whether we do or not for the following problem.

Everything works fine on 2.6.16: when the device tells us it's DMA'd into a buffer, the data is there and everyone is happy. It also works fine on kernels from 2.6.9 through 2.6.15, but only as long as there is 4GB or less of memory on the machine. On our machines with > 4GB memory, the buffers do not appear to have had anything DMA'd into them.

If we use "iommu=off" on the kernel boot line, the problem goes away and the data starts appearing.

Has anyone seen this behaviour on other devices? Are we missing something in the device setup, maybe? As I mentioned, setting a consistent DMA mask doesn't help, no matter whether we set it to 64-bits or 32-bits. Setting the regular DMA mask to 32-bits doesn't help
either: the problem still crops up.

Regards,
Robert.

Signature · 3 lines
Robert Walsh
Amalgamated Durables, Inc.  -  "We don't make the things you buy."
Email: [email protected]