Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On 8/1/2019 5:17 PM, Robert Richter wrote: Don't you think it'll be confused to have different APIs between EDAC_MC and EDAC_DEVICE? (in MC the count passed as part of edac_mc_handle_error()) I don't think edac_mc_handle_error() with 11 function arguments is a good reference for somethin we want to adopt. For the majority of drivers you just introduce another useless argument with the following pattern: edac_device_handle_ce(edac_dev, 1, 0, 0, edac_dev_name); IMO, the api should be improved when touching it. Got it, I'll update the patch as you suggested. Thanks, Hanna -Robert
Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On 01.08.19 15:29:03, Hawa, Hanna wrote: > On 8/1/2019 2:35 PM, Robert Richter wrote: > > On 15.07.19 13:53:07, Hanna Hawa wrote: > > > Add a counter parameter in order to avoid losing errors count for edac > > > device, the error count reports the number of errors reported by an edac > > > device similar to the way MC_EDAC do. > > > > > > Signed-off-by: Hanna Hawa > > > --- > > > drivers/edac/altera_edac.c | 20 > > > drivers/edac/amd8111_edac.c | 6 +++--- > > > drivers/edac/cpc925_edac.c | 4 ++-- > > > drivers/edac/edac_device.c | 18 ++ > > > drivers/edac/edac_device.h | 8 ++-- > > > drivers/edac/highbank_l2_edac.c | 4 ++-- > > > drivers/edac/mpc85xx_edac.c | 4 ++-- > > > drivers/edac/mv64x60_edac.c | 4 ++-- > > > drivers/edac/octeon_edac-l2c.c | 20 ++-- > > > drivers/edac/octeon_edac-pc.c | 6 +++--- > > > drivers/edac/qcom_edac.c| 8 > > > drivers/edac/thunderx_edac.c| 10 +- > > > drivers/edac/xgene_edac.c | 26 +- > > > 13 files changed, 74 insertions(+), 64 deletions(-) > > > > > diff --git a/drivers/edac/edac_device.h b/drivers/edac/edac_device.h > > > index 1aaba74..cf1a1da 100644 > > > --- a/drivers/edac/edac_device.h > > > +++ b/drivers/edac/edac_device.h > > > @@ -290,23 +290,27 @@ extern struct edac_device_ctl_info > > > *edac_device_del_device(struct device *dev); > > >* perform a common output and handling of an 'edac_dev' UE event > > >* > > >* @edac_dev: pointer to struct _device_ctl_info > > > + * @error_count: number of errors of the same type > > >* @inst_nr: number of the instance where the UE error happened > > >* @block_nr: number of the block where the UE error happened > > >* @msg: message to be printed > > >*/ > > > extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, > > > - int inst_nr, int block_nr, const char *msg); > > > + u16 error_count, int inst_nr, int block_nr, > > > + const char *msg); > > > /** > > >* edac_device_handle_ce(): > > >* perform a common output and handling of an 'edac_dev' CE event > > >* > > >* @edac_dev: pointer to struct _device_ctl_info > > > + * @error_count: number of errors of the same type > > >* @inst_nr: number of the instance where the CE error happened > > >* @block_nr: number of the block where the CE error happened > > >* @msg: message to be printed > > >*/ > > > extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, > > > > How about renaming this to __edac_device_handle_ce() and then have 2 > > macros for: > > > > * edac_device_handle_ce() to keep old i/f. > > > > * edac_device_handle_ce_count(), with count parameter added. > > > > Same for uncorrectable errors. > > > > Code of other driver can be kept as it is then. > > Don't you think it'll be confused to have different APIs between EDAC_MC and > EDAC_DEVICE? > (in MC the count passed as part of edac_mc_handle_error()) I don't think edac_mc_handle_error() with 11 function arguments is a good reference for somethin we want to adopt. For the majority of drivers you just introduce another useless argument with the following pattern: edac_device_handle_ce(edac_dev, 1, 0, 0, edac_dev_name); IMO, the api should be improved when touching it. -Robert
Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On 8/1/2019 2:35 PM, Robert Richter wrote: On 15.07.19 13:53:07, Hanna Hawa wrote: Add a counter parameter in order to avoid losing errors count for edac device, the error count reports the number of errors reported by an edac device similar to the way MC_EDAC do. Signed-off-by: Hanna Hawa --- drivers/edac/altera_edac.c | 20 drivers/edac/amd8111_edac.c | 6 +++--- drivers/edac/cpc925_edac.c | 4 ++-- drivers/edac/edac_device.c | 18 ++ drivers/edac/edac_device.h | 8 ++-- drivers/edac/highbank_l2_edac.c | 4 ++-- drivers/edac/mpc85xx_edac.c | 4 ++-- drivers/edac/mv64x60_edac.c | 4 ++-- drivers/edac/octeon_edac-l2c.c | 20 ++-- drivers/edac/octeon_edac-pc.c | 6 +++--- drivers/edac/qcom_edac.c| 8 drivers/edac/thunderx_edac.c| 10 +- drivers/edac/xgene_edac.c | 26 +- 13 files changed, 74 insertions(+), 64 deletions(-) diff --git a/drivers/edac/edac_device.h b/drivers/edac/edac_device.h index 1aaba74..cf1a1da 100644 --- a/drivers/edac/edac_device.h +++ b/drivers/edac/edac_device.h @@ -290,23 +290,27 @@ extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev); *perform a common output and handling of an 'edac_dev' UE event * * @edac_dev: pointer to struct _device_ctl_info + * @error_count: number of errors of the same type * @inst_nr: number of the instance where the UE error happened * @block_nr: number of the block where the UE error happened * @msg: message to be printed */ extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, - int inst_nr, int block_nr, const char *msg); + u16 error_count, int inst_nr, int block_nr, + const char *msg); /** * edac_device_handle_ce(): *perform a common output and handling of an 'edac_dev' CE event * * @edac_dev: pointer to struct _device_ctl_info + * @error_count: number of errors of the same type * @inst_nr: number of the instance where the CE error happened * @block_nr: number of the block where the CE error happened * @msg: message to be printed */ extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, How about renaming this to __edac_device_handle_ce() and then have 2 macros for: * edac_device_handle_ce() to keep old i/f. * edac_device_handle_ce_count(), with count parameter added. Same for uncorrectable errors. Code of other driver can be kept as it is then. Don't you think it'll be confused to have different APIs between EDAC_MC and EDAC_DEVICE? (in MC the count passed as part of edac_mc_handle_error()) I don't have strong objection, the change for other drivers is not that hard. Thanks, -Robert - int inst_nr, int block_nr, const char *msg); + u16 error_count, int inst_nr, int block_nr, + const char *msg);
Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On 15.07.19 13:53:07, Hanna Hawa wrote: > Add a counter parameter in order to avoid losing errors count for edac > device, the error count reports the number of errors reported by an edac > device similar to the way MC_EDAC do. > > Signed-off-by: Hanna Hawa > --- > drivers/edac/altera_edac.c | 20 > drivers/edac/amd8111_edac.c | 6 +++--- > drivers/edac/cpc925_edac.c | 4 ++-- > drivers/edac/edac_device.c | 18 ++ > drivers/edac/edac_device.h | 8 ++-- > drivers/edac/highbank_l2_edac.c | 4 ++-- > drivers/edac/mpc85xx_edac.c | 4 ++-- > drivers/edac/mv64x60_edac.c | 4 ++-- > drivers/edac/octeon_edac-l2c.c | 20 ++-- > drivers/edac/octeon_edac-pc.c | 6 +++--- > drivers/edac/qcom_edac.c| 8 > drivers/edac/thunderx_edac.c| 10 +- > drivers/edac/xgene_edac.c | 26 +- > 13 files changed, 74 insertions(+), 64 deletions(-) > diff --git a/drivers/edac/edac_device.h b/drivers/edac/edac_device.h > index 1aaba74..cf1a1da 100644 > --- a/drivers/edac/edac_device.h > +++ b/drivers/edac/edac_device.h > @@ -290,23 +290,27 @@ extern struct edac_device_ctl_info > *edac_device_del_device(struct device *dev); > * perform a common output and handling of an 'edac_dev' UE event > * > * @edac_dev: pointer to struct _device_ctl_info > + * @error_count: number of errors of the same type > * @inst_nr: number of the instance where the UE error happened > * @block_nr: number of the block where the UE error happened > * @msg: message to be printed > */ > extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, > - int inst_nr, int block_nr, const char *msg); > + u16 error_count, int inst_nr, int block_nr, > + const char *msg); > /** > * edac_device_handle_ce(): > * perform a common output and handling of an 'edac_dev' CE event > * > * @edac_dev: pointer to struct _device_ctl_info > + * @error_count: number of errors of the same type > * @inst_nr: number of the instance where the CE error happened > * @block_nr: number of the block where the CE error happened > * @msg: message to be printed > */ > extern void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, How about renaming this to __edac_device_handle_ce() and then have 2 macros for: * edac_device_handle_ce() to keep old i/f. * edac_device_handle_ce_count(), with count parameter added. Same for uncorrectable errors. Code of other driver can be kept as it is then. Thanks, -Robert > - int inst_nr, int block_nr, const char *msg); > + u16 error_count, int inst_nr, int block_nr, > + const char *msg);
Re: [UNVERIFIED SENDER] Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On 7/25/2019 9:36 PM, Mauro Carvalho Chehab wrote: /* Propagate the count up the 'totals' tree */ - instance->counters.ue_count++; - edac_dev->counters.ue_count++; + instance->counters.ue_count += error_count; + edac_dev->counters.ue_count += error_count; Patch itself looks a good idea, but maybe it should rise a WARN() if error_count == 0. Good point, shouldn't we use WARN_ONCE here? if the user call edac_device_handle_ue() with error count == 0, it not be change in run-time, only if the error count parameter is calculated somehow, and it'll be the *caller* issue that didn't check the error count. What you think? That applies for both CE and UE error logic. Sure. Thanks, Hanna Thanks, Mauro
Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
Em Mon, 15 Jul 2019 13:53:07 +0300 Hanna Hawa escreveu: > Add a counter parameter in order to avoid losing errors count for edac > device, the error count reports the number of errors reported by an edac > device similar to the way MC_EDAC do. > > Signed-off-by: Hanna Hawa > --- > drivers/edac/altera_edac.c | 20 > drivers/edac/amd8111_edac.c | 6 +++--- > drivers/edac/cpc925_edac.c | 4 ++-- > drivers/edac/edac_device.c | 18 ++ > drivers/edac/edac_device.h | 8 ++-- > drivers/edac/highbank_l2_edac.c | 4 ++-- > drivers/edac/mpc85xx_edac.c | 4 ++-- > drivers/edac/mv64x60_edac.c | 4 ++-- > drivers/edac/octeon_edac-l2c.c | 20 ++-- > drivers/edac/octeon_edac-pc.c | 6 +++--- > drivers/edac/qcom_edac.c| 8 > drivers/edac/thunderx_edac.c| 10 +- > drivers/edac/xgene_edac.c | 26 +- > 13 files changed, 74 insertions(+), 64 deletions(-) > > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c > index 8816f74..747dd43 100644 > --- a/drivers/edac/altera_edac.c > +++ b/drivers/edac/altera_edac.c > @@ -616,12 +616,12 @@ static irqreturn_t altr_edac_device_handler(int irq, > void *dev_id) > if (irq == drvdata->sb_irq) { > if (priv->ce_clear_mask) > writel(priv->ce_clear_mask, drvdata->base); > - edac_device_handle_ce(dci, 0, 0, drvdata->edac_dev_name); > + edac_device_handle_ce(dci, 1, 0, 0, drvdata->edac_dev_name); > ret_value = IRQ_HANDLED; > } else if (irq == drvdata->db_irq) { > if (priv->ue_clear_mask) > writel(priv->ue_clear_mask, drvdata->base); > - edac_device_handle_ue(dci, 0, 0, drvdata->edac_dev_name); > + edac_device_handle_ue(dci, 1, 0, 0, drvdata->edac_dev_name); > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > ret_value = IRQ_HANDLED; > } else { > @@ -919,13 +919,15 @@ static irqreturn_t __maybe_unused > altr_edac_a10_ecc_irq(int irq, void *dev_id) > if (irq == dci->sb_irq) { > writel(ALTR_A10_ECC_SERRPENA, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > > return IRQ_HANDLED; > } else if (irq == dci->db_irq) { > writel(ALTR_A10_ECC_DERRPENA, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > if (dci->data->panic) > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > > @@ -1308,14 +1310,16 @@ static irqreturn_t altr_edac_a10_l2_irq(int irq, void > *dev_id) > regmap_write(dci->edac->ecc_mgr_map, >A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, >A10_SYSGMR_MPU_CLEAR_L2_ECC_SB); > - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > > return IRQ_HANDLED; > } else if (irq == dci->db_irq) { > regmap_write(dci->edac->ecc_mgr_map, >A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, >A10_SYSGMR_MPU_CLEAR_L2_ECC_MB); > - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > > return IRQ_HANDLED; > @@ -1652,12 +1656,12 @@ static irqreturn_t altr_edac_a10_ecc_irq_portb(int > irq, void *dev_id) > if (irq == ad->sb_irq) { > writel(priv->ce_clear_mask, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ce(ad->edac_dev, 0, 0, ad->edac_dev_name); > + edac_device_handle_ce(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); > return IRQ_HANDLED; > } else if (irq == ad->db_irq) { > writel(priv->ue_clear_mask, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ue(ad->edac_dev, 0, 0, ad->edac_dev_name); > + edac_device_handle_ue(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); > return IRQ_HANDLED; > } > > diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c > index b5786cf..e595fab 100644 > --- a/drivers/edac/amd8111_edac.c > +++ b/drivers/edac/amd8111_edac.c >
Re: [RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
Hi Jan, On 7/17/2019 3:06 PM, Jan Glauber wrote: Hi Hanna, I'm probably missing something but this patch looks like while it adds the error_count parameter the passed values all seem to be 1. So is the new parameter used otherwise, maybe in another patch? Yes in another patch. In Amazon L1/L2 edac driver [1], I'm using loop to report on multiple L1 or L2 errors. After this patch I'll remove the loop and pass the errors count. [1]: https://lkml.org/lkml/2019/7/15/349 Thanks, Hanna thanks, Jan
[RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
On Mon, Jul 15, 2019 at 01:53:07PM +0300, Hanna Hawa wrote: > Add a counter parameter in order to avoid losing errors count for edac > device, the error count reports the number of errors reported by an edac > device similar to the way MC_EDAC do. > > Signed-off-by: Hanna Hawa > --- > drivers/edac/altera_edac.c | 20 > drivers/edac/amd8111_edac.c | 6 +++--- > drivers/edac/cpc925_edac.c | 4 ++-- > drivers/edac/edac_device.c | 18 ++ > drivers/edac/edac_device.h | 8 ++-- > drivers/edac/highbank_l2_edac.c | 4 ++-- > drivers/edac/mpc85xx_edac.c | 4 ++-- > drivers/edac/mv64x60_edac.c | 4 ++-- > drivers/edac/octeon_edac-l2c.c | 20 ++-- > drivers/edac/octeon_edac-pc.c | 6 +++--- > drivers/edac/qcom_edac.c| 8 > drivers/edac/thunderx_edac.c| 10 +- > drivers/edac/xgene_edac.c | 26 +- > 13 files changed, 74 insertions(+), 64 deletions(-) Hi Hanna, I'm probably missing something but this patch looks like while it adds the error_count parameter the passed values all seem to be 1. So is the new parameter used otherwise, maybe in another patch? thanks, Jan > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c > index 8816f74..747dd43 100644 > --- a/drivers/edac/altera_edac.c > +++ b/drivers/edac/altera_edac.c > @@ -616,12 +616,12 @@ static irqreturn_t altr_edac_device_handler(int irq, > void *dev_id) > if (irq == drvdata->sb_irq) { > if (priv->ce_clear_mask) > writel(priv->ce_clear_mask, drvdata->base); > - edac_device_handle_ce(dci, 0, 0, drvdata->edac_dev_name); > + edac_device_handle_ce(dci, 1, 0, 0, drvdata->edac_dev_name); > ret_value = IRQ_HANDLED; > } else if (irq == drvdata->db_irq) { > if (priv->ue_clear_mask) > writel(priv->ue_clear_mask, drvdata->base); > - edac_device_handle_ue(dci, 0, 0, drvdata->edac_dev_name); > + edac_device_handle_ue(dci, 1, 0, 0, drvdata->edac_dev_name); > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > ret_value = IRQ_HANDLED; > } else { > @@ -919,13 +919,15 @@ static irqreturn_t __maybe_unused > altr_edac_a10_ecc_irq(int irq, void *dev_id) > if (irq == dci->sb_irq) { > writel(ALTR_A10_ECC_SERRPENA, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > > return IRQ_HANDLED; > } else if (irq == dci->db_irq) { > writel(ALTR_A10_ECC_DERRPENA, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > if (dci->data->panic) > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > > @@ -1308,14 +1310,16 @@ static irqreturn_t altr_edac_a10_l2_irq(int irq, void > *dev_id) > regmap_write(dci->edac->ecc_mgr_map, >A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, >A10_SYSGMR_MPU_CLEAR_L2_ECC_SB); > - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > > return IRQ_HANDLED; > } else if (irq == dci->db_irq) { > regmap_write(dci->edac->ecc_mgr_map, >A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, >A10_SYSGMR_MPU_CLEAR_L2_ECC_MB); > - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); > + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, > + dci->edac_dev_name); > panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); > > return IRQ_HANDLED; > @@ -1652,12 +1656,12 @@ static irqreturn_t altr_edac_a10_ecc_irq_portb(int > irq, void *dev_id) > if (irq == ad->sb_irq) { > writel(priv->ce_clear_mask, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ce(ad->edac_dev, 0, 0, ad->edac_dev_name); > + edac_device_handle_ce(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); > return IRQ_HANDLED; > } else if (irq == ad->db_irq) { > writel(priv->ue_clear_mask, > base + ALTR_A10_ECC_INTSTAT_OFST); > - edac_device_handle_ue(ad->edac_dev, 0, 0, ad->edac_dev_name); > + edac_device_handle_ue(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); >
[RFC 1/1] edac: Add a counter parameter for edac_device_handle_ue/ce()
Add a counter parameter in order to avoid losing errors count for edac device, the error count reports the number of errors reported by an edac device similar to the way MC_EDAC do. Signed-off-by: Hanna Hawa --- drivers/edac/altera_edac.c | 20 drivers/edac/amd8111_edac.c | 6 +++--- drivers/edac/cpc925_edac.c | 4 ++-- drivers/edac/edac_device.c | 18 ++ drivers/edac/edac_device.h | 8 ++-- drivers/edac/highbank_l2_edac.c | 4 ++-- drivers/edac/mpc85xx_edac.c | 4 ++-- drivers/edac/mv64x60_edac.c | 4 ++-- drivers/edac/octeon_edac-l2c.c | 20 ++-- drivers/edac/octeon_edac-pc.c | 6 +++--- drivers/edac/qcom_edac.c| 8 drivers/edac/thunderx_edac.c| 10 +- drivers/edac/xgene_edac.c | 26 +- 13 files changed, 74 insertions(+), 64 deletions(-) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 8816f74..747dd43 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -616,12 +616,12 @@ static irqreturn_t altr_edac_device_handler(int irq, void *dev_id) if (irq == drvdata->sb_irq) { if (priv->ce_clear_mask) writel(priv->ce_clear_mask, drvdata->base); - edac_device_handle_ce(dci, 0, 0, drvdata->edac_dev_name); + edac_device_handle_ce(dci, 1, 0, 0, drvdata->edac_dev_name); ret_value = IRQ_HANDLED; } else if (irq == drvdata->db_irq) { if (priv->ue_clear_mask) writel(priv->ue_clear_mask, drvdata->base); - edac_device_handle_ue(dci, 0, 0, drvdata->edac_dev_name); + edac_device_handle_ue(dci, 1, 0, 0, drvdata->edac_dev_name); panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); ret_value = IRQ_HANDLED; } else { @@ -919,13 +919,15 @@ static irqreturn_t __maybe_unused altr_edac_a10_ecc_irq(int irq, void *dev_id) if (irq == dci->sb_irq) { writel(ALTR_A10_ECC_SERRPENA, base + ALTR_A10_ECC_INTSTAT_OFST); - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, + dci->edac_dev_name); return IRQ_HANDLED; } else if (irq == dci->db_irq) { writel(ALTR_A10_ECC_DERRPENA, base + ALTR_A10_ECC_INTSTAT_OFST); - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, + dci->edac_dev_name); if (dci->data->panic) panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); @@ -1308,14 +1310,16 @@ static irqreturn_t altr_edac_a10_l2_irq(int irq, void *dev_id) regmap_write(dci->edac->ecc_mgr_map, A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, A10_SYSGMR_MPU_CLEAR_L2_ECC_SB); - edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); + edac_device_handle_ce(dci->edac_dev, 1, 0, 0, + dci->edac_dev_name); return IRQ_HANDLED; } else if (irq == dci->db_irq) { regmap_write(dci->edac->ecc_mgr_map, A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST, A10_SYSGMR_MPU_CLEAR_L2_ECC_MB); - edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); + edac_device_handle_ue(dci->edac_dev, 1, 0, 0, + dci->edac_dev_name); panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); return IRQ_HANDLED; @@ -1652,12 +1656,12 @@ static irqreturn_t altr_edac_a10_ecc_irq_portb(int irq, void *dev_id) if (irq == ad->sb_irq) { writel(priv->ce_clear_mask, base + ALTR_A10_ECC_INTSTAT_OFST); - edac_device_handle_ce(ad->edac_dev, 0, 0, ad->edac_dev_name); + edac_device_handle_ce(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); return IRQ_HANDLED; } else if (irq == ad->db_irq) { writel(priv->ue_clear_mask, base + ALTR_A10_ECC_INTSTAT_OFST); - edac_device_handle_ue(ad->edac_dev, 0, 0, ad->edac_dev_name); + edac_device_handle_ue(ad->edac_dev, 1, 0, 0, ad->edac_dev_name); return IRQ_HANDLED; } diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c index b5786cf..e595fab 100644 --- a/drivers/edac/amd8111_edac.c +++ b/drivers/edac/amd8111_edac.c @@ -303,7 +303,7 @@ static void amd8111_lpc_bridge_check(struct edac_device_ctl_info *edac_dev) val8 |= IO_CTRL_1_CLEAR_MASK;