Hi Lukas, kernel test robot noticed the following build errors:
[auto build test ERROR on e48123c607a0db8b9ad02f83c8c3d39918dbda06] url: https://github.com/intel-lab-lkp/linux/commits/Lukas-Zapolskas/drm-panthor-Add-performance-counter-uAPI/20250725-230250 base: e48123c607a0db8b9ad02f83c8c3d39918dbda06 patch link: https://lore.kernel.org/r/ae6f93a51033a35e9b8e7d2994c8595975f95264.1753449448.git.lukas.zapolskas%40arm.com patch subject: [PATCH v5 5/7] drm/panthor: Implement the counter sampler and sample handling config: i386-buildonly-randconfig-006-20250726 (https://download.01.org/0day-ci/archive/20250726/202507261628.odfo5elz-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250726/202507261628.odfo5elz-...@intel.com/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 <l...@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202507261628.odfo5elz-...@intel.com/ All errors (new ones prefixed by >>): drivers/gpu/drm/panthor/panthor_perf.c: In function 'session_populate_sample': >> drivers/gpu/drm/panthor/panthor_perf.c:1031:33: error: passing argument 1 of >> 'bitmap_to_arr64' from incompatible pointer type >> [-Werror=incompatible-pointer-types] 1031 | bitmap_to_arr64(&blk->header.enable_mask, blk_em, PANTHOR_PERF_EM_BITS); | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | __u64 (*)[2] {aka long long unsigned int (*)[2]} In file included from include/linux/cpumask.h:12, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:63, from include/linux/swait.h:7, from include/linux/completion.h:12, from include/drm/drm_file.h:34, from drivers/gpu/drm/panthor/panthor_perf.c:5: include/linux/bitmap.h:313:27: note: expected 'u64 *' {aka 'long long unsigned int *'} but argument is of type '__u64 (*)[2]' {aka 'long long unsigned int (*)[2]'} 313 | void bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits); | ~~~~~^~~ In file included from <command-line>: In function 'session_read_insert_idx', inlined from 'session_copy_sample' at drivers/gpu/drm/panthor/panthor_perf.c:1039:25, inlined from 'panthor_perf_report_irq' at drivers/gpu/drm/panthor/panthor_perf.c:1141:4: include/linux/compiler_types.h:568:45: error: call to '__compiletime_assert_385' declared with attribute error: Need native word sized stores/loads for atomicity. 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:549:25: note: in definition of macro '__compiletime_assert' 549 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:571:9: note: in expansion of macro 'compiletime_assert' 571 | compiletime_assert(__native_word(t), \ | ^~~~~~~~~~~~~~~~~~ arch/x86/include/asm/barrier.h:69:9: note: in expansion of macro 'compiletime_assert_atomic_type' 69 | compiletime_assert_atomic_type(*p); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire' 176 | #define smp_load_acquire(p) __smp_load_acquire(p) | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panthor/panthor_perf.c:491:16: note: in expansion of macro 'smp_load_acquire' 491 | return smp_load_acquire(&session->control->insert_idx) % slots; | ^~~~~~~~~~~~~~~~ In function 'session_read_insert_idx', inlined from 'session_emit_sample' at drivers/gpu/drm/panthor/panthor_perf.c:1063:25, inlined from 'panthor_perf_report_irq' at drivers/gpu/drm/panthor/panthor_perf.c:1153:4: include/linux/compiler_types.h:568:45: error: call to '__compiletime_assert_385' declared with attribute error: Need native word sized stores/loads for atomicity. 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:549:25: note: in definition of macro '__compiletime_assert' 549 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:571:9: note: in expansion of macro 'compiletime_assert' 571 | compiletime_assert(__native_word(t), \ | ^~~~~~~~~~~~~~~~~~ arch/x86/include/asm/barrier.h:69:9: note: in expansion of macro 'compiletime_assert_atomic_type' 69 | compiletime_assert_atomic_type(*p); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire' 176 | #define smp_load_acquire(p) __smp_load_acquire(p) | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panthor/panthor_perf.c:491:16: note: in expansion of macro 'smp_load_acquire' 491 | return smp_load_acquire(&session->control->insert_idx) % slots; | ^~~~~~~~~~~~~~~~ In function 'session_read_extract_idx', inlined from 'session_stop' at drivers/gpu/drm/panthor/panthor_perf.c:1599:26, inlined from 'panthor_perf_session_stop' at drivers/gpu/drm/panthor/panthor_perf.c:1785:8: include/linux/compiler_types.h:568:45: error: call to '__compiletime_assert_381' declared with attribute error: Need native word sized stores/loads for atomicity. 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:549:25: note: in definition of macro '__compiletime_assert' 549 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert' 568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:571:9: note: in expansion of macro 'compiletime_assert' 571 | compiletime_assert(__native_word(t), \ | ^~~~~~~~~~~~~~~~~~ arch/x86/include/asm/barrier.h:69:9: note: in expansion of macro 'compiletime_assert_atomic_type' 69 | compiletime_assert_atomic_type(*p); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/barrier.h:176:29: note: in expansion of macro '__smp_load_acquire' 176 | #define smp_load_acquire(p) __smp_load_acquire(p) | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panthor/panthor_perf.c:473:16: note: in expansion of macro 'smp_load_acquire' 473 | return smp_load_acquire(&session->control->extract_idx) % slots; | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/bitmap_to_arr64 +1031 drivers/gpu/drm/panthor/panthor_perf.c 976 977 /** 978 * session_populate_sample - Write out a new sample into a previously populated slot in the user 979 * ringbuffer and update both the header of the block and the PRFCNT_EN 980 * counter to contain only the selected subset of counters for that block. 981 * 982 * @ptdev: Panthor device 983 * @session: Perf session 984 * @session_sample: Pointer aligned to the start of the data section of the sample in the targeted 985 * slot. 986 * @sampler_sample: Pointer aligned to the start of the data section of the intermediate sampler 987 * buffer. 988 * 989 * When a new sample slot is targeted, it must be cleared of the data already existing there, 990 * enabling a direct copy from the intermediate buffer and then zeroing out any counters 991 * that are not required for the current session. 992 */ 993 static void session_populate_sample(struct panthor_device *ptdev, 994 struct panthor_perf_session *session, u8 *session_sample, 995 u8 *sampler_sample) 996 { 997 const struct drm_panthor_perf_info *const perf_info = &ptdev->perf_info; 998 999 const size_t block_size = get_annotated_block_size(perf_info->counters_per_block); 1000 const size_t sample_size = session_get_user_sample_size(perf_info); 1001 const size_t sample_header_size = perf_info->sample_header_size; 1002 const size_t data_size = sample_size - sample_header_size; 1003 const u32 counters = perf_info->counters_per_block; 1004 1005 session_populate_sample_header(session, 1006 (struct drm_panthor_perf_sample_header *)session_sample, 1007 ptdev->perf->sampler.set_config); 1008 1009 session_sample += sample_header_size; 1010 1011 memcpy(session_sample, sampler_sample + sample_header_size, data_size); 1012 1013 for (size_t i = 0; i < data_size; i += block_size) { 1014 DECLARE_BITMAP(em_diff, PANTHOR_PERF_EM_BITS); 1015 struct panthor_perf_counter_block *blk = (typeof(blk))(session_sample + i); 1016 enum drm_panthor_perf_block_type type = blk->header.block_type; 1017 unsigned long *blk_em = session->enabled_counters->mask[type]; 1018 1019 bitmap_from_arr64(em_diff, blk->header.enable_mask, PANTHOR_PERF_EM_BITS); 1020 1021 bitmap_andnot(em_diff, em_diff, blk_em, PANTHOR_PERF_EM_BITS); 1022 bitmap_clear(em_diff, 0, PANTHOR_HEADER_COUNTERS); 1023 1024 blk->counters[PANTHOR_CTR_PRFCNT_EN] = compress_enable_mask(counters, blk_em); 1025 1026 for (size_t ctr_idx = PANTHOR_HEADER_COUNTERS; ctr_idx < counters; ctr_idx++) { 1027 if (test_bit(ctr_idx, em_diff)) 1028 blk->counters[ctr_idx] = 0; 1029 } 1030 > 1031 bitmap_to_arr64(&blk->header.enable_mask, blk_em, > PANTHOR_PERF_EM_BITS); 1032 } 1033 } 1034 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki