summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/copy_template.S
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-03-31 12:38:31 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-06-22 22:44:38 +0200
commit2239aff6ab2b95af1f628eee7a809f21c41605b3 (patch)
treefd940074a312d252976da05f7e4457c446e14027 /arch/arm/lib/copy_template.S
parent4c4925c1f4ccd72002957c3e73b4f117f2bcf712 (diff)
downloadblackbird-op-linux-2239aff6ab2b95af1f628eee7a809f21c41605b3.tar.gz
blackbird-op-linux-2239aff6ab2b95af1f628eee7a809f21c41605b3.zip
[ARM] cache align destination pointer when copying memory for some processors
The implementation for memory copy functions on ARM had a (disabled) provision for aligning the source pointer before loading registers with data. Turns out that aligning the _destination_ pointer is much more useful, as the read side is already sufficiently helped with the use of preload. So this changes the definition of the CALGN() macro to target the destination pointer instead, and turns it on for Feroceon processors where the gain is very noticeable. Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/lib/copy_template.S')
-rw-r--r--arch/arm/lib/copy_template.S12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm/lib/copy_template.S b/arch/arm/lib/copy_template.S
index cab355c0c1f7..139cce646055 100644
--- a/arch/arm/lib/copy_template.S
+++ b/arch/arm/lib/copy_template.S
@@ -13,14 +13,6 @@
*/
/*
- * This can be used to enable code to cacheline align the source pointer.
- * Experiments on tested architectures (StrongARM and XScale) didn't show
- * this a worthwhile thing to do. That might be different in the future.
- */
-//#define CALGN(code...) code
-#define CALGN(code...)
-
-/*
* Theory of operation
* -------------------
*
@@ -82,7 +74,7 @@
stmfd sp!, {r5 - r8}
blt 5f
- CALGN( ands ip, r1, #31 )
+ CALGN( ands ip, r0, #31 )
CALGN( rsb r3, ip, #32 )
CALGN( sbcnes r4, r3, r2 ) @ C is always set here
CALGN( bcs 2f )
@@ -168,7 +160,7 @@
subs r2, r2, #28
blt 14f
- CALGN( ands ip, r1, #31 )
+ CALGN( ands ip, r0, #31 )
CALGN( rsb ip, ip, #32 )
CALGN( sbcnes r4, ip, r2 ) @ C is always set here
CALGN( subcc r2, r2, ip )
OpenPOWER on IntegriCloud