Source-Changes archive

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

CVS commit: src



Module Name:    src
Committed By:   thorpej
Date:           Sat Nov 29 21:57:14 UTC 2025

Modified Files:
        src/common/lib/libc/arch/m68k/atomic: atomic_cas.S atomic_op_asm.h
        src/sys/arch/hp300/hp300: genassym.cf
        src/sys/arch/hp300/include: types.h
        src/sys/arch/m68k/include: frame.h mutex.h
        src/sys/arch/m68k/m68k: lock_stubs.s

Log Message:
Introduce __HAVE_M68K_BROKEN_RMC, which can be defined by m68k platforms
that cannot perform indivisible READ-MODIFY-WRITE bus cycles.  The
define is named for the /RMC output signal on the CPU that is asserted
when such a cycle is performed.  These cycles are only used by the CAS,
CAS2, and TAS instructions.  The cycles are, as far as I can tell,
otherwise indistinguishable from garden-variety read followed by write
bus cycles, except for the assertion of /RMC.  Note that other single-
instruction "read-modify-write" instructions (e.g. OR, AND, ADD, etc.
with a memory destination operand) do not assert /RMC, and are thus not
considered truly atomic from the perspective of the 68k architecture.

When __HAVE_M68K_BROKEN_RMC is defined, then we must make unavailable
the CAS, CAS2, and TAS instructions, because using them will typically
cause a bus error to occur.  In this case, we handle _atomic_cas_32()
(and its aliases) in the kernel environment the same way as the 68010
does: a restartable atomic sequence.  8- and 16-bit CAS operations are
not available in the kernel environment on such platforms.

We define __HAVE_M68K_BROKEN_RMC for the hp300 platform because 68020-based
hp300 systems will generate a fault for /RMC-type cycles.

Based on work by Izumi Tsutsui.

XXX pullup-11?


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/common/lib/libc/arch/m68k/atomic/atomic_cas.S
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/m68k/atomic/atomic_op_asm.h
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/hp300/hp300/genassym.cf
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp300/include/types.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/mutex.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/m68k/m68k/lock_stubs.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