]> git.baikalelectronics.ru Git - kernel.git/commit
x86, threadinfo: Redo "x86: Use inline assembler to get sp"
authorMathias Krause <minipli@googlemail.com>
Fri, 7 Mar 2014 07:52:32 +0000 (08:52 +0100)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 11 Mar 2014 00:32:01 +0000 (17:32 -0700)
commit155b1c6fa58ae82d2ac3e7fb016345d964255c82
treee73a1d334a61d856905c3656b6a42fc8332760c0
parent1a934725340b18061d177c3ebcbef95707f63d17
x86, threadinfo: Redo "x86: Use inline assembler to get sp"

This patch restores the changes of commit 9d7731bb9e "x86: Use inline
assembler instead of global register variable to get sp". They got lost
in commit b51c3becc0 "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 9d7731bb9e:

"""
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 <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Link: http://lkml.kernel.org/r/1394178752-18047-1-git-send-email-minipli@googlemail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/irq_32.c