linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Qing Wang <wangqing@vivo.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch_topology: Do not set llc_sibling if llc_id is invalid
Date: Mon, 11 Apr 2022 18:07:45 +0300	[thread overview]
Message-ID: <CAHp75Vc-frdJSAMxK1YpHwmPa_-0fTpRxq=QObcux3Jt=5+9kw@mail.gmail.com> (raw)
In-Reply-To: <1649644580-54626-1-git-send-email-wangqing@vivo.com>

On Mon, Apr 11, 2022 at 12:10 PM Qing Wang <wangqing@vivo.com> wrote:
>
> From: Wang Qing <wangqing@vivo.com>
>
> When ACPI is not enabled, cpuid_topo->llc_id = cpu_topo->llc_id = -1, which
> will set llc_sibling 0xff(...), this is misleading.

Shouldn't it be a Fixes tag then?

> Don't set llc_sibling(default 0) if we don't know the cache topology.

...

> -               if (cpuid_topo->llc_id == cpu_topo->llc_id) {
> +               if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) {

I'm wondering if more strict check is better here, i.e.

               if (cpu_topo->llc_id >= 0 && cpuid_topo->llc_id ==
cpu_topo->llc_id) {

>                         cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling);
>                         cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling);
>                 }

-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2022-04-11 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  2:36 [PATCH] arch_topology: Do not set llc_sibling if llc_id is invalid Qing Wang
2022-04-11  8:37 ` Sudeep Holla
2022-04-11  9:32   ` Greg Kroah-Hartman
2022-04-11 15:07 ` Andy Shevchenko [this message]
2022-04-12  8:58   ` Sudeep Holla
  -- strict thread matches above, loose matches on Subject: below --
2022-03-28  7:24 Qing Wang

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='CAHp75Vc-frdJSAMxK1YpHwmPa_-0fTpRxq=QObcux3Jt=5+9kw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=wangqing@vivo.com \
    /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).