[PATCH 5/5] virtio: don't use DMA API unless required

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Oct 14 06:05:54 PDT 2024


Hello Sascha,

On 14.10.24 14:48, Sascha Hauer wrote:
> On Wed, Oct 09, 2024 at 08:05:11AM +0200, Ahmad Fatoum wrote:
>> We have no Virt I/O drivers that make use of the streaming DMA API, but
>> the Virt queues are currently always allocated using the coherent DMA
>> API.
>>  	vq->queue_dma_addr = dma_addr;
>>  	vq->queue_size_in_bytes = queue_size_in_bytes;
>> +	vq->use_dma_api = vring_use_dma_api(vdev);
> 
> What's vq->use_dma_api good for? It's unused.

Linux uses it to decide e.g. inside vring_map_single, whether DMA API
should be used. I think we may need it in barebox in future too, but
it can always be added later. Please see the fixup I just sent out.

Sorry for the inconvenience,
Ahmad

> 
> Sascha
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list