lkml.org 
[lkml]   [2014]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 03/10] x86, mpx: add macro cpu_has_mpx
On Wed, Jun 18, 2014 at 05:44:09PM +0800, Qiaowei Ren wrote:
> In order to do performance optimization, this patch adds macro
> cpu_has_mpx which will directly return 0 when MPX is not supported
> by kernel.
>
> Signed-off-by: Qiaowei Ren <qiaowei.ren@intel.com>
> ---
> arch/x86/include/asm/cpufeature.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
> index e265ff9..f302d08 100644
> --- a/arch/x86/include/asm/cpufeature.h
> +++ b/arch/x86/include/asm/cpufeature.h
> @@ -339,6 +339,12 @@ extern const char * const x86_power_flags[32];
> #define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU)
> #define cpu_has_topoext boot_cpu_has(X86_FEATURE_TOPOEXT)
>
> +#ifdef CONFIG_X86_INTEL_MPX
> +#define cpu_has_mpx boot_cpu_has(X86_FEATURE_MPX)

I think we don't want those macros anymore because they're obfuscating
the code. You should use static_cpu_has instead.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2014-06-18 12:41    [W:0.424 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site