diff options
author | Hyungwoo Yang <hyungwoo.yang@intel.com> | 2019-01-30 13:38:28 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-04 12:42:08 -0800 |
commit | e1ce8ba84e9cc105f8394b3bdf41543fb72533df (patch) | |
tree | 85635d0b78cb45e8bee0fd1c907bafd0049ea1dc /core | |
parent | 193a3c47ad8af6528ff1605a4595fc7367a09834 (diff) | |
download | chrome-ec-e1ce8ba84e9cc105f8394b3bdf41543fb72533df.tar.gz |
ish: allow IRQ only after scheduler is ready
Interrupt should be enabled after scheduler is ready to handle
context switch.
This patch makes sure interrupt can be enabled only after the
scheduler is ready.
BRANCH=none
BUG=none
TEST=verified in Atlas platform
Change-Id: Idddfcb333b1d66b7b15e3f65042dd62331f6f282
Reviewed-on: https://chromium-review.googlesource.com/1446991
Commit-Ready: Hyungwoo Yang <hyungwoo.yang@intel.com>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/minute-ia/task.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c index 31d24734ec..2836d40975 100644 --- a/core/minute-ia/task.c +++ b/core/minute-ia/task.c @@ -156,6 +156,11 @@ void interrupt_disable(void) void interrupt_enable(void) { + /* + * allow enbling interrupt only after task switch is ready + */ + ASSERT(task_start_called() != 1); + __asm__ __volatile__ ("sti"); } |