Linux EDAC development
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>
Cc: yazen.ghannam@amd.com,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding
Date: Fri, 16 Jun 2023 10:16:51 -0400	[thread overview]
Message-ID: <471df10c-782d-f251-f8ff-59b01ed097b2@amd.com> (raw)
In-Reply-To: <SJ1PR11MB60834DD80A6193F959719CF4FC5BA@SJ1PR11MB6083.namprd11.prod.outlook.com>

On 6/15/2023 1:54 PM, Luck, Tony wrote:
>>          for_each_possible_cpu(cpu) {
>>                  if (cpu_data(cpu).initial_apicid == lapic_id) {
>>                          m.extcpu = cpu;
> 
> Are there any other places in the kernel where we need to find the
> Linux CPU number starting from the apic id?
> 
> I briefly looked a while back when I needed this for some
> debug use case and didn't find it then. But Linux changes
> and maybe there are some now.
> 
> Which is a long way to say I'd like to see boot code initialize an array so the above
> could just be:
> 
> 	m.extcpu = lapic_to_cpu[lapic_id];
>

So functionally the inverse of "x86_cpu_to_apicid", right? Though not 
per_cpu, of course.

I'll try and write this up if I don't find anything like it.

> But we'd need at least a couple of use cases to justify.
> 

Can you describe your original use case?

Thanks,
Yazen


  reply	other threads:[~2023-06-16 14:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 16:20 [PATCH] x86/mce: Schedule mce_setup() on correct CPU for CPER decoding Yazen Ghannam
2023-04-17 17:17 ` Luck, Tony
2023-04-17 17:28   ` Yazen Ghannam
2023-04-17 17:39     ` Luck, Tony
2023-06-09 14:26       ` Yazen Ghannam
2023-06-15 15:20 ` Borislav Petkov
2023-06-15 15:34   ` Yazen Ghannam
2023-06-15 16:20     ` Borislav Petkov
2023-06-15 17:02       ` Yazen Ghannam
2023-06-15 17:39         ` Yazen Ghannam
2023-06-15 17:54           ` Luck, Tony
2023-06-16 14:16             ` Yazen Ghannam [this message]
2023-06-16 16:05               ` Luck, Tony

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=471df10c-782d-f251-f8ff-59b01ed097b2@amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.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