diff options
author | Jett Rink <jettrink@chromium.org> | 2019-06-03 07:30:07 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-05 20:06:12 +0000 |
commit | ca796e13d2f30392caab5b77535ab32597488567 (patch) | |
tree | d3d52d1517e6471e8291248ab291ab22942a668c /core | |
parent | b4f1c3ca375f6e3c50edae12c1713236a0bcd2cc (diff) | |
download | chrome-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')
-rw-r--r-- | core/minute-ia/ia_structs.h | 2 | ||||
-rw-r--r-- | core/minute-ia/interrupts.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/minute-ia/ia_structs.h b/core/minute-ia/ia_structs.h index 08447cb242..29bbb6c005 100644 --- a/core/minute-ia/ia_structs.h +++ b/core/minute-ia/ia_structs.h @@ -8,7 +8,7 @@ #ifndef __ASSEMBLER__ -#include <stdint.h> +#include "common.h" /** 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(); } /* |