Hi Davidlohr, I love your patch! Yet something to improve: [auto build test ERROR on next-20191003] url: https://github.com/0day-ci/linux/commits/Davidlohr-Bueso/lib-interval-tree-move-to-half-closed-intervals/20191004-042411 config: arm64-allyesconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All error/warnings (new ones prefixed by >>): In file included from include/linux/swab.h:5:0, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/arm64/include/uapi/asm/byteorder.h:21, from include/asm-generic/bitops/le.h:6, from arch/arm64/include/asm/bitops.h:29, from include/linux/bitops.h:26, from include/linux/kernel.h:12, from include/linux/clk.h:13, from include/linux/amba/bus.h:14, from drivers//iommu/virtio-iommu.c:10: drivers//iommu/virtio-iommu.c: In function 'viommu_replay_mappings': >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:130:32: note: in definition of macro '__swab64' (__builtin_constant_p((__u64)(x)) ? \ ^ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:24:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:25:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:26:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:27:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ >> drivers//iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:28:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ ^ -- In file included from include/linux/swab.h:5:0, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/arm64/include/uapi/asm/byteorder.h:21, from include/asm-generic/bitops/le.h:6, from arch/arm64/include/asm/bitops.h:29, from include/linux/bitops.h:26, from include/linux/kernel.h:12, from include/linux/clk.h:13, from include/linux/amba/bus.h:14, from drivers/iommu/virtio-iommu.c:10: drivers/iommu/virtio-iommu.c: In function 'viommu_replay_mappings': drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:130:32: note: in definition of macro '__swab64' (__builtin_constant_p((__u64)(x)) ? \ ^ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:24:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:25:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:26:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:27:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:28:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:29:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:30:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:31:12: note: in definition of macro '___constant_swab64' (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) ^ >> include/uapi/linux/byteorder/big_endian.h:31:43: note: in expansion of macro '__swab64' #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) ^~~~~~~~ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:41: error: 'struct interval_tree_node' has no member named 'last' .virt_end = cpu_to_le64(mapping->iova.last), ^ include/uapi/linux/swab.h:132:12: note: in definition of macro '__swab64' __fswab64(x)) ^ >> include/linux/byteorder/generic.h:86:21: note: in expansion of macro '__cpu_to_le64' #define cpu_to_le64 __cpu_to_le64 ^~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:403:16: note: in expansion of macro 'cpu_to_le64' .virt_end = cpu_to_le64(mapping->iova.last), ^~~~~~~~~~~ vim +403 drivers//iommu/virtio-iommu.c edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 379 edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 380 /* edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 381 * viommu_replay_mappings - re-send MAP requests edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 382 * edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 383 * When reattaching a domain that was previously detached from all endpoints, edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 384 * mappings were deleted from the device. Re-create the mappings available in edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 385 * the internal tree. edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 386 */ edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 387 static int viommu_replay_mappings(struct viommu_domain *vdomain) edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 388 { edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 389 int ret = 0; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 390 unsigned long flags; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 391 struct viommu_mapping *mapping; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 392 struct interval_tree_node *node; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 393 struct virtio_iommu_req_map map; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 394 edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 395 spin_lock_irqsave(&vdomain->mappings_lock, flags); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 396 node = interval_tree_iter_first(&vdomain->mappings, 0, -1UL); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 397 while (node) { edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 398 mapping = container_of(node, struct viommu_mapping, iova); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 399 map = (struct virtio_iommu_req_map) { edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 400 .head.type = VIRTIO_IOMMU_T_MAP, edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 401 .domain = cpu_to_le32(vdomain->id), edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 402 .virt_start = cpu_to_le64(mapping->iova.start), edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 @403 .virt_end = cpu_to_le64(mapping->iova.last), edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 404 .phys_start = cpu_to_le64(mapping->paddr), edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 405 .flags = cpu_to_le32(mapping->flags), edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 406 }; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 407 edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 408 ret = viommu_send_req_sync(vdomain->viommu, &map, sizeof(map)); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 409 if (ret) edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 410 break; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 411 edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 412 node = interval_tree_iter_next(node, 0, -1UL); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 413 } edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 414 spin_unlock_irqrestore(&vdomain->mappings_lock, flags); edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 415 edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 416 return ret; edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 417 } edcd69ab9a323b Jean-Philippe Brucker 2019-01-15 418 :::::: The code at line 403 was first introduced by commit :::::: edcd69ab9a323b7ac7a86e1c44b6c9c46598391f iommu: Add virtio-iommu driver :::::: TO: Jean-Philippe Brucker <jean-philippe.brucker@xxxxxxx> :::::: CC: Michael S. Tsirkin <mst@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel