From: kbuild test robot <lkp@intel.com>
To: Green Wan <green.wan@sifive.com>
Cc: kbuild-all@01.org, linux-hackers@sifive.com,
Green Wan <green.wan@sifive.com>,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vkoul@kernel.org>, Palmer Dabbelt <palmer@sifive.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/3] dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00
Date: Tue, 17 Sep 2019 18:04:13 +0800 [thread overview]
Message-ID: <201909171742.nhNFxjIC%lkp@intel.com> (raw)
In-Reply-To: <20190917062510.886-1-green.wan@sifive.com>
[-- Attachment #1: Type: text/plain, Size: 5930 bytes --]
Hi Green,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190916]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Green-Wan/dmaengine-sf-pdma-Add-platform-dma-driver/20190917-142826
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_fill_desc':
>> drivers/dma/sf-pdma/sf-pdma.c:80:2: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
writeq(size, regs->xfer_size);
^~~~~~
writel
drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_desc_residue':
>> drivers/dma/sf-pdma/sf-pdma.c:188:12: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
residue = readq(regs->residue);
^~~~~
readl
drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_free_desc':
drivers/dma/sf-pdma/sf-pdma.c:308:16: warning: unused variable 'flags' [-Wunused-variable]
unsigned long flags;
^~~~~
cc1: some warnings being treated as errors
vim +80 drivers/dma/sf-pdma/sf-pdma.c
71
72 static void sf_pdma_fill_desc(struct sf_pdma_chan *chan,
73 u64 dst,
74 u64 src,
75 u64 size)
76 {
77 struct pdma_regs *regs = &chan->regs;
78
79 writel(PDMA_FULL_SPEED, regs->xfer_type);
> 80 writeq(size, regs->xfer_size);
81 writeq(dst, regs->dst_addr);
82 writeq(src, regs->src_addr);
83 }
84
85 void sf_pdma_disclaim_chan(struct sf_pdma_chan *chan)
86 {
87 struct pdma_regs *regs = &chan->regs;
88
89 writel(PDMA_CLEAR_CTRL, regs->ctrl);
90 }
91
92 struct dma_async_tx_descriptor *
93 sf_pdma_prep_dma_memcpy(struct dma_chan *dchan,
94 dma_addr_t dest,
95 dma_addr_t src,
96 size_t len,
97 unsigned long flags)
98 {
99 struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
100 struct sf_pdma_desc *desc;
101
102 if (!chan || !len || !dest || !src) {
103 pr_debug("%s: Please check dma len, dest, src!\n", __func__);
104 return NULL;
105 }
106
107 desc = sf_pdma_alloc_desc(chan);
108 if (!desc)
109 return NULL;
110
111 desc->in_use = true;
112 desc->dirn = DMA_MEM_TO_MEM;
113 desc->async_tx = vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
114
115 spin_lock_irqsave(&chan->lock, flags);
116 chan->desc = desc;
117 sf_pdma_fill_desc(desc->chan, dest, src, len);
118 spin_unlock_irqrestore(&chan->lock, flags);
119
120 return desc->async_tx;
121 }
122
123 static void sf_pdma_unprep_slave_dma(struct sf_pdma_chan *chan)
124 {
125 if (chan->dma_dir != DMA_NONE)
126 dma_unmap_resource(chan->vchan.chan.device->dev,
127 chan->dma_dev_addr,
128 chan->dma_dev_size,
129 chan->dma_dir, 0);
130 chan->dma_dir = DMA_NONE;
131 }
132
133 static int sf_pdma_slave_config(struct dma_chan *dchan,
134 struct dma_slave_config *cfg)
135 {
136 struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
137
138 memcpy(&chan->cfg, cfg, sizeof(*cfg));
139 sf_pdma_unprep_slave_dma(chan);
140
141 return 0;
142 }
143
144 static int sf_pdma_alloc_chan_resources(struct dma_chan *dchan)
145 {
146 struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
147 struct pdma_regs *regs = &chan->regs;
148
149 dma_cookie_init(dchan);
150 writel(PDMA_CLAIM_MASK, regs->ctrl);
151
152 return 0;
153 }
154
155 static void sf_pdma_disable_request(struct sf_pdma_chan *chan)
156 {
157 struct pdma_regs *regs = &chan->regs;
158
159 writel(readl(regs->ctrl) & ~PDMA_RUN_MASK, regs->ctrl);
160 }
161
162 static void sf_pdma_free_chan_resources(struct dma_chan *dchan)
163 {
164 struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);
165 unsigned long flags;
166 LIST_HEAD(head);
167
168 spin_lock_irqsave(&chan->vchan.lock, flags);
169 sf_pdma_disable_request(chan);
170 kfree(chan->desc);
171 chan->desc = NULL;
172 vchan_get_all_descriptors(&chan->vchan, &head);
173 sf_pdma_unprep_slave_dma(chan);
174 vchan_dma_desc_free_list(&chan->vchan, &head);
175 sf_pdma_disclaim_chan(chan);
176 spin_unlock_irqrestore(&chan->vchan.lock, flags);
177 }
178
179 static size_t sf_pdma_desc_residue(struct sf_pdma_chan *chan,
180 dma_cookie_t cookie)
181 {
182 struct virt_dma_desc *vd = NULL;
183 struct sf_pdma_desc *desc;
184 struct pdma_regs *regs = &chan->regs;
185 unsigned long flags;
186 u64 residue;
187
> 188 residue = readq(regs->residue);
189
190 chan->status = residue ? DMA_IN_PROGRESS : DMA_COMPLETE;
191
192 spin_lock_irqsave(&chan->vchan.lock, flags);
193 vd = vchan_find_desc(&chan->vchan, cookie);
194 if (!vd)
195 goto out;
196
197 desc = to_sf_pdma_desc(vd);
198
199 spin_unlock_irqrestore(&chan->vchan.lock, flags);
200
201 if (desc && chan->status == DMA_COMPLETE)
202 vchan_tx_desc_free(desc->async_tx);
203
204 return residue;
205
206 out:
207 spin_unlock_irqrestore(&chan->vchan.lock, flags);
208 return residue;
209 }
210
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69595 bytes --]
next prev parent reply other threads:[~2019-09-17 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 6:24 [PATCH 3/3] dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00 Green Wan
2019-09-17 10:04 ` kbuild test robot [this message]
2019-09-17 12:17 ` kbuild test robot
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=201909171742.nhNFxjIC%lkp@intel.com \
--to=lkp@intel.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=green.wan@sifive.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-hackers@sifive.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mchehab+samsung@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=palmer@sifive.com \
--cc=paul.walmsley@sifive.com \
--cc=paulmck@linux.ibm.com \
--cc=vkoul@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox