aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/spinlock.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-08-12 21:04:22 +0200
committerAlex Shi <alex.shi@linaro.org>2016-06-24 21:31:55 +0800
commit46cb70a50bf3b16526dde781197b194f2be84977 (patch)
treed93b67352d69ec980ce4feca4e3ce700c992c20c /arch/x86/include/asm/spinlock.h
parent44069b0826b6f76a8601ad880b10557c7e4968c9 (diff)
jump_label/x86: Work around asm build bug on older/backported GCCsv4.1/topic/writeback-cg
Boris reported that gcc version 4.4.4 20100503 (Red Hat 4.4.4-2) fails to build linux-next kernels that have this fresh commit via the locking tree: 11276d5306b8 ("locking/static_keys: Add a new static_key interface") The problem appears to be that even though @key and @branch are compile time constants, it doesn't see the following expression as an immediate value: &((char *)key)[branch] More recent GCCs don't appear to have this problem. In particular, Red Hat backported the 'asm goto' feature into 4.4, 'normal' 4.4 compilers will not have this feature and thus not run into this asm. The workaround is to supply both values to the asm as immediates and do the addition in asm. Suggested-by: H. Peter Anvin <hpa@zytor.com> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> (cherry picked from commit d420acd816c07c7be31bd19d09cbcb16e5572fa6) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'arch/x86/include/asm/spinlock.h')
0 files changed, 0 insertions, 0 deletions