{"push_id":858195817,"size":1,"distinct_size":1,"ref":"refs/heads/svn_head","head":"f1427467670a36cb6d82934a226b5fc4ed9df279","before":"30e334de0a2e8f2e8c7e4c96a559c15603d4f8fc","commits":[{"sha":"f1427467670a36cb6d82934a226b5fc4ed9df279","author":{"email":"e36e7b99f18ac68692734e6c83920556f488f532@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f","name":"royger"},"message":"x86/dma_bounce: rework _bus_dmamap_load_ma implementation\n\nThe implementation of bus_dmamap_load_ma_triv currently calls\n_bus_dmamap_load_phys on each page that is part of the passed in buffer.\nSince each page is treated as an individual buffer, the resulting behaviour\nis different from the behaviour of _bus_dmamap_load_buffer. This breaks\ncertain drivers, like Xen blkfront.\n\nIf an unmapped buffer of size 4096 that starts at offset 13 into the first\npage is passed to the current _bus_dmamap_load_ma implementation (so the ma\narray contains two pages), the result is that two segments are created, one\nwith a size of 4083 and the other with size 13 (because two independant\ncalls to _bus_dmamap_load_phys are performed, one for each physical page).\nIf the same is done with a mapped buffer and calling _bus_dmamap_load_buffer\nthe result is that only one segment is created, with a size of 4096.\n\nThis patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce\nbuffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements\n_bus_dmamap_load_ma so that it's behaviour is the same as the mapped version\n(_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer\ncode, other arches are left untouched.\n\nSponsored by:\t\tCitrix Systems R&D\nReviewed by:\t\tkib, jah (previous version)\nMFC after:\t\t2 weeks\nDifferential Revision:\thttps://reviews.freebsd.org/D888\n\n\ngit-svn-id: svn+ssh://svn.freebsd.org/base/head@290610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f","distinct":true,"url":"https://api.github.com/repos/freebsd/freebsd/commits/f1427467670a36cb6d82934a226b5fc4ed9df279"}]}