Messages in this thread | | | Date | Mon, 27 Jun 2022 06:14:05 +0800 | From | kernel test robot <> | Subject | [ogabbay:gaudi2 49/54] drivers/misc/habanalabs/gaudi2/gaudi2.c:5816:13: error: call to __compiletime_assert_449 declared with 'error' attribute: FIELD_PREP: value too large for the field |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git gaudi2 head: 46d258b93c9e6795f366c8b5159b33cfeb7d3bd8 commit: bb6edeab4c9679a00b7bb85fb20fb0a11e015509 [49/54] habanalabs: add gaudi2 asic-specific code config: x86_64-randconfig-a002-20220627 compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b0d6dd3905db145853c7c744ac92d49b00b1fa20) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=bb6edeab4c9679a00b7bb85fb20fb0a11e015509 git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git git fetch --no-tags ogabbay gaudi2 git checkout bb6edeab4c9679a00b7bb85fb20fb0a11e015509 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/misc/
If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/misc/habanalabs/gaudi2/gaudi2.c:1828:6: warning: variable 'hbm_drv_base_offset' set but not used [-Wunused-but-set-variable] u64 hbm_drv_base_offset = 0; ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:6845:39: warning: variable 'glbl_sts_clr_val' set but not used [-Wunused-but-set-variable] u32 i, j, glbl_sts_val, arb_err_val, glbl_sts_clr_val, num_error_causes; ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:9825:6: warning: no previous prototype for function 'gaudi2_set_asic_funcs' [-Wmissing-prototypes] void gaudi2_set_asic_funcs(struct hl_device *hdev) ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:9825:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void gaudi2_set_asic_funcs(struct hl_device *hdev) ^ static drivers/misc/habanalabs/gaudi2/gaudi2.c:672:1: warning: unused variable 'gaudi2_nic_rxb_core_sei_interrupts_cause' [-Wunused-const-variable] gaudi2_nic_rxb_core_sei_interrupts_cause[GAUDI2_NUM_OF_NIC_RXB_CORE_SEI_CAUSE] = { ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:678:1: warning: unused variable 'gaudi2_nic_rxb_core_spi_interrupts_cause' [-Wunused-const-variable] gaudi2_nic_rxb_core_spi_interrupts_cause[GAUDI2_NUM_OF_NIC_RXB_CORE_SPI_CAUSE] = { ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:687:27: warning: unused variable 'gaudi2_nic_rxe_sei_interrupts_cause' [-Wunused-const-variable] static const char * const gaudi2_nic_rxe_sei_interrupts_cause[GAUDI2_NUM_OF_NIC_RXE_SEI_CAUSE] = { ^ drivers/misc/habanalabs/gaudi2/gaudi2.c:694:27: warning: unused variable 'gaudi2_nic_rxe_spi_interrupts_cause' [-Wunused-const-variable] static const char * const gaudi2_nic_rxe_spi_interrupts_cause[GAUDI2_NUM_OF_NIC_RXE_SPI_CAUSE] = { ^ >> drivers/misc/habanalabs/gaudi2/gaudi2.c:5816:13: error: call to __compiletime_assert_449 declared with 'error' attribute: FIELD_PREP: value too large for the field mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_MASK_MASK, mask); ^ include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ <scratch space>:53:1: note: expanded from here __compiletime_assert_449 ^ >> drivers/misc/habanalabs/gaudi2/gaudi2.c:5816:13: error: call to __compiletime_assert_449 declared with 'error' attribute: FIELD_PREP: value too large for the field include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ <scratch space>:53:1: note: expanded from here __compiletime_assert_449 ^ >> drivers/misc/habanalabs/gaudi2/gaudi2.c:5816:13: error: call to __compiletime_assert_449 declared with 'error' attribute: FIELD_PREP: value too large for the field include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ <scratch space>:53:1: note: expanded from here __compiletime_assert_449 ^ >> drivers/misc/habanalabs/gaudi2/gaudi2.c:5816:13: error: call to __compiletime_assert_449 declared with 'error' attribute: FIELD_PREP: value too large for the field include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^ include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^ include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:340:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:333:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ <scratch space>:53:1: note: expanded from here __compiletime_assert_449 ^ 7 warnings and 4 errors generated.
vim +/error +5816 drivers/misc/habanalabs/gaudi2/gaudi2.c
5794 5795 static void gaudi2_arm_cq_monitor(struct hl_device *hdev, u32 index, u32 cq_id, 5796 u32 mon_payload, u32 sync_value) 5797 { 5798 int offset = index * 4; 5799 u32 sync_group_id, mask, mode, mon_arm; 5800 5801 /* Reset the SOB value */ 5802 WREG32(mmDCORE0_SYNC_MNGR_OBJS_SOB_OBJ_0 + offset, 0); 5803 5804 /* Configure this address with CQ_ID 0 because CQ_EN is set */ 5805 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0 + offset, cq_id); 5806 5807 /* Configure this address with CS index because CQ_EN is set */ 5808 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_PAY_DATA_0 + offset, mon_payload); 5809 5810 sync_group_id = index / 8; 5811 mask = ~(1 << (index & 0x7)); 5812 mode = 1; /* comparison mode is "equal to" */ 5813 5814 mon_arm = FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SOD_MASK, sync_value); 5815 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SOP_MASK, mode); > 5816 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_MASK_MASK, mask); 5817 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SID_MASK, sync_group_id); 5818 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_ARM_0 + offset, mon_arm); 5819 } 5820
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |