mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	David Sterba <dsterba@suse.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Matt Mackall <mpm@selenic.com>, Chris Mason <clm@fb.com>,
	Josef Bacik <jbacik@fb.com>
Subject: Re: [PATCH 3/4] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros
Date: Sat, 5 Dec 2015 19:50:11 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.11.1512051938260.3595@nanos> (raw)
In-Reply-To: <1448982023-19187-4-git-send-email-bp@alien8.de>

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

  reply	other threads:[~2015-12-05 18:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 15:00 [PATCH 0/4] x86/cpufeature: Cleanup stuff more Borislav Petkov
2015-12-01 15:00 ` [PATCH 1/4] x86/cpufeature: Move some of the scattered feature bits to x86_capability Borislav Petkov
2015-12-01 15:00 ` [PATCH 2/4] x86/cpufeature: Cleanup get_cpu_cap() Borislav Petkov
2015-12-01 15:00 ` [PATCH 3/4] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros Borislav Petkov
2015-12-05 18:50   ` Thomas Gleixner [this message]
2015-12-06 14:27     ` [PATCH -v1.1 " Borislav Petkov
2015-12-05 19:59   ` [PATCH " Thomas Gleixner
2015-12-05 20:03     ` Borislav Petkov
2015-12-01 15:00 ` [PATCH 4/4] x86/cpu: Provide a config option to disable static_cpu_has Borislav Petkov
2015-12-01 16:24   ` Josh Triplett
2015-12-01 16:57     ` Borislav Petkov
2015-12-07  9:39 [PATCH 0/4] x86/cpufeature: Cleanup, p1 Borislav Petkov
2015-12-07  9:39 ` [PATCH 3/4] x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros Borislav Petkov
2015-12-07  9:45   ` Ingo Molnar
2015-12-07  9:54     ` Borislav Petkov
2015-12-07 13:36       ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.11.1512051938260.3595@nanos \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=bp@alien8.de \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jbacik@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®