tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ef8b014ee4a1ccd9e751732690a8c7cdeed945e7 commit: ede6b6bc43c68ef030f88235e91e85939b8bdb49 [1498/2759] drm/radeon: use writel to avoid gcc optimization v3 config: x86_64-randconfig-s031-20210111 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-208-g46a52ca4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ede6b6bc43c68ef030f88235e91e85939b8bdb49 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout ede6b6bc43c68ef030f88235e91e85939b8bdb49 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> "sparse warnings: (new ones prefixed by >>)" drivers/gpu/drm/radeon/radeon_uvd.c:155:37: sparse: sparse: cast to restricted __le32 drivers/gpu/drm/radeon/radeon_uvd.c:156:42: sparse: sparse: cast to restricted __le32 drivers/gpu/drm/radeon/radeon_uvd.c:157:42: sparse: sparse: cast to restricted __le32 >> drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:794:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:796:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:801:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:802:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:804:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:830:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:831:16: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int val @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: expected unsigned int val drivers/gpu/drm/radeon/radeon_uvd.c:832:16: sparse: got restricted __le32 [usertype] vim +794 drivers/gpu/drm/radeon/radeon_uvd.c 771 772 /* 773 * multiple fence commands without any stream commands in between can 774 * crash the vcpu so just try to emmit a dummy create/destroy msg to 775 * avoid this 776 */ 777 int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring, 778 uint32_t handle, struct radeon_fence **fence) 779 { 780 /* we use the last page of the vcpu bo for the UVD message */ 781 uint64_t offs = radeon_bo_size(rdev->uvd.vcpu_bo) - 782 RADEON_GPU_PAGE_SIZE; 783 784 uint32_t __iomem *msg = (void __iomem *)(rdev->uvd.cpu_addr + offs); 785 uint64_t addr = rdev->uvd.gpu_addr + offs; 786 787 int r, i; 788 789 r = radeon_bo_reserve(rdev->uvd.vcpu_bo, true); 790 if (r) 791 return r; 792 793 /* stitch together an UVD create msg */ > 794 writel(cpu_to_le32(0x00000de4), &msg[0]); 795 writel(0x0, (void __iomem *)&msg[1]); 796 writel(cpu_to_le32(handle), &msg[2]); 797 writel(0x0, &msg[3]); 798 writel(0x0, &msg[4]); 799 writel(0x0, &msg[5]); 800 writel(0x0, &msg[6]); 801 writel(cpu_to_le32(0x00000780), &msg[7]); 802 writel(cpu_to_le32(0x00000440), &msg[8]); 803 writel(0x0, &msg[9]); 804 writel(cpu_to_le32(0x01b37000), &msg[10]); 805 for (i = 11; i < 1024; ++i) 806 writel(0x0, &msg[i]); 807 808 r = radeon_uvd_send_msg(rdev, ring, addr, fence); 809 radeon_bo_unreserve(rdev->uvd.vcpu_bo); 810 return r; 811 } 812 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip