diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2026-02-02 21:30:42 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2026-02-02 21:57:56 +0000 |
| commit | b941d1c64e58708c93621cc07ed1c8e5e709cd48 (patch) | |
| tree | e9f5a1c76827a8c817f0b9a54d4a87872361e71b /tools/test/stress2/misc/nfs14.sh | |
| parent | bfbcd310bd4997c4ddb21bb81d61f2f29c68937c (diff) | |
As part of making the chip-specific mix and match of different accesses
(DMA/bus space) work as desired, the intent is to map the HCB memory as
uncacheable. Prior to VM_MEMATTR_*, the !x86 way of indicating this to
bus_dmamem_alloc(9) was BUS_DMA_COHERENT. Then later on in 2db99100a4,
BUS_DMA_NOCACHE was hooked up to VM_MEMATTR_UNCACHEABLE for x86. As it
turns out, still as of today bus_dmamem_alloc(9) differs in this regard
across architectures. On arm, it still supports BUS_DMA_COHERENT only
for requesting uncacheable DMA and x86 still uses BUS_DMA_NOCACHE only.
On arm64 and riscv, BUS_DMA_COHERENT seems to effectively be an alias
for BUS_DMA_NOCACHE.
Thus, allocate the HCB memory with BUS_DMA_COHERENT | BUS_DMA_NOCACHE,
so we get uncacheable memory on all architectures including x86 and so
loads and stores from/to HCB won't get reordered. However, even on x86
we still need to use at least compiler barriers to achieve the desired
program order.
This change should also fix panics due to out-of-sync data seen with
FreeBSD VMs on top of OpenStack and HBAs of type lsiLogic as a result
of loads and stores getting reordered. [1]
While at it:
- Nuke the unused SYM_DRIVER_NAME macro.
- Remove unused/redundant HCB members and correct a comment typo.
PR: 270816 [1]
MFC after: 3 days
Diffstat (limited to 'tools/test/stress2/misc/nfs14.sh')
0 files changed, 0 insertions, 0 deletions
