[xilinx-xlnx:xlnx_rebase_v5.10 1409/1981] core.c:undefined reference to `dwc3_gadget_exit_hibernation'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: 87ec9a2d98a7a7dfc98b57348a0ec310fd170e4b
commit: 511e872607dba42eccf14b9debfb36d3d9fe1979 [1409/1981] usb: dwc3: gadget: Add hibernation support when operating in gadget mode
config: arm-randconfig-c002-20211216 (https://download.01.org/0day-ci/archive/20211217/202112172332.TwWUZH4F-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/Xilinx/linux-xlnx/commit/511e872607dba42eccf14b9debfb3...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
git checkout 511e872607dba42eccf14b9debfb36d3d9fe1979
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: drivers/usb/dwc3/core.o: in function `dwc3_suspend':
>> core.c:(.text+0x2dd0): undefined reference to `dwc3_gadget_exit_hibernation'
arm-linux-gnueabi-ld: drivers/usb/dwc3/core.o: in function `dwc3_remove':
core.c:(.text+0x2e2c): undefined reference to `dwc3_gadget_exit_hibernation'
`tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o
`tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o
`static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
`dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o
`static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
`dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o
`etm_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etm3x-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etm3x-core.o
`catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o
`cti_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-cti-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-cti-core.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months
[ti:ti-rt-linux-5.10.y 8683/9334] drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'?
by kernel test robot
Hi Sidraya,
FYI, the error/warning still remains.
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 52602e503dbacf8a5a30d8c8dde8a649210656bb
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [8683/9334] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211217/202112172227.sgirAs67-lk...)
compiler: sh4-linux-gcc (GCC) 11.2.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 remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
git fetch --no-tags ti ti-rt-linux-5.10.y
git checkout 97dfdd999ba7266785579c99c40a3c65e63e864a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/media/platform/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
714 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^~~~~~~~~~~~
| pfn_to_page
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
714 | new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
| ^
drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:620:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
620 | int pages;
| ^~~~~
In file included from drivers/media/platform/vxe-vxd/decoder/vxd_props.h:19,
from drivers/media/platform/vxe-vxd/decoder/decoder.h:29,
from drivers/media/platform/vxe-vxd/decoder/core.h:20,
from drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:53:
At top level:
drivers/media/platform/vxe-vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
| ^~~~~~~~~~~~~~~~~
drivers/media/platform/vxe-vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
62 | static const unsigned long VIRT_PAGE_TBL_MASK =
| ^~~~~~~~~~~~~~~~~~
drivers/media/platform/vxe-vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +714 drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c
cab68dd5406350 Sidraya 2021-11-02 606
cab68dd5406350 Sidraya 2021-11-02 607 static int vxd_dec_buf_prepare(struct vb2_buffer *vb)
cab68dd5406350 Sidraya 2021-11-02 608 {
cab68dd5406350 Sidraya 2021-11-02 609 struct vxd_dec_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
cab68dd5406350 Sidraya 2021-11-02 610 struct device *dev = ctx->dev->dev;
cab68dd5406350 Sidraya 2021-11-02 611 struct vxd_dec_q_data *q_data;
cab68dd5406350 Sidraya 2021-11-02 612 void *sgt;
cab68dd5406350 Sidraya 2021-11-02 613 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 614 struct page *new_page;
cab68dd5406350 Sidraya 2021-11-02 615 #else
cab68dd5406350 Sidraya 2021-11-02 616 void *sgl;
cab68dd5406350 Sidraya 2021-11-02 617 #endif
cab68dd5406350 Sidraya 2021-11-02 618 struct sg_table *sgt_new;
cab68dd5406350 Sidraya 2021-11-02 619 void *sgl_new;
cab68dd5406350 Sidraya 2021-11-02 620 int pages;
cab68dd5406350 Sidraya 2021-11-02 621 int nents = 0;
cab68dd5406350 Sidraya 2021-11-02 622 int size = 0;
cab68dd5406350 Sidraya 2021-11-02 623 int plane, num_planes, ret = 0;
cab68dd5406350 Sidraya 2021-11-02 624 struct vxd_buffer *buf =
cab68dd5406350 Sidraya 2021-11-02 625 container_of(vb, struct vxd_buffer, buffer.vb.vb2_buf);
cab68dd5406350 Sidraya 2021-11-02 626
cab68dd5406350 Sidraya 2021-11-02 627 q_data = get_q_data(ctx, vb->vb2_queue->type);
cab68dd5406350 Sidraya 2021-11-02 628 if (!q_data)
cab68dd5406350 Sidraya 2021-11-02 629 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 630
cab68dd5406350 Sidraya 2021-11-02 631 num_planes = q_data->fmt->num_planes;
cab68dd5406350 Sidraya 2021-11-02 632
cab68dd5406350 Sidraya 2021-11-02 633 for (plane = 0; plane < num_planes; plane++) {
cab68dd5406350 Sidraya 2021-11-02 634 if (vb2_plane_size(vb, plane) < q_data->size_image[plane]) {
cab68dd5406350 Sidraya 2021-11-02 635 dev_err(dev, "data will not fit into plane (%lu < %lu)\n",
cab68dd5406350 Sidraya 2021-11-02 636 vb2_plane_size(vb, plane),
cab68dd5406350 Sidraya 2021-11-02 637 (long)q_data->size_image[plane]);
cab68dd5406350 Sidraya 2021-11-02 638 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 639 }
cab68dd5406350 Sidraya 2021-11-02 640 }
cab68dd5406350 Sidraya 2021-11-02 641
cab68dd5406350 Sidraya 2021-11-02 642 if (buf->mapped)
cab68dd5406350 Sidraya 2021-11-02 643 return 0;
cab68dd5406350 Sidraya 2021-11-02 644
cab68dd5406350 Sidraya 2021-11-02 645 buf->buf_info.cpu_linear_addr = vb2_plane_vaddr(vb, 0);
cab68dd5406350 Sidraya 2021-11-02 646 buf->buf_info.buf_size = vb2_plane_size(vb, 0);
cab68dd5406350 Sidraya 2021-11-02 647 buf->buf_info.fd = -1;
cab68dd5406350 Sidraya 2021-11-02 648 sgt = vb2_dma_sg_plane_desc(vb, 0);
cab68dd5406350 Sidraya 2021-11-02 649 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 650 dev_err(dev, "Could not get sg_table from plane 0\n");
cab68dd5406350 Sidraya 2021-11-02 651 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 652 }
cab68dd5406350 Sidraya 2021-11-02 653
cab68dd5406350 Sidraya 2021-11-02 654 if (V4L2_TYPE_IS_OUTPUT(vb->type)) {
cab68dd5406350 Sidraya 2021-11-02 655 ret = core_stream_map_buf_sg(ctx->res_str_id,
cab68dd5406350 Sidraya 2021-11-02 656 VDEC_BUFTYPE_BITSTREAM,
cab68dd5406350 Sidraya 2021-11-02 657 &buf->buf_info, sgt,
cab68dd5406350 Sidraya 2021-11-02 658 &buf->buf_map_id);
cab68dd5406350 Sidraya 2021-11-02 659 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 660 dev_err(dev, "OUTPUT core_stream_map_buf_sg failed\n");
cab68dd5406350 Sidraya 2021-11-02 661 return ret;
cab68dd5406350 Sidraya 2021-11-02 662 }
cab68dd5406350 Sidraya 2021-11-02 663
cab68dd5406350 Sidraya 2021-11-02 664 buf->bstr_info.buf_size = q_data->size_image[0];
cab68dd5406350 Sidraya 2021-11-02 665 buf->bstr_info.cpu_virt_addr = buf->buf_info.cpu_linear_addr;
cab68dd5406350 Sidraya 2021-11-02 666 buf->bstr_info.mem_attrib =
cab68dd5406350 Sidraya 2021-11-02 667 SYS_MEMATTRIB_UNCACHED | SYS_MEMATTRIB_WRITECOMBINE |
cab68dd5406350 Sidraya 2021-11-02 668 SYS_MEMATTRIB_INPUT | SYS_MEMATTRIB_CPU_WRITE;
cab68dd5406350 Sidraya 2021-11-02 669 buf->bstr_info.bufmap_id = buf->buf_map_id;
cab68dd5406350 Sidraya 2021-11-02 670 lst_init(&buf->seq_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 671 lst_init(&buf->pic_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 672 lst_init(&buf->end_unit.bstr_seg_list);
cab68dd5406350 Sidraya 2021-11-02 673
cab68dd5406350 Sidraya 2021-11-02 674 list_add_tail(&buf->list, &ctx->out_buffers);
cab68dd5406350 Sidraya 2021-11-02 675 } else {
cab68dd5406350 Sidraya 2021-11-02 676 /* Create a single sgt from the plane(s) */
cab68dd5406350 Sidraya 2021-11-02 677 sgt_new = kmalloc(sizeof(*sgt_new), GFP_KERNEL);
cab68dd5406350 Sidraya 2021-11-02 678 if (!sgt_new)
cab68dd5406350 Sidraya 2021-11-02 679 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 680
cab68dd5406350 Sidraya 2021-11-02 681 for (plane = 0; plane < num_planes; plane++) {
cab68dd5406350 Sidraya 2021-11-02 682 size += ALIGN(vb2_plane_size(vb, plane), PAGE_SIZE);
cab68dd5406350 Sidraya 2021-11-02 683 sgt = vb2_dma_sg_plane_desc(vb, plane);
cab68dd5406350 Sidraya 2021-11-02 684 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 685 dev_err(dev, "Could not get sg_table from plane %d\n", plane);
cab68dd5406350 Sidraya 2021-11-02 686 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 687 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 688 }
cab68dd5406350 Sidraya 2021-11-02 689 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 690 nents += 1;
cab68dd5406350 Sidraya 2021-11-02 691 #else
cab68dd5406350 Sidraya 2021-11-02 692 nents += sg_nents(img_mmu_get_sgl(sgt));
cab68dd5406350 Sidraya 2021-11-02 693 #endif
cab68dd5406350 Sidraya 2021-11-02 694 }
cab68dd5406350 Sidraya 2021-11-02 695 buf->buf_info.buf_size = size;
cab68dd5406350 Sidraya 2021-11-02 696
cab68dd5406350 Sidraya 2021-11-02 697 pages = (size + PAGE_SIZE - 1) / PAGE_SIZE;
cab68dd5406350 Sidraya 2021-11-02 698 ret = sg_alloc_table(sgt_new, nents, GFP_KERNEL);
cab68dd5406350 Sidraya 2021-11-02 699 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 700 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 701 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 702 }
cab68dd5406350 Sidraya 2021-11-02 703 sgl_new = img_mmu_get_sgl(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 704
cab68dd5406350 Sidraya 2021-11-02 705 for (plane = 0; plane < num_planes; plane++) {
cab68dd5406350 Sidraya 2021-11-02 706 sgt = vb2_dma_sg_plane_desc(vb, plane);
cab68dd5406350 Sidraya 2021-11-02 707 if (!sgt) {
cab68dd5406350 Sidraya 2021-11-02 708 dev_err(dev, "Could not get sg_table from plane %d\n", plane);
cab68dd5406350 Sidraya 2021-11-02 709 sg_free_table(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 710 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 711 return -EINVAL;
cab68dd5406350 Sidraya 2021-11-02 712 }
cab68dd5406350 Sidraya 2021-11-02 713 #ifdef CAPTURE_CONTIG_ALLOC
cab68dd5406350 Sidraya 2021-11-02 @714 new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
cab68dd5406350 Sidraya 2021-11-02 715 sg_set_page(sgl_new, new_page, ALIGN(vb2_plane_size(vb, plane),
cab68dd5406350 Sidraya 2021-11-02 716 PAGE_SIZE), 0);
cab68dd5406350 Sidraya 2021-11-02 717 sgl_new = sg_next(sgl_new);
cab68dd5406350 Sidraya 2021-11-02 718 #else
cab68dd5406350 Sidraya 2021-11-02 719 sgl = img_mmu_get_sgl(sgt);
cab68dd5406350 Sidraya 2021-11-02 720
cab68dd5406350 Sidraya 2021-11-02 721 while (sgl) {
cab68dd5406350 Sidraya 2021-11-02 722 sg_set_page(sgl_new, sg_page(sgl), img_mmu_get_sgl_length(sgl), 0);
cab68dd5406350 Sidraya 2021-11-02 723 sgl = sg_next(sgl);
cab68dd5406350 Sidraya 2021-11-02 724 sgl_new = sg_next(sgl_new);
cab68dd5406350 Sidraya 2021-11-02 725 }
cab68dd5406350 Sidraya 2021-11-02 726 #endif
cab68dd5406350 Sidraya 2021-11-02 727 }
cab68dd5406350 Sidraya 2021-11-02 728
cab68dd5406350 Sidraya 2021-11-02 729 buf->buf_info.pictbuf_cfg = ctx->pict_bufcfg;
cab68dd5406350 Sidraya 2021-11-02 730 ret = core_stream_map_buf_sg(ctx->res_str_id,
cab68dd5406350 Sidraya 2021-11-02 731 VDEC_BUFTYPE_PICTURE,
cab68dd5406350 Sidraya 2021-11-02 732 &buf->buf_info, sgt_new,
cab68dd5406350 Sidraya 2021-11-02 733 &buf->buf_map_id);
cab68dd5406350 Sidraya 2021-11-02 734 sg_free_table(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 735 kfree(sgt_new);
cab68dd5406350 Sidraya 2021-11-02 736 if (ret) {
cab68dd5406350 Sidraya 2021-11-02 737 dev_err(dev, "CAPTURE core_stream_map_buf_sg failed\n");
cab68dd5406350 Sidraya 2021-11-02 738 return ret;
cab68dd5406350 Sidraya 2021-11-02 739 }
cab68dd5406350 Sidraya 2021-11-02 740 list_add_tail(&buf->list, &ctx->cap_buffers);
cab68dd5406350 Sidraya 2021-11-02 741 }
cab68dd5406350 Sidraya 2021-11-02 742 buf->mapped = TRUE;
cab68dd5406350 Sidraya 2021-11-02 743 buf->reuse = TRUE;
cab68dd5406350 Sidraya 2021-11-02 744
cab68dd5406350 Sidraya 2021-11-02 745 return 0;
cab68dd5406350 Sidraya 2021-11-02 746 }
cab68dd5406350 Sidraya 2021-11-02 747
:::::: The code at line 714 was first introduced by commit
:::::: cab68dd5406350efd2567bed47586c0a82940f40 v4l: Add V4L2 Interface function implementations
:::::: TO: Sidraya <sidraya.bj(a)pathpartnertech.com>
:::::: CC: Praneeth Bajjuri <praneeth(a)ti.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-tdx:kvm-upstream 132/152] arch/x86/kvm/mmu/tdp_mmu.c:1258:43: warning: variable 'shared' is uninitialized when used here
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: 81d423a001d35c498d0c024fa49bba248a916c55 [132/152] KVM, x86/mmu: Support TDX private mapping for TDP MMU
config: x86_64-randconfig-a013-20211216 (https://download.01.org/0day-ci/archive/20211217/202112172122.1aS4OBuJ-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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/tdx/commit/81d423a001d35c498d0c024fa49bba248a916c55
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout 81d423a001d35c498d0c024fa49bba248a916c55
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kvm/
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 >>):
>> arch/x86/kvm/mmu/tdp_mmu.c:1258:43: warning: variable 'shared' is uninitialized when used here [-Wuninitialized]
tdp_mmu_zap_alias_spte(vcpu, gfn_alias, shared);
^~~~~~
arch/x86/kvm/mmu/tdp_mmu.c:1233:13: note: initialize the variable 'shared' to silence this warning
bool shared;
^
= 0
>> arch/x86/kvm/mmu/tdp_mmu.c:1409:32: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
is_large_pte(iter->old_spte) ? PT_PAGE_SIZE_MASK : 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
arch/x86/kvm/mmu/tdp_mmu.c:1409:32: note: place parentheses around the '|' expression to silence this warning
is_large_pte(iter->old_spte) ? PT_PAGE_SIZE_MASK : 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
arch/x86/kvm/mmu/tdp_mmu.c:1409:32: note: place parentheses around the '?:' expression to evaluate it first
is_large_pte(iter->old_spte) ? PT_PAGE_SIZE_MASK : 0;
^
( )
2 warnings generated.
vim +/shared +1258 arch/x86/kvm/mmu/tdp_mmu.c
1219
1220 /*
1221 * Handle a TDP page fault (NPT/EPT violation/misconfiguration) by installing
1222 * page tables and SPTEs to translate the faulting guest physical address.
1223 */
1224 int kvm_tdp_mmu_map(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault)
1225 {
1226 struct kvm_mmu *mmu = vcpu->arch.mmu;
1227 struct tdp_iter iter;
1228 struct kvm_mmu_page *sp;
1229 u64 *child_pt;
1230 u64 new_spte;
1231 gfn_t raw_gfn;
1232 bool is_private;
1233 bool shared;
1234 int ret;
1235
1236 kvm_mmu_hugepage_adjust(vcpu, fault);
1237
1238 trace_kvm_mmu_spte_requested(fault);
1239
1240 rcu_read_lock();
1241
1242 raw_gfn = fault->addr >> PAGE_SHIFT;
1243 is_private = kvm_is_private_gfn(vcpu->kvm, raw_gfn);
1244
1245 if (is_error_noslot_pfn(fault->pfn) ||
1246 kvm_is_reserved_pfn(fault->pfn)) {
1247 if (is_private) {
1248 rcu_read_unlock();
1249 return -EFAULT;
1250 }
1251 } else if (vcpu->kvm->arch.gfn_shared_mask) {
1252 gfn_t gfn_alias = raw_gfn ^ vcpu->kvm->arch.gfn_shared_mask;
1253 /*
1254 * At given time, for one GPA, only one mapping can be valid
1255 * (either private, or shared). Zap aliasing mapping to make
1256 * sure of it. Also see comment in direct_page_fault().
1257 */
> 1258 tdp_mmu_zap_alias_spte(vcpu, gfn_alias, shared);
1259 }
1260
1261 tdp_mmu_for_each_pte(iter, mmu, is_private, raw_gfn, raw_gfn + 1) {
1262 if (fault->nx_huge_page_workaround_enabled)
1263 disallowed_hugepage_adjust(fault, iter.old_spte, iter.level);
1264
1265 if (iter.level == fault->goal_level)
1266 break;
1267
1268 /*
1269 * If there is an SPTE mapping a large page at a higher level
1270 * than the target, that SPTE must be cleared and replaced
1271 * with a non-leaf SPTE.
1272 */
1273 if (is_shadow_present_pte(iter.old_spte) &&
1274 is_large_pte(iter.old_spte)) {
1275 if (!tdp_mmu_zap_spte_flush_excl_or_shared(vcpu->kvm,
1276 &iter, shared))
1277 break;
1278 /*
1279 * TODO: large page support.
1280 * Doesn't support large page for TDX now
1281 */
1282 WARN_ON(is_private_spte(&iter.old_spte));
1283
1284
1285 /*
1286 * The iter must explicitly re-read the spte here
1287 * because the new value informs the !present
1288 * path below.
1289 */
1290 iter.old_spte = READ_ONCE(*rcu_dereference(iter.sptep));
1291 }
1292
1293 if (!is_shadow_present_pte(iter.old_spte)) {
1294
1295 /*
1296 * TODO: large page support.
1297 * Not expecting blocked private SPTE points to a
1298 * large page now.
1299 */
1300 WARN_ON(is_zapped_private_pte(iter.old_spte) &&
1301 is_large_pte(iter.old_spte));
1302
1303 /*
1304 * If SPTE has been frozen by another thread, just
1305 * give up and retry, avoiding unnecessary page table
1306 * allocation and free.
1307 */
1308 if (is_removed_spte(iter.old_spte))
1309 break;
1310
1311 sp = alloc_tdp_mmu_page(vcpu,
1312 tdp_iter_gfn_unalias(vcpu->kvm, &iter),
1313 iter.level - 1, is_private);
1314 child_pt = sp->spt;
1315
1316 new_spte = make_nonleaf_spte(child_pt,
1317 !shadow_accessed_mask);
1318
1319 if (tdp_mmu_set_spte_excl_or_shared(vcpu->kvm, &iter,
1320 new_spte, shared)) {
1321 tdp_mmu_link_page(vcpu->kvm, sp,
1322 fault->huge_page_disallowed &&
1323 fault->req_level >= iter.level);
1324
1325 trace_kvm_mmu_get_page(sp, true);
1326 } else {
1327 tdp_mmu_free_sp(sp);
1328 break;
1329 }
1330 }
1331 }
1332
1333 if (iter.level != fault->goal_level) {
1334 rcu_read_unlock();
1335 return RET_PF_RETRY;
1336 }
1337
1338 ret = tdp_mmu_map_handle_target_level(vcpu, fault, &iter, shared);
1339 rcu_read_unlock();
1340
1341 return ret;
1342 }
1343
1344 static bool block_private_gfn_range(struct kvm *kvm,
1345 struct kvm_gfn_range *range);
1346
1347 bool kvm_tdp_mmu_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range,
1348 bool flush)
1349 {
1350 struct kvm_mmu_page *root;
1351
1352 for_each_tdp_mmu_root_yield_safe(kvm, root, range->slot->as_id, false) {
1353 if (is_private_sp(root))
1354 flush |= block_private_gfn_range(kvm, range);
1355 else
1356 flush = zap_gfn_range(kvm, root, range->start, range->end,
1357 range->may_block, flush, false);
1358 }
1359
1360 return flush;
1361 }
1362
1363 typedef bool (*tdp_handler_t)(struct kvm *kvm, struct tdp_iter *iter,
1364 struct kvm_gfn_range *range);
1365
1366 static __always_inline bool kvm_tdp_mmu_handle_gfn(struct kvm *kvm,
1367 struct kvm_gfn_range *range,
1368 tdp_handler_t handler)
1369 {
1370 struct kvm_mmu_page *root;
1371 struct tdp_iter iter;
1372 bool ret = false;
1373
1374 rcu_read_lock();
1375
1376 /*
1377 * Don't support rescheduling, none of the MMU notifiers that funnel
1378 * into this helper allow blocking; it'd be dead, wasteful code.
1379 */
1380 for_each_tdp_mmu_root(kvm, root, range->slot->as_id) {
1381 /*
1382 * For TDX shared mapping, set GFN shared bit to the range,
1383 * so the handler() doesn't need to set it, to avoid duplicated
1384 * code in multiple handler()s.
1385 */
1386 if (kvm->arch.gfn_shared_mask && !is_private_sp(root)) {
1387 range->start |= kvm->arch.gfn_shared_mask;
1388 range->end |= kvm->arch.gfn_shared_mask;
1389 }
1390 tdp_root_for_each_leaf_pte(iter, root, range->start, range->end)
1391 ret |= handler(kvm, &iter, range);
1392 }
1393
1394 rcu_read_unlock();
1395
1396 return ret;
1397 }
1398
1399 static bool block_private_spte(struct kvm *kvm, struct tdp_iter *iter,
1400 struct kvm_gfn_range *range)
1401 {
1402 u64 new_spte;
1403
1404 if (WARN_ON(!is_private_spte(iter->sptep)))
1405 return false;
1406
1407 new_spte = SPTE_PRIVATE_ZAPPED |
1408 (spte_to_pfn(iter->old_spte) << PAGE_SHIFT) |
> 1409 is_large_pte(iter->old_spte) ? PT_PAGE_SIZE_MASK : 0;
1410
1411 WRITE_ONCE(*rcu_dereference(iter->sptep), new_spte);
1412
1413 static_call(kvm_x86_zap_private_spte)(kvm, iter->gfn, iter->level);
1414
1415 return true;
1416 }
1417
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
drivers/edac/i10nm_base.c:256 i10nm_get_hbm_munits() warn: 'mbase' not released on lines: 249.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b14864acbaaf03d9c01982e243a84632524c3ac
commit: c945088384d00e6eb61535cc4ba25bc062090909 EDAC/i10nm: Add support for high bandwidth memory
config: x86_64-randconfig-m001-20211215 (https://download.01.org/0day-ci/archive/20211216/202112161000.15tF7PTx-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/edac/i10nm_base.c:256 i10nm_get_hbm_munits() warn: 'mbase' not released on lines: 249.
vim +/mbase +256 drivers/edac/i10nm_base.c
c945088384d00e Qiuxu Zhuo 2021-06-11 187 static int i10nm_get_hbm_munits(void)
c945088384d00e Qiuxu Zhuo 2021-06-11 188 {
c945088384d00e Qiuxu Zhuo 2021-06-11 189 struct pci_dev *mdev;
c945088384d00e Qiuxu Zhuo 2021-06-11 190 void __iomem *mbase;
c945088384d00e Qiuxu Zhuo 2021-06-11 191 u32 reg, off, mcmtr;
c945088384d00e Qiuxu Zhuo 2021-06-11 192 struct skx_dev *d;
c945088384d00e Qiuxu Zhuo 2021-06-11 193 int i, lmc;
c945088384d00e Qiuxu Zhuo 2021-06-11 194 u64 base;
c945088384d00e Qiuxu Zhuo 2021-06-11 195
c945088384d00e Qiuxu Zhuo 2021-06-11 196 list_for_each_entry(d, i10nm_edac_list, list) {
c945088384d00e Qiuxu Zhuo 2021-06-11 197 d->pcu_cr3 = pci_get_dev_wrapper(d->seg, d->bus[1], 30, 3);
c945088384d00e Qiuxu Zhuo 2021-06-11 198 if (!d->pcu_cr3)
c945088384d00e Qiuxu Zhuo 2021-06-11 199 return -ENODEV;
c945088384d00e Qiuxu Zhuo 2021-06-11 200
c945088384d00e Qiuxu Zhuo 2021-06-11 201 if (!i10nm_check_hbm_imc(d)) {
c945088384d00e Qiuxu Zhuo 2021-06-11 202 i10nm_printk(KERN_DEBUG, "No hbm memory\n");
c945088384d00e Qiuxu Zhuo 2021-06-11 203 return -ENODEV;
c945088384d00e Qiuxu Zhuo 2021-06-11 204 }
c945088384d00e Qiuxu Zhuo 2021-06-11 205
c945088384d00e Qiuxu Zhuo 2021-06-11 206 if (I10NM_GET_SCK_BAR(d, reg)) {
c945088384d00e Qiuxu Zhuo 2021-06-11 207 i10nm_printk(KERN_ERR, "Failed to get socket bar\n");
c945088384d00e Qiuxu Zhuo 2021-06-11 208 return -ENODEV;
c945088384d00e Qiuxu Zhuo 2021-06-11 209 }
c945088384d00e Qiuxu Zhuo 2021-06-11 210 base = I10NM_GET_SCK_MMIO_BASE(reg);
c945088384d00e Qiuxu Zhuo 2021-06-11 211
c945088384d00e Qiuxu Zhuo 2021-06-11 212 if (I10NM_GET_HBM_IMC_BAR(d, reg)) {
c945088384d00e Qiuxu Zhuo 2021-06-11 213 i10nm_printk(KERN_ERR, "Failed to get hbm mc bar\n");
c945088384d00e Qiuxu Zhuo 2021-06-11 214 return -ENODEV;
c945088384d00e Qiuxu Zhuo 2021-06-11 215 }
c945088384d00e Qiuxu Zhuo 2021-06-11 216 base += I10NM_GET_HBM_IMC_MMIO_OFFSET(reg);
c945088384d00e Qiuxu Zhuo 2021-06-11 217
c945088384d00e Qiuxu Zhuo 2021-06-11 218 lmc = I10NM_NUM_DDR_IMC;
c945088384d00e Qiuxu Zhuo 2021-06-11 219
c945088384d00e Qiuxu Zhuo 2021-06-11 220 for (i = 0; i < I10NM_NUM_HBM_IMC; i++) {
c945088384d00e Qiuxu Zhuo 2021-06-11 221 mdev = pci_get_dev_wrapper(d->seg, d->bus[0],
c945088384d00e Qiuxu Zhuo 2021-06-11 222 12 + i / 4, 1 + i % 4);
c945088384d00e Qiuxu Zhuo 2021-06-11 223 if (i == 0 && !mdev) {
c945088384d00e Qiuxu Zhuo 2021-06-11 224 i10nm_printk(KERN_ERR, "No hbm mc found\n");
c945088384d00e Qiuxu Zhuo 2021-06-11 225 return -ENODEV;
c945088384d00e Qiuxu Zhuo 2021-06-11 226 }
c945088384d00e Qiuxu Zhuo 2021-06-11 227 if (!mdev)
c945088384d00e Qiuxu Zhuo 2021-06-11 228 continue;
c945088384d00e Qiuxu Zhuo 2021-06-11 229
c945088384d00e Qiuxu Zhuo 2021-06-11 230 d->imc[lmc].mdev = mdev;
c945088384d00e Qiuxu Zhuo 2021-06-11 231 off = i * I10NM_HBM_IMC_MMIO_SIZE;
c945088384d00e Qiuxu Zhuo 2021-06-11 232
c945088384d00e Qiuxu Zhuo 2021-06-11 233 edac_dbg(2, "hbm mc%d mmio base 0x%llx size 0x%x\n",
c945088384d00e Qiuxu Zhuo 2021-06-11 234 lmc, base + off, I10NM_HBM_IMC_MMIO_SIZE);
c945088384d00e Qiuxu Zhuo 2021-06-11 235
c945088384d00e Qiuxu Zhuo 2021-06-11 236 mbase = ioremap(base + off, I10NM_HBM_IMC_MMIO_SIZE);
^^^^^^^^^^^^^^^^
c945088384d00e Qiuxu Zhuo 2021-06-11 237 if (!mbase) {
c945088384d00e Qiuxu Zhuo 2021-06-11 238 i10nm_printk(KERN_ERR, "Failed to ioremap for hbm mc 0x%llx\n",
c945088384d00e Qiuxu Zhuo 2021-06-11 239 base + off);
c945088384d00e Qiuxu Zhuo 2021-06-11 240 return -ENOMEM;
c945088384d00e Qiuxu Zhuo 2021-06-11 241 }
c945088384d00e Qiuxu Zhuo 2021-06-11 242
c945088384d00e Qiuxu Zhuo 2021-06-11 243 d->imc[lmc].mbase = mbase;
c945088384d00e Qiuxu Zhuo 2021-06-11 244 d->imc[lmc].hbm_mc = true;
c945088384d00e Qiuxu Zhuo 2021-06-11 245
c945088384d00e Qiuxu Zhuo 2021-06-11 246 mcmtr = I10NM_GET_MCMTR(&d->imc[lmc], 0);
c945088384d00e Qiuxu Zhuo 2021-06-11 247 if (!I10NM_IS_HBM_IMC(mcmtr)) {
c945088384d00e Qiuxu Zhuo 2021-06-11 248 i10nm_printk(KERN_ERR, "This isn't an hbm mc!\n");
c945088384d00e Qiuxu Zhuo 2021-06-11 249 return -ENODEV;
No clean up before the return.
c945088384d00e Qiuxu Zhuo 2021-06-11 250 }
c945088384d00e Qiuxu Zhuo 2021-06-11 251
c945088384d00e Qiuxu Zhuo 2021-06-11 252 lmc++;
c945088384d00e Qiuxu Zhuo 2021-06-11 253 }
c945088384d00e Qiuxu Zhuo 2021-06-11 254 }
c945088384d00e Qiuxu Zhuo 2021-06-11 255
c945088384d00e Qiuxu Zhuo 2021-06-11 @256 return 0;
c945088384d00e Qiuxu Zhuo 2021-06-11 257 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [Intel-gfx] [PATCH v2 6/7] drm/i915: Use vma resources for async unbinding
by kernel test robot
Hi "Thomas,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on next-20211216]
[cannot apply to drm-exynos/exynos-drm-next drm/drm-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next airlied/drm-next v5.16-rc5]
[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/Thomas-Hellstr-m/drm-i915-Asynch...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-r021-20211216 (https://download.01.org/0day-ci/archive/20211217/202112172015.HCePn2cg-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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/45f1249183a30dea38defee195b33c7f6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Hellstr-m/drm-i915-Asynchronous-vma-unbinding/20211217-172108
git checkout 45f1249183a30dea38defee195b33c7f6753d9f9
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
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 >>):
>> drivers/gpu/drm/i915/i915_vma_resource.c:379:39: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
pr_err("vma resource size is %lu\n", sizeof(struct i915_vma_resource));
~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%u
include/linux/printk.h:493:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:450:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:422:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
1 warning generated.
vim +379 drivers/gpu/drm/i915/i915_vma_resource.c
376
377 int __init i915_vma_resource_module_init(void)
378 {
> 379 pr_err("vma resource size is %lu\n", sizeof(struct i915_vma_resource));
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 01/18] Structural cleanup for filesystem-based swap
by kernel test robot
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on axboe-block/for-next mszeredi-vfs/overlayfs-next rostedt-trace/for-next linus/master v5.16-rc5 next-20211216]
[cannot apply to trondmy-nfs/linux-next hnaz-mm/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/NeilBrown/Repair-SWAP-over-NFS/2...
base: git://git.samba.org/sfrench/cifs-2.6.git for-next
config: arm-randconfig-r005-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171822.DW1WPE1G-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/6443c9d01129c1a1c19f3df4a594b01e3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review NeilBrown/Repair-SWAP-over-NFS/20211217-075659
git checkout 6443c9d01129c1a1c19f3df4a594b01e3772e6bd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/nfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> fs/nfs/file.c:512:8: error: implicit declaration of function 'add_swap_extent' [-Werror,-Wimplicit-function-declaration]
ret = add_swap_extent(sis, 0, sis->max, 0);
^
1 error generated.
vim +/add_swap_extent +512 fs/nfs/file.c
486
487 static int nfs_swap_activate(struct swap_info_struct *sis, struct file *file,
488 sector_t *span)
489 {
490 unsigned long blocks;
491 long long isize;
492 int ret;
493 struct rpc_clnt *clnt = NFS_CLIENT(file->f_mapping->host);
494 struct inode *inode = file->f_mapping->host;
495
496 if (!file->f_mapping->a_ops->swap_rw)
497 /* Cannot support swap */
498 return -EINVAL;
499
500 spin_lock(&inode->i_lock);
501 blocks = inode->i_blocks;
502 isize = inode->i_size;
503 spin_unlock(&inode->i_lock);
504 if (blocks*512 < isize) {
505 pr_warn("swap activate: swapfile has holes\n");
506 return -EINVAL;
507 }
508
509 ret = rpc_clnt_swap_activate(clnt);
510 if (ret)
511 return ret;
> 512 ret = add_swap_extent(sis, 0, sis->max, 0);
513 if (ret < 0) {
514 rpc_clnt_swap_deactivate(clnt);
515 return ret;
516 }
517 *span = sis->pages;
518 sis->flags |= SWP_FS_OPS;
519 return ret;
520 }
521
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-lts:5.10/preempt-rt 19855/20232] drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:20: warning: comparison of array 'eb->batch_len' equal to a null pointer is always false
by kernel test robot
Hi Matthew,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 2aa7b06beff50959f21350fba872ba5b71380f11
commit: 95eed6488ef2ab6d7947630f596a1764cbfa31bc [19855/20232] drm/i915: Multi-BB execbuf
config: i386-randconfig-r021-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171834.xxAZesLl-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9043c3d65b11b442226015acfbf8167684586cfa)
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/95eed6488ef2ab6d7947630f5...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout 95eed6488ef2ab6d7947630f596a1764cbfa31bc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/crypto/ drivers/gpu/drm/i915/
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 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:17:
In file included from drivers/gpu/drm/i915/gt/intel_context.h:14:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
include/linux/io-mapping.h:88:9: error: implicit declaration of function '__iomap_local_pfn_prot' [-Werror,-Wimplicit-function-declaration]
return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
^
include/linux/io-mapping.h:88:9: note: did you mean '__kmap_local_pfn_prot'?
include/linux/highmem-internal.h:9:7: note: '__kmap_local_pfn_prot' declared here
void *__kmap_local_pfn_prot(unsigned long pfn, pgprot_t prot);
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:17:
In file included from drivers/gpu/drm/i915/gt/intel_context.h:14:
In file included from drivers/gpu/drm/i915/i915_drv.h:38:
include/linux/io-mapping.h:88:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion]
return __iomap_local_pfn_prot(PHYS_PFN(phys_addr), mapping->prot);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:20: warning: comparison of array 'eb->batch_len' equal to a null pointer is always false [-Wtautological-pointer-compare]
if (unlikely(eb->batch_len == 0)) { /* impossible! */
~~~~^~~~~~~~~ ~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1848:2: error: expected statement
for_each_batch_add_order(eb, i)
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1848:33: error: expected ';' after do/while statement
for_each_batch_add_order(eb, i)
^
;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1912:3: error: expected statement
for_each_batch_add_order(eb, j) {
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1912:34: error: expected ';' after do/while statement
for_each_batch_add_order(eb, j) {
^
;
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2880:2: error: expected statement
for_each_batch_add_order(eb, i) {
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1840:49: note: expanded from macro 'for_each_batch_add_order'
for (_i = _eb->num_batches - 1; _i >= 0; --_i) \
^
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2880:33: error: expected ';' after do/while statement
for_each_batch_add_order(eb, i) {
^
;
2 warnings and 7 errors generated.
vim +608 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
548
549 static int
550 eb_add_vma(struct i915_execbuffer *eb,
551 unsigned int *current_batch,
552 unsigned int i,
553 struct i915_vma *vma)
554 {
555 struct drm_i915_private *i915 = eb->i915;
556 struct drm_i915_gem_exec_object2 *entry = &eb->exec[i];
557 struct eb_vma *ev = &eb->vma[i];
558
559 ev->vma = vma;
560 ev->exec = entry;
561 ev->flags = entry->flags;
562
563 if (eb->lut_size > 0) {
564 ev->handle = entry->handle;
565 hlist_add_head(&ev->node,
566 &eb->buckets[hash_32(entry->handle,
567 eb->lut_size)]);
568 }
569
570 if (entry->relocation_count)
571 list_add_tail(&ev->reloc_link, &eb->relocs);
572
573 /*
574 * SNA is doing fancy tricks with compressing batch buffers, which leads
575 * to negative relocation deltas. Usually that works out ok since the
576 * relocate address is still positive, except when the batch is placed
577 * very low in the GTT. Ensure this doesn't happen.
578 *
579 * Note that actual hangs have only been observed on gen7, but for
580 * paranoia do it everywhere.
581 */
582 if (is_batch_buffer(eb, i)) {
583 if (entry->relocation_count &&
584 !(ev->flags & EXEC_OBJECT_PINNED))
585 ev->flags |= __EXEC_OBJECT_NEEDS_BIAS;
586 if (eb->reloc_cache.has_fence)
587 ev->flags |= EXEC_OBJECT_NEEDS_FENCE;
588
589 eb->batches[*current_batch] = ev;
590
591 if (unlikely(ev->flags & EXEC_OBJECT_WRITE)) {
592 drm_dbg(&i915->drm,
593 "Attempting to use self-modifying batch buffer\n");
594 return -EINVAL;
595 }
596
597 if (range_overflows_t(u64,
598 eb->batch_start_offset,
599 eb->args->batch_len,
600 ev->vma->size)) {
601 drm_dbg(&i915->drm, "Attempting to use out-of-bounds batch\n");
602 return -EINVAL;
603 }
604
605 if (eb->args->batch_len == 0)
606 eb->batch_len[*current_batch] = ev->vma->size -
607 eb->batch_start_offset;
> 608 if (unlikely(eb->batch_len == 0)) { /* impossible! */
609 drm_dbg(&i915->drm, "Invalid batch length\n");
610 return -EINVAL;
611 }
612
613 ++*current_batch;
614 }
615
616 return 0;
617 }
618
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week