From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC][PATCH 2/2] dma-heap: Add a system-uncached heap
Date: Wed, 29 Jul 2020 18:42:26 +0800 [thread overview]
Message-ID: <202007291834.qmLiGKrf%lkp@intel.com> (raw)
In-Reply-To: <20200729051632.66040-2-john.stultz@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 4931 bytes --]
Hi John,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linux/master]
[also build test ERROR on tegra-drm/drm/tegra/for-next linus/master v5.8-rc7 next-20200728]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/John-Stultz/dma-heap-Keep-track-of-the-heap-device-struct/20200729-131809
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6ba1b005ffc388c2aeaddae20da29e4810dea298
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/dma-buf/heaps/system_uncached_heap.c: In function 'dma_heap_do_vmap':
>> drivers/dma-buf/heaps/system_uncached_heap.c:175:24: error: implicit declaration of function 'vmalloc'; did you mean 'kmalloc'? [-Werror=implicit-function-declaration]
175 | struct page **pages = vmalloc(sizeof(struct page *) * npages);
| ^~~~~~~
| kmalloc
>> drivers/dma-buf/heaps/system_uncached_heap.c:175:24: warning: initialization of 'struct page **' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> drivers/dma-buf/heaps/system_uncached_heap.c:195:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
195 | vaddr = vmap(pages, npages, VM_MAP, pgprot);
| ^~~~
| kmap
>> drivers/dma-buf/heaps/system_uncached_heap.c:195:30: error: 'VM_MAP' undeclared (first use in this function)
195 | vaddr = vmap(pages, npages, VM_MAP, pgprot);
| ^~~~~~
drivers/dma-buf/heaps/system_uncached_heap.c:195:30: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/dma-buf/heaps/system_uncached_heap.c:196:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]
196 | vfree(pages);
| ^~~~~
| kfree
drivers/dma-buf/heaps/system_uncached_heap.c: In function 'dma_heap_buffer_vmap_put':
>> drivers/dma-buf/heaps/system_uncached_heap.c:225:3: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration]
225 | vunmap(buffer->vaddr);
| ^~~~~~
| kunmap
cc1: some warnings being treated as errors
vim +175 drivers/dma-buf/heaps/system_uncached_heap.c
170
171 static void *dma_heap_do_vmap(struct uncached_heap_buffer *buffer)
172 {
173 struct sg_table *table = &buffer->sg_table;
174 int npages = PAGE_ALIGN(buffer->len) / PAGE_SIZE;
> 175 struct page **pages = vmalloc(sizeof(struct page *) * npages);
176 struct page **tmp = pages;
177 struct scatterlist *sg;
178 pgprot_t pgprot;
179 void *vaddr;
180 int i, j;
181
182 if (!pages)
183 return ERR_PTR(-ENOMEM);
184
185 pgprot = pgprot_writecombine(PAGE_KERNEL);
186
187 for_each_sg(table->sgl, sg, table->nents, i) {
188 int npages_this_entry = PAGE_ALIGN(sg->length) / PAGE_SIZE;
189 struct page *page = sg_page(sg);
190
191 WARN_ON(i >= npages);
192 for (j = 0; j < npages_this_entry; j++)
193 *(tmp++) = page++;
194 }
> 195 vaddr = vmap(pages, npages, VM_MAP, pgprot);
> 196 vfree(pages);
197
198 if (!vaddr)
199 return ERR_PTR(-ENOMEM);
200
201 return vaddr;
202 }
203
204 static void *dma_heap_buffer_vmap_get(struct uncached_heap_buffer *buffer)
205 {
206 void *vaddr;
207
208 if (buffer->vmap_cnt) {
209 buffer->vmap_cnt++;
210 return buffer->vaddr;
211 }
212
213 vaddr = dma_heap_do_vmap(buffer);
214 if (IS_ERR(vaddr))
215 return vaddr;
216
217 buffer->vaddr = vaddr;
218 buffer->vmap_cnt++;
219 return vaddr;
220 }
221
222 static void dma_heap_buffer_vmap_put(struct uncached_heap_buffer *buffer)
223 {
224 if (!--buffer->vmap_cnt) {
> 225 vunmap(buffer->vaddr);
226 buffer->vaddr = NULL;
227 }
228 }
229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 55780 bytes --]
next prev parent reply other threads:[~2020-07-29 10:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 5:16 [RFC][PATCH 1/2] dma-heap: Keep track of the heap device struct John Stultz
2020-07-29 5:16 ` John Stultz
2020-07-29 5:16 ` [RFC][PATCH 2/2] dma-heap: Add a system-uncached heap John Stultz
2020-07-29 5:16 ` John Stultz
2020-07-29 10:42 ` kernel test robot [this message]
2020-08-03 11:06 ` Robin Murphy
2020-08-03 11:06 ` Robin Murphy
2020-08-14 5:59 ` John Stultz
2020-08-14 5:59 ` John Stultz
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=202007291834.qmLiGKrf%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.