freebsd-dev/sys/i386/include
Konstantin Belousov cbb65b7ec5 i386: Do not ever store to other-CPU counter64 slot.
On CPUs supporting cmpxchg8b, fetch is performed by cmpxchg8b on
corresponding CPU slot, which unconditionally write to the slot.  If
for that slot, the owner CPU increments it, then both CPUs might run
the cmpxchg8b instruction concurrently and this might race and
override the incremental write.  So the counter update would be lost.

Fix it by implementing fetch as IPI and accumulation of result.  It is
acceptable for rare counter64 fetch operation to be more expensive.

Diagnosed and tested by:	Andreas Longwitz <longwitz@incore.de>
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2019-02-03 21:28:58 +00:00
..
pc i386 4/4G split. 2018-04-13 20:30:49 +00:00
xen
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h
apm_bios.h
apm_segments.h
asm.h
asmacros.h Fix recent breakages of kernel profiling, mostly on i386 (high resolution 2018-06-02 04:25:09 +00:00
atomic.h Implement missing atomic_fcmpset_XXX() support for i386. 2018-08-09 11:30:13 +00:00
bootinfo.h
bus_dma.h
bus.h
clock.h re-synchronize TSC-s on SMP systems after resume, if necessary 2018-05-25 07:33:20 +00:00
counter.h i386: Do not ever store to other-CPU counter64 slot. 2019-02-03 21:28:58 +00:00
cpu.h Add a custom implementation of cpu_lock_delay() for x86. 2018-11-05 22:54:03 +00:00
cpufunc.h Tell the compiler that rdtscp clobbers %ecx. 2018-06-09 18:31:19 +00:00
cputypes.h
cserial.h Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
db_machdep.h Cleanups related to debug exceptions on x86. 2018-05-22 00:45:00 +00:00
dump.h
efi.h
elan_mmcr.h
elf.h
endian.h
exec.h
fdt.h
float.h
floatingpoint.h
frame.h i386 4/4G split. 2018-04-13 20:30:49 +00:00
gdb_machdep.h
ieeefp.h Resolve conflicts between macros in fenv.h and ieeefp.h 2018-05-31 20:22:47 +00:00
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
ioctl_bt848.h
ioctl_meteor.h
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 i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
pcb_ext.h Remove dead declaration. 2018-05-11 20:47:45 +00:00
pcb.h
pci_cfgreg.h
pcpu.h Expand x86 struct pcpus to UMA_PCPU_ALLOC_SIZE AKA PAGE_SIZE. 2018-07-06 19:50:44 +00:00
perfmon.h
pmap_base.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
pmap_nopae.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
pmap_pae.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
pmap.h i386: Merge PAE and non-PAE pmaps into same kernel. 2019-01-30 02:07:13 +00:00
pmc_mdep.h hwpmc: ABI fixes 2018-06-04 02:05:48 +00:00
ppireg.h
proc.h
profile.h Oops, the last minute reduction in the clobber list for i386 2018-06-02 09:59:27 +00:00
psl.h
ptrace.h
pvclock.h
reg.h
reloc.h
resource.h
runq.h
segments.h i386 4/4G split. 2018-04-13 20:30:49 +00:00
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