[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR12MB4902967903EB6FE0306B89D581449@BY5PR12MB4902.namprd12.prod.outlook.com>
Date: Mon, 12 Sep 2022 05:26:05 +0000
From: "Datta, Shubhrajyoti" <shubhrajyoti.datta@....com>
To: Serge Semin <Sergey.Semin@...kalelectronics.ru>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Michal Simek <michal.simek@...inx.com>,
Borislav Petkov <bp@...en8.de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Tony Luck <tony.luck@...el.com>,
James Morse <james.morse@....com>,
Robert Richter <rric@...nel.org>,
Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
CC: Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Michail Ivanov <Michail.Ivanov@...kalelectronics.ru>,
Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
Punnaiah Choudary Kalluri
<punnaiah.choudary.kalluri@...inx.com>,
Manish Narani <manish.narani@...inx.com>,
Dinh Nguyen <dinguyen@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...e.de>
Subject: RE: [PATCH v2 05/19] EDAC/synopsys: Fix reading errors count before
ECC status
[AMD Official Use Only - General]
> -----Original Message-----
> From: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> Sent: Sunday, September 11, 2022 1:12 AM
> To: Rob Herring <robh+dt@...nel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@...aro.org>; Michal Simek
> <michal.simek@...inx.com>; Borislav Petkov <bp@...en8.de>; Mauro
> Carvalho Chehab <mchehab@...nel.org>; Tony Luck
> <tony.luck@...el.com>; James Morse <james.morse@....com>; Robert
> Richter <rric@...nel.org>; Shubhrajyoti Datta
> <shubhrajyoti.datta@...inx.com>
> Cc: Serge Semin <Sergey.Semin@...kalelectronics.ru>; Serge Semin
> <fancer.lancer@...il.com>; Alexey Malahov
> <Alexey.Malahov@...kalelectronics.ru>; Michail Ivanov
> <Michail.Ivanov@...kalelectronics.ru>; Pavel Parkhomenko
> <Pavel.Parkhomenko@...kalelectronics.ru>; Punnaiah Choudary Kalluri
> <punnaiah.choudary.kalluri@...inx.com>; Manish Narani
> <manish.narani@...inx.com>; Dinh Nguyen <dinguyen@...nel.org>; Rob
> Herring <robh@...nel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski@...aro.org>; devicetree@...r.kernel.org; linux-arm-
> kernel@...ts.infradead.org; linux-edac@...r.kernel.org; linux-
> kernel@...r.kernel.org; Borislav Petkov <bp@...e.de>
> Subject: [PATCH v2 05/19] EDAC/synopsys: Fix reading errors count before
> ECC status
>
> CAUTION: This message has originated from an External Source. Please use
> proper judgment and caution when opening attachments, clicking links, or
> responding to this email.
>
>
> Aside with fixing the errors count CSR usage the commit e2932d1f6f05
> ("EDAC/synopsys: Read the error count from the correct register") all of the
> sudden has also changed the order of the errors status check procedure. So
> now the errors handler method first reads the number of CE and UE and only
> then makes sure that any of these errors have actually happened. It doesn't
> make much sense. Let's fix that by getting back the procedures order: first
> check the ECC status, then read the number of errors.
>
> Fixes: e2932d1f6f05 ("EDAC/synopsys: Read the error count from the correct
> register")
> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@....com>
> ---
> drivers/edac/synopsys_edac.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
> index da1d90a87778..558d3b3e6864 100644
> --- a/drivers/edac/synopsys_edac.c
> +++ b/drivers/edac/synopsys_edac.c
> @@ -423,18 +423,18 @@ static int zynqmp_get_error_info(struct
> synps_edac_priv *priv)
> base = priv->baseaddr;
> p = &priv->stat;
>
> - regval = readl(base + ECC_ERRCNT_OFST);
> - p->ce_cnt = regval & ECC_ERRCNT_CECNT_MASK;
> - p->ue_cnt = (regval & ECC_ERRCNT_UECNT_MASK) >>
> ECC_ERRCNT_UECNT_SHIFT;
> - if (!p->ce_cnt)
> - goto ue_err;
> -
> regval = readl(base + ECC_STAT_OFST);
> if (!regval)
> return 1;
>
> p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK);
>
> + regval = readl(base + ECC_ERRCNT_OFST);
> + p->ce_cnt = regval & ECC_ERRCNT_CECNT_MASK;
> + p->ue_cnt = (regval & ECC_ERRCNT_UECNT_MASK) >>
> ECC_ERRCNT_UECNT_SHIFT;
> + if (!p->ce_cnt)
> + goto ue_err;
> +
> regval = readl(base + ECC_CEADDR0_OFST);
> p->ceinfo.row = (regval & ECC_CEADDR0_RW_MASK);
> regval = readl(base + ECC_CEADDR1_OFST);
> --
> 2.37.2
Powered by blists - more mailing lists