Re: [PATCH 0/2] x86/fred: enable FRED by default
From: H. Peter Anvin
Date: Tue Mar 24 2026 - 00:24:53 EST
On 2026-03-23 20:05, Xin Li wrote:
>
>
>> On Mar 23, 2026, at 6:01 PM, Sohil Mehta <sohil.mehta@xxxxxxxxx> wrote:
>>
>>> @@ -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 > 0 && (arglen != 2 || strncmp(arg, "on", 2)))
>>> setup_clear_cpu_cap(X86_FEATURE_FRED);
>>
>> Nit: Would it be better to compare with "off" rather than not on?
>
> +1 :)
>
It would change the meaning of something like "fred=0" though.
-hpa