Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9080158pxu; Mon, 28 Dec 2020 06:09:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxopmwgtnt+81fPpeXgcOgctwp7LiPGg6uY8UENeWYNFOw7aRvDisTu1mPOfgrpGOTswh40 X-Received: by 2002:aa7:c151:: with SMTP id r17mr41680917edp.106.1609164597197; Mon, 28 Dec 2020 06:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164597; cv=none; d=google.com; s=arc-20160816; b=AmQe38Z2gwxz/V7MGsXFT4GCBvt7Rs0tsJb5EN7hDKJnbIh9kd5yYXQWqsVV/t7nuJ g/Rd5KPqtfPh8LeuNBLHT03txcAiKSUGy1uY9szNbhSKdCemTbF7W8cKE28GEJXIghtI //MVbFZzTFN+hhXoijcJAQGJg3EA8WkJ91twFIiWBuCRObjVnrJgA5ovxE8IVHUO2mBS RW1+0ZjQeJcxI+U4bcfJW+HBNBnw/rM0NfdLgtha4O3kf6Pe1CmttiPi9vfxN4favyI8 GDp553zTA8y35U4pErMr3KM0+l3C3qaJncrZXblWlWYUztSGZJJVhJ9mOHiYa45NP5+O hDiA== 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=SSAUl+j2iD/yEkWonfLUiLN6S13UJaLL8Y12EgCRTAs=; b=guajfm8CRvsoioo6pKHYbrJp0aM/JzioCUv+ce8PUEjedikDWuUSodcZl7hQot5NQz y5xJnCRdeYz582DJsXlR+tNSvobRCfZbHsxl9lAKsDxfnp6LmGEw3NmP3vb0Nzs6xHGd KWt/1zrk7zYQtV1dvxoywemeyEAVQUrP1nwpHNZ8Wi6wOStjLwKd2Oe0GDrGEH9bFZRV VWWgX7T0tLq4k+mQf+PPEDMPqaknxjWms45Sc4fvGQy+eHCzH1uU9s4LB/edGUiu6uxh aRmPkd3Zgt/b593L+y5GImsVyFKtY4DyV8IvkwIh5hu3ZNWHW8yikOIM9ekwZlPFRX8x 0/iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zs9IG2OE; 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 o7si20243791edq.20.2020.12.28.06.09.33; Mon, 28 Dec 2020 06:09:57 -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=zs9IG2OE; 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 S2438342AbgL1OHK (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:41336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438206AbgL1OGr (ORCPT ); Mon, 28 Dec 2020 09:06:47 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4CE29207CC; Mon, 28 Dec 2020 14:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164366; bh=L2oQ7vS2PuVGUFiLlIMu+HTccOljxwDmI47xCwiPMa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zs9IG2OEwYT8sn+f1CRl7GH//VovXKDIh7FQCp3sXQWeY4BqFAtGEfPyf+z/lRMd2 QxIv8G6M7r/IOiQzBL4Io29YhgiMM8n4IjsjNvEYGKgHF1UcndruPPHwmP2wrNrX2N 09ofadRxNIvlDup2kK6XALXuP827X4mU7kbLc/UY= 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 5.10 156/717] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32 Date: Mon, 28 Dec 2020 13:42:34 +0100 Message-Id: <20201228125028.429590492@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 3d2f94afc13ae..5e31960a56a9d 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.27.0