Re: [PATCH 2/2] RAS/AMD/{ATL,FMPM}: Get masked address

From: Yazen Ghannam
Date: Tue Apr 08 2025 - 11:57:13 EST


On Tue, Apr 08, 2025 at 12:14:15PM +0200, Borislav Petkov wrote:
> On Mon, Apr 07, 2025 at 11:16:57AM -0400, Yazen Ghannam wrote:
> > Okay, will do.
>
> Yah, except that df_cfg crap needs an export now:
>
> ERROR: modpost: "df_cfg" [drivers/ras/amd/fmpm.ko] undefined!
> make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
> make[1]: *** [/mnt/kernel/kernel/linux/Makefile:1956: modpost] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>

*sigh*, sorry for the noise. I did a 'make -f' build rather than a full
build.

> Looking at the call chain how we land in that fpds_equal() in fmpm, can we
> read out from the error records themselves that those are from MI300 and not
> need df_cfg at all?
>
> There's a struct mce here:
>
> static void update_fru_record(struct fru_rec *rec, struct mce *m)
>
> which has CPUID for example.
>
> Otherwise we'll have to go back to your original thing if we're going to have
> to export *something*...
>

At the moment, FMPM only loads on MI300A. We can just have a local
function to mask the addresses. I was thinking we can have function
pointers to make things generic. But maybe we keep it simple until
really necessary by just using the MI300 version by default.

Please see patch below.

Thanks,
Yazen

----------------