summaryrefslogtreecommitdiff
path: root/core/minute-ia/task.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-01-08 10:22:09 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2019-01-09 01:50:37 +0000
commiteb9e5a0061236c08460f8c285cca748ff3ae548a (patch)
tree5e5aff324b20f90c3c4ed3e81061aeb0a3059be8 /core/minute-ia/task.c
parent2f16a6245009215ca342a478576a7e5f6a857b9a (diff)
downloadchrome-ec-stabilize-atlas-11177.B.tar.gz
ish: remove lock; prefix from inline ASMstabilize-atlas-11177.B
Since all instances of minute-ia core are a single core, the lock; prefix on statements does not have any meaningful affect other than a potential performance hit. We still want to mark inline asm where it would matter, so we introduce a new define that evaluates to empty today. BRANCH=atlas_ish BUG=none TEST=builds Change-Id: I47506951dfdabfdbd16ae825fe742b01b44205d1 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1401014 Reviewed-by: Aaron Durbin <adurbin@chromium.org> (cherry picked from commit 7ced9b2e02cdb49b78384ecb93978c1bab5cd015) Reviewed-on: https://chromium-review.googlesource.com/c/1401808 Reviewed-by: Caveh Jalali <caveh@google.com> Commit-Queue: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com>
Diffstat (limited to 'core/minute-ia/task.c')
-rw-r--r--core/minute-ia/task.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index 16bb724c2d..77c429c288 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -433,7 +433,7 @@ void mutex_lock(struct mutex *mtx)
do {
old_val = 0;
__asm__ __volatile__(
- "lock; cmpxchg %1, %2\n"
+ ASM_LOCK_PREFIX "cmpxchg %1, %2\n"
: "=a" (old_val)
: "r" (value), "m" (mtx->lock), "a" (old_val)
: "memory");
@@ -454,7 +454,7 @@ void mutex_unlock(struct mutex *mtx)
task_ *tsk = current_task;
__asm__ __volatile__(
- "lock; cmpxchg %1, %2\n"
+ ASM_LOCK_PREFIX "cmpxchg %1, %2\n"
: "=a" (old_val)
: "r" (val), "m" (mtx->lock), "a" (old_val)
: "memory");