Hi Lukas,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on next-20251219]
[cannot apply to linus/master v6.19-rc1]
[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/Lukas-Zapolskas/drm-panthor-Add-performance-counter-uAPI/20251216-012117
base:   https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next
patch link:    
https://lore.kernel.org/r/20251215171453.2506348-6-lukas.zapolskas%40arm.com
patch subject: [PATCH v6 5/7] drm/panthor: Implement the counter sampler and 
sample handling
config: um-randconfig-001-20251217 
(https://download.01.org/0day-ci/archive/20251220/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 
1335a05ab8bc8339ce24be3a9da89d8c3f4e0571)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251220/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/panthor/panthor_perf.c:5:
   In file included from include/drm/drm_file.h:39:
   In file included from include/drm/drm_prime.h:37:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on 
a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1209 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> drivers/gpu/drm/panthor/panthor_perf.c:1045:19: error: incompatible pointer 
>> types passing '__u64 (*)[2]' (aka 'unsigned long long (*)[2]') to parameter 
>> of type 'u64 *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
    1045 |                 bitmap_to_arr64(&blk->header.enable_mask, blk_em, 
PANTHOR_PERF_EM_BITS);
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitmap.h:316:27: note: passing argument to parameter 'buf' here
     316 | void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned 
int nbits);
         |                           ^
   1 warning and 1 error generated.


vim +1045 drivers/gpu/drm/panthor/panthor_perf.c

   991  
   992  /**
   993   * session_populate_sample - Write out a new sample into a previously 
populated slot in the user
   994   *                           ringbuffer and update both the header of 
the block and the PRFCNT_EN
   995   *                           counter to contain only the selected 
subset of counters for that block.
   996   *
   997   * @ptdev: Panthor device
   998   * @session: Perf session
   999   * @session_sample: Pointer aligned to the start of the data section of 
the sample in the targeted
  1000   *                  slot.
  1001   * @sampler_sample: Pointer aligned to the start of the data section of 
the intermediate sampler
  1002   *                  buffer.
  1003   *
  1004   * When a new sample slot is targeted, it must be cleared of the data 
already existing there,
  1005   * enabling a direct copy from the intermediate buffer and then zeroing 
out any counters
  1006   * that are not required for the current session.
  1007   */
  1008  static void session_populate_sample(struct panthor_device *ptdev,
  1009                                      struct panthor_perf_session 
*session, u8 *session_sample,
  1010                                      u8 *sampler_sample)
  1011  {
  1012          const struct drm_panthor_perf_info *const perf_info = 
&ptdev->perf_info;
  1013          const size_t block_size = 
get_annotated_block_size(perf_info->counters_per_block);
  1014          const size_t sample_size = perf_info->sample_size;
  1015          const size_t sample_header_size = perf_info->sample_header_size;
  1016          const size_t data_size = sample_size - sample_header_size;
  1017          const u32 counters = perf_info->counters_per_block;
  1018  
  1019          session_populate_sample_header(session,
  1020                                         (struct 
drm_panthor_perf_sample_header *)session_sample,
  1021                                         ptdev->perf->sampler.set_config);
  1022  
  1023          session_sample += sample_header_size;
  1024  
  1025          memcpy(session_sample, sampler_sample + sample_header_size, 
data_size);
  1026  
  1027          for (size_t i = 0; i < data_size; i += block_size) {
  1028                  DECLARE_BITMAP(em_diff, PANTHOR_PERF_EM_BITS);
  1029                  struct panthor_perf_counter_block *blk = 
(typeof(blk))(session_sample + i);
  1030                  enum drm_panthor_perf_block_type type = 
blk->header.block_type;
  1031                  unsigned long *blk_em = 
session->enabled_counters->mask[type];
  1032  
  1033                  bitmap_from_arr64(em_diff, blk->header.enable_mask, 
PANTHOR_PERF_EM_BITS);
  1034  
  1035                  bitmap_andnot(em_diff, em_diff, blk_em, 
PANTHOR_PERF_EM_BITS);
  1036                  bitmap_clear(em_diff, 0, PANTHOR_HEADER_COUNTERS);
  1037  
  1038                  blk->counters[PANTHOR_CTR_PRFCNT_EN] = 
compress_enable_mask(counters, blk_em);
  1039  
  1040                  for (size_t ctr_idx = PANTHOR_HEADER_COUNTERS; ctr_idx 
< counters; ctr_idx++) {
  1041                          if (test_bit(ctr_idx, em_diff))
  1042                                  blk->counters[ctr_idx] = 0;
  1043                  }
  1044  
> 1045                  bitmap_to_arr64(&blk->header.enable_mask, blk_em, 
> PANTHOR_PERF_EM_BITS);
  1046          }
  1047  }
  1048  

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

Reply via email to