freebsd-dev/sys/arm
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
..
allwinner Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (13 of many) 2020-02-24 10:45:22 +00:00
altera/socfpga Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
amlogic/aml8726 Implement missing MMCBR ivars 2019-07-04 14:15:04 +00:00
annapurna/alpine arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
arm [PowerPC][Book-E] Fix missing load base in elf_cpu_parse_dynamic(). 2020-03-18 02:58:18 +00:00
broadcom/bcm2835 Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
cloudabi32 Use uintptr_t instead of register_t * for the stack base. 2019-12-03 23:17:54 +00:00
conf arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00
freescale Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
include Expand generic subword atomic primitives 2020-03-25 23:12:43 +00:00
linux regen linuxulator sysent after r357577 2020-02-05 16:54:16 +00:00
mv Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
nvidia Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
qemu arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
rockchip Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
samsung/exynos Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
ti Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
versatile Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
xilinx arm: zynq: An SPI driver for Zynq platforms 2020-02-28 10:57:23 +00:00