tree:
https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 2c4a98833ded50c324a6c5e7c949f93cca137acf [120/1142] misc: vpusmm: add alloc/import
DMABuf for VPU
config: m68k-allmodconfig (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://github.com/intel/linux-intel-lts/commit/2c4a98833ded50c324a6c5e7c...
git remote add intel-linux-intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 2c4a98833ded50c324a6c5e7c949f93cca137acf
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from drivers/misc/vpusmm/vpusmm_driver.c:23:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro
'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro
'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from arch/m68k/include/asm/page_mm.h:7,
from arch/m68k/include/asm/page.h:47,
from drivers/misc/vpusmm/vpusmm_driver.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
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));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from drivers/misc/vpusmm/vpusmm_driver.c:7:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
139 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro
'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
355 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c: At top level:
> drivers/misc/vpusmm/vpusmm_driver.c:406:6: warning: no previous
prototype for 'vpusmm_dmabuf_release' [-Wmissing-prototypes]
406 | void
vpusmm_dmabuf_release(struct dma_buf *dmabuf)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:47,
from drivers/misc/vpusmm/vpusmm_driver.c:6:
drivers/misc/vpusmm/vpusmm_driver.c: In function 'vpusmm_device_vma_fault':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro
'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:441:7: note: in expansion of macro
'pfn_valid'
441 | if (!pfn_valid(page_frame_num))
| ^~~~~~~~~
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from drivers/misc/vpusmm/vpusmm_driver.c:7:
drivers/misc/vpusmm/vpusmm_driver.c: In function 'vpusmm_session_alloc':
> drivers/misc/vpusmm/vpusmm_driver.c:616:11: warning: format
'%llx' expects argument of type 'long long unsigned int', but argument 4
has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
616 |
pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:283:21: note: in definition of macro 'pr_fmt'
283 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:143:2: note: in expansion of macro
'__dynamic_func_call'
143 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:153:2: note: in expansion of macro
'_dynamic_func_call'
153 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:331:2: note: in expansion of macro 'dynamic_pr_debug'
331 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:2: note: in expansion of macro
'pr_debug'
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:28: note: format string is defined here
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:5,
from drivers/misc/vpusmm/vpusmm_driver.c:7:
> drivers/misc/vpusmm/vpusmm_driver.c:616:11: warning: format
'%llx' expects argument of type 'long long unsigned int', but argument 5
has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
616 |
pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:283:21: note: in definition of macro 'pr_fmt'
283 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:143:2: note: in expansion of macro
'__dynamic_func_call'
143 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:153:2: note: in expansion of macro
'_dynamic_func_call'
153 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:331:2: note: in expansion of macro 'dynamic_pr_debug'
331 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:2: note: in expansion of macro
'pr_debug'
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:616:44: note: format string is defined here
616 | pr_debug("%s: dma_addr=%llx, phys_addr=%llx allocated from %s\n",
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/cdev.h:8,
from drivers/misc/vpusmm/vpusmm_driver.c:12:
drivers/misc/vpusmm/vpusmm_driver.c: In function 'vpusmm_probe':
> drivers/misc/vpusmm/vpusmm_driver.c:935:18: warning: format
'%llx' expects argument of type 'long long unsigned int', but argument 5
has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
935
| dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/misc/vpusmm/vpusmm_driver.c:935:4: note: in expansion of macro
'dev_info'
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:935:32: note: format string is defined here
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/linux/cdev.h:8,
from drivers/misc/vpusmm/vpusmm_driver.c:12:
drivers/misc/vpusmm/vpusmm_driver.c:935:18: warning: format '%llx' expects
argument of type 'long long unsigned int', but argument 6 has type
'resource_size_t' {aka 'unsigned int'} [-Wformat=]
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/device.h:1658:22: note: in definition of macro 'dev_fmt'
1658 | #define dev_fmt(fmt) fmt
| ^~~
drivers/misc/vpusmm/vpusmm_driver.c:935:4: note: in expansion of macro
'dev_info'
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ^~~~~~~~
drivers/misc/vpusmm/vpusmm_driver.c:935:37: note: format string is defined here
935 | dev_info(dev, " %s %zuMB %llx~%llx\n", dev_name(mem_dev),
mem_size/(1024*1024),
| ~~~^
| |
| long long unsigned int
| %x
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +/vpusmm_dmabuf_release +406 drivers/misc/vpusmm/vpusmm_driver.c
405
406 void vpusmm_dmabuf_release(struct dma_buf *dmabuf)
407 {
408 // this buffer is only referencec by dmabuf
409 struct vpusmm_buffer *buff = dmabuf->priv;
410
411 if (buff) {
412 if (buff->cookie) {
413 dma_free_attrs(buff->dev, buff->size, buff->cookie, buff->dma_addr,
buff->dma_attrs);
414 buff->cookie = NULL;
415 }
416 kfree(buff);
417 }
418 }
419
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org