HomeFreeBSD

Improve loading of multipage aligned buffers.

Description

Improve loading of multipage aligned buffers.

The multipage alignment requirements is incompatible with many aspects
of actual busdma code. Multi-page alignment requests are incompatible
with many aspects of current busdma code. Mainly with partially bounced
buffer segments and per-page loop in bus_dmamap_load_buffer(). Because
proper implementation would be a major restructuring of the code, add
the fix only for already known uses and do KASSERT for all other cases.

For this reason, bus_dmamap_load_buffer () should take the memory allocated
by bus_dmam_alloc () as one segment bypassing per page segmentation. We can
do this because it is guaranteed that the memory is physically continuous.

Reviewed by: bz
Tested by: imp, mv, daniel.engberg.lists_pyret.net, kjopek_gmail.com
Differential Revision: https://reviews.freebsd.org/D26735

Details

Provenance
mmelAuthored on Nov 2 2020, 8:26 AM
Parents
rG63ed2e364295: linux(4): Disambiguate identical ioctl errors in distinct paths
Branches
Unknown
Tags
Unknown