arm64 memcpy_{from|to}io and memset_io

Catalin Marinas catalin.marinas at
Wed Oct 14 09:12:14 PDT 2015

On Tue, Oct 13, 2015 at 11:12:18PM -0700, Radha Mohan wrote:
> I see that the memcpy_{from|to}io and memset_io are not in an
> optimized manner. I guess these are just a copy from
> arch/arm/include/asm/io.h where there could be problem with different
> implementations.

I think you may be looking at an older kernel version. In the latest
mainline, memcpy_*io functions are more optimised in the sense that they
use 64-bit accesses if the alignment permits.

> Do we still need these to be byte write ?

No but see above.

> Can we convert them to use a more optimized memcpy ?

There is a risk to converting them to something like memcpy() as the
latter does not guarantee aligned accesses. Alignment is mandatory for
Device memory access.

> We have some drivers, like framebuffer driver using these functions
> and end up writing byte-by-byte. This causes a very poor VGA
> performance.

You probably have an old kernel version.


More information about the linux-arm-kernel mailing list