All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:5.10/yocto 1743/8000] drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'?
@ 2021-04-21 16:37 kernel test robot
  2021-04-22  4:33 ` John Stultz
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-04-21 16:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3994 bytes --]

Hi John,

FYI, the error/warning still remains.

tree:   https://github.com/intel/linux-intel-lts.git 5.10/yocto
head:   7b21704e4fac30fcc2b7458234f03bdfc67b31b9
commit: f853204a169c95e2c5cb469c4528aeec6b1b59a2 [1743/8000] dma-buf: heaps: Move heap-helper logic into the cma_heap implementation
config: mips-randconfig-r016-20210421 (attached as .config)
compiler: mips64el-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
        # https://github.com/intel/linux-intel-lts/commit/f853204a169c95e2c5cb469c4528aeec6b1b59a2
        git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-linux-intel-lts 5.10/yocto
        git checkout f853204a169c95e2c5cb469c4528aeec6b1b59a2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/dma-buf/heaps/cma_heap.c: In function 'cma_heap_do_vmap':
>> drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
     185 |  vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
         |          ^~~~
         |          kmap
>> drivers/dma-buf/heaps/cma_heap.c:185:49: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
     185 |  vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
         |                                                 ^~~~~~
         |                                                 VM_MTE
   drivers/dma-buf/heaps/cma_heap.c:185:49: note: each undeclared identifier is reported only once for each function it appears in
   drivers/dma-buf/heaps/cma_heap.c: In function 'cma_heap_vunmap':
>> drivers/dma-buf/heaps/cma_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 +185 drivers/dma-buf/heaps/cma_heap.c

   180	
   181	static void *cma_heap_do_vmap(struct cma_heap_buffer *buffer)
   182	{
   183		void *vaddr;
   184	
 > 185		vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
   186		if (!vaddr)
   187			return ERR_PTR(-ENOMEM);
   188	
   189		return vaddr;
   190	}
   191	
   192	static int cma_heap_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
   193	{
   194		struct cma_heap_buffer *buffer = dmabuf->priv;
   195		void *vaddr;
   196		int ret = 0;
   197	
   198		mutex_lock(&buffer->lock);
   199		if (buffer->vmap_cnt) {
   200			buffer->vmap_cnt++;
   201			dma_buf_map_set_vaddr(map, buffer->vaddr);
   202			goto out;
   203		}
   204	
   205		vaddr = cma_heap_do_vmap(buffer);
   206		if (IS_ERR(vaddr)) {
   207			ret = PTR_ERR(vaddr);
   208			goto out;
   209		}
   210		buffer->vaddr = vaddr;
   211		buffer->vmap_cnt++;
   212		dma_buf_map_set_vaddr(map, buffer->vaddr);
   213	out:
   214		mutex_unlock(&buffer->lock);
   215	
   216		return ret;
   217	}
   218	
   219	static void cma_heap_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
   220	{
   221		struct cma_heap_buffer *buffer = dmabuf->priv;
   222	
   223		mutex_lock(&buffer->lock);
   224		if (!--buffer->vmap_cnt) {
 > 225			vunmap(buffer->vaddr);
   226			buffer->vaddr = NULL;
   227		}
   228		mutex_unlock(&buffer->lock);
   229		dma_buf_map_clear(map);
   230	}
   231	

---
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: 34152 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [intel-linux-intel-lts:5.10/yocto 1743/8000] drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'?
  2021-04-21 16:37 [intel-linux-intel-lts:5.10/yocto 1743/8000] drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? kernel test robot
@ 2021-04-22  4:33 ` John Stultz
  0 siblings, 0 replies; 2+ messages in thread
From: John Stultz @ 2021-04-22  4:33 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3034 bytes --]

On Wed, Apr 21, 2021 at 9:37 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi John,
>
> FYI, the error/warning still remains.
>
> tree:   https://github.com/intel/linux-intel-lts.git 5.10/yocto
> head:   7b21704e4fac30fcc2b7458234f03bdfc67b31b9
> commit: f853204a169c95e2c5cb469c4528aeec6b1b59a2 [1743/8000] dma-buf: heaps: Move heap-helper logic into the cma_heap implementation
> config: mips-randconfig-r016-20210421 (attached as .config)
> compiler: mips64el-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
>         # https://github.com/intel/linux-intel-lts/commit/f853204a169c95e2c5cb469c4528aeec6b1b59a2
>         git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
>         git fetch --no-tags intel-linux-intel-lts 5.10/yocto
>         git checkout f853204a169c95e2c5cb469c4528aeec6b1b59a2
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>    drivers/dma-buf/heaps/cma_heap.c: In function 'cma_heap_do_vmap':
> >> drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
>      185 |  vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
>          |          ^~~~
>          |          kmap
> >> drivers/dma-buf/heaps/cma_heap.c:185:49: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
>      185 |  vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
>          |                                                 ^~~~~~
>          |                                                 VM_MTE
>    drivers/dma-buf/heaps/cma_heap.c:185:49: note: each undeclared identifier is reported only once for each function it appears in
>    drivers/dma-buf/heaps/cma_heap.c: In function 'cma_heap_vunmap':
> >> drivers/dma-buf/heaps/cma_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
>
>

So this was confusing me, as the fix for this should be commit
8075c3005e4b1 ("dma-buf: cma_heap: Include linux/vmalloc.h to fix
build failures on MIPS") upstream.

But that change was needed to fix a5d2d29e24be ("dma-buf: heaps: Move
heap-helper logic into the cma_heap implementation"), which isn't in
5.10.

I realize that the yocto tree has backported that change and others,
but apparently missed 8075c3005e4b1?

So I'd suggest cherry-picking that for your tree?

thanks
-john

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-22  4:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 16:37 [intel-linux-intel-lts:5.10/yocto 1743/8000] drivers/dma-buf/heaps/cma_heap.c:185:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? kernel test robot
2021-04-22  4:33 ` John Stultz

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.