Skip to content

Commit

Permalink
microblaze: Fix put_user macro for 64bits arguments
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
michalsimek committed Jul 27, 2009
1 parent ea3fd14 commit 7bcb63b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: \
Expand Down

0 comments on commit 7bcb63b

Please sign in to comment.