On Tue, Jan 16, 2018 at 03:28:30PM +0100, Peter Zijlstra wrote:
> In order to recognise static_cpu_has() alternatives from any other
> alternative without dodgy heuristics, we need to explicitly mark them.
> Use the new type field for this.
> 
> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org>
> ---
>  arch/x86/include/asm/alternative.h |    1 +
>  arch/x86/include/asm/cpufeature.h  |    5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> --- a/arch/x86/include/asm/alternative.h
> +++ b/arch/x86/include/asm/alternative.h
> @@ -46,6 +46,7 @@
>  #endif
>  
>  #define ALT_TYPE_DEFAULT     0
> +#define ALT_TYPE_STATIC_CPU_HAS      1 /* objtool, static_cpu_has */

Just a nitpick: let's be more verbose in that comment:

/*
 * This alt_instr descriptor is part of a static_cpu_has() construct. Use it to
 * detect its type when processing with other tools, like objtool, for example.
 */
#define ALT_TYPE_STATIC_CPU_HAS 1

With that:

Reviewed-by: Borislav Petkov <b...@suse.de>

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Reply via email to