diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-20 10:08:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-21 15:54:18 +0200 |
commit | 9460333e9910471eda010423dcb493f758d997d4 (patch) | |
tree | d479396b21572626f835e0d78794a9811129661a /c/src/lib/libbsp/sparc/shared/irq_asm.S | |
parent | bsp/leon3: Fix LEON3_Cpu_Index initialization (diff) | |
download | rtems-9460333e9910471eda010423dcb493f758d997d4.tar.bz2 |
sparc: Rework CPU counter support
Rework CPU counter support to enable use of the GR740 up-counter via
%asr22 and %asr23.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/irq_asm.S | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/irq_asm.S b/c/src/lib/libbsp/sparc/shared/irq_asm.S index b7f372c654..4a0c3822c8 100644 --- a/c/src/lib/libbsp/sparc/shared/irq_asm.S +++ b/c/src/lib/libbsp/sparc/shared/irq_asm.S @@ -451,10 +451,12 @@ dont_do_the_window: subcc %l7, 1, %l7 ! outermost interrupt handler? bnz dont_switch_stacks ! No, then do not switch stacks -#if defined( RTEMS_PROFILING ) - sethi %hi(SYM(_SPARC_Counter)), %o5 - ld [%o5 + %lo(SYM(_SPARC_Counter))], %l4 - ld [%l4], %o5 +#if defined(RTEMS_PROFILING) + sethi %hi(_SPARC_Counter), %o5 + ld [%o5 + %lo(_SPARC_Counter)], %l4 + call %l4, 0 + nop + mov %o0, %o5 #else nop #endif @@ -536,13 +538,15 @@ pil_fixed: ! WAS LOADED WHEN ISF WAS SAVED!!! mov %l3, %o0 ! o0 = 1st arg = vector number call %g4, 0 -#if defined( RTEMS_PROFILING ) +#if defined(RTEMS_PROFILING) mov %o5, %l3 ! save interrupt entry instant cmp %l7, 0 bne profiling_not_outer_most_exit nop ta SPARC_SWTRAP_IRQDIS ! Call interrupt disable trap handler - ld [%l4], %o2 ! o2 = 3rd arg = interrupt exit instant + call %l4, 0 ! Call _SPARC_Counter.counter_read + nop + mov %o0, %o2 ! o2 = 3rd arg = interrupt exit instant mov %l3, %o1 ! o1 = 2nd arg = interrupt entry instant call SYM(_Profiling_Outer_most_interrupt_entry_and_exit), 0 mov %g6, %o0 ! o0 = 1st arg = per-CPU control |