freebsd-dev/sys/x86
Warner Losh 730b1b4d1c busdma: Annotate bus_dmamap_sync() with fence
Add an explicit thread fence release before returning from
bus_dmamap_sync. This should be a no-op in practice, but makes
explicit that all ordinary stores will be completed before subsequent
reads/writes to ordinary device memory. On x86, normal memory ordering
is strong enough to generally guarantee this. The fence keeps the
optimizer (likely LTO) from reordering other calls around this.
The other architectures already have calls, as appropriate, that
are equivalent.

Note: On x86, there is one exception to this rule. If you've mapped
memory as write combining, then you will need to add a sfence or
similar. Normally, though, busdma doesn't operate on such memory, and
drivers that do already cope appropriately.

Reviewed by: kib@, gallatin@, chuck@, mav@
Differential Revision: https://reviews.freebsd.org/D27448
2020-12-04 21:34:04 +00:00
..
acpica x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
bios Explicit CTLFLAG_DYN not needed 2020-10-04 19:37:15 +00:00
conf Use envvar rather than nonstandard hint. lines 2020-09-23 19:18:53 +00:00
cpufreq hwpstate_intel: don't unconditionally print the error message 2020-11-29 01:43:04 +00:00
include Add VT driver for VBE framebuffer device 2020-11-30 08:22:40 +00:00
iommu Add device_t member to struct iommu. 2020-11-16 15:29:52 +00:00
isa timer_restore is now unused, remove it 2020-10-08 20:56:11 +00:00
linux linux(4): Deduplicate unimpl/dummy syscall handlers 2020-11-05 19:30:31 +00:00
pci x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
x86 busdma: Annotate bus_dmamap_sync() with fence 2020-12-04 21:34:04 +00:00
xen x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00