mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kani, Toshi" <toshi.kani@hpe.com>
To: Borislav Petkov <bp@alien8.de>, Justin He <Justin.He@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, James Morse <James.Morse@arm.com>,
	Tony Luck <tony.luck@intel.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	Robert Richter <rric@kernel.org>,
	Shuai Xue <xueshuai@linux.alibaba.com>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>
Subject: RE: 回复: [PATCH] ACPI: APEI: move edac_init ahead of ghes platform drv register
Date: Tue, 9 Aug 2022 14:36:33 +0000	[thread overview]
Message-ID: <PH7PR84MB18380596CA00597E9D5D18DF82629@PH7PR84MB1838.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <YvJB5cxSldpigw1g@zn.tnic>

On Tuesday, August 9, 2022 5:16 AM, Borislav Petkov wrote:
> bool ghes_edac_driver_is_preferred()
> {
> 	if (IS_ENABLED(CONFIG_X86)) {
>                 /* Check if safe to enable on this system */
>                 idx = acpi_match_platform_list(plat_list);
> 	} else if (ARM) {
> 		/* insert ARM logic here */
> 	}
> }
> 
> That function should be called by the EDAC modules which compete with
> ghes_edac.

The logic needs to be latched on ghes presence, i.e., the condition is
(ghes-present) && (ghes-preferred).  Currently, ghes_probe() calls
ghes_edac_register() for this.

> In the x86 case, that's sb_edac, skx_edac and amd64_edac, I guess.

Agree that changing all edac drivers to check with GHES is an option.
In this approach, though, they will need to check with foo_preferred()
when a new FW interface FOO is introduced.
 
> It all depends on what platforms Toshi wants to load it - I'm guessing
> HPE has both Intel and AMD platforms where they prefer ghes_edac.

Yes, and HPE will keep the same platform ID for GHES/FF model.

> On ARM, that's up to ARM folks.
> 
> > Because I notice that lots of other edac drivers are probing like:
> > ...
> >         owner = edac_get_owner();
> >         if (owner && strncmp(owner, EDAC_MOD_STR,
> sizeof(EDAC_MOD_STR)))
> >                 return -EBUSY;
> 
> No, that's a silly mechanism to allow a single EDAC driver to load on
> the system. But your test will go before it, at the very beginning of
> the init function.

Well, this check being interface independent (like GHES) is good at least.

Toshi

  reply	other threads:[~2022-08-09 14:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  2:32 Jia He
2022-08-08 18:17 ` Rafael J. Wysocki
2022-08-08 18:37   ` Borislav Petkov
2022-08-08 20:40     ` Kani, Toshi
2022-08-08 20:57       ` Borislav Petkov
2022-08-08 21:11         ` Kani, Toshi
2022-08-08 21:20           ` Borislav Petkov
2022-08-08 21:36             ` Kani, Toshi
2022-08-09  7:40               ` Borislav Petkov
2022-08-09  9:24                 ` 回复: " Justin He
2022-08-09 11:15                   ` Borislav Petkov
2022-08-09 14:36                     ` Kani, Toshi [this message]
2022-08-09 15:14                       ` Borislav Petkov
2022-08-09 15:39                         ` Kani, Toshi
2022-08-09 17:11                           ` Borislav Petkov
2022-08-09 17:36                             ` Kani, Toshi
2022-08-09 16:51                     ` Justin He
2022-08-09 17:15                       ` Borislav Petkov
2022-08-09 18:46                         ` Borislav Petkov
2022-08-10  6:00                           ` Justin He
2022-08-10  8:28                             ` Borislav Petkov
2022-08-10  8:53                               ` Justin He
2022-08-11  0:39                           ` Justin He
2022-08-11  7:40                             ` Borislav Petkov
2022-08-09 10:06       ` Justin He
2022-08-09 14:57         ` Kani, Toshi

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=PH7PR84MB18380596CA00597E9D5D18DF82629@PH7PR84MB1838.NAMPRD84.PROD.OUTLOOK.COM \
    --to=toshi.kani@hpe.com \
    --cc=James.Morse@arm.com \
    --cc=Justin.He@arm.com \
    --cc=bp@alien8.de \
    --cc=jarkko@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=xueshuai@linux.alibaba.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

all inboxes | Powered by JetHome®