diff options
author | Yilun Lin <yllin@google.com> | 2019-06-21 11:31:17 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-23 17:01:01 +0000 |
commit | b372cac87efd705e1232267e490680a9f2a06676 (patch) | |
tree | d7bbcde7ba3036df91940e92a5a49a8dfa1b355e /chip/mt_scp/ipi.c | |
parent | 260230523897331d9a36e48a6ff993a192f9af86 (diff) | |
download | chrome-ec-b372cac87efd705e1232267e490680a9f2a06676.tar.gz |
mt_scp/ipi: Do not support ipi_send in ISR context
No one uses ipi_send in ISR, and removing this can simplify
the ipi_send logic.
TEST=runs SCP, and see it doesn't print it sends IPI in ISR.
BUG=b:117917141
BRANCH=none
Change-Id: I96115ffc4124331d864daff2d375021c76a74b0c
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1670649
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Auto-Submit: Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'chip/mt_scp/ipi.c')
-rw-r--r-- | chip/mt_scp/ipi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chip/mt_scp/ipi.c b/chip/mt_scp/ipi.c index 7b42da2423..f8fca269b7 100644 --- a/chip/mt_scp/ipi.c +++ b/chip/mt_scp/ipi.c @@ -86,13 +86,11 @@ int ipi_send(int32_t id, const void *buf, uint32_t len, int wait) if (!ipi_ready) return EC_ERROR_BUSY; - /* - * TODO(b:117917141): Evaluate if we can remove this once we have the - * video/camera feature code base. - */ - if (wait && in_interrupt_context()) - /* Prevent from infinity wait when be in ISR context. */ + /* TODO(b:117917141): Remove this check completely. */ + if (in_interrupt_context()) { + CPRINTS("Err: invoke %s() in ISR CTX", __func__); return EC_ERROR_BUSY; + } if (len > sizeof(scp_send_obj->buffer)) return EC_ERROR_INVAL; |