Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5420548pxu; Thu, 22 Oct 2020 01:36:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+m7I18RZeTkinBUHlMh3M1Q6EnvKESyz1t5JqeYml2xUK4ZzWPfhu/ozwKI6riOPn5lZh X-Received: by 2002:a17:906:f2c4:: with SMTP id gz4mr1282892ejb.410.1603355816557; Thu, 22 Oct 2020 01:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355816; cv=none; d=google.com; s=arc-20160816; b=n5adhmP03IbfM4SAaIIvnCGLzKI1PD8pBXvwIqlKtifMJgAsAWmNDqOgwi7F9stKbg E9wiAwYjuiwmNPAFpd98YwbI2jyOaBtSten36vz6nEItVxRUgLxjNSJhDf3jvR+E4rF3 HUth8zpD3G2RcIeNRHWcHVByqSbVmm3a6FUvIKMqQxfitj3pgQ7vJG0jTGsCIUsEqtow T0py8F7oIR6GAKvFj3q7hOo2PY/xaRdjYx6bgCKjGSV+Lish7Gt6bNhOS1jpcieuJkBI Q+4x/uzK7anPdLreiODELu1r5Fy7qDoa+P9KhTEWtUGplNdclvPlNgGw80qZo1GvKUZX TWmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:message-id; bh=63iK/S5iCoqX9uDkY9v81rlLvJFsshlbqe82R3GPaxo=; b=SieUwhvD1cXYddlHFaAp45SChKDaFuR2nqrucsROMdlivNAA0OqqBy04hL3JaE4lVI ZTf97vUVW3FdfI+5gJL3VxD8GmBjne8XFK/8AwsynQCAB0M3Coj2nf0BZq1jmwLxodTQ uVO4o2MkVcmUqAP5CGxN/AN4WA1A9RpoqTfcAfUuVnNCyUt2w23zACKrbpaEv01zlP1v w277nCQB/tUwmot4HPBOvpqIFqz15oS9QimhPdNABo/H494DqGBm5XNGH9fQhlk/4fl0 zMwMsNf4jDGY15CZ1AzCmFtbcBvNBLmw2ATVRbwfCa4IYjsBz2r/DgvLsuSZOhFWUi/U jX6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si464915ejr.2.2020.10.22.01.36.34; Thu, 22 Oct 2020 01:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2508223AbgJVG33 (ORCPT + 99 others); Thu, 22 Oct 2020 02:29:29 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:35612 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503633AbgJVG33 (ORCPT ); Thu, 22 Oct 2020 02:29:29 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4CGyBZ0btYz9vBKd; Thu, 22 Oct 2020 08:29:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 3Yi_ud8vKGm4; Thu, 22 Oct 2020 08:29:26 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4CGyBY6pFWz9vBKb; Thu, 22 Oct 2020 08:29:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CBE4F8B805; Thu, 22 Oct 2020 08:29:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id RZPUlOz3ue1r; Thu, 22 Oct 2020 08:29:26 +0200 (CEST) Received: from po17688vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 893BE8B769; Thu, 22 Oct 2020 08:29:26 +0200 (CEST) Received: by po17688vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 2C942667EF; Thu, 22 Oct 2020 06:29:26 +0000 (UTC) Message-Id: <648e2448e938d52d0b5887445e018ca584edc06d.1603348103.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH v1 01/20] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 22 Oct 2020 06:29:26 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8xx, we get the following features: [ 0.000000] cpu_features = 0x0000000000000100 [ 0.000000] possible = 0x0000000000000120 [ 0.000000] always = 0x0000000000000000 This is not correct. As CONFIG_PPC_8xx is mutually exclusive with all other configurations, the three lines should be equal. The problem is due to CPU_FTRS_GENERIC_32 which is taken when CONFIG_BOOK3S_32 is NOT selected. This CPU_FTRS_GENERIC_32 is pointless because there is no generic configuration supporting all 32 bits but book3s/32. Remove this pointless generic features definition to unbreak the calculation of 'possible' features and 'always' features. Fixes: 76bc080ef5a3 ("[POWERPC] Make default cputable entries reflect selected CPU family") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/cputable.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 93bc70d4c9a1..c596bab134e2 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -409,7 +409,6 @@ static inline void cpu_feature_keys_init(void) { } CPU_FTR_DBELL | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_DEBUG_LVL_EXC | CPU_FTR_EMB_HV | CPU_FTR_ALTIVEC_COMP | \ CPU_FTR_CELL_TB_BUG | CPU_FTR_SMT) -#define CPU_FTRS_GENERIC_32 (CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) /* 64-bit CPUs */ #define CPU_FTRS_PPC970 (CPU_FTR_LWSYNC | \ @@ -520,8 +519,6 @@ enum { CPU_FTRS_7447 | CPU_FTRS_7447A | CPU_FTRS_82XX | CPU_FTRS_G2_LE | CPU_FTRS_E300 | CPU_FTRS_E300C2 | CPU_FTRS_CLASSIC32 | -#else - CPU_FTRS_GENERIC_32 | #endif #ifdef CONFIG_PPC_8xx CPU_FTRS_8XX | @@ -596,8 +593,6 @@ enum { CPU_FTRS_7447 & CPU_FTRS_7447A & CPU_FTRS_82XX & CPU_FTRS_G2_LE & CPU_FTRS_E300 & CPU_FTRS_E300C2 & CPU_FTRS_CLASSIC32 & -#else - CPU_FTRS_GENERIC_32 & #endif #ifdef CONFIG_PPC_8xx CPU_FTRS_8XX & -- 2.25.0