[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202102120024.WRJqXQvc-lkp@intel.com>
Date: Fri, 12 Feb 2021 00:18:29 +0800
From: kernel test robot <lkp@...el.com>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: drivers/media/common/videobuf2/videobuf2-vmalloc.c:108:12: error:
implicit declaration of function '__pfn_to_phys'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 291009f656e8eaebbdfd3a8d99f6b190a9ce9deb
commit: 4bfc848e0981fcd35db00fe1c6581560689f6dc7 m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM
date: 8 weeks ago
config: m68k-randconfig-r035-20210209 (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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bfc848e0981fcd35db00fe1c6581560689f6dc7
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4bfc848e0981fcd35db00fe1c6581560689f6dc7
# 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@...el.com>
All errors (new ones prefixed by >>):
In file included from include/linux/init.h:5,
from include/linux/io.h:10,
from drivers/media/common/videobuf2/videobuf2-vmalloc.c:13:
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/media/common/videobuf2/videobuf2-vmalloc.c: In function 'vb2_vmalloc_get_userptr':
>> drivers/media/common/videobuf2/videobuf2-vmalloc.c:108:12: error: implicit declaration of function '__pfn_to_phys' [-Werror=implicit-function-declaration]
108 | ioremap(__pfn_to_phys(nums[0]), size + offset);
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__pfn_to_phys +108 drivers/media/common/videobuf2/videobuf2-vmalloc.c
3c18ff06d811f7 drivers/media/video/videobuf2-vmalloc.c Pawel Osciak 2010-10-11 73
36c0f8b32c4bd4 drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-04-15 74 static void *vb2_vmalloc_get_userptr(struct device *dev, unsigned long vaddr,
cd474037c4a9a9 drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2014-11-18 75 unsigned long size,
cd474037c4a9a9 drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2014-11-18 76 enum dma_data_direction dma_dir)
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 77 {
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 78 struct vb2_vmalloc_buf *buf;
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 79 struct frame_vector *vec;
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 80 int n_pages, offset, i;
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 81 int ret = -ENOMEM;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 82
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 83 buf = kzalloc(sizeof(*buf), GFP_KERNEL);
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 84 if (!buf)
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 85 return ERR_PTR(-ENOMEM);
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 86
cd474037c4a9a9 drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2014-11-18 87 buf->dma_dir = dma_dir;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 88 offset = vaddr & ~PAGE_MASK;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 89 buf->size = size;
707947247e9517 drivers/media/common/videobuf2/videobuf2-vmalloc.c Hans Verkuil 2019-04-04 90 vec = vb2_create_framevec(vaddr, size);
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 91 if (IS_ERR(vec)) {
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 92 ret = PTR_ERR(vec);
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 93 goto fail_pfnvec_create;
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 94 }
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 95 buf->vec = vec;
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 96 n_pages = frame_vector_count(vec);
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 97 if (frame_vector_to_pages(vec) < 0) {
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 98 unsigned long *nums = frame_vector_pfns(vec);
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 99
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 100 /*
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 101 * We cannot get page pointers for these pfns. Check memory is
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 102 * physically contiguous and use direct mapping.
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 103 */
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 104 for (i = 1; i < n_pages; i++)
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 105 if (nums[i-1] + 1 != nums[i])
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 106 goto fail_map;
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 107 buf->vaddr = (__force void *)
4bdc0d676a6431 drivers/media/common/videobuf2/videobuf2-vmalloc.c Christoph Hellwig 2020-01-06 @108 ioremap(__pfn_to_phys(nums[0]), size + offset);
570d2a48b70094 drivers/media/video/videobuf2-vmalloc.c Javier Martin 2012-02-16 109 } else {
d4efd79a81abc7 drivers/media/common/videobuf2/videobuf2-vmalloc.c Christoph Hellwig 2020-06-01 110 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1);
570d2a48b70094 drivers/media/video/videobuf2-vmalloc.c Javier Martin 2012-02-16 111 }
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 112
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 113 if (!buf->vaddr)
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 114 goto fail_map;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 115 buf->vaddr += offset;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 116 return buf;
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 117
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 118 fail_map:
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 119 vb2_destroy_framevec(vec);
5a9e4dec393a2c drivers/media/v4l2-core/videobuf2-vmalloc.c Jan Kara 2015-07-13 120 fail_pfnvec_create:
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 121 kfree(buf);
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 122
0ff657b0f6120c drivers/media/v4l2-core/videobuf2-vmalloc.c Hans Verkuil 2016-07-21 123 return ERR_PTR(ret);
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 124 }
4419b8aca8dc13 drivers/media/video/videobuf2-vmalloc.c Andrzej Pietrasiewicz 2011-10-13 125
:::::: The code at line 108 was first introduced by commit
:::::: 4bdc0d676a643140bdf17dbf7eafedee3d496a3c remove ioremap_nocache and devm_ioremap_nocache
:::::: TO: Christoph Hellwig <hch@....de>
:::::: CC: Christoph Hellwig <hch@....de>
---
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" (31248 bytes)
Powered by blists - more mailing lists