linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean
@ 2020-06-07 17:32 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-06-07 17:32 UTC (permalink / raw)
  To: Hans de Goede; +Cc: kbuild-all, linux-kernel, Noralf Trønnes

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

Hi Hans,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3b69e8b4571125bec1f77f886174fe6cab6b9d75
commit: e4f86e43716443e934d705952902d40de0fa9a05 drm: Add Grain Media GM12U320 driver v2
date:   11 months ago
config: m68k-randconfig-r011-20200607 (attached as .config)
compiler: m68k-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
        git checkout e4f86e43716443e934d705952902d40de0fa9a05
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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 >>, old ones prefixed by <<):

drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean 'dma_free_writecombine'? [-Werror=implicit-function-declaration]
260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
|                 ^~~~~~~~~~~~~~~~~~~
|                 dma_free_writecombine
drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: incompatible type for argument 4 of 'vmap'
260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
|                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|                 |
|                 int
In file included from include/asm-generic/io.h:887,
from arch/m68k/include/asm/io.h:11,
from arch/m68k/include/asm/pgtable_no.h:14,
from arch/m68k/include/asm/pgtable.h:3,
from include/linux/mm.h:99,
from include/linux/scatterlist.h:8,
from include/linux/dma-buf.h:29,
from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
include/linux/vmalloc.h:109:14: note: expected 'pgprot_t' {aka 'struct <anonymous>'} but argument is of type 'int'
109 | extern void *vmap(struct page **pages, unsigned int count,
|              ^~~~
cc1: some warnings being treated as errors

vim +260 drivers/gpu/drm/drm_gem_shmem_helper.c

2194a63a818db7 Noralf Trønnes  2019-03-12  243  
2194a63a818db7 Noralf Trønnes  2019-03-12  244  static void *drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem)
2194a63a818db7 Noralf Trønnes  2019-03-12  245  {
2194a63a818db7 Noralf Trønnes  2019-03-12  246  	struct drm_gem_object *obj = &shmem->base;
2194a63a818db7 Noralf Trønnes  2019-03-12  247  	int ret;
2194a63a818db7 Noralf Trønnes  2019-03-12  248  
2194a63a818db7 Noralf Trønnes  2019-03-12  249  	if (shmem->vmap_use_count++ > 0)
2194a63a818db7 Noralf Trønnes  2019-03-12  250  		return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  251  
2194a63a818db7 Noralf Trønnes  2019-03-12  252  	ret = drm_gem_shmem_get_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  253  	if (ret)
2194a63a818db7 Noralf Trønnes  2019-03-12  254  		goto err_zero_use;
2194a63a818db7 Noralf Trønnes  2019-03-12  255  
2194a63a818db7 Noralf Trønnes  2019-03-12  256  	if (obj->import_attach)
2194a63a818db7 Noralf Trønnes  2019-03-12  257  		shmem->vaddr = dma_buf_vmap(obj->import_attach->dmabuf);
2194a63a818db7 Noralf Trønnes  2019-03-12  258  	else
be7d9f05c53e6f Boris Brezillon 2019-05-29  259  		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
be7d9f05c53e6f Boris Brezillon 2019-05-29 @260  				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
2194a63a818db7 Noralf Trønnes  2019-03-12  261  
2194a63a818db7 Noralf Trønnes  2019-03-12  262  	if (!shmem->vaddr) {
2194a63a818db7 Noralf Trønnes  2019-03-12  263  		DRM_DEBUG_KMS("Failed to vmap pages\n");
2194a63a818db7 Noralf Trønnes  2019-03-12  264  		ret = -ENOMEM;
2194a63a818db7 Noralf Trønnes  2019-03-12  265  		goto err_put_pages;
2194a63a818db7 Noralf Trønnes  2019-03-12  266  	}
2194a63a818db7 Noralf Trønnes  2019-03-12  267  
2194a63a818db7 Noralf Trønnes  2019-03-12  268  	return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  269  
2194a63a818db7 Noralf Trønnes  2019-03-12  270  err_put_pages:
2194a63a818db7 Noralf Trønnes  2019-03-12  271  	drm_gem_shmem_put_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  272  err_zero_use:
2194a63a818db7 Noralf Trønnes  2019-03-12  273  	shmem->vmap_use_count = 0;
2194a63a818db7 Noralf Trønnes  2019-03-12  274  
2194a63a818db7 Noralf Trønnes  2019-03-12  275  	return ERR_PTR(ret);
2194a63a818db7 Noralf Trønnes  2019-03-12  276  }
2194a63a818db7 Noralf Trønnes  2019-03-12  277  

:::::: The code at line 260 was first introduced by commit
:::::: be7d9f05c53e6fc88525f8e55cf2dae937761799 drm/gem_shmem: Use a writecombine mapping for ->vaddr

:::::: TO: Boris Brezillon <boris.brezillon@collabora.com>
:::::: CC: Rob Herring <robh@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26028 bytes --]

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

* drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean
@ 2020-07-11  5:25 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-07-11  5:25 UTC (permalink / raw)
  To: Hans de Goede; +Cc: kbuild-all, linux-kernel, Noralf Trønnes

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

Hi Hans,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   aa0c9086b40c17a7ad94425b3b70dd1fdd7497bf
commit: e4f86e43716443e934d705952902d40de0fa9a05 drm: Add Grain Media GM12U320 driver v2
date:   12 months ago
config: m68k-randconfig-r002-20200710 (attached as .config)
compiler: m68k-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
        git checkout e4f86e43716443e934d705952902d40de0fa9a05
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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 >>):

   In file included from include/linux/file.h:9,
                    from include/linux/dma-buf.h:27,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean 'dma_free_writecombine'? [-Werror=implicit-function-declaration]
     260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~
         |                 dma_free_writecombine
   drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: incompatible type for argument 4 of 'vmap'
     260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 |
         |                 int
   In file included from include/asm-generic/io.h:887,
                    from arch/m68k/include/asm/io.h:11,
                    from arch/m68k/include/asm/pgtable_no.h:14,
                    from arch/m68k/include/asm/pgtable.h:3,
                    from include/linux/mm.h:99,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-buf.h:29,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/vmalloc.h:109:14: note: expected 'pgprot_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     109 | extern void *vmap(struct page **pages, unsigned int count,
         |              ^~~~
   cc1: some warnings being treated as errors

vim +260 drivers/gpu/drm/drm_gem_shmem_helper.c

2194a63a818db7 Noralf Trønnes  2019-03-12  243  
2194a63a818db7 Noralf Trønnes  2019-03-12  244  static void *drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem)
2194a63a818db7 Noralf Trønnes  2019-03-12  245  {
2194a63a818db7 Noralf Trønnes  2019-03-12  246  	struct drm_gem_object *obj = &shmem->base;
2194a63a818db7 Noralf Trønnes  2019-03-12  247  	int ret;
2194a63a818db7 Noralf Trønnes  2019-03-12  248  
2194a63a818db7 Noralf Trønnes  2019-03-12  249  	if (shmem->vmap_use_count++ > 0)
2194a63a818db7 Noralf Trønnes  2019-03-12  250  		return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  251  
2194a63a818db7 Noralf Trønnes  2019-03-12  252  	ret = drm_gem_shmem_get_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  253  	if (ret)
2194a63a818db7 Noralf Trønnes  2019-03-12  254  		goto err_zero_use;
2194a63a818db7 Noralf Trønnes  2019-03-12  255  
2194a63a818db7 Noralf Trønnes  2019-03-12  256  	if (obj->import_attach)
2194a63a818db7 Noralf Trønnes  2019-03-12  257  		shmem->vaddr = dma_buf_vmap(obj->import_attach->dmabuf);
2194a63a818db7 Noralf Trønnes  2019-03-12  258  	else
be7d9f05c53e6f Boris Brezillon 2019-05-29  259  		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
be7d9f05c53e6f Boris Brezillon 2019-05-29 @260  				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
2194a63a818db7 Noralf Trønnes  2019-03-12  261  
2194a63a818db7 Noralf Trønnes  2019-03-12  262  	if (!shmem->vaddr) {
2194a63a818db7 Noralf Trønnes  2019-03-12  263  		DRM_DEBUG_KMS("Failed to vmap pages\n");
2194a63a818db7 Noralf Trønnes  2019-03-12  264  		ret = -ENOMEM;
2194a63a818db7 Noralf Trønnes  2019-03-12  265  		goto err_put_pages;
2194a63a818db7 Noralf Trønnes  2019-03-12  266  	}
2194a63a818db7 Noralf Trønnes  2019-03-12  267  
2194a63a818db7 Noralf Trønnes  2019-03-12  268  	return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  269  
2194a63a818db7 Noralf Trønnes  2019-03-12  270  err_put_pages:
2194a63a818db7 Noralf Trønnes  2019-03-12  271  	drm_gem_shmem_put_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  272  err_zero_use:
2194a63a818db7 Noralf Trønnes  2019-03-12  273  	shmem->vmap_use_count = 0;
2194a63a818db7 Noralf Trønnes  2019-03-12  274  
2194a63a818db7 Noralf Trønnes  2019-03-12  275  	return ERR_PTR(ret);
2194a63a818db7 Noralf Trønnes  2019-03-12  276  }
2194a63a818db7 Noralf Trønnes  2019-03-12  277  

:::::: The code at line 260 was first introduced by commit
:::::: be7d9f05c53e6fc88525f8e55cf2dae937761799 drm/gem_shmem: Use a writecombine mapping for ->vaddr

:::::: TO: Boris Brezillon <boris.brezillon@collabora.com>
:::::: CC: Rob Herring <robh@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26916 bytes --]

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

* drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean
@ 2020-07-10 18:22 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-07-10 18:22 UTC (permalink / raw)
  To: Hans de Goede; +Cc: kbuild-all, linux-kernel, Noralf Trønnes

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

Hi Hans,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   42f82040ee66db13525dc6f14b8559890b2f4c1c
commit: e4f86e43716443e934d705952902d40de0fa9a05 drm: Add Grain Media GM12U320 driver v2
date:   12 months ago
config: m68k-randconfig-r002-20200710 (attached as .config)
compiler: m68k-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
        git checkout e4f86e43716443e934d705952902d40de0fa9a05
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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 >>):

   In file included from include/linux/file.h:9,
                    from include/linux/dma-buf.h:27,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean 'dma_free_writecombine'? [-Werror=implicit-function-declaration]
     260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~
         |                 dma_free_writecombine
   drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: incompatible type for argument 4 of 'vmap'
     260 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 |
         |                 int
   In file included from include/asm-generic/io.h:887,
                    from arch/m68k/include/asm/io.h:11,
                    from arch/m68k/include/asm/pgtable_no.h:14,
                    from arch/m68k/include/asm/pgtable.h:3,
                    from include/linux/mm.h:99,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-buf.h:29,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/vmalloc.h:109:14: note: expected 'pgprot_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     109 | extern void *vmap(struct page **pages, unsigned int count,
         |              ^~~~
   cc1: some warnings being treated as errors

vim +260 drivers/gpu/drm/drm_gem_shmem_helper.c

2194a63a818db7 Noralf Trønnes  2019-03-12  243  
2194a63a818db7 Noralf Trønnes  2019-03-12  244  static void *drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem)
2194a63a818db7 Noralf Trønnes  2019-03-12  245  {
2194a63a818db7 Noralf Trønnes  2019-03-12  246  	struct drm_gem_object *obj = &shmem->base;
2194a63a818db7 Noralf Trønnes  2019-03-12  247  	int ret;
2194a63a818db7 Noralf Trønnes  2019-03-12  248  
2194a63a818db7 Noralf Trønnes  2019-03-12  249  	if (shmem->vmap_use_count++ > 0)
2194a63a818db7 Noralf Trønnes  2019-03-12  250  		return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  251  
2194a63a818db7 Noralf Trønnes  2019-03-12  252  	ret = drm_gem_shmem_get_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  253  	if (ret)
2194a63a818db7 Noralf Trønnes  2019-03-12  254  		goto err_zero_use;
2194a63a818db7 Noralf Trønnes  2019-03-12  255  
2194a63a818db7 Noralf Trønnes  2019-03-12  256  	if (obj->import_attach)
2194a63a818db7 Noralf Trønnes  2019-03-12  257  		shmem->vaddr = dma_buf_vmap(obj->import_attach->dmabuf);
2194a63a818db7 Noralf Trønnes  2019-03-12  258  	else
be7d9f05c53e6f Boris Brezillon 2019-05-29  259  		shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
be7d9f05c53e6f Boris Brezillon 2019-05-29 @260  				    VM_MAP, pgprot_writecombine(PAGE_KERNEL));
2194a63a818db7 Noralf Trønnes  2019-03-12  261  
2194a63a818db7 Noralf Trønnes  2019-03-12  262  	if (!shmem->vaddr) {
2194a63a818db7 Noralf Trønnes  2019-03-12  263  		DRM_DEBUG_KMS("Failed to vmap pages\n");
2194a63a818db7 Noralf Trønnes  2019-03-12  264  		ret = -ENOMEM;
2194a63a818db7 Noralf Trønnes  2019-03-12  265  		goto err_put_pages;
2194a63a818db7 Noralf Trønnes  2019-03-12  266  	}
2194a63a818db7 Noralf Trønnes  2019-03-12  267  
2194a63a818db7 Noralf Trønnes  2019-03-12  268  	return shmem->vaddr;
2194a63a818db7 Noralf Trønnes  2019-03-12  269  
2194a63a818db7 Noralf Trønnes  2019-03-12  270  err_put_pages:
2194a63a818db7 Noralf Trønnes  2019-03-12  271  	drm_gem_shmem_put_pages(shmem);
2194a63a818db7 Noralf Trønnes  2019-03-12  272  err_zero_use:
2194a63a818db7 Noralf Trønnes  2019-03-12  273  	shmem->vmap_use_count = 0;
2194a63a818db7 Noralf Trønnes  2019-03-12  274  
2194a63a818db7 Noralf Trønnes  2019-03-12  275  	return ERR_PTR(ret);
2194a63a818db7 Noralf Trønnes  2019-03-12  276  }
2194a63a818db7 Noralf Trønnes  2019-03-12  277  

:::::: The code at line 260 was first introduced by commit
:::::: be7d9f05c53e6fc88525f8e55cf2dae937761799 drm/gem_shmem: Use a writecombine mapping for ->vaddr

:::::: TO: Boris Brezillon <boris.brezillon@collabora.com>
:::::: CC: Rob Herring <robh@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26916 bytes --]

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

end of thread, other threads:[~2020-07-11  5:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 17:32 drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean kernel test robot
2020-07-10 18:22 kernel test robot
2020-07-11  5:25 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).