summaryrefslogtreecommitdiff
path: root/core/minute-ia/interrupts.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-06-03 07:30:07 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-05 20:06:12 +0000
commitca796e13d2f30392caab5b77535ab32597488567 (patch)
treed3d52d1517e6471e8291248ab291ab22942a668c /core/minute-ia/interrupts.c
parentb4f1c3ca375f6e3c50edae12c1713236a0bcd2cc (diff)
downloadchrome-ec-ca796e13d2f30392caab5b77535ab32597488567.tar.gz
ish: reload watchdog after lower power exit
Reload the watchdog timer immediately after exiting from D0ix before re-enabling the reset of the IRQs. Also re-enable all ISRs in a batch while interrupts are disabled to limit the number of context switched if multiple interrupts are pending. BRANCH=none BUG=b:133190570 TEST=let arcada enter and exit D0i[0123] without issue for a couple of minutes. There are not adverse affects of this change. Change-Id: I3ef5878b0618a0c1858664cad061d415329d4302 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1640304 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'core/minute-ia/interrupts.c')
-rw-r--r--core/minute-ia/interrupts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/minute-ia/interrupts.c b/core/minute-ia/interrupts.c
index a4a3569c22..3ce0e2a2a4 100644
--- a/core/minute-ia/interrupts.c
+++ b/core/minute-ia/interrupts.c
@@ -13,6 +13,7 @@
#include "irq_handler.h"
#include "registers.h"
#include "task_defs.h"
+#include "task.h"
#include "util.h"
/* Console output macros */
@@ -81,10 +82,13 @@ void restore_interrupts(uint64_t irq_map)
{
int i;
+ /* Disable interrupts until everything is unmasked */
+ interrupt_disable();
for (i = 0; i < ISH_MAX_IOAPIC_IRQS; i++) {
if (((uint64_t)0x1 << i) & irq_map)
unmask_interrupt(i);
}
+ interrupt_enable();
}
/*