Ignore:
Timestamp:
Jan 12, 2021, 6:13:08 AM (4 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
19acb3b
Parents:
c968b27
git-author:
Sebastian Huber <sebastian.huber@…> (01/12/21 06:13:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/01/21 05:26:18)
Message:

nios2: Use Per_CPU_Control::isr_dispatch_disable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/nios2/nios2-context-switch.S

    rc968b27 r9165349d  
    1616#endif
    1717
    18 #include <rtems/score/cpu.h>
     18#include <rtems/score/percpu.h>
    1919#include <rtems/score/nios2-utility.h>
    2020
    21         .extern _Nios2_Thread_dispatch_disabled
     21        .extern _Per_CPU_Information
    2222
    2323        .globl  _CPU_Context_switch
     
    2626_CPU_Context_switch:
    2727
    28         ldw     r9, %gprel(_Nios2_Thread_dispatch_disabled)(gp)
     28        ldw     r9, %gprel(_Per_CPU_Information + PER_CPU_ISR_DISPATCH_DISABLE)(gp)
    2929        rdctl   r8, status
    3030        stw     r16, NIOS2_CONTEXT_OFFSET_R16(r4)
     
    4040        stw     sp, NIOS2_CONTEXT_OFFSET_SP(r4)
    4141        stw     ra, NIOS2_CONTEXT_OFFSET_RA(r4)
    42         stw     r9, NIOS2_CONTEXT_OFFSET_THREAD_DISPATCH_DISABLED(r4)
     42        stw     r9, NIOS2_CONTEXT_OFFSET_ISR_DISPATCH_DISABLE(r4)
    4343
    4444restore:
    4545
    46         ldw     r10, NIOS2_CONTEXT_OFFSET_THREAD_DISPATCH_DISABLED(r5)
     46        ldw     r10, NIOS2_CONTEXT_OFFSET_ISR_DISPATCH_DISABLE(r5)
    4747        ldw     r16, NIOS2_CONTEXT_OFFSET_R16(r5)
    4848        ldw     r17, NIOS2_CONTEXT_OFFSET_R17(r5)
     
    5454        ldw     r23, NIOS2_CONTEXT_OFFSET_R23(r5)
    5555        ldw     fp, NIOS2_CONTEXT_OFFSET_FP(r5)
    56         stw     r10, %gprel(_Nios2_Thread_dispatch_disabled)(gp)
     56        stw     r10, %gprel(_Per_CPU_Information + PER_CPU_ISR_DISPATCH_DISABLE)(gp)
    5757        ldw     r11, NIOS2_CONTEXT_OFFSET_STATUS(r5)
    5858        ldw     sp, NIOS2_CONTEXT_OFFSET_SP(r5)
Note: See TracChangeset for help on using the changeset viewer.