Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-10] src/sys/arch/powerpc/powerpc



Module Name:    src
Committed By:   martin
Date:           Mon Jan  5 14:32:53 UTC 2026

Modified Files:
        src/sys/arch/powerpc/powerpc [netbsd-10]: trap_subr.S

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1214):

        sys/arch/powerpc/powerpc/trap_subr.S: revision 1.88

powerpc: Clear reservations on return from trap.

For MP systems, clear reservations (with stwcx. instruction) when
returning from a trap to protect the following sequence:
  user       kernel
  ----       ------
  lwarx                       # take reservation on address A
             trap             # exception entry
             lwarx            # take reservation on address B
             rfi              # exception return
  stwcx.                      # store with wrong reservation

This can happen both for UP and SMP systems, but I think it's only a
problem for SMP. Since we already clear the reservation on context
switch, there is no risk of another thread storing at the same time.

Fixes PR port-powerpc/59386 (t_spinlock test is failing).


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.86.4.1 src/sys/arch/powerpc/powerpc/trap_subr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index