[PATCH 2/8] asm-generic: define fallback memcpy and memset for device I/O
Sascha Hauer
sha at pengutronix.de
Tue Feb 2 14:03:17 EST 2021
On Fri, Jan 29, 2021 at 05:11:10PM +0100, Ahmad Fatoum wrote:
> The Atmel quadspi driver makes use of the memcpy_(to|from)io,
> but we don't define them on all platforms. Fix this to allow
> for easier porting of kernel code.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> include/asm-generic/io.h | 53 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
This patch breaks compilation for ARM:
In file included from /ptx/work/WORK_EIHEI/sha/backup/barebox/barebox-maintainer-utils/barebox/arch/arm/include/asm/io.h:6,
from include/io.h:5,
from arch/arm/lib32/io.c:3:
include/asm-generic/io.h:448:23: error: redefinition of 'memcpy_fromio'
448 | #define memcpy_fromio memcpy_fromio
| ^~~~~~~~~~~~~
arch/arm/lib32/io.c:9:6: note: in expansion of macro 'memcpy_fromio'
9 | void memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
| ^~~~~~~~~~~~~
include/asm-generic/io.h:448:23: note: previous definition of 'memcpy_fromio' was here
448 | #define memcpy_fromio memcpy_fromio
| ^~~~~~~~~~~~~
include/asm-generic/io.h:457:20: note: in expansion of macro 'memcpy_fromio'
457 | static inline void memcpy_fromio(void *buffer,
| ^~~~~~~~~~~~~
include/asm-generic/io.h:466:21: error: redefinition of 'memcpy_toio'
466 | #define memcpy_toio memcpy_toio
| ^~~~~~~~~~~
arch/arm/lib32/io.c:24:6: note: in expansion of macro 'memcpy_toio'
24 | void memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
| ^~~~~~~~~~~
include/asm-generic/io.h:466:21: note: previous definition of 'memcpy_toio' was here
466 | #define memcpy_toio memcpy_toio
| ^~~~~~~~~~~
include/asm-generic/io.h:475:20: note: in expansion of macro 'memcpy_toio'
475 | static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer,
| ^~~~~~~~~~~
include/asm-generic/io.h:431:19: error: redefinition of 'memset_io'
431 | #define memset_io memset_io
| ^~~~~~~~~
arch/arm/lib32/io.c:39:6: note: in expansion of macro 'memset_io'
39 | void memset_io(volatile void __iomem *dst, int c, size_t count)
| ^~~~~~~~~
include/asm-generic/io.h:431:19: note: previous definition of 'memset_io' was here
431 | #define memset_io memset_io
| ^~~~~~~~~
include/asm-generic/io.h:440:20: note: in expansion of macro 'memset_io'
440 | static inline void memset_io(volatile void __iomem *addr, int value,
| ^~~~~~~~~
--
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