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-20 05:20:37 +0000
commit183268f86a40683993762264f06673d96906e0a7 (patch)
tree66e6fabb1b97db105b468d459c3c55bdc3ba1596
parent56bfecc2520f5079ef8f5e655d3c665796393be0 (diff)
downloadchrome-ec-183268f86a40683993762264f06673d96906e0a7.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> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2839200 Tested-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@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()