x86, threadinfo: Redo "x86: Use inline assembler to get sp"
x86, threadinfo: Redo "x86: Use inline assembler to get sp"

This patch restores the changes of commit dff38e3e93 "x86: Use inline
assembler instead of global register variable to get sp". They got lost
in commit 198d208df4 "x86: Keep thread_info on thread stack in x86_32"
while moving the code to arch/x86/kernel/irq_32.c.

Quoting Andi from commit dff38e3e93:

"""
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.
"""

Cc: Steven Rostedt <43232e92d70cc7aa53504ad0397085ee47bad87f@goodmis.org>
Cc: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Brian Gerst <e60badcb99f652a0bcc15460d39f7ea12d6655ee@gmail.com>
Cc: Andi Kleen <0474aee45985f5ae829f53849df476200e876990@linux.intel.com>
Signed-off-by: Mathias Krause <64568d9183dcfcdd0a6fb47964820a1cdaf94ecc@googlemail.com>
Link: http://lkml.kernel.org/r/1394178752-18047-1-git-send-email-64568d9183dcfcdd0a6fb47964820a1cdaf94ecc@googlemail.com
Signed-off-by: H. Peter Anvin <8a453bad9912ffe59bc0f0b8abe03df9be19379e@linux.intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs