lkml.org 
[lkml]   [2015]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros
On Tue, 1 Dec 2015, Borislav Petkov wrote:
> #if __GNUC__ >= 4
> extern void warn_pre_alternatives(void);
> diff --git a/arch/x86/include/asm/xor_32.h b/arch/x86/include/asm/xor_32.h
> index 5a08bc8bff33..ccca77dad474 100644
> --- a/arch/x86/include/asm/xor_32.h
> +++ b/arch/x86/include/asm/xor_32.h
> @@ -553,7 +553,7 @@ do { \
> if (cpu_has_xmm) { \
> xor_speed(&xor_block_pIII_sse); \
> xor_speed(&xor_block_sse_pf64); \
> - } else if (cpu_has_mmx) { \
> + } else if (static_cpu_has_safe(X86_FEATURE_MMX)) { \

This one can be boot_cpu_has. It's only used in crypto init for
testing the fastest xor algo.

> diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
> index 3b533cf37c74..8f2ef910c7bf 100644
> --- a/arch/x86/kernel/cpu/mtrr/generic.c
> +++ b/arch/x86/kernel/cpu/mtrr/generic.c
> @@ -349,7 +349,7 @@ static void get_fixed_ranges(mtrr_type *frs)
>
> void mtrr_save_fixed_ranges(void *info)
> {
> - if (cpu_has_mtrr)
> + if (static_cpu_has_safe(X86_FEATURE_MTRR))
> get_fixed_ranges(mtrr_state.fixed_ranges);

This one is not really hotpath either. Its called from cpu_up and from
hibernation code.

Thanks,

tglx


\
 
 \ /
  Last update: 2015-12-05 20:41    [W:0.385 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site