From: Yazen Ghannam <yazen.ghannam@amd.com>
To: "Naik, Avadhut" <avadnaik@amd.com>
Cc: Avadhut Naik <avadhut.naik@amd.com>,
linux-edac@vger.kernel.org, bp@alien8.de, john.allen@amd.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] EDAC/amd64: Incorporate DRAM Address in EDAC message
Date: Mon, 11 Aug 2025 09:43:39 -0400 [thread overview]
Message-ID: <20250811134339.GA616@yaz-khff2.amd.com> (raw)
In-Reply-To: <c9ae8b26-e254-47a7-8e2f-b5da90f50030@amd.com>
On Wed, Aug 06, 2025 at 04:08:07PM -0500, Naik, Avadhut wrote:
[...]
> >> @@ -2808,11 +2824,13 @@ static void umc_get_err_info(struct mce *m, struct err_info *err)
> >> static void decode_umc_error(int node_id, struct mce *m)
> >> {
> >> u8 ecc_type = (m->status >> 45) & 0x3;
> >> + struct dram_addr dram_addr;
> >> struct mem_ctl_info *mci;
> >> unsigned long sys_addr;
> >> struct amd64_pvt *pvt;
> >> struct atl_err a_err;
> >> struct err_info err;
> >> + int ret;
> >>
> >> node_id = fixup_node_id(node_id, m);
> >>
> >> @@ -2822,6 +2840,7 @@ static void decode_umc_error(int node_id, struct mce *m)
> >>
> >> pvt = mci->pvt_info;
> >>
> >> + memset(&dram_addr, 0, sizeof(dram_addr));
> >> memset(&err, 0, sizeof(err));
> >>
> >> if (m->status & MCI_STATUS_DEFERRED)
> >> @@ -2853,6 +2872,10 @@ static void decode_umc_error(int node_id, struct mce *m)
> >> goto log_error;
> >> }
> >>
> >> + ret = amd_convert_umc_mca_addr_to_dram_addr(&a_err, &dram_addr);
> >> + if (!ret)
> >> + err.dram_addr = &dram_addr;
> >
> > I feel like it is not necessary to pass a second struct if it is already
> > contained in another.
> >
> > You could just clear (or not set) that field if an error occurs.
> >
> Slightly confused here.
> Do you mean we should avoid passing dram_addr as second parameter
> for amd_convert_umc_mca_addr_to_dram_addr() and instead just pass
> struct err_info instance err?
>
> And, in case some error occurs, we should just do
> err.dram_addr = 0x0;
> ?
>
Sorry, I think I misread this before.
I was thinking you can add 'struct dram_addr' to 'struct atl_err'. The
intent of 'struct atl_err' is to collect all needed parameters for the
translation functions.
Additionally, I just realized, we should have an 'invalid' default value
for dram_addr. Technically, bank=0, row=0, col=0, etc., would be a valid
DRAM address.
Thanks,
Yazen
prev parent reply other threads:[~2025-08-11 13:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 16:48 [PATCH 0/2] Incorporate DRAM address in EDAC messages Avadhut Naik
2025-07-17 16:48 ` [PATCH 1/2] RAS/AMD/ATL: Translate UMC normalized address to DRAM address using PRM Avadhut Naik
2025-07-28 14:40 ` Yazen Ghannam
2025-08-06 18:21 ` Naik, Avadhut
2025-07-17 16:48 ` [PATCH 2/2] EDAC/amd64: Incorporate DRAM Address in EDAC message Avadhut Naik
2025-07-28 15:14 ` Yazen Ghannam
2025-08-06 21:08 ` Naik, Avadhut
2025-08-06 21:15 ` Borislav Petkov
2025-08-06 21:37 ` Naik, Avadhut
2025-08-11 13:43 ` Yazen Ghannam [this message]
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=20250811134339.GA616@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=avadhut.naik@amd.com \
--cc=avadnaik@amd.com \
--cc=bp@alien8.de \
--cc=john.allen@amd.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®