freebsd-dev/sys
Conrad Meyer ca0ec73c11 Expand generic subword atomic primitives
The goal of this change is to make the atomic_load_acq_{8,16},
atomic_testandset{,_acq}_long, and atomic_testandclear_long primitives
available in MI-namespace.

The second goal is to get this draft out of my local tree, as anything that
requires a full tinderbox is a big burden out of tree.  MD specifics can be
refined individually afterwards.

The generic implementations may not be ideal for your architecture; feel
free to implement better versions.  If no subword_atomic definitions are
needed, the include can be removed from your arch's machine/atomic.h.
Generic definitions are guarded by defined macros of the same name.  To
avoid picking up conflicting generic definitions, some macro defines are
added to various MD machine/atomic.h to register an existing implementation.

Include _atomic_subword.h in arm and arm64 machine/atomic.h.

For some odd reason, KCSAN only generates some versions of primitives.
Generate the _acq variants of atomic_load.*_8, atomic_load.*_16, and
atomic_testandset.*_long.  There are other questionably disabled primitives,
but I didn't run into them, so I left them alone.  KCSAN is only built for
amd64 in tinderbox for now.

Add atomic_subword implementations of atomic_load_acq_{8,16} implemented
using masking and atomic_load_acq_32.

Add generic atomic_subword implementations of atomic_testandset_long(),
atomic_testandclear_long(), and atomic_testandset_acq_long(), using
atomic_fcmpset_long() and atomic_fcmpset_acq_long().

On x86, add atomic_testandset_acq_long as an alias for
atomic_testandset_long.

Reviewed by:	kevans, rlibby (previous versions both)
Differential Revision:	https://reviews.freebsd.org/D22963
2020-03-25 23:12:43 +00:00
..
amd64 Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
arm Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
arm64 Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
bsm vfs: add realpathat syscall 2020-02-20 16:58:19 +00:00
cam sys/cam: remove doubled ;s 2020-03-20 16:15:45 +00:00
cddl MFOpenZFS: ZVOLs should not be allowed to have children 2020-03-25 15:56:18 +00:00
compat Implement a workaround for kms-drm modules 2020-03-20 15:07:25 +00:00
conf Fix newvers.sh on macOS 10.15 2020-03-23 17:51:44 +00:00
contrib Fix misleading indentation warning in OCTEON1 kernel 2020-03-17 11:59:45 +00:00
crypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ddb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
dev ichwd: Add Atom C3000 watchdog ID. 2020-03-24 21:28:48 +00:00
dts arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00
fs Mark procfs-based process debugging as deprecated for FreeBSD 13. 2020-03-17 18:44:03 +00:00
gdb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
geom Use the newer EINTEGRITY error when authentication fails. 2020-03-23 21:26:32 +00:00
gnu dts: Update our copy for arm, arm64 and riscv dts to Linux 5.5 2020-02-28 15:42:51 +00:00
i386 Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
kgssapi
libkern Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
mips Use a GCC-compatile compiler flag in files.xlp 2020-03-22 22:18:06 +00:00
modules Introduce LINUXKPI_GENSRCS. 2020-03-20 21:06:58 +00:00
net Fix PNP matching for iflib NIC drivers 2020-03-24 19:20:10 +00:00
net80211 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (7 of many) 2020-02-21 16:32:17 +00:00
netgraph Fix spelling of "dropped". 2020-03-04 22:32:40 +00:00
netinet Remove an optimization, which was incorrect a couple of times and 2020-03-25 18:20:37 +00:00
netinet6 Fix synchronization in the IPV6_2292PKTOPTIONS set handler. 2020-03-19 21:38:52 +00:00
netipsec Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netpfil Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netsmb Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfs Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nfsclient
nfsserver
nlm Remove stale FreeBSD_version checks. 2020-03-01 23:01:37 +00:00
ofed Fix for double unlock in ipoib. 2020-03-16 12:33:57 +00:00
opencrypto Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
powerpc Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
riscv Remove the secondary_stacks array in arm64 and riscv kernels. 2020-03-24 18:43:23 +00:00
rpc Remove obsolete old-freebsd version compat shim. 2020-03-01 23:01:51 +00:00
security In r358471, we interrupted the case block that would eventually lead 2020-03-03 01:46:35 +00:00
sys Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
teken
tests Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tools vfs: stop null checking routines in vop wrappers 2020-01-26 00:41:38 +00:00
ufs When mounting a UFS filesystem, return EINTEGRITY rather than EIO 2020-03-11 21:00:40 +00:00
vm Check for busy or wired in vm_page_relookup(). Some callers will only keep 2020-03-11 22:25:45 +00:00
x86 Do not spuriously re-enable disabled io_apic pin on EOI for some configurations. 2020-03-18 21:34:52 +00:00
xdr typo: s/impelmentation/implementation/. 2020-02-07 15:14:29 +00:00
xen Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (16 of many) 2020-02-25 19:04:39 +00:00
Makefile Remove sparc64 kernel support 2020-02-03 17:35:11 +00:00