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
committerchrome-bot <chrome-bot@chromium.org>2019-01-08 14:33:35 -0800
commit7ced9b2e02cdb49b78384ecb93978c1bab5cd015 (patch)
tree3e15d11209f38bf203063bbce00717777dca29bc /core/minute-ia/task.c
parent9e4474e561ec165cf24e8aa249c2aeeed8e7f1ef (diff)
downloadchrome-ec-7ced9b2e02cdb49b78384ecb93978c1bab5cd015.tar.gz
ish: remove lock; prefix from inline ASM
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>
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");