linux-stable-rt/arch/x86/include/asm
Arjan van de Ven 79e1dd05d1 x86: Provide an alternative() based cmpxchg64()
cmpxchg64() today generates, to quote Linus, "barf bag" code.

cmpxchg64() is about to get used in the scheduler to fix a bug there,
but it's a prerequisite that cmpxchg64() first be made non-sucking.

This patch turns cmpxchg64() into an efficient implementation that
uses the alternative() mechanism to just use the raw instruction on
all modern systems.

Note: the fallback is NOT smp safe, just like the current fallback
is not SMP safe. (Interested parties with i486 based SMP systems
are welcome to submit fix patches for that.)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
[ fixed asm constraint bug ]
Fixed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090930170754.0886ff2e@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-30 22:55:59 +02:00
..
uv x86: SGI UV: Add volatile semantics to macros that access chipset registers 2009-09-18 14:05:32 +02:00
visws
xen
Kbuild
a.out-core.h
a.out.h
acpi.h ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h 2009-08-28 19:57:29 -04:00
aes.h
agp.h
alternative-asm.h
alternative.h
amd_iommu.h x86/amd-iommu: Add passthrough mode initialization functions 2009-09-03 16:15:42 +02:00
amd_iommu_types.h Merge branch 'amd-iommu/pagetable' into amd-iommu/2.6.32 2009-09-03 17:14:57 +02:00
apic.h Merge branch 'linus' into x86/urgent 2009-09-20 20:25:03 +02:00
apicdef.h Merge branch 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2009-09-14 17:43:43 -07:00
apicnum.h
apm.h
asm.h x86, asm: Make _ASM_EXTABLE() usable from assembly code 2009-08-31 15:14:30 -07:00
atomic.h
atomic_32.h
atomic_64.h
auxvec.h
bios_ebda.h
bitops.h
bitsperlong.h
boot.h
bootparam.h Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 14:05:47 -07:00
bug.h
bugs.h
byteorder.h
cache.h Use macros for .data.page_aligned section. 2009-09-21 06:27:08 +02:00
cacheflush.h x86, pat: Use page flags to track memtypes of RAM pages 2009-08-26 15:41:24 -07:00
calgary.h
calling.h
checksum.h
checksum_32.h
checksum_64.h
cmpxchg.h
cmpxchg_32.h x86: Provide an alternative() based cmpxchg64() 2009-09-30 22:55:59 +02:00
cmpxchg_64.h
compat.h
cpu.h
cpu_debug.h
cpufeature.h x86: Move APERF/MPERF into a X86_FEATURE 2009-09-15 16:51:25 +02:00
cpumask.h
cputime.h
current.h
debugreg.h
delay.h
desc.h
desc_defs.h
device.h
div64.h
dma-mapping.h
dma.h
dmi.h
ds.h
dwarf2.h x86, asm: Add 32-bit versions of the combined CFI macros 2009-08-31 15:14:29 -07:00
e820.h x86: Move memory_setup to x86_init_ops 2009-08-27 17:12:52 +02:00
edac.h
efi.h
elf.h x86: Increase MIN_GAP to include randomized stack 2009-09-10 17:00:12 -07:00
emergency-restart.h
entry_arch.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
errno.h
fb.h
fcntl.h
fixmap.h
floppy.h
frame.h
ftrace.h tracing: Remove FTRACE_SYSCALL_MAX definitions 2009-08-26 21:30:39 +02:00
futex.h
gart.h
genapic.h
geode.h
gpio.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_irq.h
hypertransport.h
hypervisor.h x86: Move tsc_calibration to x86_init_ops 2009-08-31 09:35:47 +02:00
i387.h Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-14 07:58:08 -07:00
i8253.h
i8259.h
ia32.h
ia32_unistd.h
idle.h
init.h
io.h
io_32.h
io_64.h
io_apic.h Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 14:05:47 -07:00
ioctl.h
ioctls.h
iomap.h x86, pat: Add PAT reserve free to io_mapping* APIs 2009-08-26 15:41:16 -07:00
iommu.h
ipcbuf.h
ipi.h
irq.h x86: Move irq_init to x86_init_ops 2009-08-31 09:35:45 +02:00
irq_regs.h
irq_remapping.h
irq_vectors.h
irqflags.h
ist.h
k8.h
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kmemcheck.h
kprobes.h
kvm.h KVM: PIT support for HPET legacy mode 2009-09-10 08:33:12 +03:00
kvm_emulate.h KVM: Rename x86_emulate.c to emulate.c 2009-09-10 10:46:45 +03:00
kvm_host.h KVM: VMX: Check cpl before emulating debug register access 2009-09-10 18:11:10 +03:00
kvm_para.h KVM: Add missing #include 2009-09-10 10:46:49 +03:00
ldt.h
lguest.h
lguest_hcall.h
linkage.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mca.h
mca_dma.h
mce.h
microcode.h
mman.h
mmconfig.h
mmu.h
mmu_context.h cpumask: use mm_cpumask() wrapper: x86 2009-09-24 09:34:52 +09:30
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-14 07:57:32 -07:00
mpspec.h x86: Move get/find_smp_config to x86_init_ops 2009-08-31 09:35:45 +02:00
mpspec_def.h
msgbuf.h
msidef.h
msr-index.h Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-17 21:07:08 -07:00
msr.h x86, msr: Export the register-setting MSR functions via /dev/*/msr 2009-08-31 16:16:04 -07:00
mtrr.h
mutex.h
mutex_32.h
mutex_64.h
nmi.h sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
nops.h x86/tracing: comment need for atomic nop 2009-09-10 17:22:44 -04:00
numa.h
numa_32.h
numa_64.h
numaq.h
olpc.h
page.h
page_32.h
page_32_types.h
page_64.h
page_64_types.h
page_types.h
param.h
paravirt.h Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 14:05:47 -07:00
paravirt_types.h Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 14:05:47 -07:00
parport.h
pat.h x86, pat: New i/f for driver to request memtype for IO regions 2009-08-26 15:41:10 -07:00
pci-direct.h
pci-functions.h
pci.h x86/PCI: default pcibus cpumask to all cpus if it lacks affinity 2009-09-18 08:51:10 -07:00
pci_64.h
pci_x86.h
percpu.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
perf_event.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
pgalloc.h
pgtable-2level.h
pgtable-2level_types.h
pgtable-3level.h
pgtable-3level_types.h
pgtable.h Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 14:05:47 -07:00
pgtable_32.h
pgtable_32_types.h
pgtable_64.h
pgtable_64_types.h
pgtable_types.h Merge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen into x86/urgent 2009-09-23 14:35:10 +02:00
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
prctl.h
processor-cyrix.h
processor-flags.h
processor.h Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-17 21:00:02 -07:00
proto.h
ptrace-abi.h
ptrace.h
pvclock-abi.h
pvclock.h
rdc321x_defs.h
reboot.h
reboot_fixups.h
required-features.h
resource.h
resume-trace.h
rio.h
rtc.h
rwlock.h
rwsem.h
scatterlist.h
seccomp.h
seccomp_32.h
seccomp_64.h
sections.h
segment.h
sembuf.h
serial.h
setup.h x86: Add Moorestown early detection 2009-08-31 11:09:40 +02:00
setup_arch.h
shmbuf.h
shmparam.h
sigcontext.h
sigcontext32.h
sigframe.h
siginfo.h
signal.h
smp.h cpumask: remove arch_send_call_function_ipi 2009-09-24 09:34:47 +09:30
smpboot_hooks.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
srat.h
stackprotector.h x86/i386: Make sure stack-protector segment base is cache aligned 2009-09-03 21:30:51 +02:00
stacktrace.h
stat.h
statfs.h
string.h
string_32.h x86: Trivial whitespace cleanups 2009-09-20 20:18:57 +02:00
string_64.h
suspend.h
suspend_32.h
suspend_64.h
svm.h
swab.h
swiotlb.h
sync_bitops.h
sys_ia32.h
syscall.h x86: syscall_get_nr returns int 2009-09-22 19:57:51 -07:00
syscalls.h
system.h x86/i386: Make sure stack-protector segment base is cache aligned 2009-09-03 21:30:51 +02:00
system_64.h
tce.h
termbits.h
termios.h
thread_info.h Merge branch 'x86-percpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-14 08:01:28 -07:00
time.h x86: Move get/set_wallclock to x86_platform_ops 2009-09-16 14:34:50 +02:00
timer.h x86: Move tsc_calibration to x86_init_ops 2009-08-31 09:35:47 +02:00
timex.h
tlb.h
tlbflush.h
topology.h x86: Remove redundant non-NUMA topology functions 2009-09-24 14:16:15 +02:00
trampoline.h
traps.h
tsc.h x86: Move tsc_calibration to x86_init_ops 2009-08-31 09:35:47 +02:00
types.h
uaccess.h
uaccess_32.h x86: Fix uaccess_32.h typo 2009-09-20 20:19:34 +02:00
uaccess_64.h
ucontext.h
unaligned.h
unistd.h
unistd_32.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
unistd_64.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
user.h
user32.h
user_32.h
user_64.h
vdso.h
vga.h
vgtod.h
virtext.h
vm86.h
vmi.h
vmi_time.h
vmware.h x86: Move tsc_calibration to x86_init_ops 2009-08-31 09:35:47 +02:00
vmx.h KVM: VMX: more MSR_IA32_VMX_EPT_VPID_CAP capability bits 2009-09-10 08:32:55 +03:00
vsyscall.h
x86_init.h x86: Move get/set_wallclock to x86_platform_ops 2009-09-16 14:34:50 +02:00
xcr.h
xor.h
xor_32.h
xor_64.h
xsave.h