From: Vinod Koul <vinod.koul@intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Stefan Roese <sr@denx.de>, Dave Jiang <dave.jiang@intel.com>
Subject: Re: linux-next: build failure after merge of the slave-dma tree
Date: Tue, 22 Aug 2017 22:09:00 +0530 [thread overview]
Message-ID: <20170822163859.GA3053@localhost> (raw)
In-Reply-To: <20170822153654.6455c8df@canb.auug.org.au>
On Tue, Aug 22, 2017 at 03:36:54PM +1000, Stephen Rothwell wrote:
> Hi Vinod,
>
> After merging the slave-dma tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> In file included from drivers/dma/dmaengine.h:9:0,
> from drivers/dma/altera-msgdma.c:27:
> drivers/dma/altera-msgdma.c: In function 'msgdma_probe':
> drivers/dma/altera-msgdma.c:946:14: error: 'DMA_SG' undeclared (first use in this function)
> dma_cap_set(DMA_SG, dma_dev->cap_mask);
> ^
> include/linux/dmaengine.h:1197:46: note: in definition of macro 'dma_cap_set'
> #define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask))
> ^
> drivers/dma/altera-msgdma.c:946:14: note: each undeclared identifier is reported only once for each function it appears in
> dma_cap_set(DMA_SG, dma_dev->cap_mask);
> ^
> include/linux/dmaengine.h:1197:46: note: in definition of macro 'dma_cap_set'
> #define dma_cap_set(tx, mask) __dma_cap_set((tx), &(mask))
> ^
> drivers/dma/altera-msgdma.c:965:9: error: 'struct dma_device' has no member named 'device_prep_dma_sg'
> dma_dev->device_prep_dma_sg = msgdma_prep_sg;
> ^
>
> Caused by commit
>
> a85c6f1b2921 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core")
>
> interacting with commit
>
> c678fa66341c ("dmaengine: remove DMA_SG as it is dead code in kernel")
>
> This should have been fixed up in the merge commit
>
> 0a0ab6497093 ("Merge branch 'topic/dmatest' into next")
>
> I have used the slave-dma tree from next-20170817 for today.
Thanks Stephen for reporting, I have fixed it up by removed DMA_SG from this
driver with belo patch
-- >8 --
From: Vinod Koul <vinod.koul@intel.com>
Date: Tue, 22 Aug 2017 22:03:43 +0530
Subject: [PATCH] dmaengine: altera: remove DMA_SG
Commit c678fa66341c: ("dmaengine: remove DMA_SG as it is dead code in
kernel") removes DMA_SG from dmaengine subsystem but missed the newly added
driver, so remove it from here as well
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
drivers/dma/altera-msgdma.c | 94 ---------------------------------------------
1 file changed, 94 deletions(-)
diff --git a/drivers/dma/altera-msgdma.c b/drivers/dma/altera-msgdma.c
index 33b87b413793..75208b43d137 100644
--- a/drivers/dma/altera-msgdma.c
+++ b/drivers/dma/altera-msgdma.c
@@ -386,98 +386,6 @@ msgdma_prep_memcpy(struct dma_chan *dchan, dma_addr_t dma_dst,
}
/**
- * msgdma_prep_sg - prepare descriptors for a memory sg transaction
- * @dchan: DMA channel
- * @dst_sg: Destination scatter list
- * @dst_sg_len: Number of entries in destination scatter list
- * @src_sg: Source scatter list
- * @src_sg_len: Number of entries in source scatter list
- * @flags: transfer ack flags
- *
- * Return: Async transaction descriptor on success and NULL on failure
- */
-static struct dma_async_tx_descriptor *
-msgdma_prep_sg(struct dma_chan *dchan, struct scatterlist *dst_sg,
- unsigned int dst_sg_len, struct scatterlist *src_sg,
- unsigned int src_sg_len, unsigned long flags)
-{
- struct msgdma_device *mdev = to_mdev(dchan);
- struct msgdma_sw_desc *new, *first = NULL;
- void *desc = NULL;
- size_t len, dst_avail, src_avail;
- dma_addr_t dma_dst, dma_src;
- u32 desc_cnt = 0, i;
- struct scatterlist *sg;
-
- for_each_sg(src_sg, sg, src_sg_len, i)
- desc_cnt += DIV_ROUND_UP(sg_dma_len(sg), MSGDMA_MAX_TRANS_LEN);
-
- spin_lock_bh(&mdev->lock);
- if (desc_cnt > mdev->desc_free_cnt) {
- spin_unlock_bh(&mdev->lock);
- dev_dbg(mdev->dev, "mdev %p descs are not available\n", mdev);
- return NULL;
- }
- mdev->desc_free_cnt -= desc_cnt;
- spin_unlock_bh(&mdev->lock);
-
- dst_avail = sg_dma_len(dst_sg);
- src_avail = sg_dma_len(src_sg);
-
- /* Run until we are out of scatterlist entries */
- while (true) {
- /* Allocate and populate the descriptor */
- new = msgdma_get_descriptor(mdev);
-
- desc = &new->hw_desc;
- len = min_t(size_t, src_avail, dst_avail);
- len = min_t(size_t, len, MSGDMA_MAX_TRANS_LEN);
- if (len == 0)
- goto fetch;
- dma_dst = sg_dma_address(dst_sg) + sg_dma_len(dst_sg) -
- dst_avail;
- dma_src = sg_dma_address(src_sg) + sg_dma_len(src_sg) -
- src_avail;
-
- msgdma_desc_config(desc, dma_dst, dma_src, len,
- MSGDMA_DESC_STRIDE_RW);
- dst_avail -= len;
- src_avail -= len;
-
- if (!first)
- first = new;
- else
- list_add_tail(&new->node, &first->tx_list);
-fetch:
- /* Fetch the next dst scatterlist entry */
- if (dst_avail == 0) {
- if (dst_sg_len == 0)
- break;
- dst_sg = sg_next(dst_sg);
- if (dst_sg == NULL)
- break;
- dst_sg_len--;
- dst_avail = sg_dma_len(dst_sg);
- }
- /* Fetch the next src scatterlist entry */
- if (src_avail == 0) {
- if (src_sg_len == 0)
- break;
- src_sg = sg_next(src_sg);
- if (src_sg == NULL)
- break;
- src_sg_len--;
- src_avail = sg_dma_len(src_sg);
- }
- }
-
- msgdma_desc_config_eod(desc);
- first->async_tx.flags = flags;
-
- return &first->async_tx;
-}
-
-/**
* msgdma_prep_slave_sg - prepare descriptors for a slave sg transaction
*
* @dchan: DMA channel
@@ -943,7 +851,6 @@ static int msgdma_probe(struct platform_device *pdev)
/* Set DMA capabilities */
dma_cap_zero(dma_dev->cap_mask);
dma_cap_set(DMA_MEMCPY, dma_dev->cap_mask);
- dma_cap_set(DMA_SG, dma_dev->cap_mask);
dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);
dma_dev->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
@@ -962,7 +869,6 @@ static int msgdma_probe(struct platform_device *pdev)
dma_dev->copy_align = DMAENGINE_ALIGN_4_BYTES;
dma_dev->device_prep_dma_memcpy = msgdma_prep_memcpy;
- dma_dev->device_prep_dma_sg = msgdma_prep_sg;
dma_dev->device_prep_slave_sg = msgdma_prep_slave_sg;
dma_dev->device_config = msgdma_dma_config;
--
2.7.4
--
~Vinod
next prev parent reply other threads:[~2017-08-22 16:35 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 5:36 linux-next: build failure after merge of the slave-dma tree Stephen Rothwell
2017-08-22 16:39 ` Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-07-04 7:31 Stephen Rothwell
2019-07-06 13:43 ` Robin Gong
2019-07-06 14:43 ` Vinod Koul
2019-07-08 2:01 ` Robin Gong
2019-07-08 4:09 ` Vinod Koul
2019-07-08 1:22 ` Robin Gong
2019-07-08 3:06 ` zhangfei
2019-07-08 4:17 ` Vinod Koul
2019-07-08 4:54 ` Robin Gong
2019-07-08 4:48 ` Robin Gong
2018-10-04 5:44 Stephen Rothwell
2018-10-04 6:13 ` Vinod
2016-09-16 3:18 Stephen Rothwell
2016-09-16 8:34 ` Peter Griffin
2016-09-19 16:38 ` Vinod Koul
2015-10-15 0:51 Stephen Rothwell
2015-10-15 3:35 ` Koul, Vinod
2015-10-15 3:35 ` Koul, Vinod
2015-10-15 3:51 ` Stephen Rothwell
2015-10-15 14:07 ` Arnd Bergmann
2015-10-15 14:27 ` Stephen Rothwell
2015-08-06 2:22 Stephen Rothwell
2015-08-06 3:00 ` Vinod Koul
2015-08-24 6:53 ` Maxime Ripard
2015-08-24 8:11 ` Vinod Koul
2015-08-24 9:21 ` Maxime Ripard
2015-02-16 1:09 Stephen Rothwell
2015-02-16 1:48 ` Yibin Gong
2015-02-16 1:48 ` Yibin Gong
2015-02-16 4:06 ` Vinod Koul
2014-12-09 3:48 Stephen Rothwell
2014-12-09 4:47 ` Vinod Koul
2014-11-10 0:58 Stephen Rothwell
2014-11-10 5:06 ` Vinod Koul
2014-11-12 13:23 ` Ludovic Desroches
2014-11-12 13:23 ` Ludovic Desroches
2014-09-12 3:17 Stephen Rothwell
2014-09-15 9:51 ` Geert Uytterhoeven
2014-07-28 2:18 Stephen Rothwell
2014-07-28 7:16 ` Vinod Koul
2014-07-28 11:56 ` Maxime Ripard
2013-04-02 1:57 Stephen Rothwell
2013-04-02 1:38 ` Vinod Koul
2013-01-07 0:26 Stephen Rothwell
2013-01-07 14:00 ` Vinod Koul
2012-06-22 3:00 Stephen Rothwell
2012-06-22 5:01 ` Vinod Koul
2012-06-25 1:21 ` Zhangfei Gao
2012-03-27 0:52 Stephen Rothwell
2012-03-27 8:33 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170822163859.GA3053@localhost \
--to=vinod.koul@intel.com \
--cc=dave.jiang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=sr@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.