]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve loading of multipage aligned buffers.
authorMichal Meloun <mmel@FreeBSD.org>
Mon, 2 Nov 2020 08:26:19 +0000 (08:26 +0000)
committerMichal Meloun <mmel@FreeBSD.org>
Mon, 2 Nov 2020 08:26:19 +0000 (08:26 +0000)
commit099b595154992e9c970ff7ab1e6b1826e339df1d
treeb41f79d8c073c8557f059cbd7f03974afcecec95
parent63ed2e364295e4e82b92fdb0f7ecd9060d4291b5
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
sys/arm64/arm64/busdma_bounce.c