Re: [PATCH v2 2/5] x86/cpuid: refactor setup_clear_cpu_cap()/clear_cpu_cap()

From: Borislav Petkov
Date: Fri Oct 21 2022 - 12:20:07 EST


On Mon, Jul 18, 2022 at 05:11:20PM +0300, Maxim Levitsky wrote:
> Currently setup_clear_cpu_cap passes NULL 'struct cpuinfo_x86*'
> to clear_cpu_cap to indicate that capability should be cleared from boot_cpu_data.
>
> Later that is used in clear_feature to do recursive call to
> clear_cpu_cap together with clearing the feature bit from 'cpu_caps_cleared'
>
> Remove that code and just call the do_clear_cpu_cap on boot_cpu_data directly
> from the setup_clear_cpu_cap.
>
> The only functional change this introduces is that now calling clear_cpu_cap
> explicitly on boot_cpu_data also sets the bits in cpu_caps_cleared,
> which is the only thing that makes sense anyway.
>
> All callers of both functions were checked for this and fixed.

Change looks ok. What I can't grok is this sentence: what was checked
and fixed where?

What does need fixing and why?

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette