Re: [PATCH V10 RESEND] EDAC: Add EDAC driver for loongson memory controller

From: Borislav Petkov
Date: Fri Jan 03 2025 - 11:20:21 EST


On Tue, Dec 17, 2024 at 10:25:25AM +0800, Zhao Qunqin wrote:
>
> 在 2024/12/16 下午7:55, Borislav Petkov 写道:
> > On Mon, Dec 16, 2024 at 09:33:51AM +0800, Zhao Qunqin wrote:
> > > +LOONGSON EDAC DRIVER
> > > +M: Zhao Qunqin <zhaoqunqin@xxxxxxxxxxx>
> > > +L: linux-edac@xxxxxxxxxxxxxxx
> > > +S: Maintained
> > > +F: drivers/edac/loongson_edac.c
> > If you add yourself as a maintainer, I'd expect you to review and/or ack
> > patches for your driver so that I can pick them up.
> OK. I can review the patches for this driver.

Not "can" - I would need you to. I don't have the hardware to test and don't
have the time to review them.

> > > + new = read_ecc(mci);
> > > + add = new - pvt->last_ce_count;
> > > + pvt->last_ce_count = new;
> > That last_ce_count is just silly. Kill it.
>
> Then  I  can't calculate the error count added since the last check,  cause
> what record in Loongson's ECC register is  the error count  from reset of
> the memory controller.

Can that ECC register be zeroed on each check function run?

Because this should work this way: every time you have to issue an error
message about how many errors were logged, you simply issue the error count
you've logged this time.

Userspace tools like rasdaemon etc can then aggregate the counts.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette