linux/arch
Alexander Chumachenko c9e2fbd909 x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile
While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4
misoptimization of non-inlined constant_test_bit() due to non-volatile
addr when 'const volatile unsigned long *addr' cast to 'unsigned long *'
with subsequent unconditional jump to pause (and not to the test) leading
to hang.

Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined
constant_test_bit() and correct jump, thus working around the kernel bug.

Other arches than asm-x86 may implement this slightly differently;
2.6.29 mitigates the misoptimization by changing the function prototype
(commit c4295fbb60) but probably fixing the issue
itself is better.

Signed-off-by: Alexander Chumachenko <ledest@gmail.com>
Signed-off-by: Michael Shigorin <mike@osdn.org.ua>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-09-26 22:43:07 -07:00
..
alpha alpha: deal with multiple simultaneously pending signals 2010-09-18 23:08:29 -04:00
arm Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung 2010-09-19 11:05:05 -07:00
avr32 Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
blackfin Blackfin: bf52x/bf54x boards: drop unused nand page size 2010-08-27 16:08:43 -04:00
cris Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
frv frv: double syscall restarts, syscall restart in sigreturn() 2010-09-20 10:44:38 -07:00
h8300 h8300: Fix missing consts in kernel_execve() 2010-09-07 13:52:28 -07:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2010-09-16 12:58:44 -07:00
m32r Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
m68k m68k,m68knommu: Wire up fanotify_init, fanotify_mark, and prlimit64 2010-09-13 20:28:45 +02:00
m68knommu m68k,m68knommu: Wire up fanotify_init, fanotify_mark, and prlimit64 2010-09-13 20:28:45 +02:00
microblaze Merge branch 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-18 09:26:17 -07:00
mips compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
mn10300 MN10300: Fix up the IRQ names for the on-chip serial ports 2010-09-14 17:06:28 -07:00
parisc compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
powerpc compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
s390 compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
score Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sh Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sparc compat: Make compat_alloc_user_space() incorporate the access_ok() 2010-09-14 16:08:45 -07:00
tile Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2010-09-16 12:54:54 -07:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-08-28 13:55:31 -07:00
x86 x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile 2010-09-26 22:43:07 -07:00
xtensa Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
.gitignore
Kconfig Merge branch 'perf/nmi' into perf/core 2010-08-05 08:45:05 +02:00