diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-01-12 07:13:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-01 06:26:18 +0100 |
commit | 9165349d392d6f3307b9506dd818e91736d7493b (patch) | |
tree | dd6bb49ee02961f4ae3ff206020b3fdbfcc89d17 /cpukit/score/cpu/nios2/nios2-eic-il-low-level.S | |
parent | nios2: Add TLS support (diff) | |
download | rtems-9165349d392d6f3307b9506dd818e91736d7493b.tar.bz2 |
nios2: Use Per_CPU_Control::isr_dispatch_disable
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/nios2/nios2-eic-il-low-level.S | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S b/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S index a8045d74df..c215d4bd94 100644 --- a/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S +++ b/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S @@ -41,7 +41,6 @@ .section .text .extern _Per_CPU_Information - .extern _Nios2_Thread_dispatch_disabled .extern _Nios2_ISR_Status_interrupts_disabled .globl _Nios2_ISR_Dispatch_with_shadow_non_preemptive @@ -65,8 +64,8 @@ _Nios2_ISR_Dispatch_with_shadow_non_preemptive: /* Load thread dispatch necessary */ ldb r12, %gprel(_Per_CPU_Information + PER_CPU_DISPATCH_NEEDED)(gp) - /* Load Nios II specific thread dispatch disabled */ - ldw r13, %gprel(_Nios2_Thread_dispatch_disabled)(gp) + /* Load thread dispatch after ISR disable indicator */ + ldw r13, %gprel(_Per_CPU_Information + PER_CPU_ISR_DISPATCH_DISABLE)(gp) /* Read status */ rdctl r14, status @@ -92,14 +91,14 @@ _Nios2_ISR_Dispatch_with_shadow_non_preemptive: andhi r14, r14, 0x3f bne r14, zero, no_thread_dispatch - /* Is Nios II specific thread dispatch allowed? */ + /* Is thread dispatch after ISR allowed? */ bne r13, zero, no_thread_dispatch /* Obtain stack frame in normal register set */ rdprs r15, sp, -FRAME_SIZE - /* Disable Nios II specific thread dispatch */ - stw r12, %gprel(_Nios2_Thread_dispatch_disabled)(gp) + /* Disable thread dispatch after ISR */ + stw r12, %gprel(_Per_CPU_Information + PER_CPU_ISR_DISPATCH_DISABLE)(gp) /* Save context */ stw sstatus, FRAME_OFFSET_STATUS(r15) @@ -184,8 +183,8 @@ do_thread_dispatch: /* Is thread dispatch necessary? */ bne r13, zero, enable_interrupts_before_thread_dispatch - /* Enable Nios II specific thread dispatch */ - stw zero, %gprel(_Nios2_Thread_dispatch_disabled)(gp) + /* Enable thread dispatch after ISR */ + stw zero, %gprel(_Per_CPU_Information + PER_CPU_ISR_DISPATCH_DISABLE)(gp) /* Restore remaining volatile register */ ldw r13, FRAME_OFFSET_R13(sp) |