Unverified Commit b660d0a2 authored by Julian Vetter's avatar Julian Vetter Committed by Arnd Bergmann
Browse files

New implementation for IO memcpy and IO memset



The IO memcpy and IO memset functions in asm-generic/io.h simply call
memcpy and memset. This can lead to alignment problems or faults on
architectures that do not define their own version and fall back to
these defaults.
This patch introduces new implementations for IO memcpy and IO memset,
that use read{l,q} accessor functions, align accesses to machine word
size, and resort to byte accesses when the target memory is not aligned.
For new architectures and existing ones that were using the old
fallbacks these functions are save to use, because IO memory constraints
are taken into account. Moreover, architectures with similar
implementations can now use these new versions, not needing to implement
their own.

Reviewed-by: default avatarYann Sionneau <ysionneau@kalrayinc.com>
Signed-off-by: default avatarJulian Vetter <jvetter@kalrayinc.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent d4d3125a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment