summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortim <tim2.lin@ite.corp-partner.google.com>2021-04-13 14:55:17 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-16 04:43:51 +0000
commitf049419925029cbadacccffab880586b82c27b12 (patch)
tree66e6fabb1b97db105b468d459c3c55bdc3ba1596
parent0d11b2f71e40e0147cc1dfc0a53b76758d318c77 (diff)
downloadchrome-ec-f049419925029cbadacccffab880586b82c27b12.tar.gz
include/system: support interrupt_disable_all of RISCV in zephyr
We need to call the function of interrupt_disable_all in the case of not cortex_m CPU. BUG=b:185202623 BRANCH=none TEST=zmake -lDEBUG configure -b -B zephyr/build_ite zephyr/projects/it8xxx2_evb/ (no warning) Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Change-Id: I852d530ba1e319dbe4656e23d8f143566dd7a626 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2797684 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--include/system.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/system.h b/include/system.h
index 854f2b3557..d6427cb676 100644
--- a/include/system.h
+++ b/include/system.h
@@ -26,6 +26,8 @@
#define interrupt_disable_all() __asm__("cpsid i")
#elif CONFIG_ZTEST
#define interrupt_disable_all()
+#else /* !CONFIG_CPU_CORTEX_M */
+#define interrupt_disable_all() irq_lock()
#endif
#else /* !CONFIG_ZEPHYR */
#define interrupt_disable_all() interrupt_disable()