From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Avadhut Naik <avadhut.naik@amd.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] EDAC/amd64: Set zn_regs_v2 flag for all AMD Family 1Ah-based SOCs
Date: Thu, 30 Oct 2025 09:48:39 -0400 [thread overview]
Message-ID: <20251030134839.GA3209@yaz-khff2.amd.com> (raw)
In-Reply-To: <20251029171057.GFaQJKoUUKI_VM2GXn@fat_crate.local>
On Wed, Oct 29, 2025 at 06:10:57PM +0100, Borislav Petkov wrote:
> On Mon, Oct 13, 2025 at 05:30:42PM +0000, Avadhut Naik wrote:
[...]
> > --- a/drivers/edac/amd64_edac.c
> > +++ b/drivers/edac/amd64_edac.c
> > @@ -3779,6 +3779,8 @@ static int per_family_init(struct amd64_pvt *pvt)
> > else
> > pvt->ops = &dct_ops;
> >
> > + pvt->flags.zn_regs_v2 = (pvt->fam >= 0x1A) ? 1 : 0;
> > +
> > switch (pvt->fam) {
> > case 0xf:
> > tmp_name = (pvt->ext_model >= K8_REV_F) ?
> > @@ -3887,20 +3889,14 @@ static int per_family_init(struct amd64_pvt *pvt)
> > switch (pvt->model) {
> > case 0x00 ... 0x1f:
> > pvt->max_mcs = 12;
> > - pvt->flags.zn_regs_v2 = 1;
> > - break;
> > - case 0x40 ... 0x4f:
> > - pvt->flags.zn_regs_v2 = 1;
> > break;
> > case 0x50 ... 0x57:
> > case 0xc0 ... 0xc7:
> > pvt->max_mcs = 16;
> > - pvt->flags.zn_regs_v2 = 1;
> > break;
> > case 0x90 ... 0x9f:
> > case 0xa0 ... 0xaf:
> > pvt->max_mcs = 8;
> > - pvt->flags.zn_regs_v2 = 1;
> > break;
> > }
>
> I'm not sure about this: if we hoist this particular assignment up, then
> what's the point of the tabellary switch-case where you can see at a quick
> glance, all the settings that we do per model...?
>
I think we should take any opportunity to get away from family/model
checks.
Yes, we still have one item (max_mcs) left. As a follow up, we can see
if this can be removed also.
Thanks,
Yazen
next prev parent reply other threads:[~2025-10-30 13:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 17:30 [PATCH 0/4] Cleanups in amd64_edac Avadhut Naik
2025-10-13 17:30 ` [PATCH 1/4] EDAC/amd64: Generate ctl_name string at runtime Avadhut Naik
2025-10-20 13:47 ` Borislav Petkov
2025-10-20 18:28 ` Naik, Avadhut
2025-10-20 19:09 ` Borislav Petkov
2025-10-13 17:30 ` [PATCH 2/4] EDAC/amd64: Remove NUM_CONTROLLERS macro Avadhut Naik
2025-10-21 10:44 ` Borislav Petkov
2025-10-22 6:07 ` Naik, Avadhut
2025-10-13 17:30 ` [PATCH 3/4] EDAC/amd64: Set zn_regs_v2 flag for all AMD Family 1Ah-based SOCs Avadhut Naik
2025-10-29 17:10 ` Borislav Petkov
2025-10-30 13:48 ` Yazen Ghannam [this message]
2025-11-03 21:18 ` Borislav Petkov
2025-11-04 14:59 ` Yazen Ghannam
2025-10-13 17:30 ` [PATCH 4/4] EDAC/mc_sysfs: Begin deprecating legacy sysfs EDAC interface Avadhut Naik
2025-10-29 17:24 ` Borislav Petkov
2025-10-30 14:52 ` Naik, Avadhut
2025-10-30 15:01 ` Greg KH
2025-10-30 19:18 ` Borislav Petkov
2025-10-31 12:38 ` Greg KH
2025-10-31 12:54 ` Borislav Petkov
2025-10-31 19:34 ` Naik, Avadhut
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=20251030134839.GA3209@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--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