summaryrefslogtreecommitdiff
path: root/core/minute-ia/config_core.h
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/config_core.h
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/config_core.h')
-rw-r--r--core/minute-ia/config_core.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/minute-ia/config_core.h b/core/minute-ia/config_core.h
index 3ca60cf71d..426e215eae 100644
--- a/core/minute-ia/config_core.h
+++ b/core/minute-ia/config_core.h
@@ -12,4 +12,18 @@
#define CONFIG_SOFTWARE_PANIC
+/*
+ * Since all implementations minute-ia are a single core, we do not need a
+ * "lock;" prefix on any instructions. We use the below define in places where
+ * a lock statement would be needed if there were multiple cores.
+ *
+ * Also the destination operand needs to be a memory location instead of a
+ * register for us to drop the "lock;" prefix for a single-core chip.
+ */
+#ifndef __ASSEMBLER__
+#define ASM_LOCK_PREFIX ""
+#else
+#define ASM_LOCK_PREFIX
+#endif
+
#endif /* __CROS_EC_CONFIG_CORE_H */