[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1257258056-4008-1-git-send-email-eibach@gdsys.de>
Date: Tue, 3 Nov 2009 15:20:56 +0100
From: Dirk Eibach <eibach@...ys.de>
To: linux-kernel@...r.kernel.org
Cc: Dirk Eibach <eibach@...ys.de>
Subject: [PATCH] arch/powerpc: Improve _memcpy
The implementation of _memcpy_fromio and _memcpy_toio seems to be suboptimal for size 4.
Signed-off-by: Dirk Eibach <eibach@...ys.de>
---
arch/powerpc/kernel/io.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 1882bf4..8dc7547 100644
--- a/arch/powerpc/kernel/io.c
+++ b/arch/powerpc/kernel/io.c
@@ -161,7 +161,7 @@ void _memcpy_fromio(void *dest, const volatile void __iomem *src,
dest++;
n--;
}
- while(n > 4) {
+ while(n >= 4) {
*((u32 *)dest) = *((volatile u32 *)vsrc);
eieio();
vsrc += 4;
@@ -190,7 +190,7 @@ void _memcpy_toio(volatile void __iomem *dest, const void *src, unsigned long n)
vdest++;
n--;
}
- while(n > 4) {
+ while(n >= 4) {
*((volatile u32 *)vdest) = *((volatile u32 *)src);
src += 4;
vdest += 4;
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists