aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/io.c
diff options
context:
space:
mode:
authorAlbrecht Dreß <albrecht.dress@arcor.de>2009-11-04 18:43:12 -0500
committerGrant Likely <grant.likely@secretlab.ca>2009-11-04 18:43:12 -0500
commita22c65f81ae28656b80d2acc687cf6318eb15bba (patch)
tree18090f675ad36a6dc6a91f88d34ace88784fa1fa /arch/powerpc/kernel/io.c
parent5cc17d7e01abd77eda1267a75748cfc84c92a523 (diff)
powerpc: tiny memcpy_(to|from)io optimisation
This trivial patch changes memcpy_(to|from)io as to transfer as many 32-bit words as possible in 32-bit accesses (in the current solution, the last 32-bit word was transferred as 4 byte accesses). Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/kernel/io.c')
-rw-r--r--arch/powerpc/kernel/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/io.c b/arch/powerpc/kernel/io.c
index 1882bf419fa6..8dc7547c2377 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,
161 dest++; 161 dest++;
162 n--; 162 n--;
163 } 163 }
164 while(n > 4) { 164 while(n >= 4) {
165 *((u32 *)dest) = *((volatile u32 *)vsrc); 165 *((u32 *)dest) = *((volatile u32 *)vsrc);
166 eieio(); 166 eieio();
167 vsrc += 4; 167 vsrc += 4;
@@ -190,7 +190,7 @@ void _memcpy_toio(volatile void __iomem *dest, const void *src, unsigned long n)
190 vdest++; 190 vdest++;
191 n--; 191 n--;
192 } 192 }
193 while(n > 4) { 193 while(n >= 4) {
194 *((volatile u32 *)vdest) = *((volatile u32 *)src); 194 *((volatile u32 *)vdest) = *((volatile u32 *)src);
195 src += 4; 195 src += 4;
196 vdest += 4; 196 vdest += 4;