Skip to content

Commit

Permalink
x86: fix percpu_write with 64-bit constants
Browse files Browse the repository at this point in the history
Impact: slightly better code generation for percpu_to_op()

The processor will sign-extend 32-bit immediate values in 64-bit
operations.  Use the 'e' constraint ("32-bit signed integer constant,
or a symbolic reference known to fit that range") for 64-bit constants.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Brian Gerst authored and Tejun Heo committed Jan 21, 2009
1 parent 06deef8 commit 299e269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ do { \
case 8: \
asm(op "q %1,"__percpu_arg(0) \
: "+m" (var) \
: "r" ((T__)val)); \
: "re" ((T__)val)); \
break; \
default: __bad_percpu_size(); \
} \
Expand Down

0 comments on commit 299e269

Please sign in to comment.