Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9036702pxu; Mon, 28 Dec 2020 05:05:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvFcD7eZXL/6nxUw5Re11nD7ClCMTDjM7HX/SYkNn426Z7oBDk/6ZhbBsFXsPHtZ3GvRpz X-Received: by 2002:aa7:d6d8:: with SMTP id x24mr42924432edr.105.1609160724258; Mon, 28 Dec 2020 05:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160724; cv=none; d=google.com; s=arc-20160816; b=I0GPLBIP3aNKleD3dRicVd2qwz6/XQzxtlVh4CX6qpWIxM+DX4Ev1n43TGl92dn0pW cocwsoFHA5IXxDgOfkZnZLaR9fkxLjSe0eSZA15pNDaDkV85Dw7sXxAq4VVjmDC3ARGR e3zdGS0iIOJlocbwO3EjYUYdvoL0oBPuh3+YrS+EVX6lx6h+Oe2aLovprFmfKNYDE/UO O0N1yC5DFd82CMuwcqE+7BmItKIDidupSioU2Mv1V1mahsILpakibvhf0+lzDty7Qfut f6JaHAtmDVh5+Q/tA34zgK+hOY3NkhJxp0cK1ZRO0HXXgwbxvmRPjPtzgt/yqmS1c23R NeLg== 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=gmYEKpEllfH9ve3VzldYM94f8tPGM1Mxp2gPPQJwwSM=; b=kptQ3TIVq4qlYRvA1v40w9XnqZJwiRiUIH3GB0hiWRvv782lavwHVMMnT5vlhvFnXs YoN0tAJqvk3CNxjNpQmki97Itgtdloj/QEQ3Tl8lUlUjiEuERJ73Qz03+QRzwBjDxn0e zLgqK8pL7b7MRiD/3+LlJzXZVOZy3wJMVEeCN+5ckBQllQaKPrwCjPp+ZwgcGhQCDgqI a0NXeviD7VaaGgnJPvzJR8fKQliuBNqbaXZBpI1jQg+P0FTDTnXJ3V56LQmc01mH9v8+ KVl8QYGr2tqYrMivrRnbHyfGNPfanOXQ6uMmDhMXkSAztQNdCj4iY9/ggysC8X4dQPT2 jqIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zVnO5+ty; 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 dp20si18012687ejc.620.2020.12.28.05.05.01; Mon, 28 Dec 2020 05:05:24 -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=zVnO5+ty; 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 S1730026AbgL1NCQ (ORCPT + 99 others); Mon, 28 Dec 2020 08:02:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:58392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730022AbgL1NCP (ORCPT ); Mon, 28 Dec 2020 08:02:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CDB2822AAD; Mon, 28 Dec 2020 13:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160494; bh=2fmLW/om088uHuhHIqZBpB1c8Ng6+o4iSQVawsMcQtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zVnO5+ty3hD9RwyJHKnJH5lUU9KD4JhahjEy9F7R8/7ffY2UVjG/IXX3/TwSvFIbk tkzcCOFNsWtNE+5BvFyHW8J6zLoZR/9wHCD1FaRzAuqlYZntpHqTrQQnhOWKEwHQTn j0iqdr05HrJt/e4BG5kIrViq/CH/m182sf5mU73U= 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.9 071/175] powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32 Date: Mon, 28 Dec 2020 13:48:44 +0100 Message-Id: <20201228124856.685423061@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 cf51aea47510c..090edefe125da 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -419,7 +419,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 | \ @@ -510,8 +509,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_8xx CPU_FTRS_8XX | @@ -562,8 +559,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_8xx CPU_FTRS_8XX & -- 2.27.0