Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9223948pxu; Mon, 28 Dec 2020 09:44:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwi+S42koTL52bQ5tb5p6oxFkQeESytd8KuuLpFPkVYlsG/zAp7JkzGHj3yx2PZI+HvapS/ X-Received: by 2002:a05:6402:3546:: with SMTP id f6mr19555540edd.242.1609177481613; Mon, 28 Dec 2020 09:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609177481; cv=none; d=google.com; s=arc-20160816; b=s70DNn1PVPkOxAvpBtVcV0OAOJSq0Zcy4TKK1YivSbb+E091t+5ObRr/YhZQcBT3hA YC+D6ppvRP94pen5UdfFzHq6MCsNYWxqLlVH6gw7W6JkPpbnyJao2kHd5av1Ij/fkKlX aKFdP7k0VDCJ0DM+LQbyWa3jzBgtOmxBOW1px8i7Xa5obrk80k3yRZHApR7UEXZY5Hi+ 8TkUKzF5IeyyPkLBBL3dpdgENb20SEjN8c11SOH4K4iikFMf/z7157jYsChC/+XK/TcA /NiXFltLZQLg2VtY+Df6znndez/f9FTggb8dGTPnduXlPk9oCeLsZ45jxUrhxTaZ6a+0 Pg6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vYYlwnJhgJGwYv7sTntXaoo8Tf4VJ1EqV2SeA+tKQ/8=; b=RZc7j3igU1QQWFGnPRi5T+UFAZe9I4yU2u7NLnyiGmIG1FAg/PNatNyBAg3q96hiH4 wUIjg8CtwFAoOzVHiQF4dGYzw3Y49pNoLeVr7yoy4R+oaL5fJ+EKIYDQgaUcclx07ALe HcUb1m1tQzfoXJm443X5M/UesVUn3gjsEauGAGv9CdCGGS55p7mFeYMEuITzbnNVUfsw U6Z3deTdSWvJfHCbXmNV8f14KskOVK41Rkm5d8Jn4w3YaFE50TU/faXZvdcCI5YnlJGn 7kROcB/ODqAI5lJjdt3nWEsyAxczXbWLL16l3eay8EUXDQdEMH3Q8s9qWx79F3O6WkMS 0NoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IR5uXtQS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc4si19086897edb.417.2020.12.28.09.44.19; Mon, 28 Dec 2020 09:44:41 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IR5uXtQS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731991AbgL1NMP (ORCPT + 99 others); Mon, 28 Dec 2020 08:12:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:39606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731889AbgL1NL4 (ORCPT ); Mon, 28 Dec 2020 08:11:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 10183208BA; Mon, 28 Dec 2020 13:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161100; bh=ZJlX41T0hgo1Z6toExChw39aouskNYuChXl0ibefaas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IR5uXtQSv2Xdn2RAylSW6gDJFZ4zNZ2pkWXoGz+A8KJlM1qc0eyYuo8WXhmy6hTxx ncHsgxNBHl3BxdO5NsF8bLEk4a/aHSCl0A4HoN0Jd1XG8VC/f2vRt/xmepmB+KdDOM LBcXTtwdpPLWKC4qfaimPox3m8nM+LA36i5vaj/8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 100/242] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32 Date: Mon, 28 Dec 2020 13:48:25 +0100 Message-Id: <20201228124909.615019815@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit 78665179e569c7e1fe102fb6c21d0f5b6951f084 ] 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/76a85f30bf981d1aeaae00df99321235494da254.1604426550.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- 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 e4451b30d7e32..89a5cdf46ad7f 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -423,7 +423,6 @@ enum { 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_POWER4 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ @@ -515,8 +514,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 | @@ -567,8 +564,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.27.0