[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250407151657.GA1948540@yaz-khff2.amd.com>
Date: Mon, 7 Apr 2025 11:16:57 -0400
From: Yazen Ghannam <yazen.ghannam@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>,
Muralidhara M K <muralidhara.mk@....com>,
linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] RAS/AMD/{ATL,FMPM}: Get masked address
On Mon, Apr 07, 2025 at 03:24:15PM +0200, Borislav Petkov wrote:
> On Tue, Apr 01, 2025 at 08:49:01PM +0000, Yazen Ghannam wrote:
> > +u64 amd_atl_masked_addr(u64 addr)
> > +{
> > + /*
> > + * Row retirement is done on MI300 systems, and some bits are 'don't care'
> > + * for comparing addresses with unique physical rows.
> > + * This includes all column bits and the row[13] bit.
> > + */
> > + if (df_cfg.rev == DF4p5 && df_cfg.flags.heterogeneous)
> > + return addr & ~(MI300_UMC_MCA_ROW13 | MI300_UMC_MCA_COL);
> > +
> > + return addr;
> > +}
> > +EXPORT_SYMBOL_GPL(amd_atl_masked_addr);
>
> Uff, an exported silly helper.
>
> Make that static inline and stick into a header so that compiler can inline
> and optimize.
>
> And that header should be drivers/ras/amd/atl/internal.h
>
> Also, the helper should be called "atl_mask_address()" or so as all our
> functions have verbs in imperative tone.
>
> > diff --git a/include/linux/ras.h b/include/linux/ras.h
> > index a64182bc72ad..e822275bed6a 100644
> > --- a/include/linux/ras.h
> > +++ b/include/linux/ras.h
>
> Internal helpers go into the internal header, not here.
>
> Thx.
>
Okay, will do.
Thanks,
Yazen
Powered by blists - more mailing lists