RE: [PATCH v2] EDAC: synopsys: Fix the wrong call of pinf->col parameter

From: Sherry Sun
Date: Sun Mar 15 2020 - 21:31:44 EST


Hi Borislav,

> -----Original Message-----
> From: Borislav Petkov <bp@xxxxxxxxx>
> Sent: 2020å3æ16æ 3:50
> To: Sherry Sun <sherry.sun@xxxxxxx>
> Cc: mchehab@xxxxxxxxxx; tony.luck@xxxxxxxxx; james.morse@xxxxxxx;
> rrichter@xxxxxxxxxxx; michal.simek@xxxxxxxxxx; manish.narani@xxxxxxxxxx;
> linux-edac@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>; Frank Li <frank.li@xxxxxxx>
> Subject: Re: [PATCH v2] EDAC: synopsys: Fix the wrong call of pinf->col
> parameter
>
> On Fri, Feb 28, 2020 at 10:16:23AM +0800, Sherry Sun wrote:
> > Since ZynqMP platform call zynqmp_get_error_info() function to get
> > ce/ue information. In this function, pinf->col parameter is not used,
> > this parameter is only used by Zynq platforme in
> > zynq_get_error_info(). So here pinf->col should not be called and
> > printed for ZynqMP, need remove it.
>
> Err, the interrupt handler intr_handler() calls the ->get_error_info() function
> pointer and then calls handle_error(). I.e, the same path ending in
> handle_error() is called on both: Zynq and ZynqMP, one through the
> interrupt and the other through the poller.
>
> Because it looks like the interrupt support is only on ZynqMP? I'm looking at
> that DDR_ECC_INTR_SUPPORT thing.
>
> If so, then you need to rename the interrupt handler to
> zynqmp_intr_handler().
>
> And normal Zynq platform uses check_errors() which then calls
> handle_error().
>
> So still not good enough: you probably "fixed" it on ZynqMP but broke it on
> Zynq because check_errors() calls ->get_error_info() which is
> zynq_get_error_info() and will have populated pinf->col.
>
> You need to differentiate between Zynq and ZynqMP in handle_error() and
> issue the proper string depending on the platform.

Maybe you misunderstood the handle_error(), this function has already
distinguished between Zynq and ZynqMP through priv->p_data->quirks.
And what I am doing in this patch is to remove the useless pinf->col in ZynqMP
part, which won't break the Zynq part.

Thanks
Sherry Sun


>
> AFAICT.
>
> --
> Regards/Gruss,
> Boris.
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeopl
> e.kernel.org%2Ftglx%2Fnotes-about-
> netiquette&amp;data=02%7C01%7Csherry.sun%40nxp.com%7C948bf1123f6f
> 4717a61508d7c91a193b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0
> %7C637198986257175149&amp;sdata=O8txcSkTpO3I34KUL0qboQ%2BvPme
> D7lYPHsAhWavevWg%3D&amp;reserved=0