On 23/01/2024 11:00 am, Jan Beulich wrote:
> While not performance critical, these hook invocations still want
> converting: This way all pre-filled struct cpu_dev instances can become
> __initconst_cf_clobber, thus allowing to eliminate further 8 ENDBR
> during the 2nd phase of alternatives patching (besides moving previously
> resident data to .init.*).
>
> Since all use sites need touching anyway, take the opportunity and also
> address a Misra C:2012 Rule 5.5 violation: Rename the this_cpu static
> variable.
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>

Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

> ---
> With LTO it might end up necessary to tag as __used more than just
> "default_cpu".

Why is it even needed here?

LTO can't rid early_cpu_init() of the default clause, so can't make
default_cpu unreferenced, I don't think.

> Perhaps __used would better be integrated into __initconst_cf_clobber,
> to be independent of the compiler potentially eliding structure
> instances.

Maybe.  I guess the issue here is that the tools really can't see the
connection between being in the clobber section, and alternatives going
and making a modification.

~Andrew

Reply via email to