On 06.02.2026 17:15, Alejandro Vallejo wrote: > @@ -738,11 +738,10 @@ static bool __init retpoline_calculations(void) > unsigned int ucode_rev = this_cpu(cpu_sig).rev; > bool safe = false; > > - if ( boot_cpu_data.vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON) ) > + if ( cpu_vendor() & (X86_VENDOR_AMD | X86_VENDOR_HYGON) ) > return true; > > - if ( boot_cpu_data.vendor != X86_VENDOR_INTEL || > - boot_cpu_data.family != 6 ) > + if ( !(cpu_vendor() & X86_VENDOR_INTEL) || boot_cpu_data.family != 6 ) > return false;
At the example of this (applies throughout this patch): With the panic() in patch 03 the transformation looks correct. Without that panic(), or without being explicitly aware of it, this gives the impression of explicitly doing an unsafe thing: Even though by way of boot_cpu_data.vendor we know what vendor's CPU we're on, we're acting as if we didn't know. I'm really uncertain whether such changes are worth it with the mere goal of reducing code size. Even beyond the concern raised, this feels like it might be increasing the risk of introducing subtle bugs. I wonder what Andrew and Roger think in this regard. Jan
