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

[MiNT] USB buffers cache line size aligned



Hi,

in USB sources most of the buffers to transfer data between main
memory and USB host controllers are placed in the stack, this is
heritage from U-Boot, they prefer it like this because in some booting
systems some drivers could be used before malloc is available. Those
buffers should be cache line size aligned just in case the transfer
between memory and the host controllers is a DMA operation. Right now
USB MiNT sources doesn't take care of this. We have two choices to fix
this:

1) Allocate the buffers with kmalloc as we don't have the U-Boot
problem regarding the booting systems.

2) Keep those buffers in the stack and make them aligned with a macro
imported from U-boot.

Any opinion about what method you preferred?