Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init
From: H. Peter Anvin
Date: Tue Jan 19 2016 - 23:42:35 EST
On 01/19/16 20:39, Brian Gerst wrote:
>
> Can't put it in .init.text or else you get:
> WARNING: arch/x86/kernel/built-in.o(.text+0x4b9): Section mismatch in
> reference from the function __switch_to() to the (unknown reference)
> .init.text:(unknown)
> The function __switch_to() references
> the (unknown reference) __init (unknown).
> This is often because __switch_to lacks a __init
> annotation or the annotation of (unknown) is wrong.
>
> We want to override that because we know that the reference will be
> removed after alternatives run. That's why I created a new section.
>
Right. I wish we could tag reference call sites as clean, not sources
or targets. Sigh.
However, that's not too much of an issue.
-hpa