SPARC: add support for the tracing subsystem
This commit implements the architecture specific parts for the Zephyr tracing subsystem on SPARC and LEON3. It does so by calling sys_trace_isr_enter(), sys_trace_isr_exit() and sys_trace_idle(). The logic for the ISR tracing is: 1. switch to interrupt stack 2. *call sys_trace_isr_enter()* if CONFIG_TRACING_ISR 3. call the interrupt handler 4. *call sys_trace_isr_exit()* if CONFIG_TRACING_ISR 5. switch back to thread stack Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
parent
a5fd0d5c0b
commit
35264cc214
2 changed files with 13 additions and 1 deletions
|
@ -127,10 +127,20 @@ __sparc_trap_interrupt:
|
|||
nop
|
||||
nop
|
||||
|
||||
/* SPARC interrupt request level is the first agrument */
|
||||
#ifdef CONFIG_TRACING_ISR
|
||||
call sys_trace_isr_enter
|
||||
nop
|
||||
#endif
|
||||
|
||||
/* SPARC interrupt request level is the first argument */
|
||||
call z_sparc_enter_irq
|
||||
mov %l3, %o0
|
||||
|
||||
#ifdef CONFIG_TRACING_ISR
|
||||
call sys_trace_isr_exit
|
||||
nop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Switch back to interrupted task stack
|
||||
* %fp: %sp of interrupted task - ISF_SIZE.
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <tracing/tracing.h>
|
||||
|
||||
static void leon_idle(unsigned int key)
|
||||
{
|
||||
sys_trace_idle();
|
||||
irq_unlock(key);
|
||||
|
||||
__asm__ volatile ("wr %g0, %asr19");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue