public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>,
	Muralidhara M K <muralidhara.mk@amd.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] RAS/AMD/{ATL,FMPM}: Get masked address
Date: Mon, 7 Apr 2025 11:16:57 -0400	[thread overview]
Message-ID: <20250407151657.GA1948540@yaz-khff2.amd.com> (raw)
In-Reply-To: <20250407132415.GCZ_PR_82FKBcsIuGr@fat_crate.local>

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

  reply	other threads:[~2025-04-07 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 20:48 [PATCH 0/2] MI300A ATL and FMPM fixes Yazen Ghannam
2025-04-01 20:49 ` [PATCH 1/2] RAS/AMD/ATL: Include row[13] bit in row retirement Yazen Ghannam
2025-04-01 20:49 ` [PATCH 2/2] RAS/AMD/{ATL,FMPM}: Get masked address Yazen Ghannam
2025-04-07 13:24   ` Borislav Petkov
2025-04-07 15:16     ` Yazen Ghannam [this message]
2025-04-08 10:14       ` Borislav Petkov
2025-04-08 15:52         ` Yazen Ghannam
2025-04-08 17:33           ` Borislav Petkov
2025-04-08 20:10             ` Yazen Ghannam
2025-04-10  9:51               ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250407151657.GA1948540@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muralidhara.mk@amd.com \
    --cc=naveenkrishna.chatradhi@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox