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

Re: [Xen-devel] dma_map_single returns 0 on ARM



On Fri, 24 Oct 2014, Zoltan Kiss wrote:
> Hi,
> 
> I'm trying to fire up the Ethernet port of a Hisilicon D01 board, and it fails
> when it wants to map the buffers to the device:
> 
>               phys = dma_map_single(&ndev->dev, priv->rx_buf[i],
>                               RX_BUF_SIZE, DMA_FROM_DEVICE);
> 
> This returns 0, while running on bare metal it works. Does anyone has an
> advice where should I look?

dma_map_single should just be a wrapper around dma_ops->map_page that in
dom0 is implemented by xen_swiotlb_map_page.
From looking at the code the issue appears to be that dma_capable
returns false for your device.

In any case even if dma_map_single returned a valid address, keep in
mind that at the moment if the device is not dma coherent Linux needs
to be compiled with CONFIG_ARM_LPAE to be able to cache flush the
buffers correctly. But the failure in that case is a memory corruption
after the dma request is completed.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.