]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: powerpc: Enable commented out BUILD_BUG_ON() assertion
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 11 Apr 2025 08:42:21 +0000 (10:42 +0200)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 16 Apr 2025 16:49:38 +0000 (22:19 +0530)
The BUILD_BUG_ON() assertion was commented out in commit 38634e676992
("powerpc/kvm: Remove problematic BUILD_BUG_ON statement") and fixed in
commit c0a187e12d48 ("KVM: powerpc: Fix BUILD_BUG_ON condition"), but
not enabled. Enable it now that this no longer breaks and remove the
comment.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250411084222.6916-1-thorsten.blum@linux.dev
arch/powerpc/kvm/timing.h

index 45817ab82bb43636f1ac63d56944df1d043430ef..14b0e23f601f9061699349b3142a52d055ec68df 100644 (file)
@@ -38,11 +38,7 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {}
 static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
 {
        /* type has to be known at build time for optimization */
-
-       /* The BUILD_BUG_ON below breaks in funny ways, commented out
-        * for now ... -BenH
        BUILD_BUG_ON(!__builtin_constant_p(type));
-       */
        switch (type) {
        case EXT_INTR_EXITS:
                vcpu->stat.ext_intr_exits++;