Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #1933: irq_asm1.patch

File irq_asm1.patch, 2.7 KB (added by Daniel Hellstrom, on 10/07/11 at 11:49:42)

irq_asm.S SPARC patches

  • c/src/lib/libbsp/sparc/shared/irq_asm.S

    RCS file: /home/cvspserver/SMP_Repository/rtems-smp/c/src/lib/libbsp/sparc/shared/irq_asm.S,v
    retrieving revision 1.2
    diff -u -r1.2 irq_asm.S
     
    267267        add     %l5, %l7, %l5
    268268    #endif
    269269        ld       [%l5], %l5     /* l5 = pointer to per CPU */
    270         nop
    271         nop
    272270
    273271        /*
    274272         *  On multi-core system, we need to use SMP safe versions
     
    277275         *  _ISR_SMP_Enter returns the interrupt nest level.  If we are
    278276         *  outermost interrupt, then we need to switch stacks.
    279277         */
    280         mov      %sp, %fp
    281278        call    SYM(_ISR_SMP_Enter), 0
    282         nop                             ! delay slot
     279         mov      %sp, %fp              ! delay slot
    283280        cmp     %o0, 0
    284281#else
    285282        /*
     
    321318        /*
    322319         *  Do we need to switch to the interrupt stack?
    323320         */
    324         bnz      dont_switch_stacks      ! No, then do not switch stacks
    325         ld       [%l5 + PER_CPU_INTERRUPT_STACK_HIGH], %sp
     321        beq,a    dont_switch_stacks      ! No, then do not switch stacks
     322         ld      [%l5 + PER_CPU_INTERRUPT_STACK_HIGH], %sp
    326323
    327324dont_switch_stacks:
    328325        /*
     
    358355        nop                             ! delay slot
    359356        cmp     %o0, 0
    360357        bz      simple_return
     358         nop
    361359#else
    362360        !sethi    %hi(SYM(_Thread_Dispatch_disable_level)), %l4
    363361        !ld       [%l5 + PER_CPU_ISR_NEST_LEVEL], %l7
     
    405403        ld       [%l6 + %lo(SYM(_CPU_ISR_Dispatch_disable))], %l7
    406404        orcc     %l7, %g0, %g0   ! Is this thread already doing an ISR?
    407405        bnz      simple_return   ! Yes, then do a "simple" exit
    408         nop
     406         nop
    409407
    410408        /*
    411409         *  If a context switch is necessary, then do fudge stack to
     
    413411         */
    414412
    415413        ldub     [%l5 + PER_CPU_DISPATCH_NEEDED], %l5
    416         nop
    417         nop
    418 
    419414        orcc     %l5, %g0, %g0   ! Is thread switch necessary?
    420415        bz       simple_return   ! No, then return
     416         nop
    421417#endif
    422418        /*
    423419         *  Invoke interrupt dispatcher.
     
    479475        nop
    480476    #endif
    481477        ld       [%l5], %l5     /* l5 = pointer to per CPU */
    482         nop
    483         nop
    484478#else
    485479        sethi    %hi(_Per_CPU_Information), %l5
    486480        add      %l5, %lo(_Per_CPU_Information), %l5
    487481#endif
    488482        ldub     [%l5 + PER_CPU_DISPATCH_NEEDED], %l5
    489         nop
    490         nop
    491 
    492483        orcc     %l5, %g0, %g0   ! Is thread switch necessary?
    493484        bz       allow_nest_again
    494485        nop