summary refs log tree commit diff
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorVictor Kamensky <victor.kamensky@linaro.org>2014-09-04 06:07:33 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-09-12 17:38:59 +0100
commitd9981380b49b839ecaffbbe131908a342db68980 (patch)
treebd39bf86b001180366029db52f5a3c7e9e5bd7e3 /arch/arm/mach-sa1100
parente918a62a2ba81d10a3cc2c513dc70034c9524a95 (diff)
downloadlinux-d9981380b49b839ecaffbbe131908a342db68980.tar.gz
ARM: 8137/1: fix get_user BE behavior for target variable with size of 8 bytes
e38361d 'ARM: 8091/2: add get_user() support for 8 byte types' commit
broke V7 BE get_user call when target var size is 64 bit, but '*ptr' size
is 32 bit or smaller. e38361d changed type of __r2 from 'register
unsigned long' to 'register typeof(x) __r2 asm("r2")' i.e before the change
even when target variable size was 64 bit, __r2 was still 32 bit.
But after e38361d commit, for target var of 64 bit size, __r2 became 64
bit and now it should occupy 2 registers r2, and r3. The issue in BE case
that r3 register is least significant word of __r2 and r2 register is most
significant word of __r2. But __get_user_4 still copies result into r2 (most
significant word of __r2). Subsequent code copies from __r2 into x, but
for situation described it will pick up only garbage from r3 register.

Special __get_user_64t_(124) functions are introduced. They are similar to
corresponding __get_user_(124) function but result stored in r3 register
(lsw in case of 64 bit __r2 in BE image). Those function are used by
get_user macro in case of BE and target var size is 64bit.

Also changed __get_user_lo8 name into __get_user_32t_8 to get consistent
naming accross all cases.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
0 files changed, 0 insertions, 0 deletions