[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206300921.wpqmVhcP-lkp@intel.com>
Date: Thu, 30 Jun 2022 09:52:56 +0800
From: kernel test robot <lkp@...el.com>
To: Oded Gabbay <ogabbay@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [ogabbay:gaudi2 52/62]
drivers/misc/habanalabs/gaudi2/gaudi2.c:5744:13: error: call to
__compiletime_assert_443 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: cdf0db9c5190d3f87662583db935ef9f5c0b7e4a
commit: db0c0cf75ce55851443487f3b7c6e033f112102d [52/62] habanalabs: add gaudi2 asic-specific code
config: x86_64-randconfig-a012
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a774ba7f60d1fef403b5507b1b1a7475d3684d71)
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=db0c0cf75ce55851443487f3b7c6e033f112102d
git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
git fetch --no-tags ogabbay gaudi2
git checkout db0c0cf75ce55851443487f3b7c6e033f112102d
# 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@...el.com>
All errors (new ones prefixed by >>):
drivers/misc/habanalabs/gaudi2/gaudi2.c:6773: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:9754: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:9754: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:5744:13: error: call to __compiletime_assert_443 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>:48:1: note: expanded from here
__compiletime_assert_443
^
>> drivers/misc/habanalabs/gaudi2/gaudi2.c:5744:13: error: call to __compiletime_assert_443 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>:48:1: note: expanded from here
__compiletime_assert_443
^
>> drivers/misc/habanalabs/gaudi2/gaudi2.c:5744:13: error: call to __compiletime_assert_443 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>:48:1: note: expanded from here
__compiletime_assert_443
^
>> drivers/misc/habanalabs/gaudi2/gaudi2.c:5744:13: error: call to __compiletime_assert_443 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>:48:1: note: expanded from here
__compiletime_assert_443
^
2 warnings and 4 errors generated.
vim +/error +5744 drivers/misc/habanalabs/gaudi2/gaudi2.c
5722
5723 static void gaudi2_arm_cq_monitor(struct hl_device *hdev, u32 index, u32 cq_id,
5724 u32 mon_payload, u32 sync_value)
5725 {
5726 int offset = index * 4;
5727 u32 sync_group_id, mask, mode, mon_arm;
5728
5729 /* Reset the SOB value */
5730 WREG32(mmDCORE0_SYNC_MNGR_OBJS_SOB_OBJ_0 + offset, 0);
5731
5732 /* Configure this address with CQ_ID 0 because CQ_EN is set */
5733 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_PAY_ADDRL_0 + offset, cq_id);
5734
5735 /* Configure this address with CS index because CQ_EN is set */
5736 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_PAY_DATA_0 + offset, mon_payload);
5737
5738 sync_group_id = index / 8;
5739 mask = ~(1 << (index & 0x7));
5740 mode = 1; /* comparison mode is "equal to" */
5741
5742 mon_arm = FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SOD_MASK, sync_value);
5743 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SOP_MASK, mode);
> 5744 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_MASK_MASK, mask);
5745 mon_arm |= FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_MON_ARM_SID_MASK, sync_group_id);
5746 WREG32(mmDCORE0_SYNC_MNGR_OBJS_MON_ARM_0 + offset, mon_arm);
5747 }
5748
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (162452 bytes)
Powered by blists - more mailing lists