From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754754AbcIKHnA (ORCPT ); Sun, 11 Sep 2016 03:43:00 -0400 Received: from smtp1.it.da.ut.ee ([193.40.5.66]:58017 "EHLO smtp1.it.da.ut.ee" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbcIKHm7 (ORCPT ); Sun, 11 Sep 2016 03:42:59 -0400 Date: Sun, 11 Sep 2016 12:12:22 +0300 (EEST) From: Meelis Roos To: Michael Ellerman cc: Linux Kernel list , "Aneesh Kumar K.V" , linuxppc-dev@lists.ozlabs.org Subject: Re: UBSAN: Undefined behaviour in arch/powerpc/kernel/cputable.c In-Reply-To: <87r38snkv2.fsf@concordia.ellerman.id.au> Message-ID: References: <87r38snkv2.fsf@concordia.ellerman.id.au> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Does this fix it? Yes, thank you! > diff --git a/arch/powerpc/include/asm/cpu_has_feature.h b/arch/powerpc/include/asm/cpu_has_feature.h > index 2ef55f8968a2..b312b152461b 100644 > --- a/arch/powerpc/include/asm/cpu_has_feature.h > +++ b/arch/powerpc/include/asm/cpu_has_feature.h > @@ -15,7 +15,7 @@ static inline bool early_cpu_has_feature(unsigned long feature) > #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS > #include > > -#define NUM_CPU_FTR_KEYS 64 > +#define NUM_CPU_FTR_KEYS BITS_PER_LONG > > extern struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS]; > > -- Meelis Roos (mroos@linux.ee)