From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, <x86@kernel.org>, <bp@suse.de>
Subject: Re: [PATCH] x86/AMD: Fix LLC ID for AMD Fam17h systems
Date: Thu, 27 Oct 2016 09:58:51 -0400 [thread overview]
Message-ID: <b2f643aa-d161-0dbc-500c-d86426c85170@amd.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1610262134130.5013@nanos>
>> + /*
>> + * LLC is at the Core Complex level.
>> + * Core Complex Id is ApicId[3].
>> + */
>> + else if (c->x86 == 0x17)
>> + per_cpu(cpu_llc_id, cpu) = c->initial_apicid >> 3;
>
> This whole if/else block lacks curly braces. See:
>
> https://marc.info/?l=linux-kernel&m=147351236615103
>
Okay, understood.
>> - /*
>> - * Fix percpu cpu_llc_id here as LLC topology is different
>> - * for Fam17h systems.
>> - */
>> - if (c->x86 != 0x17 || !cpuid_edx(0x80000006))
>> - return;
>> -
>> - 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;
>
> So if I've read the patch correctly then the trivial fix for fam17h would
> have been:
>
>> + per_cpu(cpu_llc_id, cpu) = c->initial_apicid >> 3;
>
> Right?
>
Right.
> And this one liner wants to be a seperate patch with a proper
> explanation. And that simple hunk can be tagged for stable.
>
Okay, I'll make it a separate patch. It still wouldn't be a one-liner
because then socket_id and core_complex_id would be left unused and
should be removed.
> The rest of the patch is cleanup and improvement and want's to be seperated
> out and explained proper.
>
Okay, will do.
Thanks,
Yazen
prev parent reply other threads:[~2016-10-27 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 15:42 Yazen Ghannam
2016-10-26 20:00 ` Thomas Gleixner
2016-10-27 13:58 ` Yazen Ghannam [this message]
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=b2f643aa-d161-0dbc-500c-d86426c85170@amd.com \
--to=yazen.ghannam@amd.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--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®