Re: [PATCH V3 06/11] accel/amdxdna: Add GEM buffer object management

From: kernel test robot
Date: Sat Sep 14 2024 - 10:08:15 EST


Hi Lizhi,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on drm-tip/drm-tip linus/master v6.11-rc7 next-20240913]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Lizhi-Hou/accel-amdxdna-Add-documentation-for-AMD-NPU-accelerator-driver/20240912-020807
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link: https://lore.kernel.org/r/20240911180604.1834434-7-lizhi.hou%40amd.com
patch subject: [PATCH V3 06/11] accel/amdxdna: Add GEM buffer object management
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240914/202409142134.BxN16uQN-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409142134.BxN16uQN-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409142134.BxN16uQN-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from drivers/accel/amdxdna/aie2_ctx.c:13:
>> drivers/accel/amdxdna/amdxdna_ctx.h:16:26: error: use of undeclared identifier 'count'
16 | u32 data[] __counted_by(count);
| ^
1 error generated.
--
In file included from drivers/accel/amdxdna/aie2_pci.c:16:
>> drivers/accel/amdxdna/amdxdna_ctx.h:16:26: error: use of undeclared identifier 'count'
16 | u32 data[] __counted_by(count);
| ^
drivers/accel/amdxdna/aie2_pci.c:406:46: warning: shift count >= width of type [-Wshift-count-overflow]
406 | ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
77 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
1 warning and 1 error generated.


vim +/count +16 drivers/accel/amdxdna/amdxdna_ctx.h

8
9 /* Exec buffer command header format */
10 #define AMDXDNA_CMD_STATE GENMASK(3, 0)
11 #define AMDXDNA_CMD_EXTRA_CU_MASK GENMASK(11, 10)
12 #define AMDXDNA_CMD_COUNT GENMASK(22, 12)
13 #define AMDXDNA_CMD_OPCODE GENMASK(27, 23)
14 struct amdxdna_cmd {
15 u32 header;
> 16 u32 data[] __counted_by(count);
17 };
18

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki