Changeset ab1ae2d9 in mainline


Ignore:
Timestamp:
2006-09-09T09:29:50Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27ab6a7
Parents:
253f35a1
Message:

Fixes for sparc64's preemptible_handler().
Resynchronize CWP with that of TL=0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/trap/trap_table.S

    r253f35a1 rab1ae2d9  
    586586        be 1f
    587587        nop
    588 0:      ba 0b                                   ! this for debugging, if we ever get here
     5880:      ba 0b                                   ! this is for debugging, if we ever get here
    589589        nop                                     ! it will be easy to find
    590590
     
    592592.if NOT(\is_syscall)
    593593        rdpr %tstate, %g3
     594       
     595        /*
     596         * One of the ways this handler can be invoked is after a nested MMU trap from
     597         * either spill_1_normal or fill_1_normal traps. Both of these traps manipulate
     598         * the CWP register. We deal with the situation by simulating the MMU trap
     599         * on TL=1 and restart the respective SAVE or RESTORE instruction once the MMU
     600         * trap is resolved. However, because we are in the wrong window from the
     601         * perspective of the MMU trap, we need to synchronize CWP with CWP from TL=0.
     602         */
     603        and %g3, TSTATE_CWP_MASK, %g4
     604        wrpr %g4, 0, %cwp                       ! resynchronize CWP
     605
    594606        andcc %g3, TSTATE_PRIV_BIT, %g0         ! if this trap came from the privileged mode...
    595607        bnz 0f                                  ! ...skip setting of kernel stack and primary context
    596608        nop
     609       
    597610.endif
    598611        /*
     
    886899         *      OTHERWIN        = 0
    887900         *
    888          * The RESTORE isntruction is therfore to be skipped.
     901         * The RESTORE instruction is therfore to be skipped.
    889902         */
    8909032:
Note: See TracChangeset for help on using the changeset viewer.