summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.com>2019-04-17 22:19:38 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-19 14:45:17 -0700
commita013f9eed6465569b99e96fe521c11b8c5f05e05 (patch)
treef747a683fca8d907f67e0887f1272ba7ead4523c
parente7b1f511fde30b4ebb207ab7285e0ca103c49a03 (diff)
downloadchrome-ec-a013f9eed6465569b99e96fe521c11b8c5f05e05.tar.gz
ish: remove scan ISR registers IRQ handling
Currently we can LAPIC's ISR registers to find vector number but it's already know to the IRQ handler. BRANCH=none BUG=none TEST=Tested on Arcada platform Change-Id: If6626eee0b2548eb26d15cf97b220403b6afcfdb Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1573203 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--core/minute-ia/irq_handler.h9
-rw-r--r--core/minute-ia/switch.S14
-rw-r--r--core/minute-ia/task.c4
3 files changed, 13 insertions, 14 deletions
diff --git a/core/minute-ia/irq_handler.h b/core/minute-ia/irq_handler.h
index 4df2b14da6..b691dc71fb 100644
--- a/core/minute-ia/irq_handler.h
+++ b/core/minute-ia/irq_handler.h
@@ -29,9 +29,12 @@
#endif
#ifdef CONFIG_TASK_PROFILING
-#define task_start_irq_handler_call "call task_start_irq_handler\n"
+#define task_start_irq_handler_call(vector) \
+ "push $"#vector"\n" \
+ "call task_start_irq_handler\n" \
+ "addl $0x4, %esp\n"
#else
-#define task_start_irq_handler_call
+#define task_start_irq_handler_call(vector)
#endif
@@ -68,7 +71,7 @@ struct irq_data {
"movl %esp, %eax\n" \
"movl $stack_end, %esp\n" \
"push %eax\n" \
- task_start_irq_handler_call \
+ task_start_irq_handler_call(vector) \
"call "#routine"\n" \
"push $0\n" \
"push $0\n" \
diff --git a/core/minute-ia/switch.S b/core/minute-ia/switch.S
index 79adfef7bd..1fdcc61bb8 100644
--- a/core/minute-ia/switch.S
+++ b/core/minute-ia/switch.S
@@ -9,12 +9,6 @@
#include "registers.h"
#include "task_defs.h"
-#ifdef CONFIG_TASK_PROFILING
-#define task_start_irq_handler_call call task_start_irq_handler
-#else
-#define task_start_irq_handler_call
-#endif
-
.text
.extern current_task
@@ -101,9 +95,11 @@ __switchto:
push %ecx
push %edx
- # We don't push anything on the stack for start irq since the
- # parameter is unused.
- task_start_irq_handler_call
+#ifdef CONFIG_TASK_PROFILING
+ push $ISH_TS_VECTOR
+ call task_start_irq_handler
+ addl $0x4, %esp
+#endif
# Stack is already set up from previous pushes
call switch_handler
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c
index c344b55179..8c3d9fd9f2 100644
--- a/core/minute-ia/task.c
+++ b/core/minute-ia/task.c
@@ -269,14 +269,14 @@ void __schedule(int desched, int resched)
}
#ifdef CONFIG_TASK_PROFILING
-void __keep task_start_irq_handler(void *unused)
+void __keep task_start_irq_handler(void *data)
{
/*
* Get time before checking depth, in case this handler is
* pre-empted.
*/
uint32_t t = get_time().le.lo;
- uint32_t vector = get_current_interrupt_vector();
+ uint32_t vector = (uint32_t)data;
int irq = VEC_TO_IRQ(vector);
/*