From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com,
rric@kernel.org, Smita.KoralahalliChannabasappa@amd.com,
william.roche@oracle.com
Subject: Re: [PATCH v4 1/2] EDAC/amd64: Set memory type per DIMM
Date: Thu, 24 Feb 2022 18:18:45 +0000 [thread overview]
Message-ID: <YhfMBbsex8+cTnSE@yaz-ubuntu> (raw)
In-Reply-To: <YhafLB7Jw1Bul7YP@zn.tnic>
On Wed, Feb 23, 2022 at 09:55:08PM +0100, Borislav Petkov wrote:
> On Wed, Feb 02, 2022 at 02:43:06PM +0000, Yazen Ghannam wrote:
> > +static void _determine_memory_type_df(struct amd64_umc *umc)
>
> You don't need this function, right?
>
> IOW, here's what I've applied:
>
...
>
> -static void determine_memory_type(struct amd64_pvt *pvt)
> +static void determine_memory_type_df(struct amd64_pvt *pvt)
> {
> - u32 dram_ctrl, dcsm;
> + struct amd64_umc *umc;
> + u32 i;
>
> - if (pvt->umc) {
> - if ((pvt->umc[0].dimm_cfg | pvt->umc[1].dimm_cfg) & BIT(5))
> - pvt->dram_type = MEM_LRDDR4;
> - else if ((pvt->umc[0].dimm_cfg | pvt->umc[1].dimm_cfg) & BIT(4))
> - pvt->dram_type = MEM_RDDR4;
> + for_each_umc(i) {
> + umc = &pvt->umc[i];
> +
> + if (!(umc->sdp_ctrl & UMC_SDP_INIT)) {
> + umc->dram_type = MEM_EMPTY;
> + continue;
> + }
> +
> + if (umc->dimm_cfg & BIT(5))
> + umc->dram_type = MEM_LRDDR4;
> + else if (umc->dimm_cfg & BIT(4))
> + umc->dram_type = MEM_RDDR4;
> else
> - pvt->dram_type = MEM_DDR4;
> - return;
> + umc->dram_type = MEM_DDR4;
> +
> + edac_dbg(1, " UMC%d DIMM type: %s\n", i, edac_mem_types[umc->dram_type]);
> }
> +}
Ah, I see. You got rid of the extra helper function. Makes sense and looks
okay to me.
Thanks,
Yazen
next prev parent reply other threads:[~2022-02-24 18:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 14:43 [PATCH v4 0/2] AMD Family 19h Models 10h-1Fh Updates Yazen Ghannam
2022-02-02 14:43 ` [PATCH v4 1/2] EDAC/amd64: Set memory type per DIMM Yazen Ghannam
2022-02-03 13:19 ` William Roche
2022-02-03 14:09 ` Borislav Petkov
2022-02-03 15:46 ` William Roche
2022-02-04 15:51 ` Yazen Ghannam
2022-02-04 17:20 ` William Roche
2022-02-23 20:55 ` Borislav Petkov
2022-02-24 18:18 ` Yazen Ghannam [this message]
2022-02-02 14:43 ` [PATCH v4 2/2] EDAC/amd64: Add new register offset support and related changes Yazen Ghannam
2022-02-03 13:19 ` William Roche
2022-03-06 16:18 ` [PATCH v4 0/2] AMD Family 19h Models 10h-1Fh Updates Borislav Petkov
2022-03-09 21:05 ` Yazen Ghannam
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=YhfMBbsex8+cTnSE@yaz-ubuntu \
--to=yazen.ghannam@amd.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=tony.luck@intel.com \
--cc=william.roche@oracle.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