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
Reviewer
bz
Differential Revision
D26735: Improve loading of multipage aligned buffers.
Parents
rS367267: linux(4): Disambiguate identical ioctl errors in distinct paths
Branches
Unknown
Tags
Unknown