Re: linux-next: manual merge of the slave-dma tree with Linus' tree
On 11-06-19, 16:32, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the slave-dma tree got a conflict in: > > include/linux/sudmac.h > > between commit: > > 49833cbeafa4 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - > rule 311") > > from Linus' tree and commit: > > 9a0f780958bb ("dmaengine: sudmac: remove unused driver") > > from the slave-dma tree. > > I fixed it up (I removed the file) and can carry the fix as > necessary. This is now fixed as far as linux-next is concerned, but any Thanks Stephen, I will keep this in mind before I send this to Linus > non trivial conflicts should be mentioned to your upstream maintainer > when your tree is submitted for merging. You may also want to consider > cooperating with the maintainer of the conflicting tree to minimise any > particularly complex conflicts. > > -- > Cheers, > Stephen Rothwell -- ~Vinod
linux-next: manual merge of the slave-dma tree with Linus' tree
Hi all, Today's linux-next merge of the slave-dma tree got a conflict in: include/linux/sudmac.h between commit: 49833cbeafa4 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 311") from Linus' tree and commit: 9a0f780958bb ("dmaengine: sudmac: remove unused driver") from the slave-dma tree. I fixed it up (I removed the file) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell pgporYS3Q4n8B.pgp Description: OpenPGP digital signature
Re: linux-next: manual merge of the slave-dma tree with Linus' tree
On 26-02-19, 15:24, Stephen Rothwell wrote: > Hi Vinod, > > Today's linux-next merge of the slave-dma tree got a conflict in: > > drivers/dma/dmatest.c > > between commit: > > 6454368a804c ("dmaengine: dmatest: Abort test in case of mapping error") > > from Linus' tree and commit: > > 361deb7243d2 ("dmaengine: dmatest: wrap src & dst data into a struct") > > from the slave-dma tree. > > I fixed it up (see below) and can carry the fix as necessary. This > is now fixed as far as linux-next is concerned, but any non trivial > conflicts should be mentioned to your upstream maintainer when your tree > is submitted for merging. You may also want to consider cooperating > with the maintainer of the conflicting tree to minimise any particularly > complex conflicts. Thanks for the fix, this seems fine to me. Also, in this case that Linus so let me see how to ease it :) > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/dma/dmatest.c > index 6511928b4cdf,50221d467d86.. > --- a/drivers/dma/dmatest.c > +++ b/drivers/dma/dmatest.c > @@@ -708,12 -726,14 +726,12 @@@ static int dmatest_func(void *data > > um->addr[i] = dma_map_page(dev->dev, pg, pg_off, > um->len, DMA_TO_DEVICE); > - srcs[i] = um->addr[i] + src_off; > + srcs[i] = um->addr[i] + src->off; > ret = dma_mapping_error(dev->dev, um->addr[i]); > if (ret) { > -dmaengine_unmap_put(um); > result("src mapping error", total_tests, > -src_off, dst_off, len, ret); > +src->off, dst->off, len, ret); > -failed_tests++; > -continue; > +goto error_unmap_continue; > } > um->to_cnt++; > } > @@@ -728,9 -748,11 +746,9 @@@ > DMA_BIDIRECTIONAL); > ret = dma_mapping_error(dev->dev, dsts[i]); > if (ret) { > -dmaengine_unmap_put(um); > result("dst mapping error", total_tests, > -src_off, dst_off, len, ret); > +src->off, dst->off, len, ret); > -failed_tests++; > -continue; > +goto error_unmap_continue; > } > um->bidi_cnt++; > } > @@@ -758,10 -780,12 +776,10 @@@ > } > > if (!tx) { > - result("prep error", total_tests, src_off, > -dst_off, len, ret); > -dmaengine_unmap_put(um); > + result("prep error", total_tests, src->off, > +dst->off, len, ret); > msleep(100); > -failed_tests++; > -continue; > +goto error_unmap_continue; > } > > done->done = false; > @@@ -770,10 -794,12 +788,10 @@@ > cookie = tx->tx_submit(tx); > > if (dma_submit_error(cookie)) { > - result("submit error", total_tests, src_off, > -dst_off, len, ret); > -dmaengine_unmap_put(um); > + result("submit error", total_tests, src->off, > +dst->off, len, ret); > msleep(100); > -failed_tests++; > -continue; > +goto error_unmap_continue; > } > dma_async_issue_pending(chan); > > @@@ -782,23 -808,25 +800,23 @@@ > > status = dma_async_is_tx_complete(chan, cookie, NULL, NULL); > > -dmaengine_unmap_put(um); > - > if (!done->done) { > - result("test timed out", total_tests, src_off, dst_off, > + result("test timed out", total_tests, src->off, > dst->off, > len, 0); > -failed_tests++; > -continue; > +goto error_unmap_continue; > } else if (status != DMA_COMPLETE) { > result(status == DMA_ERROR ? > "completion error status" : > -"completion busy status", total_tests, src_off, > -dst_off, len, ret); > +"completion busy status", total_tests, src->off, > +dst->off, len, ret); > -failed_tests++; > -continue; >
linux-next: manual merge of the slave-dma tree with Linus' tree
Hi Vinod, Today's linux-next merge of the slave-dma tree got a conflict in: drivers/dma/dmatest.c between commit: 6454368a804c ("dmaengine: dmatest: Abort test in case of mapping error") from Linus' tree and commit: 361deb7243d2 ("dmaengine: dmatest: wrap src & dst data into a struct") from the slave-dma tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/dma/dmatest.c index 6511928b4cdf,50221d467d86.. --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@@ -708,12 -726,14 +726,12 @@@ static int dmatest_func(void *data um->addr[i] = dma_map_page(dev->dev, pg, pg_off, um->len, DMA_TO_DEVICE); - srcs[i] = um->addr[i] + src_off; + srcs[i] = um->addr[i] + src->off; ret = dma_mapping_error(dev->dev, um->addr[i]); if (ret) { - dmaengine_unmap_put(um); result("src mapping error", total_tests, - src_off, dst_off, len, ret); + src->off, dst->off, len, ret); - failed_tests++; - continue; + goto error_unmap_continue; } um->to_cnt++; } @@@ -728,9 -748,11 +746,9 @@@ DMA_BIDIRECTIONAL); ret = dma_mapping_error(dev->dev, dsts[i]); if (ret) { - dmaengine_unmap_put(um); result("dst mapping error", total_tests, - src_off, dst_off, len, ret); + src->off, dst->off, len, ret); - failed_tests++; - continue; + goto error_unmap_continue; } um->bidi_cnt++; } @@@ -758,10 -780,12 +776,10 @@@ } if (!tx) { - result("prep error", total_tests, src_off, - dst_off, len, ret); - dmaengine_unmap_put(um); + result("prep error", total_tests, src->off, + dst->off, len, ret); msleep(100); - failed_tests++; - continue; + goto error_unmap_continue; } done->done = false; @@@ -770,10 -794,12 +788,10 @@@ cookie = tx->tx_submit(tx); if (dma_submit_error(cookie)) { - result("submit error", total_tests, src_off, - dst_off, len, ret); - dmaengine_unmap_put(um); + result("submit error", total_tests, src->off, + dst->off, len, ret); msleep(100); - failed_tests++; - continue; + goto error_unmap_continue; } dma_async_issue_pending(chan); @@@ -782,23 -808,25 +800,23 @@@ status = dma_async_is_tx_complete(chan, cookie, NULL, NULL); - dmaengine_unmap_put(um); - if (!done->done) { - result("test timed out", total_tests, src_off, dst_off, + result("test timed out", total_tests, src->off, dst->off, len, 0); - failed_tests++; - continue; + goto error_unmap_continue; } else if (status != DMA_COMPLETE) { result(status == DMA_ERROR ? "completion error status" : - "completion busy status", total_tests, src_off, - dst_off, len, ret); + "completion busy status", total_tests, src->off, + dst->off, len, ret); - failed_tests++; - continue; + goto error_unmap_continue; } + dmaengine_unmap_put(um); + if (params->noverify) { - verbose_result("test passed", total_tests, src_off, -
linux-next: manual merge of the slave-dma tree with Linus' tree
Hi Vinod, Today's linux-next merge of the slave-dma tree got a conflict in: drivers/dma/imx-sdma.c between commit: 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()") from Linus' tree and commit: ceaf52265148 ("dmaengine: imx-sdma: pass ->dev to dma_alloc_coherent() API") from the slave-dma tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/dma/imx-sdma.c index 86708fb9bda1,af14a8d6efa8.. --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@@ -1182,8 -1189,8 +1189,8 @@@ static int sdma_request_channel0(struc { int ret = -EBUSY; - sdma->bd0 = dma_alloc_coherent(NULL, PAGE_SIZE, >bd0_phys, - sdma->bd0 = dma_zalloc_coherent(sdma->dev, PAGE_SIZE, >bd0_phys, - GFP_NOWAIT); ++ sdma->bd0 = dma_alloc_coherent(sdma->dev, PAGE_SIZE, >bd0_phys, + GFP_NOWAIT); if (!sdma->bd0) { ret = -ENOMEM; goto out; @@@ -1205,8 -1212,8 +1212,8 @@@ static int sdma_alloc_bd(struct sdma_de u32 bd_size = desc->num_bd * sizeof(struct sdma_buffer_descriptor); int ret = 0; - desc->bd = dma_alloc_coherent(NULL, bd_size, >bd_phys, - GFP_NOWAIT); - desc->bd = dma_zalloc_coherent(desc->sdmac->sdma->dev, bd_size, - >bd_phys, GFP_NOWAIT); ++ desc->bd = dma_alloc_coherent(desc->sdmac->sdma->dev, bd_size, ++>bd_phys, GFP_NOWAIT); if (!desc->bd) { ret = -ENOMEM; goto out; pgpaiItbQAyfy.pgp Description: OpenPGP digital signature
linux-next: manual merge of the slave-dma tree with Linus' tree
Hi Vinod, Today's linux-next merge of the slave-dma tree got a conflict in drivers/dma/dmatest.c between commit 632fd28326c0 ("dmatest: implement two helpers to unmap dma memory") from the tree and commit f04f98e91bd8 ("dmatest: adjust invalid module parameters for number of source buffers") from the slave-dma tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc drivers/dma/dmatest.c index 64b048d,0e2deaa..000 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@@ -228,20 -228,13 +228,27 @@@ static void dmatest_callback(void *arg wake_up_all(done->wait); } +static inline void unmap_src(struct device *dev, dma_addr_t *addr, size_t len, + unsigned int count) +{ + while (count--) + dma_unmap_single(dev, addr[count], len, DMA_TO_DEVICE); +} + +static inline void unmap_dst(struct device *dev, dma_addr_t *addr, size_t len, + unsigned int count) +{ + while (count--) + dma_unmap_single(dev, addr[count], len, DMA_BIDIRECTIONAL); +} + + static unsigned int min_odd(unsigned int x, unsigned int y) + { + unsigned int val = min(x, y); + + return val % 2 ? val : val - 1; + } + /* * This function repeatedly tests DMA transfers of various lengths and * offsets for a given operation type until it is told to exit by pgp0W2Y4ChR6N.pgp Description: PGP signature
linux-next: manual merge of the slave-dma tree with Linus' tree
Hi Vinod, Today's linux-next merge of the slave-dma tree got a conflict in drivers/dma/dmatest.c between commit 632fd28326c0 (dmatest: implement two helpers to unmap dma memory) from the tree and commit f04f98e91bd8 (dmatest: adjust invalid module parameters for number of source buffers) from the slave-dma tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwells...@canb.auug.org.au diff --cc drivers/dma/dmatest.c index 64b048d,0e2deaa..000 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@@ -228,20 -228,13 +228,27 @@@ static void dmatest_callback(void *arg wake_up_all(done-wait); } +static inline void unmap_src(struct device *dev, dma_addr_t *addr, size_t len, + unsigned int count) +{ + while (count--) + dma_unmap_single(dev, addr[count], len, DMA_TO_DEVICE); +} + +static inline void unmap_dst(struct device *dev, dma_addr_t *addr, size_t len, + unsigned int count) +{ + while (count--) + dma_unmap_single(dev, addr[count], len, DMA_BIDIRECTIONAL); +} + + static unsigned int min_odd(unsigned int x, unsigned int y) + { + unsigned int val = min(x, y); + + return val % 2 ? val : val - 1; + } + /* * This function repeatedly tests DMA transfers of various lengths and * offsets for a given operation type until it is told to exit by pgp0W2Y4ChR6N.pgp Description: PGP signature