[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1512051938260.3595@nanos>
Date: Sat, 5 Dec 2015 19:50:11 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Borislav Petkov <bp@...en8.de>
cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
David Sterba <dsterba@...e.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Matt Mackall <mpm@...enic.com>, Chris Mason <clm@...com>,
Josef Bacik <jbacik@...com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists