From: Borislav Petkov <bp@suse.de>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com, peterz@infradead.org,
Yazen.Ghannam@amd.com
Subject: Re: [PATCH v2 1/2] x86/amd: Refactor topology extension related code
Date: Sat, 22 Jul 2017 18:12:15 +0200 [thread overview]
Message-ID: <20170722161215.GA13329@nazgul.tnic> (raw)
In-Reply-To: <1500688839-30247-2-git-send-email-suravee.suthikulpanit@amd.com>
On Fri, Jul 21, 2017 at 09:00:38PM -0500, Suravee Suthikulpanit wrote:
> Refactoring in preparation for subsequent changes.
> There is no functional change.
>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> ---
> arch/x86/kernel/cpu/amd.c | 79 ++++++++++++++++++++++++++---------------------
> 1 file changed, 44 insertions(+), 35 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index bb5abe8..74d8d7c 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -297,54 +297,63 @@ static int nearby_node(int apicid)
> #endif
>
> /*
> - * Fixup core topology information for
> - * (1) AMD multi-node processors
> - * Assumption: Number of cores in each internal node is the same.
> - * (2) AMD processors supporting compute units
> + * Get topology information via X86_FEATURE_TOPOEXT
> */
> -#ifdef CONFIG_SMP
> -static void amd_get_topology(struct cpuinfo_x86 *c)
> +static void __get_topoext(struct cpuinfo_x86 *c)
> {
> - u8 node_id;
> + u32 eax, ebx, ecx, edx;
> int cpu = smp_processor_id();
>
> - /* get information required for multi-node processors */
> - if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
> - u32 eax, ebx, ecx, edx;
> + cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
>
> - cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
> + smp_num_siblings = ((ebx >> 8) & 0xff) + 1;
>
> - node_id = ecx & 0xff;
When reviewers ask you about a preparatory cleanup patch, you don't
sneak in changes in it - you *only* *move* the code so that the change
is *absolutely* comprehensible. Ontop you do changes. Don't tell me you
didn't know that!
Try again.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
next prev parent reply other threads:[~2017-07-22 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-22 2:00 [PATCH v2 0/2] x86/amd: Refactor and fixup family17h cpu_core_id Suravee Suthikulpanit
2017-07-22 2:00 ` [PATCH v2 1/2] x86/amd: Refactor topology extension related code Suravee Suthikulpanit
2017-07-22 16:12 ` Borislav Petkov [this message]
2017-07-24 3:28 ` Suravee Suthikulpanit
2017-07-24 7:15 ` Borislav Petkov
2017-07-23 19:25 ` kbuild test robot
2017-07-22 2:00 ` [PATCH v2 2/2] x86/amd: Fixup cpu_core_id for family17h downcore configuration Suravee Suthikulpanit
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=20170722161215.GA13329@nazgul.tnic \
--to=bp@suse.de \
--cc=Yazen.Ghannam@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=suravee.suthikulpanit@amd.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
all inboxes | Powered by JetHome®