arch/powerpc: Improve _memcpy
PATCH 1/1 arch/powerpc: Improve _memcpy
Forwarding to the ppc mailing list.
Chris
-------- Original Message --------
Subject: [PATCH] arch/powerpc: Improve _memcpy
Date: Tue, 3 Nov 2009 15:20:56 +0100
From: Dirk Eibach <[email protected]>
To: [email protected]
CC: Dirk Eibach <[email protected]>
The implementation of _memcpy_fromio and _memcpy_toio seems to be suboptimal for size 4.
--- arch/powerpc/kernel/io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/io.c +0 -0
@@ -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;
Signature · 7 lines
1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
See <http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-May/072582.html>. Any chance to get this one into the tree? Grant?
Cheers, Albrecht.
Am 03.11.09 20:30 schrieb(en) Chris Friesen:
Quoted 60 lines
Forwarding to the ppc mailing list.
Chris
-------- Original Message --------
Subject: [PATCH]arch/powerpc: Improve_memcpy
Date: Tue, 3 Nov 2009 15:20:56 +0100
From: Dirk Eibach <[email protected]>
To: [email protected]
CC: Dirk Eibach <[email protected]>The implementation of
_memcpy_fromioand_memcpy_toioseems to be suboptimal for size 4.Signed-off-by Dirk Eibach <[email protected]>--- arch/powerpc/kernel/io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/powerpc/kernel/io.c +1
-1@@ -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 ();arch/powerpc/kernel/io.c +1
-1vsrc +=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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Quoted 2 lines · Albrecht Dreß
See <http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-May/072582.html>.
Any chance to get this one into the tree? Grant?
Even though it is generic ppc code, I picked it up into my 5200 -next tree because it's such a simple patch. I expect Ben will pull it into his any day now.
Cheers,
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.