summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S')
-rw-r--r--ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S65
1 files changed, 0 insertions, 65 deletions
diff --git a/ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S b/ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S
deleted file mode 100644
index 1e572c50..00000000
--- a/ANDROID_3.4.5/arch/x86/lib/cmpxchg16b_emu.S
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- *
- */
-#include <linux/linkage.h>
-#include <asm/alternative-asm.h>
-#include <asm/frame.h>
-#include <asm/dwarf2.h>
-
-#ifdef CONFIG_SMP
-#define SEG_PREFIX %gs:
-#else
-#define SEG_PREFIX
-#endif
-
-.text
-
-/*
- * Inputs:
- * %rsi : memory location to compare
- * %rax : low 64 bits of old value
- * %rdx : high 64 bits of old value
- * %rbx : low 64 bits of new value
- * %rcx : high 64 bits of new value
- * %al : Operation successful
- */
-ENTRY(this_cpu_cmpxchg16b_emu)
-CFI_STARTPROC
-
-#
-# Emulate 'cmpxchg16b %gs:(%rsi)' except we return the result in %al not
-# via the ZF. Caller will access %al to get result.
-#
-# Note that this is only useful for a cpuops operation. Meaning that we
-# do *not* have a fully atomic operation but just an operation that is
-# *atomic* on a single cpu (as provided by the this_cpu_xx class of
-# macros).
-#
-this_cpu_cmpxchg16b_emu:
- pushf
- cli
-
- cmpq SEG_PREFIX(%rsi), %rax
- jne not_same
- cmpq SEG_PREFIX 8(%rsi), %rdx
- jne not_same
-
- movq %rbx, SEG_PREFIX(%rsi)
- movq %rcx, SEG_PREFIX 8(%rsi)
-
- popf
- mov $1, %al
- ret
-
- not_same:
- popf
- xor %al,%al
- ret
-
-CFI_ENDPROC
-
-ENDPROC(this_cpu_cmpxchg16b_emu)