linux/arch/x86
Jan Beulich 819165fb34 x86: Adjust asm constraints in atomic64 wrappers
Eric pointed out overly restrictive constraints in atomic64_set(), but
there are issues throughout the file. In the cited case, %ebx and %ecx
are inputs only (don't get changed by either of the two low level
implementations). This was also the case elsewhere.

Further in many cases early-clobber indicators were missing.

Finally, the previous implementation rolled a custom alternative
instruction macro from scratch, rather than using alternative_call()
(which was introduced with the commit that the description of the
change in question actually refers to). Adjusting has the benefit of
not hiding referenced symbols from the compiler, which however requires
them to be declared not just in the exporting source file (which, as a
desirable side effect, in turn allows that exporting file to become a
real 5-line stub).

This patch does not eliminate the overly restrictive memory clobbers,
however: Doing so would occasionally make the compiler set up a second
register for accessing the memory object (to satisfy the added "m"
constraint), and it's not clear which of the two non-optimal
alternatives is better.

v2: Re-do the declaration and exporting of the internal symbols.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4F19A2A5020000780006E0D9@nat28.tlf.novell.com
Cc: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-01-20 17:29:31 -08:00
..
boot x86, efi: Break up large initrd reads 2011-12-16 08:34:35 -08:00
configs
crypto crypto: serpent-sse2 - remove unneeded LRW/XTS #ifdefs 2011-12-20 15:20:08 +08:00
ia32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit 2012-01-17 16:41:31 -08:00
include/asm x86: Adjust asm constraints in atomic64 wrappers 2012-01-20 17:29:31 -08:00
kernel Merge remote-tracking branch 'linus/master' into x86/urgent 2012-01-19 12:56:50 -08:00
kvm module_param: make bool parameters really bool (arch) 2012-01-13 09:32:18 +10:30
lguest lguest: Make sure interrupt is allocated ok by lguest_setup_irq 2012-01-12 15:44:47 +10:30
lib x86: Adjust asm constraints in atomic64 wrappers 2012-01-20 17:29:31 -08:00
math-emu
mm Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-01-18 15:51:48 -08:00
net net: bpf_jit: fix an off-one bug in x86_64 cond jump target 2011-12-19 15:47:29 -05:00
oprofile
pci x86/PCI: build amd_bus.o only when CONFIG_AMD_NB=y 2012-01-12 07:54:18 -08:00
platform Merge remote-tracking branch 'linus/master' into x86/urgent 2012-01-19 12:56:50 -08:00
power
syscalls
tools
um uml: fix compile for x86-64 2012-01-18 19:26:11 -08:00
vdso
video
xen Merge branch 'stable/for-linus-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2012-01-10 10:09:59 -08:00
.gitignore x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore 2012-01-16 08:21:59 +01:00
Kbuild
Kconfig Merge remote-tracking branch 'linus/master' into x86/urgent 2012-01-19 12:56:50 -08:00
Kconfig.cpu mm,x86,um: move CMPXCHG_DOUBLE config option 2012-01-12 20:13:03 -08:00
Kconfig.debug Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-11 19:13:40 -08:00
Makefile
Makefile.um
Makefile_32.cpu