From f049419925029cbadacccffab880586b82c27b12 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 13 Apr 2021 14:55:17 +0800 Subject: 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 Change-Id: I852d530ba1e319dbe4656e23d8f143566dd7a626 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2797684 Reviewed-by: Keith Short --- include/system.h | 2 ++ 1 file changed, 2 insertions(+) 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() -- cgit v1.2.1