]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/fred: Enable FRED by default
authorH. Peter Anvin <hpa@zytor.com>
Wed, 25 Mar 2026 23:01:47 +0000 (16:01 -0700)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 27 Mar 2026 15:04:47 +0000 (16:04 +0100)
When FRED was added to the mainline kernel, it was set up as an explicit
opt-in due to the risk of regressions before hardware was available publicly.

Now, Panther Lake (Core Ultra 300 series) has been released, and benchmarking
by Phoronix has shown that it provides a significant performance benefit on
most workloads:

  https://www.phoronix.com/review/intel-fred-panther-lake

Accordingly, enable FRED by default if the CPU supports it. FRED can of
course still be disabled via the fred=off command line option.

Touch up Kconfig help too.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://patch.msgid.link/20260325230151.1898287-2-hpa@zytor.com
Documentation/admin-guide/kernel-parameters.txt
arch/x86/Kconfig
arch/x86/kernel/cpu/common.c

index 03a550630644f43d36b69ae79e6d66f42d75426d..bfa8a20ccc378c669fb212be86966899d14ea553 100644 (file)
@@ -1750,8 +1750,8 @@ Kernel parameters
        fred=           [X86-64]
                        Enable/disable Flexible Return and Event Delivery.
                        Format: { on | off }
-                       on: enable FRED when it's present.
-                       off: disable FRED, the default setting.
+                       on: enable FRED when it's present, the default setting.
+                       off: disable FRED.
 
        ftrace=[tracer]
                        [FTRACE] will set and start the specified tracer
index e2df1b147184a6ed451a9d82a6cbfc72a78aa253..876b663dcf3806e9bc78c41526b16ef46137dff5 100644 (file)
@@ -557,7 +557,7 @@ config X86_FRED
        bool "Flexible Return and Event Delivery"
        depends on X86_64
        help
-         When enabled, try to use Flexible Return and Event Delivery
+         When enabled, use Flexible Return and Event Delivery
          instead of the legacy SYSCALL/SYSENTER/IDT architecture for
          ring transitions and exception/interrupt handling if the
          system supports it.
index a8ff4376c2860e20c5f65d3167d0c53fb876a87a..0b02cb038d7f09d38b015d9b99dcb55e09c57fc5 100644 (file)
@@ -1746,7 +1746,7 @@ static void __init cpu_parse_early_param(void)
 
        /* Minimize the gap between FRED is available and available but disabled. */
        arglen = cmdline_find_option(boot_command_line, "fred", arg, sizeof(arg));
-       if (arglen != 2 || strncmp(arg, "on", 2))
+       if (arglen == 3 && !strncmp(arg, "off", 3))
                setup_clear_cpu_cap(X86_FEATURE_FRED);
 
        arglen = cmdline_find_option(boot_command_line, "clearcpuid", arg, sizeof(arg));