freebsd-dev/sys
John Baldwin b96562eb86 Fix atomic_*cmpset32 on riscv64 with clang.
The lr.w instruction used to read the value from memory sign-extends
the value read from memory.  GCC sign-extends the 32-bit comparison
value passed in whereas clang currently does not.  As a result, if the
value being compared has the MSB set, the comparison fails for
matching 32-bit values when compiled with clang.

Use a cast to explicitly sign-extend the unsigned comparison value.
This works with both GCC and clang.

There is commentary in the RISC-V spec that suggests that GCC's
approach is more correct, but it is not clear if the commentary in the
RISC-V spec is binding.

Reviewed by:	mhorne
Obtained from:	Axiado
MFC after:	2 weeks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D22084
2019-10-23 16:41:31 +00:00
..
amd64 amd64 pmap: conditionalize per-superpage locks on NUMA 2019-10-22 22:55:46 +00:00
arm axp81x: Use the default regnode_init method 2019-10-23 09:54:50 +00:00
arm64 Stop enabling interrupts when reentering kdb on arm64 2019-10-23 13:21:15 +00:00
bsm
cam
cddl Assert that vnode_pager_setsize() is called with the vnode exclusively locked 2019-10-22 16:21:24 +00:00
compat linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
conf Add driver for DesignWare PCIE core, and its Armada 8K specific attachement. 2019-10-20 11:11:32 +00:00
contrib Merge ACPICA 20191018. 2019-10-19 14:56:44 +00:00
crypto
ddb
dev regulator: Add a regnode_set_constraint function 2019-10-23 09:56:53 +00:00
dts
fs pseudofs: hashed vncache 2019-10-22 22:52:53 +00:00
gdb gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
geom Make all the gnop parameters optional in the request from userland, 2019-10-16 21:49:44 +00:00
gnu
i386 linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
isa
kern Fix undefined behavior. 2019-10-23 16:06:47 +00:00
kgssapi
libkern
mips Remove page locking from pmap_mincore(). 2019-10-16 22:03:27 +00:00
modules if_tuntap: remove if_{tun,tap}.ko -> if_tuntap.ko links 2019-10-21 20:28:38 +00:00
net tuntap(4): Fix NOINET build after r353741 2019-10-23 02:15:15 +00:00
net80211
netgraph
netinet Fix compile issues when building a kernel without the VIMAGE option. 2019-10-19 20:48:53 +00:00
netinet6 Execute nd6_dad_timer() in the network epoch, since nd6_dad_duplicated() 2019-10-22 16:06:33 +00:00
netipsec
netpfil pf: Must be in NET_EPOCH to call icmp_error 2019-10-18 03:36:26 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
powerpc powerpc/booke: Fix Book-E boot post-minidump 2019-10-23 00:31:19 +00:00
riscv Fix atomic_*cmpset32 on riscv64 with clang. 2019-10-23 16:41:31 +00:00
rpc
security
sparc64 Split out a more generic debugnet(4) from netdump(4) 2019-10-17 16:23:03 +00:00
sys Assert that vnode_pager_setsize() is called with the vnode exclusively locked 2019-10-22 16:21:24 +00:00
teken
tests
tools
ufs Abbreviate softdep lock names. 2019-10-18 17:01:27 +00:00
vm Assert that vm_fault_lock_vnode() returns locked saved vnode. 2019-10-23 07:36:26 +00:00
x86 hw.intrbalance: Make sysctl tunable 2019-10-19 16:37:49 +00:00
xdr
xen
Makefile