From: Thomas Gleixner <tglx@linutronix.de>
To: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/AMD: Fix Socket ID for LLC topology for AMD Fam17h systems
Date: Fri, 2 Sep 2016 10:41:25 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1609021040350.5647@nanos> (raw)
In-Reply-To: <1472674900-60688-1-git-send-email-Yazen.Ghannam@amd.com>
On Wed, 31 Aug 2016, Yazen Ghannam wrote:
> The Socket ID is ApicId[bits] on Fam17h systems.
>
> Change substraction to logical AND when extracting socket_id
> from c->apicid.
So Fam17h will only ever have 2 sockets, right?
Thanks,
tglx
> Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
> ---
> arch/x86/kernel/cpu/amd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index f5c69d8..479555f 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -365,7 +365,7 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c)
> if (c->x86 != 0x17 || !cpuid_edx(0x80000006))
> return;
>
> - socket_id = (c->apicid >> bits) - 1;
> + socket_id = (c->apicid >> bits) & 1;
> core_complex_id = (c->apicid & ((1 << bits) - 1)) >> 3;
>
> per_cpu(cpu_llc_id, cpu) = (socket_id << 3) | core_complex_id;
> --
> 1.9.1
>
>
next prev parent reply other threads:[~2016-09-02 8:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-31 20:21 Yazen Ghannam
2016-09-02 8:41 ` Thomas Gleixner [this message]
2016-09-02 12:57 ` Ghannam, Yazen
2016-09-02 13:13 ` Thomas Gleixner
2016-09-02 16:28 ` Ghannam, Yazen
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.20.1609021040350.5647@nanos \
--to=tglx@linutronix.de \
--cc=Yazen.Ghannam@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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®