[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH7PR84MB18380596CA00597E9D5D18DF82629@PH7PR84MB1838.NAMPRD84.PROD.OUTLOOK.COM>
Date: Tue, 9 Aug 2022 14:36:33 +0000
From: "Kani, Toshi" <toshi.kani@....com>
To: Borislav Petkov <bp@...en8.de>, Justin He <Justin.He@....com>
CC: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, James Morse <James.Morse@....com>,
Tony Luck <tony.luck@...el.com>,
"Mauro Carvalho Chehab" <mchehab@...nel.org>,
Robert Richter <rric@...nel.org>,
Shuai Xue <xueshuai@...ux.alibaba.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
"open list:EDAC-CORE" <linux-edac@...r.kernel.org>
Subject: RE: 回复: [PATCH] ACPI: APEI: move edac_init ahead of ghes platform drv register
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
Powered by blists - more mailing lists