linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Remove eieio in _memcpy_fromio
@ 2025-01-28 13:57 Julian Vetter
  2025-01-28 14:16 ` Christophe Leroy
  0 siblings, 1 reply; 6+ messages in thread
From: Julian Vetter @ 2025-01-28 13:57 UTC (permalink / raw)
  To: Arnd Bergmann, Madhavan Srinivasan, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N Rao
  Cc: linuxppc-dev, linux-kernel, Julian Vetter

Remove the eieio() calls in _memcpy_fromio, to bring its implementation
closer to the one from lib/iomem_copy.c. These eieio() calls don't seem
to be necessary, because the _memcpy_toio completely omits them. Also
the legacy code from ppc was not doing them.

Signed-off-by: Julian Vetter <julian@outer-limits.org>
---
 arch/powerpc/kernel/io.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 6af535905984..81e5d54260a1 100644
--- a/arch/powerpc/kernel/io.c
+++ b/arch/powerpc/kernel/io.c
@@ -155,21 +155,18 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src,
 	__asm__ __volatile__ ("sync" : : : "memory");
 	while(n && (!IO_CHECK_ALIGN(vsrc, 4) || !IO_CHECK_ALIGN(dest, 4))) {
 		*((u8 *)dest) = *((volatile u8 *)vsrc);
-		eieio();
 		vsrc++;
 		dest++;
 		n--;
 	}
 	while(n >= 4) {
 		*((u32 *)dest) = *((volatile u32 *)vsrc);
-		eieio();
 		vsrc += 4;
 		dest += 4;
 		n -= 4;
 	}
 	while(n) {
 		*((u8 *)dest) = *((volatile u8 *)vsrc);
-		eieio();
 		vsrc++;
 		dest++;
 		n--;
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-28 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 13:57 [PATCH] powerpc: Remove eieio in _memcpy_fromio Julian Vetter
2025-01-28 14:16 ` Christophe Leroy
2025-01-28 15:07   ` Julian Vetter
2025-01-28 15:24     ` Christophe Leroy
2025-01-28 15:34       ` Christophe Leroy
2025-01-28 16:50         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).