linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-21  9:39 Zhengqiang
  0 siblings, 0 replies; 7+ messages in thread
From: Zhengqiang @ 2018-05-21  9:39 UTC (permalink / raw)
  To: Borislav Petkov, James Morse
  Cc: Tyler Baicar, mchehab, toshi.kani, linux-edac, linuxarm,
	linux-arm-kernel@lists.infradead.org

Thanks, it works for me.

On 2018/5/18 19:20, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> ARM machines all have DMI tables so if they request hw error reporting
> through GHES, then the driver should be able to detect DIMMs and report
> errors successfully (famous last words :)).
> 
> Make the platform-based list x86-specific so that ghes_edac can load on
> ARM.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Reviewed-by: James Morse <james.morse@arm.com>
> Tested-by: James Morse <james.morse@arm.com>
> Cc: Qiang Zheng <zhengqiang10@huawei.com>
> Link: https://lkml.kernel.org/r/1526039543-180996-1-git-send-email-zhengqiang10@huawei.com

Tested-by: Qiang Zheng <zhengqiang10@huawei.com>

> ---
>  drivers/edac/ghes_edac.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> 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;
> +	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.
>
---
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

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-22  2:10 Tyler Baicar
  0 siblings, 0 replies; 7+ messages in thread
From: Tyler Baicar @ 2018-05-22  2:10 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: James Morse, Zhengqiang, mchehab, toshi.kani, linux-edac,
	linuxarm, linux-arm-kernel@lists.infradead.org

On 5/21/2018 4:44 PM, Borislav Petkov wrote:
> On Mon, May 21, 2018 at 04:34:11PM -0400, Tyler Baicar wrote:
>> Agreed. Sounds good to me.
> Meaning you're sending me a patch soon or ...?
>
> :-D
>
Yes, I'll put a patch together and send it out tomorrow.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-21 20:44 Borislav Petkov
  0 siblings, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2018-05-21 20:44 UTC (permalink / raw)
  To: Tyler Baicar
  Cc: James Morse, Zhengqiang, mchehab, toshi.kani, linux-edac,
	linuxarm, linux-arm-kernel@lists.infradead.org

On Mon, May 21, 2018 at 04:34:11PM -0400, Tyler Baicar wrote:
> Agreed. Sounds good to me.

Meaning you're sending me a patch soon or ...?

:-D

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-21 20:34 Tyler Baicar
  0 siblings, 0 replies; 7+ messages in thread
From: Tyler Baicar @ 2018-05-21 20:34 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: James Morse, Zhengqiang, mchehab, toshi.kani, linux-edac,
	linuxarm, linux-arm-kernel@lists.infradead.org

On 5/21/2018 1:15 PM, Borislav Petkov wrote:
> On Mon, May 21, 2018 at 09:48:23AM -0400, Tyler Baicar wrote:
>> I don't see an issue with not printing out the long BIOS statement, but the
>> number of DIMM sockets print could still be useful.
> Well, if you wanna dump the number of DIMMs - then maybe that line
> should issue unconditionally. However, "DIMM sockets" is silly - it
> should simply say:
>
> 	"%d DIMMs detected"
>
> or so.
Agreed. Sounds good to me.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-21 17:15 Borislav Petkov
  0 siblings, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2018-05-21 17:15 UTC (permalink / raw)
  To: Tyler Baicar
  Cc: James Morse, Zhengqiang, mchehab, toshi.kani, linux-edac,
	linuxarm, linux-arm-kernel@lists.infradead.org

On Mon, May 21, 2018 at 09:48:23AM -0400, Tyler Baicar wrote:
> I don't see an issue with not printing out the long BIOS statement, but the
> number of DIMM sockets print could still be useful.

Well, if you wanna dump the number of DIMMs - then maybe that line
should issue unconditionally. However, "DIMM sockets" is silly - it
should simply say:

	"%d DIMMs detected"

or so.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-21 13:48 Tyler Baicar
  0 siblings, 0 replies; 7+ messages in thread
From: Tyler Baicar @ 2018-05-21 13:48 UTC (permalink / raw)
  To: Borislav Petkov, James Morse
  Cc: Zhengqiang, mchehab, toshi.kani, linux-edac, linuxarm,
	linux-arm-kernel@lists.infradead.org

On 5/18/2018 7:20 AM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> ARM machines all have DMI tables so if they request hw error reporting
> through GHES, then the driver should be able to detect DIMMs and report
> errors successfully (famous last words :)).
>
> Make the platform-based list x86-specific so that ghes_edac can load on
> ARM.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Reviewed-by: James Morse <james.morse@arm.com>
> Tested-by: James Morse <james.morse@arm.com>
> Cc: Qiang Zheng <zhengqiang10@huawei.com>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>

Was it intentional to make idx=0 so that the pr_info later in this function no 
longer hits?

I don't see an issue with not printing out the long BIOS statement, but the 
number of DIMM sockets print could still be useful.

Thanks,
Tyler

^ permalink raw reply	[flat|nested] 7+ messages in thread
* EDAC, ghes: Make platform-based whitelisting x86-only
@ 2018-05-18 11:20 Borislav Petkov
  0 siblings, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2018-05-18 11:20 UTC (permalink / raw)
  To: James Morse
  Cc: Zhengqiang, Tyler Baicar, mchehab, toshi.kani, linux-edac,
	linuxarm, linux-arm-kernel@lists.infradead.org

From: Borislav Petkov <bp@suse.de>

ARM machines all have DMI tables so if they request hw error reporting
through GHES, then the driver should be able to detect DIMMs and report
errors successfully (famous last words :)).

Make the platform-based list x86-specific so that ghes_edac can load on
ARM.

Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Cc: Qiang Zheng <zhengqiang10@huawei.com>
Link: https://lkml.kernel.org/r/1526039543-180996-1-git-send-email-zhengqiang10@huawei.com
---
 drivers/edac/ghes_edac.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

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;
+	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.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-22  2:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21  9:39 EDAC, ghes: Make platform-based whitelisting x86-only Zhengqiang
  -- strict thread matches above, loose matches on Subject: below --
2018-05-22  2:10 Tyler Baicar
2018-05-21 20:44 Borislav Petkov
2018-05-21 20:34 Tyler Baicar
2018-05-21 17:15 Borislav Petkov
2018-05-21 13:48 Tyler Baicar
2018-05-18 11:20 Borislav Petkov

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).