freebsd-dev/sys
Konstantin Belousov 615b6ea2c8 Reset non-zero it_need indicator to zero atomically with fetching its
current value.  It is believed that the change is the real fix for the
issue which was covered over by the r252683.

With the current code, if the interrupt handler sets it_need between
read and consequent reset, the update could be lost and
ithread_execute_handlers() would not be called in response to the lost
update.

The r252683 could have hide the issue since at the moment of commit,
atomic_load_acq_int() did locked cmpxchg on the variable, which puts
the cache line into the exclusive owned state and clears store
buffers.  Then the immediate store of zero has very high chance of
reusing the exclusive state of the cache line and make the load and
store sequence operate as atomic swap.

For now, add the acq+rel fence immediately after the swap, to not
disturb current (but excessive) ordering.  Acquire is needed for the
ih_need reads after the load, while release does not serve a useful
purpose [*].

Reviewed by:	alc
Noted by:	alc [*]
Discussed with:	bde
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-07-15 17:36:35 +00:00
..
amd64 Revert inadvertent change to amd64/GENERIC. 2015-07-15 01:04:54 +00:00
arm Bring a few simplifications to a10_gpio: 2015-07-13 18:19:26 +00:00
arm64 Add identify_cpu() to ARM64 init_secondary routine 2015-07-15 09:24:45 +00:00
boot Add the Banana Pi DTS. 2015-07-07 19:01:54 +00:00
bsm
cam Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
cddl Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
compat Implement the trivial socket system calls: shutdown() and listen(). 2015-07-15 11:27:34 +00:00
conf cxgbe(4): Update T4 and T5 firmwares to 1.14.2.0. 2015-07-14 08:02:05 +00:00
contrib Import the CloudABI datatypes and create a system call table. 2015-07-09 07:20:15 +00:00
crypto Complete the move that was started w/ r263218.. For some reason I 2015-07-11 03:12:34 +00:00
ddb Correct the function name in catch-all error handling case. 2015-06-17 10:20:59 +00:00
dev Fix an infinite loop when a node doesn't have an interrupt-parent property. 2015-07-15 13:28:25 +00:00
fs Check suspendability on the mountpoint returned by VOP_GETWRITEMOUNT. 2015-07-05 22:37:33 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Add a new option to gpart(8) to fix Lenovo BIOS boot issue 2015-07-15 02:23:55 +00:00
gnu
i386 Spell crypto correctly. 2015-07-14 10:47:56 +00:00
isa
kern Reset non-zero it_need indicator to zero atomically with fetching its 2015-07-15 17:36:35 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Populate hw.model with the CPU model information. 2015-07-14 05:14:10 +00:00
modules cxgbe(4): Update T4 and T5 firmwares to 1.14.2.0. 2015-07-14 08:02:05 +00:00
net * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
net80211 Break out the current 802.11 software scan methods into an indirect table. 2015-06-08 02:35:43 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet Correct issue presented in r285051, 2015-07-09 16:28:36 +00:00
netinet6 Keep IPv6 address specified by IPV6_PKTINFO socket option in kernel 2015-07-03 19:01:38 +00:00
netipsec Summary: Fix LINT build. The names of the new AES modes were not 2015-07-10 02:23:50 +00:00
netnatm
netpfil assorted algorithmic fixes from Paolo Valente (one of my qfq coauthors): 2015-07-10 19:24:36 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Fix broken implementation of "kvasprintf()" function by adding missing 2015-07-03 11:16:20 +00:00
opencrypto Fix XTS, and name things a bit better... 2015-07-14 07:45:18 +00:00
pc98 Spell crypto correctly. 2015-07-14 10:47:56 +00:00
powerpc Spell crypto correctly. 2015-07-14 10:47:56 +00:00
rpc
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Spell crypto correctly. 2015-07-14 10:47:56 +00:00
sys Implement the CloudABI random_get() system call. 2015-07-14 18:45:15 +00:00
teken
tools
ufs Move chdir/chroot-related fdp manipulation to kern_descrip.c 2015-07-11 16:19:11 +00:00
vm Add an initial NUMA affinity/policy configuration for threads and processes. 2015-07-11 15:21:37 +00:00
x86 Set the initial system time to a sane (as in: not end of 21st century) value when 2015-06-29 17:02:09 +00:00
xdr
xen Garbage collect comments which related to the pre-r284296 support for a 2015-06-21 06:05:33 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00