From: Zhengqiang <zhengqiang10@huawei.com>
To: James Morse <james.morse@arm.com>, Borislav Petkov <bp@alien8.de>,
Tyler Baicar <tbaicar@qti.qualcomm.com>
Cc: mchehab@kernel.org, toshi.kani@hpe.com,
linux-edac@vger.kernel.org, linuxarm@huawei.com,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: ghes_edac: enable HIP08 platform edac driver
Date: Fri, 18 May 2018 15:13:40 +0800 [thread overview]
Message-ID: <5AFE7D24.3090408@huawei.com> (raw)
On 2018/5/18 2:02, James Morse wrote:
> Hi guys,
>
> Tyler, Zhengqiang, I assume all your shipped platforms with HEST->GHES entries
> also have DMI tables.
>
Sure, Our ARM64 platform have DMI tables. thanks.
>
> On 16/05/18 19:29, Borislav Petkov wrote:
>> On Wed, May 16, 2018 at 02:38:38PM +0100, James Morse wrote:
>>> XGene has its own edac driver, but it doesn't probe when booted via ACPI so
>>> won't conflict with ghes_edac.
>>
>> Actually it will. EDAC core can have only one EDAC driver loaded. Don't
>> ask me why - it has been that way since forever.
>
> By won't probe I mean it only works on DT systems:
>
> | static const struct of_device_id xgene_edac_of_match[] = {
> | { .compatible = "apm,xgene-edac" },
> | {},
> | };
>
> | .driver = {
> | .name = "xgene-edac",
> | .of_match_table = xgene_edac_of_match,
> | },
>
> To work on a system with GHES it would need an 'struct acpi_device_id' to
> describe the HID (?) and populate driver's acpi_match_table.
>
>
>> We can change it some
>> day but frankly, I don't see reasoning for it. One driver can easily
>> manage *all* error sources on a system, I'd say.
>
> I agree, there is no reason to support two at the same time, if this happens
> then there is probably something wrong with the platform (e.g. races with
> firmware reading the same hardware registers), so we should make some noise.
>
> Xgene's edac driver would be a good example of this, it looks like it reads data
> from some mmio region, if something else is doing the same we're going to make a
> mess.
>
>
>>> So I think we're good to make the whitelist x86 only.
>>> Your diff-hunk makes 'idx=-1', so we always get the 'Unfortunately' warning. I'd
>>> like to suppress this unless force_load has been used.
>>
>> Yeah, we should handle that differently for ARM. Toshi added the idx
>> thing in
>>
>> 5deed6b6a479 ("EDAC, ghes: Add platform check")
>>
>> to dump this when the platform is not whitelisted. So let's do that:
>>
>> ---
>> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
>> index 863fbf3db29f..473aeec4b1da 100644
>> --- a/drivers/edac/ghes_edac.c
>> +++ b/drivers/edac/ghes_edac.c
>> @@ -440,12 +440,16 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
>> struct mem_ctl_info *mci;
>> struct edac_mc_layer layers[1];
>> struct ghes_edac_dimm_fill dimm_fill;
>> - int idx;
>> + int idx = -1;
>>
>> - /* Check if safe to enable on this system */
>> - idx = acpi_match_platform_list(plat_list);
>> - if (!force_load && idx < 0)
>> - return -ENODEV;
>
> v4.17-rc5 has 'return 0' here. Wouldn't this change means no ghes can be
> registered unless ghes_edac is also supported by the platform?
> Shouldn't this be '0' for a silent failure?
>
>
>> + if (IS_ENABLED(CONFIG_X86)) {
>> + /* Check if safe to enable on this system */
>> + idx = acpi_match_platform_list(plat_list);
>> + if (!force_load && idx < 0)
>> + return -ENODEV;
>> + } else {
>> + idx = 0;
>> + }
>>
>> /*
>> * We have only one logical memory controller to which all DIMMs belong.
>
> Tested on Seattle and some cranky homebrew-no-DMI firmware:
> Tested-by: James Morse <james.morse@arm.com>
>
> With the ENODEV/0 thing above:
> Reviewed-by: James Morse <james.morse@arm.com>
>
>
>>> It looks like even the oldest Arm64 ACPI systems have dmi tables, so we can
>>> probably require DMI or the 'force' flag.
>>
>> Well, with the hunk above it would still do ghes_edac_count_dimms() on
>> ARM and if it fails to find something, it will set fake, which is a good
>> sanity-check as it screams loudly. :)
>
>
> Thanks,
>
> James
>
> .
>
---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: zhengqiang10@huawei.com (Zhengqiang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ghes_edac: enable HIP08 platform edac driver
Date: Fri, 18 May 2018 15:13:40 +0800 [thread overview]
Message-ID: <5AFE7D24.3090408@huawei.com> (raw)
In-Reply-To: <8602b133-e0fa-57e2-5159-9d34a1ded85f@arm.com>
On 2018/5/18 2:02, James Morse wrote:
> Hi guys,
>
> Tyler, Zhengqiang, I assume all your shipped platforms with HEST->GHES entries
> also have DMI tables.
>
Sure, Our ARM64 platform have DMI tables. thanks.
>
> On 16/05/18 19:29, Borislav Petkov wrote:
>> On Wed, May 16, 2018 at 02:38:38PM +0100, James Morse wrote:
>>> XGene has its own edac driver, but it doesn't probe when booted via ACPI so
>>> won't conflict with ghes_edac.
>>
>> Actually it will. EDAC core can have only one EDAC driver loaded. Don't
>> ask me why - it has been that way since forever.
>
> By won't probe I mean it only works on DT systems:
>
> | static const struct of_device_id xgene_edac_of_match[] = {
> | { .compatible = "apm,xgene-edac" },
> | {},
> | };
>
> | .driver = {
> | .name = "xgene-edac",
> | .of_match_table = xgene_edac_of_match,
> | },
>
> To work on a system with GHES it would need an 'struct acpi_device_id' to
> describe the HID (?) and populate driver's acpi_match_table.
>
>
>> We can change it some
>> day but frankly, I don't see reasoning for it. One driver can easily
>> manage *all* error sources on a system, I'd say.
>
> I agree, there is no reason to support two at the same time, if this happens
> then there is probably something wrong with the platform (e.g. races with
> firmware reading the same hardware registers), so we should make some noise.
>
> Xgene's edac driver would be a good example of this, it looks like it reads data
> from some mmio region, if something else is doing the same we're going to make a
> mess.
>
>
>>> So I think we're good to make the whitelist x86 only.
>>> Your diff-hunk makes 'idx=-1', so we always get the 'Unfortunately' warning. I'd
>>> like to suppress this unless force_load has been used.
>>
>> Yeah, we should handle that differently for ARM. Toshi added the idx
>> thing in
>>
>> 5deed6b6a479 ("EDAC, ghes: Add platform check")
>>
>> to dump this when the platform is not whitelisted. So let's do that:
>>
>> ---
>> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
>> index 863fbf3db29f..473aeec4b1da 100644
>> --- a/drivers/edac/ghes_edac.c
>> +++ b/drivers/edac/ghes_edac.c
>> @@ -440,12 +440,16 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
>> struct mem_ctl_info *mci;
>> struct edac_mc_layer layers[1];
>> struct ghes_edac_dimm_fill dimm_fill;
>> - int idx;
>> + int idx = -1;
>>
>> - /* Check if safe to enable on this system */
>> - idx = acpi_match_platform_list(plat_list);
>> - if (!force_load && idx < 0)
>> - return -ENODEV;
>
> v4.17-rc5 has 'return 0' here. Wouldn't this change means no ghes can be
> registered unless ghes_edac is also supported by the platform?
> Shouldn't this be '0' for a silent failure?
>
>
>> + if (IS_ENABLED(CONFIG_X86)) {
>> + /* Check if safe to enable on this system */
>> + idx = acpi_match_platform_list(plat_list);
>> + if (!force_load && idx < 0)
>> + return -ENODEV;
>> + } else {
>> + idx = 0;
>> + }
>>
>> /*
>> * We have only one logical memory controller to which all DIMMs belong.
>
> Tested on Seattle and some cranky homebrew-no-DMI firmware:
> Tested-by: James Morse <james.morse@arm.com>
>
> With the ENODEV/0 thing above:
> Reviewed-by: James Morse <james.morse@arm.com>
>
>
>>> It looks like even the oldest Arm64 ACPI systems have dmi tables, so we can
>>> probably require DMI or the 'force' flag.
>>
>> Well, with the hunk above it would still do ghes_edac_count_dimms() on
>> ARM and if it fails to find something, it will set fake, which is a good
>> sanity-check as it screams loudly. :)
>
>
> Thanks,
>
> James
>
> .
>
next reply other threads:[~2018-05-18 7:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 7:13 Zhengqiang [this message]
2018-05-18 7:13 ` [PATCH] ghes_edac: enable HIP08 platform edac driver Zhengqiang
-- strict thread matches above, loose matches on Subject: below --
2018-05-22 2:10 EDAC, ghes: Make platform-based whitelisting x86-only Tyler Baicar
2018-05-22 2:10 ` [PATCH] " Tyler Baicar
2018-05-21 20:44 Borislav Petkov
2018-05-21 20:44 ` [PATCH] " Borislav Petkov
2018-05-21 20:34 Tyler Baicar
2018-05-21 20:34 ` [PATCH] " Tyler Baicar
2018-05-21 17:15 Borislav Petkov
2018-05-21 17:15 ` [PATCH] " Borislav Petkov
2018-05-21 13:48 Tyler Baicar
2018-05-21 13:48 ` [PATCH] " Tyler Baicar
2018-05-21 9:39 Zhengqiang
2018-05-21 9:39 ` [PATCH] " Zhengqiang
2018-05-18 11:20 Borislav Petkov
2018-05-18 11:20 ` [PATCH] " Borislav Petkov
2018-05-18 11:11 ghes_edac: enable HIP08 platform edac driver Borislav Petkov
2018-05-18 11:11 ` [PATCH] " Borislav Petkov
2018-05-17 18:02 James Morse
2018-05-17 18:02 ` [PATCH] " James Morse
2018-05-16 18:29 Borislav Petkov
2018-05-16 18:29 ` [PATCH] " Borislav Petkov
2018-05-16 13:38 James Morse
2018-05-16 13:38 ` [PATCH] " James Morse
2018-05-14 16:47 Borislav Petkov
2018-05-14 16:47 ` [PATCH] " Borislav Petkov
2018-05-14 15:12 James Morse
2018-05-14 15:12 ` [PATCH] " James Morse
2018-05-14 9:47 Borislav Petkov
2018-05-14 4:11 Zhengqiang
2018-05-11 12:19 Borislav Petkov
2018-05-11 11:52 Zhengqiang
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=5AFE7D24.3090408@huawei.com \
--to=zhengqiang10@huawei.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mchehab@kernel.org \
--cc=tbaicar@qti.qualcomm.com \
--cc=toshi.kani@hpe.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.