diff options
author | Michal Simek <monstr@monstr.eu> | 2009-07-13 16:46:54 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-07-27 07:39:54 +0200 |
commit | 7bcb63b21327427b130edeb6e6ad44ee260b3043 (patch) | |
tree | 1e70546246b4c03ff7db40c600b4c5e06f9a6e1f /arch/microblaze | |
parent | ea3fd1466f81a851452bf7f34ccb9b5058e4793c (diff) | |
download | linux-7bcb63b21327427b130edeb6e6ad44ee260b3043.tar.gz linux-7bcb63b21327427b130edeb6e6ad44ee260b3043.tar.bz2 linux-7bcb63b21327427b130edeb6e6ad44ee260b3043.zip |
microblaze: Fix put_user macro for 64bits arguments
For 64bits arguments gcc caused that put_user macro
works with wrong value because of optimalization.
Adding volatile caused that gcc not optimized it.
It is possible to use (as Blackfin do) two put_user
macros with 32bits arguments but there is one more
instruction which is due to duplication zero return
value which is called put_user_asm macro.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 65adad61e7e9..5431b4631a7a 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h @@ -189,7 +189,7 @@ extern long strnlen_user(const char *src, long count); #define __put_user(x, ptr) \ ({ \ - __typeof__(*(ptr)) __gu_val = x; \ + __typeof__(*(ptr)) volatile __gu_val = (x); \ long __gu_err = 0; \ switch (sizeof(__gu_val)) { \ case 1: \ |