linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, H Peter Anvin <hpa@zytor.com>,
	Christopherson Sean J <sean.j.christopherson@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Radim Krcmar <rkrcmar@redhat.com>,
	Ravi V Shankar <ravi.v.shankar@intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH v2 1/2] x86/cpufeatures: Combine word 11 and 12 into new scattered features word 11
Date: Wed, 19 Jun 2019 14:24:45 -0700	[thread overview]
Message-ID: <20190619212445.GA234387@romley-ivt3.sc.intel.com> (raw)
In-Reply-To: <20190619173628.GI9574@zn.tnic>

On Wed, Jun 19, 2019 at 07:36:28PM +0200, Borislav Petkov wrote:
> On Mon, Jun 17, 2019 at 11:00:15AM -0700, Fenghua Yu wrote:
> > @@ -832,33 +857,6 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
> >  		c->x86_capability[CPUID_D_1_EAX] = eax;
> > -	/* Additional Intel-defined flags: level 0x0000000F */
> > -	if (c->cpuid_level >= 0x0000000F) {
> What I meant with having a separate patch doing the carve out is to have
> a single patch doing *only* code movement - no changes, no nothing. So
> that it is clear what happens. Intermixing code movement and changes is
> a bad idea and hard to review.
> 
> IOW, I did this:
> 
> ---
> From cef4f58a3da0465bbff33b2d669cc600b775f3ba Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <bp@suse.de>
> Date: Wed, 19 Jun 2019 17:24:34 +0200
> Subject: [PATCH] x86/cpufeatures: Carve out CQM features retrieval
> 
> ... into a separate function for better readability. Split out from a
> patch from Fenghua Yu <fenghua.yu@intel.com> to keep the mechanical,
> sole code movement separate for easy review.
> 
> No functional changes.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: x86@kernel.org
> ---
>  arch/x86/kernel/cpu/common.c | 60 ++++++++++++++++++++----------------
>  1 file changed, 33 insertions(+), 27 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 2c57fffebf9b..fe6ed9696467 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -801,6 +801,38 @@ static void init_speculation_control(struct cpuinfo_x86 *c)
>  	}
>  }
>  
> +static void init_cqm(struct cpuinfo_x86 *c)
> +{
> +	u32 eax, ebx, ecx, edx;
> 
> This way you have *pure* code movement only.
> 
> And then your second patch turns into this, which shows *exactly* what
> has been changed in init_cqm().

Yes, the added patch makes this patch set more clear and readable.

> 
> Please have a look and send me only the now third patch with corrected
> commit message.
> 
> From e33527b8cde8bef84cdc90651d1a1c7a9a5234d7 Mon Sep 17 00:00:00 2001
> From: Fenghua Yu <fenghua.yu@intel.com>
> Date: Wed, 19 Jun 2019 18:51:09 +0200
> Subject: [PATCH] x86/cpufeatures: Combine word 11 and 12 into a new
>  scattered features word
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> It's a waste for the four X86_FEATURE_CQM_* feature bits to occupy two
> whole feature bits words. To better utilize feature words, re-define
> word 11 to host scattered features and move the four X86_FEATURE_CQM_*
> features into Linux defined word 11. More scattered features can be
> added in word 11 in the future.

I checked and tested the updated patch set (now three patches). They
look much better than v2.

I will send you the now third patch with corrected commit message
in the other email thread.

Thanks.

-Fenghua

  reply	other threads:[~2019-06-19 21:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 18:00 [PATCH v2 0/2] x86/cpufeatures: Re-arrange a few features and enumerate AVX512 BFLOAT16 intructions Fenghua Yu
2019-06-17 18:00 ` [PATCH v2 1/2] x86/cpufeatures: Combine word 11 and 12 into new scattered features word 11 Fenghua Yu
2019-06-19 17:36   ` Borislav Petkov
2019-06-19 21:24     ` Fenghua Yu [this message]
2019-06-20 11:37   ` [tip:x86/cpu] x86/cpufeatures: Combine word 11 and 12 into a new scattered features word tip-bot for Fenghua Yu
2019-06-17 18:00 ` [PATCH v2 2/2] x86/cpufeatures: Enumerate new AVX512 BFLOAT16 instructions Fenghua Yu
2019-06-19 17:31   ` Borislav Petkov
2019-06-19 21:34     ` Fenghua Yu
2019-06-20 10:37       ` Borislav Petkov
2019-06-20 14:06         ` Fenghua Yu
2019-06-20 11:38   ` [tip:x86/cpu] x86/cpufeatures: Enumerate the " tip-bot for Fenghua Yu

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=20190619212445.GA234387@romley-ivt3.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).