From: Marc Zyngier <maz@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
Oliver Upton <oliver.upton@linux.dev>,
Joey Gouly <joey.gouly@arm.com>
Subject: Re: [linux-next:master 7083/12380] include/linux/compiler_types.h:517:45: error: call to '__compiletime_assert_845' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(sr)
Date: Wed, 20 Nov 2024 10:59:39 +0000 [thread overview]
Message-ID: <86r076uq5g.wl-maz@kernel.org> (raw)
In-Reply-To: <202411201857.ZNudtGJl-lkp@intel.com>
On Wed, 20 Nov 2024 10:09:36 +0000,
kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: ac24e26aa08fe026804f678599f805eb13374a5d
> commit: a0162020095e2a34a59fc64c07183cc039e759f6 [7083/12380] KVM: arm64: Extend masking facility to arbitrary registers
> config: arm64-randconfig-004-20241120 (https://download.01.org/0day-ci/archive/20241120/202411201857.ZNudtGJl-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241120/202411201857.ZNudtGJl-lkp@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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202411201857.ZNudtGJl-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from <command-line>:
> arch/arm64/kvm/nested.c: In function 'set_sysreg_masks':
> >> include/linux/compiler_types.h:517:45: error: call to '__compiletime_assert_845' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(sr)
That's annoying. CONFIG_CC_OPTIMIZE_FOR_SIZE=y is what generates the
(legitimate) breakage. The hack below addresses it.
M.
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index aeaa6017ffd89..9b36218b48def 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -951,7 +951,7 @@ u64 kvm_vcpu_apply_reg_masks(const struct kvm_vcpu *vcpu,
return v;
}
-static void set_sysreg_masks(struct kvm *kvm, int sr, u64 res0, u64 res1)
+static __always_inline void set_sysreg_masks(struct kvm *kvm, int sr, u64 res0, u64 res1)
{
int i = sr - __SANITISED_REG_START__;
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2024-11-20 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 10:09 [linux-next:master 7083/12380] include/linux/compiler_types.h:517:45: error: call to '__compiletime_assert_845' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(sr) kernel test robot
2024-11-20 10:59 ` Marc Zyngier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r076uq5g.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=joey.gouly@arm.com \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oliver.upton@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.