lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/10] x86: Annotate static_cpu_has alternative
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) <peterz@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 <bp@suse.de>

--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2018-01-18 14:16    [W:0.213 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site