Hi Yunsheng,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master] [also build test WARNING on net/master linus/master v5.14-rc1 next-20210715] [cannot apply to sparc-next/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Yunsheng-Lin/add-frag-page-support-... base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 5e437416ff66981d8154687cfdf7de50b1d82bfc config: m68k-buildonly-randconfig-r006-20210714 (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/0day-ci/linux/commit/247943d70c2069ca3fa3a272f3eb26b463e1... git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Yunsheng-Lin/add-frag-page-support-in-page-pool/20210714-173612 git checkout 247943d70c2069ca3fa3a272f3eb26b463e17f4d # 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 warnings (new ones prefixed by >>):
In file included from include/linux/skbuff.h:40, from include/net/net_namespace.h:39, from include/linux/netdevice.h:37, from drivers/net/ethernet/wiznet/w5100.c:11: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ -- In file included from include/linux/skbuff.h:40, from include/linux/filter.h:13, from kernel/bpf/core.c:21: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ kernel/bpf/core.c: At top level: kernel/bpf/core.c:1356:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes] 1356 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) | ^~~~~~~~~~~~~~~~~~~~~ -- In file included from include/linux/skbuff.h:40, from include/linux/filter.h:13, from include/linux/bpf_verifier.h:9, from kernel/bpf/verifier.c:12: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ In file included from include/linux/bpf_verifier.h:9, from kernel/bpf/verifier.c:12: kernel/bpf/verifier.c: In function 'jit_subprogs': include/linux/filter.h:363:4: warning: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12209:16: note: in expansion of macro 'BPF_CAST_CALL' 12209 | insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) - | ^~~~~~~~~~~~~ kernel/bpf/verifier.c: In function 'do_misc_fixups': include/linux/filter.h:363:4: warning: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12648:17: note: in expansion of macro 'BPF_CAST_CALL' 12648 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12652:17: note: in expansion of macro 'BPF_CAST_CALL' 12652 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12656:17: note: in expansion of macro 'BPF_CAST_CALL' 12656 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12660:17: note: in expansion of macro 'BPF_CAST_CALL' 12660 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12664:17: note: in expansion of macro 'BPF_CAST_CALL' 12664 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12668:17: note: in expansion of macro 'BPF_CAST_CALL' 12668 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) - | ^~~~~~~~~~~~~ include/linux/filter.h:363:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, u32, u64)' {aka 'int (* const)(struct bpf_map *, unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ kernel/bpf/verifier.c:12672:17: note: in expansion of macro 'BPF_CAST_CALL' 12672 | insn->imm = BPF_CAST_CALL(ops->map_redirect) - | ^~~~~~~~~~~~~ -- In file included from include/linux/skbuff.h:40, from include/linux/filter.h:13, from kernel/bpf/hashtab.c:8: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ In file included from kernel/bpf/hashtab.c:8: kernel/bpf/hashtab.c: In function 'htab_map_gen_lookup': include/linux/filter.h:363:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ include/linux/filter.h:371:14: note: in definition of macro 'BPF_EMIT_CALL' 371 | .imm = ((FUNC) - __bpf_call_base) }) | ^~~~ kernel/bpf/hashtab.c:641:26: note: in expansion of macro 'BPF_CAST_CALL' 641 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); | ^~~~~~~~~~~~~ kernel/bpf/hashtab.c: In function 'htab_lru_map_gen_lookup': include/linux/filter.h:363:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ include/linux/filter.h:371:14: note: in definition of macro 'BPF_EMIT_CALL' 371 | .imm = ((FUNC) - __bpf_call_base) }) | ^~~~ kernel/bpf/hashtab.c:682:26: note: in expansion of macro 'BPF_CAST_CALL' 682 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); | ^~~~~~~~~~~~~ kernel/bpf/hashtab.c: In function 'htab_of_map_gen_lookup': include/linux/filter.h:363:4: warning: cast between incompatible function types from 'void * (*)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] 363 | ((u64 (*)(u64, u64, u64, u64, u64))(x)) | ^ include/linux/filter.h:371:14: note: in definition of macro 'BPF_EMIT_CALL' 371 | .imm = ((FUNC) - __bpf_call_base) }) | ^~~~ kernel/bpf/hashtab.c:2319:26: note: in expansion of macro 'BPF_CAST_CALL' 2319 | *insn++ = BPF_EMIT_CALL(BPF_CAST_CALL(__htab_map_lookup_elem)); | ^~~~~~~~~~~~~ -- In file included from include/linux/skbuff.h:40, from include/linux/filter.h:13, from include/linux/bpf_verifier.h:9, from kernel/bpf/btf.c:19: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ kernel/bpf/btf.c: In function 'btf_seq_show': kernel/bpf/btf.c:5694:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 5694 | seq_vprintf((struct seq_file *)show->target, fmt, args); | ^~~~~~~~ kernel/bpf/btf.c: In function 'btf_snprintf_show': kernel/bpf/btf.c:5731:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 5731 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args); | ^~~ -- In file included from include/linux/skbuff.h:40, from include/linux/if_ether.h:19, from include/uapi/linux/ethtool.h:19, from include/linux/ethtool.h:18, from include/linux/phy.h:16, from include/linux/fec.h:14, from arch/m68k/coldfire/device.c:16: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ arch/m68k/coldfire/device.c: At top level: arch/m68k/coldfire/device.c:512:13: error: 'MCFEDMA_BASE' undeclared here (not in a function); did you mean 'MCFQSPI_BASE'? 512 | .start = MCFEDMA_BASE, | ^~~~~~~~~~~~ | MCFQSPI_BASE arch/m68k/coldfire/device.c:513:26: error: 'MCFEDMA_SIZE' undeclared here (not in a function); did you mean 'MCFQSPI_SIZE'? 513 | .end = MCFEDMA_BASE + MCFEDMA_SIZE - 1, | ^~~~~~~~~~~~ | MCFQSPI_SIZE arch/m68k/coldfire/device.c:517:13: error: 'MCFEDMA_IRQ_INTR0' undeclared here (not in a function) 517 | .start = MCFEDMA_IRQ_INTR0, | ^~~~~~~~~~~~~~~~~ arch/m68k/coldfire/device.c:523:13: error: 'MCFEDMA_IRQ_INTR16' undeclared here (not in a function) 523 | .start = MCFEDMA_IRQ_INTR16, | ^~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/device.c:529:13: error: 'MCFEDMA_IRQ_INTR56' undeclared here (not in a function) 529 | .start = MCFEDMA_IRQ_INTR56, | ^~~~~~~~~~~~~~~~~~ arch/m68k/coldfire/device.c:535:13: error: 'MCFEDMA_IRQ_ERR' undeclared here (not in a function) 535 | .start = MCFEDMA_IRQ_ERR, | ^~~~~~~~~~~~~~~ -- In file included from include/linux/skbuff.h:40, from include/net/net_namespace.h:39, from include/linux/init_task.h:18, from arch/m68k/kernel/process.c:30: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ arch/m68k/kernel/process.c: At top level: arch/m68k/kernel/process.c:115:16: warning: no previous prototype for 'm68k_clone' [-Wmissing-prototypes] 115 | asmlinkage int m68k_clone(struct pt_regs *regs) | ^~~~~~~~~~ arch/m68k/kernel/process.c:136:16: warning: no previous prototype for 'm68k_clone3' [-Wmissing-prototypes] 136 | asmlinkage int m68k_clone3(struct pt_regs *regs) | ^~~~~~~~~~~ arch/m68k/kernel/process.c:215:5: warning: no previous prototype for 'dump_fpu' [-Wmissing-prototypes] 215 | int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu) | ^~~~~~~~ -- In file included from include/linux/skbuff.h:40, from include/linux/filter.h:13, from kernel/kallsyms.c:25: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ kernel/kallsyms.c: At top level: kernel/kallsyms.c:502:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes] 502 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, | ^~~~~~~~~~~~~~~~ -- kernel/fork.c:162:13: warning: no previous prototype for 'arch_release_task_struct' [-Wmissing-prototypes] 162 | void __weak arch_release_task_struct(struct task_struct *tsk) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/fork.c:752:20: warning: no previous prototype for 'arch_task_cache_init' [-Wmissing-prototypes] 752 | void __init __weak arch_task_cache_init(void) { } | ^~~~~~~~~~~~~~~~~~~~ kernel/fork.c:847:12: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes] 847 | int __weak arch_dup_task_struct(struct task_struct *dst, | ^~~~~~~~~~~~~~~~~~~~ In file included from include/linux/skbuff.h:40, from include/net/net_namespace.h:39, from include/linux/init_task.h:18, from kernel/fork.c:983: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ -- In file included from include/linux/skbuff.h:40, from include/net/net_namespace.h:39, from include/linux/init_task.h:18, from kernel/exit.c:55: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ kernel/exit.c: At top level: kernel/exit.c:1810:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes] 1810 | __weak void abort(void) | ^~~~~ -- In file included from include/linux/skbuff.h:40, from include/linux/if_ether.h:19, from include/uapi/linux/ethtool.h:19, from include/linux/ethtool.h:18, from include/linux/phy.h:16, from include/linux/acpi_mdio.h:9, from drivers/net/ethernet/marvell/mvmdio.c:21: include/net/page_pool.h: In function 'page_pool_get_dma_addr':
include/net/page_pool.h:209:7: warning: left shift count >= width of type [-Wshift-count-overflow]
209 | ret <<= 32; | ^~~ include/net/page_pool.h: In function 'page_pool_set_dma_addr':
include/net/page_pool.h:220:8: warning: right shift count >= width of type [-Wshift-count-overflow]
220 | addr >>= 32; | ^~~ At top level: drivers/net/ethernet/marvell/mvmdio.c:432:36: warning: 'orion_mdio_acpi_match' defined but not used [-Wunused-const-variable=] 432 | static const struct acpi_device_id orion_mdio_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ ..
vim +209 include/net/page_pool.h
200 201 #define PAGE_POOL_DMA_USE_PP_FRAG_COUNT \ 202 (sizeof(dma_addr_t) > sizeof(unsigned long)) 203 204 static inline dma_addr_t page_pool_get_dma_addr(struct page *page) 205 { 206 dma_addr_t ret = page->dma_addr; 207 208 if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT) {
209 ret <<= 32;
210 ret |= atomic_long_read(&page->pp_frag_count) & PAGE_MASK; 211 } 212 213 return ret; 214 } 215 216 static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr) 217 { 218 if (PAGE_POOL_DMA_USE_PP_FRAG_COUNT) { 219 atomic_long_set(&page->pp_frag_count, addr & PAGE_MASK);
220 addr >>= 32;
221 } 222 223 page->dma_addr = addr; 224 } 225
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org