[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202002231041.qaTNnL3s%lkp@intel.com>
Date: Sun, 23 Feb 2020 10:08:44 +0800
From: kbuild test robot <lkp@...el.com>
To: Christoph Hellwig <hch@....de>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Paul Walmsley <paul.walmsley@...ive.com>,
Anup Patel <anup@...infault.org>
Subject: drivers/gpu/drm/vgem/vgem_drv.c:392:33: error: implicit declaration
of function 'pgprot_writecombine'
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0a115e5f23b948be369faf14d3bccab283830f56
commit: 6bd33e1ece528f67646db33bf97406b747dafda0 riscv: add nommu support
date: 3 months ago
config: riscv-randconfig-a001-20200223 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6bd33e1ece528f67646db33bf97406b747dafda0
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
from include/linux/dma-buf.h:18,
from drivers/gpu/drm/vgem/vgem_drv.c:33:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
#define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
^~~~~~~~~~~
include/linux/scatterlist.h:145:18: note: in expansion of macro 'virt_to_page'
sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
^~~~~~~~~~~~
In file included from arch/riscv/include/asm/page.h:12:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/scatterlist.h:8,
from include/linux/dma-buf.h:18,
from drivers/gpu/drm/vgem/vgem_drv.c:33:
include/linux/scatterlist.h: In function 'sg_phys':
include/asm-generic/memory_model.h:55:54: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
^
include/linux/pfn.h:21:36: note: in definition of macro 'PFN_PHYS'
#define PFN_PHYS(x) ((phys_addr_t)(x) << PAGE_SHIFT)
^
arch/riscv/include/asm/page.h:115:29: note: in expansion of macro 'pfn_to_phys'
#define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
^~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: in expansion of macro '__page_to_pfn'
#define page_to_pfn __page_to_pfn
^~~~~~~~~~~~~
arch/riscv/include/asm/page.h:115:41: note: in expansion of macro 'page_to_pfn'
#define page_to_phys(page) (pfn_to_phys(page_to_pfn(page)))
^~~~~~~~~~~
include/linux/scatterlist.h:224:9: note: in expansion of macro 'page_to_phys'
return page_to_phys(sg_page(sg)) + sg->offset;
^~~~~~~~~~~~
In file included from arch/riscv/include/asm/page.h:131:0,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/scatterlist.h:8,
from include/linux/dma-buf.h:18,
from drivers/gpu/drm/vgem/vgem_drv.c:33:
include/linux/scatterlist.h: In function 'sg_page_iter_page':
include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
include/linux/mm.h:213:26: note: in expansion of macro 'pfn_to_page'
#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
^~~~~~~~~~~
include/linux/scatterlist.h:384:9: note: in expansion of macro 'nth_page'
return nth_page(sg_page(piter->sg), piter->sg_pgoffset);
^~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_single_attrs':
include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
#define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
^~~~~~~~~~~
include/linux/dma-mapping.h:587:33: note: in expansion of macro 'virt_to_page'
return dma_map_page_attrs(dev, virt_to_page(ptr), offset_in_page(ptr),
^~~~~~~~~~~~
include/linux/highmem.h: In function 'kmap_to_page':
include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'vm_mmap'?
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
#define pfn_to_page __pfn_to_page
^~~~~~~~~~~~~
arch/riscv/include/asm/page.h:112:30: note: in expansion of macro 'pfn_to_page'
#define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
^~~~~~~~~~~
include/linux/highmem.h:75:9: note: in expansion of macro 'virt_to_page'
return virt_to_page(addr);
^~~~~~~~~~~~
drivers/gpu/drm/vgem/vgem_drv.c: In function 'vgem_prime_vmap':
>> drivers/gpu/drm/vgem/vgem_drv.c:392:33: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
return vmap(pages, n_pages, 0, pgprot_writecombine(PAGE_KERNEL));
^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/vgem/vgem_drv.c:392:33: error: incompatible type for argument 4 of 'vmap'
In file included from include/asm-generic/io.h:887:0,
from arch/riscv/include/asm/io.h:148,
from include/linux/scatterlist.h:9,
from include/linux/dma-buf.h:18,
from drivers/gpu/drm/vgem/vgem_drv.c:33:
include/linux/vmalloc.h:119:14: note: expected 'pgprot_t {aka struct <anonymous>}' but argument is of type 'int'
extern void *vmap(struct page **pages, unsigned int count,
^~~~
drivers/gpu/drm/vgem/vgem_drv.c: In function 'vgem_prime_mmap':
>> drivers/gpu/drm/vgem/vgem_drv.c:421:20: error: incompatible types when assigning to type 'pgprot_t {aka struct <anonymous>}' from type 'int'
vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
^
drivers/gpu/drm/vgem/vgem_drv.c: In function 'vgem_prime_vmap':
drivers/gpu/drm/vgem/vgem_drv.c:393:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/pgprot_writecombine +392 drivers/gpu/drm/vgem/vgem_drv.c
af33a9190d0226 Laura Abbott 2017-05-04 381
e6f15b763ab2bc Chris Wilson 2016-07-11 382 static void *vgem_prime_vmap(struct drm_gem_object *obj)
e6f15b763ab2bc Chris Wilson 2016-07-11 383 {
71bb23c707c141 Chris Wilson 2017-06-22 384 struct drm_vgem_gem_object *bo = to_vgem_bo(obj);
e6f15b763ab2bc Chris Wilson 2016-07-11 385 long n_pages = obj->size >> PAGE_SHIFT;
e6f15b763ab2bc Chris Wilson 2016-07-11 386 struct page **pages;
e6f15b763ab2bc Chris Wilson 2016-07-11 387
71bb23c707c141 Chris Wilson 2017-06-22 388 pages = vgem_pin_pages(bo);
e6f15b763ab2bc Chris Wilson 2016-07-11 389 if (IS_ERR(pages))
e6f15b763ab2bc Chris Wilson 2016-07-11 390 return NULL;
e6f15b763ab2bc Chris Wilson 2016-07-11 391
71bb23c707c141 Chris Wilson 2017-06-22 @392 return vmap(pages, n_pages, 0, pgprot_writecombine(PAGE_KERNEL));
e6f15b763ab2bc Chris Wilson 2016-07-11 393 }
e6f15b763ab2bc Chris Wilson 2016-07-11 394
e6f15b763ab2bc Chris Wilson 2016-07-11 395 static void vgem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
e6f15b763ab2bc Chris Wilson 2016-07-11 396 {
71bb23c707c141 Chris Wilson 2017-06-22 397 struct drm_vgem_gem_object *bo = to_vgem_bo(obj);
71bb23c707c141 Chris Wilson 2017-06-22 398
e6f15b763ab2bc Chris Wilson 2016-07-11 399 vunmap(vaddr);
71bb23c707c141 Chris Wilson 2017-06-22 400 vgem_unpin_pages(bo);
e6f15b763ab2bc Chris Wilson 2016-07-11 401 }
e6f15b763ab2bc Chris Wilson 2016-07-11 402
e6f15b763ab2bc Chris Wilson 2016-07-11 403 static int vgem_prime_mmap(struct drm_gem_object *obj,
e6f15b763ab2bc Chris Wilson 2016-07-11 404 struct vm_area_struct *vma)
e6f15b763ab2bc Chris Wilson 2016-07-11 405 {
e6f15b763ab2bc Chris Wilson 2016-07-11 406 int ret;
e6f15b763ab2bc Chris Wilson 2016-07-11 407
e6f15b763ab2bc Chris Wilson 2016-07-11 408 if (obj->size < vma->vm_end - vma->vm_start)
e6f15b763ab2bc Chris Wilson 2016-07-11 409 return -EINVAL;
e6f15b763ab2bc Chris Wilson 2016-07-11 410
e6f15b763ab2bc Chris Wilson 2016-07-11 411 if (!obj->filp)
e6f15b763ab2bc Chris Wilson 2016-07-11 412 return -ENODEV;
e6f15b763ab2bc Chris Wilson 2016-07-11 413
f74ac01520c9f6 Miklos Szeredi 2017-02-20 414 ret = call_mmap(obj->filp, vma);
e6f15b763ab2bc Chris Wilson 2016-07-11 415 if (ret)
e6f15b763ab2bc Chris Wilson 2016-07-11 416 return ret;
e6f15b763ab2bc Chris Wilson 2016-07-11 417
e6f15b763ab2bc Chris Wilson 2016-07-11 418 fput(vma->vm_file);
e6f15b763ab2bc Chris Wilson 2016-07-11 419 vma->vm_file = get_file(obj->filp);
e6f15b763ab2bc Chris Wilson 2016-07-11 420 vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
e6f15b763ab2bc Chris Wilson 2016-07-11 @421 vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
e6f15b763ab2bc Chris Wilson 2016-07-11 422
e6f15b763ab2bc Chris Wilson 2016-07-11 423 return 0;
e6f15b763ab2bc Chris Wilson 2016-07-11 424 }
e6f15b763ab2bc Chris Wilson 2016-07-11 425
:::::: The code at line 392 was first introduced by commit
:::::: 71bb23c707c141b176bc084179ca5ee58d5fd26a drm/vgem: Pin our pages for dmabuf exports
:::::: TO: Chris Wilson <chris@...is-wilson.co.uk>
:::::: CC: Daniel Vetter <daniel.vetter@...ll.ch>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (26558 bytes)
Powered by blists - more mailing lists