lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9d3f4dc3-300e-314e-040b-d360ed092366@kernel.org>
Date:   Fri, 5 May 2023 07:25:51 -0500
From:   Dinh Nguyen <dinguyen@...nel.org>
To:     niravkumar.l.rabara@...el.com
Cc:     bp@...en8.de, james.morse@....com, linux-edac@...r.kernel.org,
        linux-kernel@...r.kernel.org, mchehab@...nel.org, rric@...nel.org,
        tony.luck@...el.com
Subject: Re: [PATCH v2 2/2] EDAC/altera: Check previous DDR DBE during driver
 probe



On 5/3/23 05:18, niravkumar.l.rabara@...el.com wrote:
> From: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
> 
> Add DDR DBE check during driver probe to notify user if previous
> reboot cause by DDR DBE and print DBE error related information.
> 
> Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@...el.com>
> ---
>   drivers/edac/altera_edac.c | 29 ++++++++++++++++++++++++-----
>   1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> index 8b31cd54bdb6..398a49a3eb89 100644
> --- a/drivers/edac/altera_edac.c
> +++ b/drivers/edac/altera_edac.c
> @@ -2159,6 +2159,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
>   #ifdef CONFIG_64BIT
>   	{
>   		int dberror, err_addr;
> +		struct arm_smccc_res result;
>   
>   		edac->panic_notifier.notifier_call = s10_edac_dberr_handler;
>   		atomic_notifier_chain_register(&panic_notifier_list,
> @@ -2168,11 +2169,28 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
>   		regmap_read(edac->ecc_mgr_map, S10_SYSMGR_UE_VAL_OFST,
>   			    &dberror);
>   		if (dberror) {
> -			regmap_read(edac->ecc_mgr_map, S10_SYSMGR_UE_ADDR_OFST,
> -				    &err_addr);
> -			edac_printk(KERN_ERR, EDAC_DEVICE,
> -				    "Previous Boot UE detected[0x%X] @ 0x%X\n",
> -				    dberror, err_addr);
> +			/* Bit-31 is set if previous DDR UE happened */
> +			if (dberror & (1 << 31)) {
> +				/* Read previous DDR UE info */
> +				arm_smccc_smc(INTEL_SIP_SMC_READ_SEU_ERR, 0,
> +					0, 0, 0, 0, 0, 0, &result);

Please run checkpatch --strict to align these.

> +
> +				if (!(int)result.a0) {

Why the typecast to int?

> +					edac_printk(KERN_ERR, EDAC_DEVICE,
> +					"Previous DDR UE:Count=0x%X,Address=0x%X,ErrorData=0x%X\n"
> +					, (unsigned int)result.a1, (unsigned int)result.a2
> +					, (unsigned int)result.a3);
> +				} else {
> +					edac_printk(KERN_ERR, EDAC_DEVICE,
> +						"INTEL_SIP_SMC_SEU_ERR_STATUS failed\n");
> +				}
> +			} else {
> +				regmap_read(edac->ecc_mgr_map, S10_SYSMGR_UE_ADDR_OFST,
> +						&err_addr);
> +				edac_printk(KERN_ERR, EDAC_DEVICE,
> +						"Previous Boot UE detected[0x%X] @ 0x%X\n",
> +						dberror, err_addr);
> +			}
>   			/* Reset the sticky registers */
>   			regmap_write(edac->ecc_mgr_map,
>   				     S10_SYSMGR_UE_VAL_OFST, 0);
> @@ -2180,6 +2198,7 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
>   				     S10_SYSMGR_UE_ADDR_OFST, 0);
>   		}
>   	}
> +

Stray newline.

>   #else
>   	edac->db_irq = platform_get_irq(pdev, 1);
>   	if (edac->db_irq < 0)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ