freebsd-dev/sys/mips
Ed Schouten 2e5d5dc936 Add proper __sync_*() intrinsics for MIPS.
To make <stdatomic.h> work on MIPS (and ARM) using GCC, we need to
provide implementations of the __sync_*() functions. I already added
these functions for 4 and 8 byte types to libcompiler-rt some time ago,
based on top of <machine/atomic.h>.

Unfortunately, <machine/atomic.h> only provides a subset of the features
needed to implement <stdatomic.h>. This means that in some cases we had
to do compare-and-exchange calls in loops, where a simple ll/sc would
suffice.

Also implement these functions for 1 and 2 byte types. MIPS only
provides ll/sc instructions for 4 and 8 byte types, but this is of
course no limitation. We can simply load 4 bytes and use some bitmask
tricks to modify only the bytes affected.

Discussed on:	mips, arch
Tested with:	QEMU
2013-06-08 13:19:11 +00:00
..
adm5120 Fix low-level uart drivers that set their fifo sizes in the softc too late. 2013-04-01 00:44:20 +00:00
alchemy Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
atheros Add the AR933x SoC GPIO pin count limitation. 2013-05-02 00:40:45 +00:00
beri Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
cavium Use cvmx_mgmt_port_num_ports() instead of the inlined copy of a 2013-05-02 19:47:36 +00:00
conf Tidy up some CVS workarounds. 2013-05-12 01:53:47 +00:00
gxemul Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
idt Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
include Rename VM_NDOMAIN into MAXMEMDOM and move it into machine/param.h in 2013-05-07 22:46:24 +00:00
malta Add the static kernel boot environment, needed to actually boot this thing. 2013-04-17 18:26:01 +00:00
mips Add proper __sync_*() intrinsics for MIPS. 2013-06-08 13:19:11 +00:00
nlm Fix incorrect KASSERTs in xlpge 2013-04-12 16:03:22 +00:00
rmi MFcalloutng: 2013-02-28 13:46:03 +00:00
rt305x Fix undefined behaviour in several gpio_pin_setflags() routines (under 2013-04-13 21:21:13 +00:00
sentry5 Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00
sibyte Merge from vmobj-rwlock branch: 2013-02-26 01:00:11 +00:00