From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5899707382083912497==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: include/linux/compiler_types.h:328:45: error: call to '__compiletime_assert_202' declared with attribute error: BUILD_BUG failed Date: Tue, 07 Dec 2021 19:53:09 +0800 Message-ID: <202112071925.61r0Z8V1-lkp@intel.com> List-Id: --===============5899707382083912497== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = master head: cd8c917a56f20f48748dd43d9ae3caff51d5b987 commit: 4775bc63f880001ee4fbd6456b12ab04674149e3 clocksource/arm_arch_timer= : Add build-time guards for unhandled register accesses date: 7 weeks ago config: arm64-randconfig-r003-20211207 (https://download.01.org/0day-ci/arc= hive/20211207/202112071925.61r0Z8V1-lkp(a)intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/torvalds/linux.gi= t/commit/?id=3D4775bc63f880001ee4fbd6456b12ab04674149e3 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/gi= t/torvalds/linux.git git fetch --no-tags linus master git checkout 4775bc63f880001ee4fbd6456b12ab04674149e3 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Darm64 SHELL=3D/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from : In function 'arch_timer_reg_read_cp15', inlined from 'arch_timer_reg_read' at drivers/clocksource/arm_arch_t= imer.c:166:9, inlined from 'erratum_set_next_event_tval_generic' at drivers/clocks= ource/arm_arch_timer.c:414:9: >> include/linux/compiler_types.h:328:45: error: call to '__compiletime_ass= ert_202' declared with attribute error: BUILD_BUG failed 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^ include/linux/compiler_types.h:309:25: note: in definition of macro '__c= ompiletime_assert' 309 | prefix ## suffix(); = \ | ^~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_comp= iletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_= ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arch_timer.h:159:9: note: in expansion of macro '= BUILD_BUG' 159 | BUILD_BUG(); | ^~~~~~~~~ In function 'arch_timer_reg_write_cp15', inlined from 'arch_timer_reg_write' at drivers/clocksource/arm_arch_= timer.c:131:3, inlined from 'erratum_set_next_event_tval_generic' at drivers/clocks= ource/arm_arch_timer.c:426:2: include/linux/compiler_types.h:328:45: error: call to '__compiletime_ass= ert_199' declared with attribute error: BUILD_BUG failed 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^ include/linux/compiler_types.h:309:25: note: in definition of macro '__c= ompiletime_assert' 309 | prefix ## suffix(); = \ | ^~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_comp= iletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_= ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arch_timer.h:130:17: note: in expansion of macro = 'BUILD_BUG' 130 | BUILD_BUG(); | ^~~~~~~~~ vim +/__compiletime_assert_202 +328 include/linux/compiler_types.h eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 = eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 #define _compiletime_assert(con= dition, msg, prefix, suffix) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 __compiletime_assert(condition= , msg, prefix, suffix) eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 = eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 /** eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * compiletime_assert - break b= uild and emit msg if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 * @condition: a compile-time c= onstant condition to check eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * @msg: a message to emi= t if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 * eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * In tradition of POSIX assert= , this macro will break the build if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 * supplied condition is *false= *, emitting the supplied error message if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 * compiler has support to do s= o. eb5c2d4b45e3d2 Will Deacon 2020-07-21 326 */ eb5c2d4b45e3d2 Will Deacon 2020-07-21 327 #define compiletime_assert(cond= ition, msg) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 @328 _compiletime_assert(condition,= msg, __compiletime_assert_, __COUNTER__) eb5c2d4b45e3d2 Will Deacon 2020-07-21 329 = :::::: The code at line 328 was first introduced by commit :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletim= e_assert() macros into compiler_types.h :::::: TO: Will Deacon :::::: CC: Will Deacon --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5899707382083912497==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECC45C433F5 for ; Tue, 7 Dec 2021 11:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235905AbhLGL50 (ORCPT ); Tue, 7 Dec 2021 06:57:26 -0500 Received: from mga06.intel.com ([134.134.136.31]:19735 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbhLGL50 (ORCPT ); Tue, 7 Dec 2021 06:57:26 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10190"; a="298355150" X-IronPort-AV: E=Sophos;i="5.87,293,1631602800"; d="scan'208";a="298355150" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2021 03:53:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,293,1631602800"; d="scan'208";a="611646323" Received: from lkp-server02.sh.intel.com (HELO 9e1e9f9b3bcb) ([10.239.97.151]) by orsmga004.jf.intel.com with ESMTP; 07 Dec 2021 03:53:54 -0800 Received: from kbuild by 9e1e9f9b3bcb with local (Exim 4.92) (envelope-from ) id 1muZ2f-000MWe-NC; Tue, 07 Dec 2021 11:53:53 +0000 Date: Tue, 7 Dec 2021 19:53:09 +0800 From: kernel test robot To: Marc Zyngier Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Daniel Lezcano Subject: include/linux/compiler_types.h:328:45: error: call to '__compiletime_assert_202' declared with attribute error: BUILD_BUG failed Message-ID: <202112071925.61r0Z8V1-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: cd8c917a56f20f48748dd43d9ae3caff51d5b987 commit: 4775bc63f880001ee4fbd6456b12ab04674149e3 clocksource/arm_arch_timer: Add build-time guards for unhandled register accesses date: 7 weeks ago config: arm64-randconfig-r003-20211207 (https://download.01.org/0day-ci/archive/20211207/202112071925.61r0Z8V1-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 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/torvalds/linux.git/commit/?id=4775bc63f880001ee4fbd6456b12ab04674149e3 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 4775bc63f880001ee4fbd6456b12ab04674149e3 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from : In function 'arch_timer_reg_read_cp15', inlined from 'arch_timer_reg_read' at drivers/clocksource/arm_arch_timer.c:166:9, inlined from 'erratum_set_next_event_tval_generic' at drivers/clocksource/arm_arch_timer.c:414:9: >> include/linux/compiler_types.h:328:45: error: call to '__compiletime_assert_202' declared with attribute error: BUILD_BUG failed 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:309:25: note: in definition of macro '__compiletime_assert' 309 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arch_timer.h:159:9: note: in expansion of macro 'BUILD_BUG' 159 | BUILD_BUG(); | ^~~~~~~~~ In function 'arch_timer_reg_write_cp15', inlined from 'arch_timer_reg_write' at drivers/clocksource/arm_arch_timer.c:131:3, inlined from 'erratum_set_next_event_tval_generic' at drivers/clocksource/arm_arch_timer.c:426:2: include/linux/compiler_types.h:328:45: error: call to '__compiletime_assert_199' declared with attribute error: BUILD_BUG failed 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:309:25: note: in definition of macro '__compiletime_assert' 309 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_compiletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arch_timer.h:130:17: note: in expansion of macro 'BUILD_BUG' 130 | BUILD_BUG(); | ^~~~~~~~~ vim +/__compiletime_assert_202 +328 include/linux/compiler_types.h eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 #define _compiletime_assert(condition, msg, prefix, suffix) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 __compiletime_assert(condition, msg, prefix, suffix) eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 /** eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * compiletime_assert - break build and emit msg if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 * @condition: a compile-time constant condition to check eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * @msg: a message to emit if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 * eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * In tradition of POSIX assert, this macro will break the build if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 * supplied condition is *false*, emitting the supplied error message if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 * compiler has support to do so. eb5c2d4b45e3d2 Will Deacon 2020-07-21 326 */ eb5c2d4b45e3d2 Will Deacon 2020-07-21 327 #define compiletime_assert(condition, msg) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 @328 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) eb5c2d4b45e3d2 Will Deacon 2020-07-21 329 :::::: The code at line 328 was first introduced by commit :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h :::::: TO: Will Deacon :::::: CC: Will Deacon --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org