]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Use inline assembler instead of global register variable to get sp
authorAndi Kleen <ak@linux.intel.com>
Tue, 22 Oct 2013 16:07:57 +0000 (09:07 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 30 Jan 2014 06:17:17 +0000 (22:17 -0800)
commit9d7731bb9e02e670b7d95f04390d7d02d51a32bb
tree084ea355a1f7d84e3d1a33759e3105ff116e2d28
parentcd6654ed4a5f3ecf5b63586dcdbe9d44eeb3e84b
x86: Use inline assembler instead of global register variable to get sp

LTO in gcc 4.6/47. has trouble with global register variables. They were used
to read the stack pointer. Use a simple inline assembler statement with
a mov instead.

This also helps LLVM/clang, which does not support global register
variables.

[ hpa: Ideally this should become a builtin in both gcc and clang. ]

v2: More general asm constraint. Fix description (Jan Beulich)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1382458079-24450-6-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/thread_info.h