On Wed, Sep 25, 2024, at 13:24, Julian Vetter wrote:
Various architectures have almost the same implementations for
__memcpy_{to,from}io and __memset_io functions. So, consolidate them
into the existing lib/iomap_copy.c.
Reviewed-by: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
Signed-off-by: Julian Vetter <jvetter@xxxxxxxxxxxxx>
---
Signed-off-by: Julian Vetter <jvetter@xxxxxxxxxxxxx>
You have a duplicated signoff here.
+#ifndef __memcpy_fromio
+void __memcpy_fromio(void *to, const volatile void __iomem *from,
size_t count);
+#endif
+
+#ifndef __memcpy_toio
+void __memcpy_toio(volatile void __iomem *to, const void *from, size_t
count);
+#endif
+
+#ifndef __memset_io
+void __memset_io(volatile void __iomem *dst, int c, size_t count);
+#endif
I'm not entirely sure about the purpose of the #ifdef here, since
nothing ever overrides the double-underscore versions, both before
and after your patches.
Unless I'm missing something here, I think a more logical
sequence would be:
1. add the definitions in this file without the underscores,
as memcpy_fromio/memcpy_toio/memset_io, with the #ifdefRight. I will remove it in my next patch revision.
for that name that is always set at this point
2. replace the default implementation in asm-generic/io.hYes, I have done this now.
with extern prototypes, remove the #define from those
3. convert the other architectures, removing both the
implementations and the prototypes.
Arnd