Re: include/linux/compiler_types.h:328:45: error: call to '__compiletime_assert_202' declared with attribute error: BUILD_BUG failed

From: Marc Zyngier
Date: Tue Dec 07 2021 - 08:11:46 EST


+ Will for the arm64 tree.

On Tue, 07 Dec 2021 11:53:09 +0000,
kernel test robot <lkp@xxxxxxxxx> wrote:
>
> 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@xxxxxxxxx/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 <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> In file included from <command-line>:
> 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

[...]

This looks like another version of the inlining issue for which I have
posted a fix[1] a while ago.

Daniel, can you please pick this one up for the next -rc?

Alternatively, I can route it via the arm64 tree.

Thanks,

M.

[1] https://lore.kernel.org/all/20211117113532.3895208-1-maz@xxxxxxxxxx

--
Without deviation from the norm, progress is not possible.