aboutsummaryrefslogtreecommitdiff
path: root/include/asm-sh
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2008-07-28 18:36:13 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 18:36:13 +0900
commit2b4b2bb42137c779ef0084de5df66ff21b4cd86e (patch)
treee4f2994b5f30f7a70015e6ad061fc0bba09b526f /include/asm-sh
parent44f95989525c48f6c79fe1c6ad07860765f987cd (diff)
sh: Workaround for __put_user_asm() bug with gcc 4.x on big-endian.
I think this problem is GCC(4.1.2) bug. Syscall "getdents" returned "dirent->d_off" is always 0. I think other EB enviroment have same problem. Problem code 0c03c954 <filldir>: : c03c97a: 58 f7 mov.l @(28,r15),r8 !-> offset (high) c03c97c: 59 f8 mov.l @(32,r15),r9 !-> offset (low) c03c97e: 53 f9 mov.l @(36,r15),r3 c03c980: 54 fa mov.l @(40,r15),r4 : c03c9a0: 21 82 mov.l r8,@r1 !offset(high) -> dirent->d_off It's workaround patch. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/uaccess_32.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h
index ae0d24f6653..892fd6dea9d 100644
--- a/include/asm-sh/uaccess_32.h
+++ b/include/asm-sh/uaccess_32.h
@@ -76,7 +76,8 @@ do { \
__put_user_asm(x, ptr, retval, "w"); \
break; \
case 4: \
- __put_user_asm(x, ptr, retval, "l"); \
+ __put_user_asm((u32)x, ptr, \
+ retval, "l"); \
break; \
case 8: \
__put_user_u64(x, ptr, retval); \