freebsd-dev/sys/i386/include
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
..
pc
xen
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
apm_segments.h
asm.h
asmacros.h i386: stop guessing the address of the trap frame in ddb backtrace. 2019-11-12 15:56:27 +00:00
atomic.h Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
bootinfo.h
bus_dma.h
bus.h
clock.h
counter.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
cpu.h Add a custom implementation of cpu_lock_delay() for x86. 2018-11-05 22:54:03 +00:00
cpufunc.h Provide convenience C wrappers for RDPKRU and WRPKRU instructions. 2019-02-19 19:17:20 +00:00
cputypes.h
cserial.h Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
db_machdep.h
dump.h
efi.h
elan_mmcr.h
elf.h
endian.h
exec.h
fdt.h
float.h
floatingpoint.h
frame.h
gdb_machdep.h
ieeefp.h
if_wl_wavelan.h
in_cksum.h
intr_machdep.h Merge amd64 and i386 <machine/intr_machdep.h> headers. 2018-08-20 12:31:39 +00:00
iodev.h
kdb.h
limits.h
md_var.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
memdev.h
metadata.h
minidump.h
mp_watchdog.h
nexusvar.h
npx.h
ofw_machdep.h
param.h Define MAXCPU consistently between the kernel and KLDs. 2020-02-05 19:08:21 +00:00
pcb_ext.h
pcb.h
pci_cfgreg.h
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pcpu.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
perfmon.h
pmap_base.h i386: implement sysctl vm.pmap.kernel_maps. 2019-09-22 19:23:00 +00:00
pmap_nopae.h i386 PAE: avoid atomic for pte_store() where possible. 2019-02-26 09:45:44 +00:00
pmap_pae.h i386 PAE: avoid atomic for pte_store() where possible. 2019-02-26 09:45:44 +00:00
pmap.h Define a unified pmap structure for i386. 2020-01-07 15:59:31 +00:00
pmc_mdep.h
ppireg.h
proc.h
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h
resource.h
runq.h
segments.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smapi.h
smp.h
speaker.h
specialreg.h
stack.h
stdarg.h
sysarch.h
timerreg.h
trap.h
tss.h
ucontext.h
vdso.h
vm86.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
vm.h
vmparam.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00