Re: [U-Boot] [PATCH 1/2] common: make bouncebuf work for non-DMA transfers

Marek Vasut wrote:
Why don't you just fix the cache operations in the driver ?
This driver is copying CPU only. There are no cache operations involved! Vignesh added the bounce buffer obviously to fix alignment issues on his platform.
This bounce-buffer for only CPU operations is just wasting CPU cycles and degrades performance and I just cannot find a good reason for it.
I only thought using the bounce buffer here would be better than to add memcpy/memmove for alignment reasons in the driver (in terms of possible code duplication).
I can of course implement this in a different way.
Simon

On 11/15/2017 05:18 PM, Goldschmidt Simon wrote:
Marek Vasut wrote:
Why don't you just fix the cache operations in the driver ?
This driver is copying CPU only. There are no cache operations involved! Vignesh added the bounce buffer obviously to fix alignment issues on his platform.
This bounce-buffer for only CPU operations is just wasting CPU cycles and degrades performance and I just cannot find a good reason for it.
I only thought using the bounce buffer here would be better than to add memcpy/memmove for alignment reasons in the driver (in terms of possible code duplication).
I can of course implement this in a different way.
So what alignment problems do you observe ? If you copy using the CPU only, why do you need the bounce buffer at all ? I don't quite get it.
participants (2)
-
Goldschmidt Simon
-
Marek Vasut