summaryrefslogtreecommitdiff
path: root/chip/mt8192_scp
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@chromium.org>2020-05-27 11:35:06 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-10 10:37:35 +0000
commitc4c40177d87b64bd4aa6fa6a07d71c375176c830 (patch)
tree1b3165fd541ccde4c5e5a076b9b98aa65ac1a46b /chip/mt8192_scp
parent16ded48a332ebed5e5e7b5f46e2f9cad7adc7603 (diff)
downloadchrome-ec-c4c40177d87b64bd4aa6fa6a07d71c375176c830.tar.gz
chip/mt8192_scp: use in_soft_interrupt_context()
Given that timer hardware is independent to processor. Uses timer's interrupt source to determine hardware interrupt vs. software interrupt is not reliable. The timer's interrupt source could raise when the processor is handling previous interrupt. Uses in_soft_interrupt_context() instead. BRANCH=none BUG=b:146213943 BUG=b:156218912 TEST=make BOARD=asurada_scp Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: Idf15ea37e667499c38c8c5b96a9352bcfbfaed2e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217597 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'chip/mt8192_scp')
-rw-r--r--chip/mt8192_scp/hrtimer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/mt8192_scp/hrtimer.c b/chip/mt8192_scp/hrtimer.c
index 29088120ef..dfa451b612 100644
--- a/chip/mt8192_scp/hrtimer.c
+++ b/chip/mt8192_scp/hrtimer.c
@@ -199,7 +199,7 @@ static void irq_group6_handler(void)
break;
case SCP_IRQ_TIMER(TIMER_SYSTEM):
/* If this is a hardware irq, check overflow */
- if (timer_is_irq(TIMER_SYSTEM)) {
+ if (!in_soft_interrupt_context()) {
timer_ack_irq(TIMER_SYSTEM);
if (sys_high) {