]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] [MIPS] Implement 32-bit kernel emulation of atomic64 operations
authorBrandon Bergren <bdragon@FreeBSD.org>
Thu, 2 Jan 2020 23:20:37 +0000 (23:20 +0000)
committerKristof Provost <kp@FreeBSD.org>
Wed, 6 Oct 2021 18:29:31 +0000 (20:29 +0200)
commit92a6b17e8ba00d1d55936b53868f81c69d70f446
tree60feb38c16d550856c3d0a516eee3593f1a3981a
parent6fea4b82e7b86ac680d5615f8361863353737325
[PowerPC] [MIPS] Implement 32-bit kernel emulation of atomic64 operations

This is a lock-based emulation of 64-bit atomics for kernel use, split off
from an earlier patch by jhibbits.

This is needed to unblock future improvements that reduce the need for
locking on 64-bit platforms by using atomic updates.

The implementation allows for future integration with userland atomic64,
but as that implies going through sysarch for every use, the current
status quo of userland doing its own locking may be for the best.

Submitted by: jhibbits (original patch), kevans (mips bits)
Reviewed by: jhibbits, jeff, kevans
Differential Revision: https://reviews.freebsd.org/D22976

(cherry picked from commit 9aafc7c0523456c8b5ee8919c97f75277cf4d70b)
sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c
sys/cddl/compat/opensolaris/sys/atomic.h
sys/conf/files.mips
sys/conf/files.powerpc
sys/kern/subr_atomic64.c [new file with mode: 0644]
sys/mips/include/atomic.h
sys/powerpc/include/atomic.h
sys/sys/_atomic64e.h [new file with mode: 0644]