Help!

Fwd: [PATCH] arch/powerpc: Improve _memcpy

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel RSS
Next:  Processing of dh-ocaml_0.9.2_amd64.changes  
Author Message
Chris Friesen
External


Since: Jun 09, 2006
Posts: 105



PostPosted: Tue Nov 03, 2009 3:10 pm    Post subject: Fwd: [PATCH] arch/powerpc: Improve _memcpy
Archived from groups: linux>kernel (more info?)

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 <eibach RemoveThis @gdsys.de>
To: linux-kernel RemoveThis @vger.kernel.org
CC: Dirk Eibach <eibach RemoveThis @gdsys.de>

The implementation of _memcpy_fromio and _memcpy_toio seems to be
suboptimal for size 4.

Signed-off-by: Dirk Eibach <eibach RemoveThis @gdsys.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 RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Grant Likely
External


Since: May 02, 2007
Posts: 16



PostPosted: Mon Nov 09, 2009 1:10 pm    Post subject: Re: Fwd: [PATCH] arch/powerpc: Improve _memcpy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, Nov 4, 2009 at 11:12 AM, Albrecht Dreß <albrecht.dress.TakeThisOut@arcor.de> wrote:
> 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.

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Kernel All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum