From nobody Sun Feb 8 04:45:41 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F4B413BEB4; Thu, 25 Jan 2024 18:21:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706206900; cv=none; b=qUj5EdBULtE9mOKL4SxKPs21N7kG4zpy2r2I/3sQ0z2TUpRksWUtBlrUQgwXFd2C6yFh+tnFJESVbk4g3jJrkgGw6zGNDzghON5gzoj9eQ09iW39nfW2f5KFJ9sjYVVUp8kmK/yNN5OYxlkMS7bi6TlyWUlP8QfvL74KAKybOhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706206900; c=relaxed/simple; bh=0ukaSdLB7QrrDZhuoXZBBuAGXfiReFxv7PEmTV3Xlbc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=E9z5PyT+1KoQ4Su0gXkuf/aKT0XKF6LmTUqGboXHR+D03NCnMVDB7GrDQbVe512OdgsW4I4ZL8OnfFmV3JmUVFnV0eh4CO0TDuGuH/lmYM2yD23xdBEnyWE2EwZ+uPHwqd07mdlse0KctmKrma6TIUsqDoHWhyHdx7adJNqfm+A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xZ6B29b5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=y0o61jjK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xZ6B29b5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="y0o61jjK" Date: Thu, 25 Jan 2024 18:21:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706206896; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0BtMfiW5Jmaue+jLIiKXGH1dEvlk5SISeSvAE/4TjV4=; b=xZ6B29b5UYNErTfXEPCqr9QRKtsFG30czeQ6rSvzHgNkVdVKDAgw+DsqZ3aBijI2+b+wJF FdCF/Ct9wirLlTghVCZxHN3YFx0uBOGaz2QEd1mh/ggRpMHSTAqcfK1UDCf3x5fDoDIYP9 znM1JEl0wxl+jl19KiuR76nvhCu6V+aj9GyCb070QfWZ915mafF0PEdCbvdEjGBsYezCwS vdhzTaCSsjRS2wZ7C7DQQYzCNTvnznDj7lghA+oqfiT1rIWvEy0AFs3MYhyw/ceMpHl/5Q pt/twFVnT4tYvMx0/mnstAejDKtQMhS1Q3P9zwcLXQ5PPtd9RHHpOVI4kYCyaw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706206896; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0BtMfiW5Jmaue+jLIiKXGH1dEvlk5SISeSvAE/4TjV4=; b=y0o61jjKWGD4YLbr6GyihBK9pKn14LfTWoYuZqUCOP2hNIGj4tDYpCiIo3WIybaKHJ3UCb gvVWbz7HUTZfPdAQ== From: "tip-bot2 for H. Peter Anvin (Intel)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fred] x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled Cc: Megha Dey , "H. Peter Anvin (Intel)" , Xin Li , Thomas Gleixner , Shan Kang , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231205105030.8698-8-xin3.li@intel.com> References: <20231205105030.8698-8-xin3.li@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170620689604.398.10401404045358407255.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/fred branch of tip: Commit-ID: e554a8ca49d6d6d782f546ae4d7f036946e7dd87 Gitweb: https://git.kernel.org/tip/e554a8ca49d6d6d782f546ae4d7f03694= 6e7dd87 Author: H. Peter Anvin (Intel) AuthorDate: Tue, 05 Dec 2023 02:49:56 -08:00 Committer: Thomas Gleixner CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00 x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled Add CONFIG_X86_FRED to to make cpu_feature_enabled() work correctly with FRED. Originally-by: Megha Dey Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Thomas Gleixner Tested-by: Shan Kang Link: https://lore.kernel.org/r/20231205105030.8698-8-xin3.li@intel.com --- arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/as= m/disabled-features.h index 702d93f..f40b29d 100644 --- a/arch/x86/include/asm/disabled-features.h +++ b/arch/x86/include/asm/disabled-features.h @@ -117,6 +117,12 @@ #define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31)) #endif =20 +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -133,7 +139,7 @@ #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM) #define DISABLED_MASK13 0 #define DISABLED_MASK14 0 #define DISABLED_MASK15 0 diff --git a/tools/arch/x86/include/asm/disabled-features.h b/tools/arch/x8= 6/include/asm/disabled-features.h index 702d93f..f40b29d 100644 --- a/tools/arch/x86/include/asm/disabled-features.h +++ b/tools/arch/x86/include/asm/disabled-features.h @@ -117,6 +117,12 @@ #define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31)) #endif =20 +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -133,7 +139,7 @@ #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM) #define DISABLED_MASK13 0 #define DISABLED_MASK14 0 #define DISABLED_MASK15 0