aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mm/copypage-xsc3.c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-04 04:05:15 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-06-08 19:42:18 +0100
commit9a40ac86152c9cffd3dca482a15ddf9a8c5716b3 (patch)
tree52a74a0826d771141b78b1a04928e75df5726ebf /arch/arm/mm/copypage-xsc3.c
parent76962be8491b18ae7ff4fd6a4accd398bdb402a2 (diff)
ARM: 6164/1: Add kto and kfrom to input operands list.
When functions incoming parameters are not in input operands list gcc 4.5 does not load the parameters into registers before calling this function but the inline assembly assumes valid addresses inside this function. This breaks the code because r0 and r1 are invalid when execution enters v4wb_copy_user_page () Also the constant needs to be used as third input operand so account for that as well. Tested on qemu arm. CC: <stable@kernel.org> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/copypage-xsc3.c')
-rw-r--r--arch/arm/mm/copypage-xsc3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c
index 747ad4140fc..f9cde0702f1 100644
--- a/arch/arm/mm/copypage-xsc3.c
+++ b/arch/arm/mm/copypage-xsc3.c
@@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
{
asm("\
stmfd sp!, {r4, r5, lr} \n\
- mov lr, %0 \n\
+ mov lr, %2 \n\
\n\
pld [r1, #0] \n\
pld [r1, #32] \n\
@@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
\n\
ldmfd sp!, {r4, r5, pc}"
:
- : "I" (PAGE_SIZE / 64 - 1));
+ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1));
}
void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,