diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-05-02 22:39:26 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-05-02 22:39:26 +0000 |
commit | 0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44 (patch) | |
tree | 66bf7ae0e46fdb756bf9b253b183f9f50e42fdba /sys/kern/subr_bus_dma.c | |
parent | 4053f8ac4de7a978fe215f25e45469e512a2c7bb (diff) | |
download | src-0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44.tar.gz src-0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44.zip |
Continuation of multi page mbuf redesign from r359919.
The following series of patches addresses three things:
Now that array of pages is embedded into mbuf, we no longer need
separate structure to pass around, so struct mbuf_ext_pgs is an
artifact of the first implementation. And struct mbuf_ext_pgs_data
is a crutch to accomodate the main idea r359919 with minimal churn.
Also, M_EXT of type EXT_PGS are just a synonym of M_NOMAP.
The namespace for the newfeature is somewhat inconsistent and
sometimes has a lengthy prefixes. In these patches we will
gradually bring the namespace to "m_epg" prefix for all mbuf
fields and most functions.
Step 1 of 4:
o Anonymize mbuf_ext_pgs_data, embed in m_ext
o Embed mbuf_ext_pgs
o Start documenting all this entanglement
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D24598
Notes
Notes:
svn path=/head/; revision=360569
Diffstat (limited to 'sys/kern/subr_bus_dma.c')
-rw-r--r-- | sys/kern/subr_bus_dma.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_bus_dma.c b/sys/kern/subr_bus_dma.c index 8f8f48fa238d..bfdcc91ff21c 100644 --- a/sys/kern/subr_bus_dma.c +++ b/sys/kern/subr_bus_dma.c @@ -141,7 +141,7 @@ _bus_dmamap_load_unmapped_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, off = 0; len -= seglen; error = _bus_dmamap_load_buffer(dmat, map, - &ext_pgs->m_epg_hdr[segoff], seglen, kernel_pmap, + &m->m_epg_hdr[segoff], seglen, kernel_pmap, flags, segs, nsegs); } } @@ -159,7 +159,7 @@ _bus_dmamap_load_unmapped_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, seglen = min(seglen, len); len -= seglen; error = _bus_dmamap_load_phys(dmat, map, - ext_pgs->m_epg_pa[i] + segoff, seglen, flags, segs, nsegs); + m->m_epg_pa[i] + segoff, seglen, flags, segs, nsegs); pgoff = 0; }; if (len != 0 && error == 0) { @@ -167,7 +167,7 @@ _bus_dmamap_load_unmapped_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map, ("off + len > trail (%d + %d > %d)", off, len, ext_pgs->trail_len)); error = _bus_dmamap_load_buffer(dmat, map, - &ext_pgs->m_epg_trail[off], len, kernel_pmap, flags, segs, + &m->m_epg_trail[off], len, kernel_pmap, flags, segs, nsegs); } return (error); |