From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: yazen.ghannam@amd.com, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, tony.luck@intel.com,
x86@kernel.org, Avadhut.Naik@amd.com,
Smita.KoralahalliChannabasappa@amd.com,
amd-gfx@lists.freedesktop.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 05/20] x86/mce/amd: Use helper for UMC bank type check
Date: Mon, 27 Nov 2023 10:00:00 -0500 [thread overview]
Message-ID: <7b6d0d32-c1c5-4c57-a34c-81c9699c0d49@amd.com> (raw)
In-Reply-To: <20231127114349.GMZWSA9QADGqCXnTYe@fat_crate.local>
On 11/27/2023 6:43 AM, Borislav Petkov wrote:
> On Sat, Nov 18, 2023 at 01:32:33PM -0600, Yazen Ghannam wrote:
>> @@ -714,14 +721,10 @@ static bool legacy_mce_is_memory_error(struct mce *m)
>> */
>> static bool smca_mce_is_memory_error(struct mce *m)
>> {
>> - enum smca_bank_types bank_type;
>> -
>> if (XEC(m->status, 0x3f))
>> return false;
>>
>> - bank_type = smca_get_bank_type(m->extcpu, m->bank);
>> -
>> - return bank_type == SMCA_UMC || bank_type == SMCA_UMC_V2;
>> + return smca_umc_bank_type(m->ipid);
>
> return FIELD_GET(MCI_IPID_HWID, ipid) == IPID_TYPE_UMC;
>
> after having done:
>
> #define IPID_TYPE_UMC 0x96;
>
> and you don't need that silly helper.
The helper is also used in the following patch. But in any case, it may
be overkill. So I'll drop it.
>
> And then you can do more cleanups ontop by doing
>
> /* Unified Memory Controller MCA type */
> { SMCA_UMC, HWID_MCATYPE(IPID_TYPE_UMC, 0x0) },
> { SMCA_UMC_V2, HWID_MCATYPE(IPID_TYPE_UMC, 0x1) },
>
> and have all the numbering properly defined and abstracted away.
>
Yep, agreed. Thanks for the suggestion.
Thanks,
Yazen
next prev parent reply other threads:[~2023-11-27 15:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 19:32 [PATCH 00/20] MCA Updates Yazen Ghannam
2023-11-18 19:32 ` [PATCH 01/20] x86/mce/inject: Clear test status value Yazen Ghannam
2023-11-22 18:17 ` [tip: ras/core] " tip-bot2 for Yazen Ghannam
2023-11-18 19:32 ` [PATCH 02/20] x86/mce: Define mce_setup() helpers for global and per-CPU fields Yazen Ghannam
2023-11-22 18:24 ` Borislav Petkov
2023-11-27 14:52 ` Yazen Ghannam
2023-11-18 19:32 ` [PATCH 03/20] x86/mce: Use mce_setup() helpers for apei_smca_report_x86_error() Yazen Ghannam
2023-11-22 18:28 ` Borislav Petkov
2023-11-27 14:53 ` Yazen Ghannam
2023-11-18 19:32 ` [PATCH 04/20] x86/mce/amd, EDAC/mce_amd: Move long names to decoder module Yazen Ghannam
2023-11-27 11:31 ` [tip: ras/core] " tip-bot2 for Yazen Ghannam
2023-11-18 19:32 ` [PATCH 05/20] x86/mce/amd: Use helper for UMC bank type check Yazen Ghannam
2023-11-27 11:43 ` Borislav Petkov
2023-11-27 15:00 ` Yazen Ghannam [this message]
2023-11-18 19:32 ` [PATCH 06/20] x86/mce/amd: Use helper for GPU UMC bank type checks Yazen Ghannam
2023-11-27 11:46 ` Borislav Petkov
2023-11-27 15:12 ` Yazen Ghannam
2023-11-18 19:32 ` [PATCH 07/20] x86/mce/amd: Use fixed bank number for quirks Yazen Ghannam
2023-11-18 19:32 ` [PATCH 08/20] x86/mce/amd: Look up bank type by IPID Yazen Ghannam
2023-11-18 19:32 ` [PATCH 09/20] x86/mce/amd: Clean up SMCA configuration Yazen Ghannam
2023-11-18 19:32 ` [PATCH 10/20] x86/mce/amd: Prep DFR handler before enabling banks Yazen Ghannam
2023-11-18 19:32 ` [PATCH 11/20] x86/mce/amd: Simplify DFR handler setup Yazen Ghannam
2023-11-18 19:32 ` [PATCH 12/20] x86/mce/amd: Clean up enable_deferred_error_interrupt() Yazen Ghannam
2023-11-18 19:32 ` [PATCH 13/20] x86/mce: Unify AMD THR handler with MCA Polling Yazen Ghannam
2023-11-18 19:32 ` [PATCH 14/20] x86/mce/amd: Unify AMD DFR " Yazen Ghannam
2023-11-18 19:32 ` [PATCH 15/20] x86/mce: Skip AMD threshold init if no threshold banks found Yazen Ghannam
2023-11-18 19:32 ` [PATCH 16/20] x86/mce/amd: Support SMCA Corrected Error Interrupt Yazen Ghannam
2023-11-18 19:32 ` [PATCH 17/20] x86/mce: Add wrapper for struct mce to export vendor specific info Yazen Ghannam
2023-11-18 19:32 ` [PATCH 18/20] x86/mce, EDAC/mce_amd: Add support for new MCA_SYND{1,2} registers Yazen Ghannam
2023-11-18 19:32 ` [PATCH 19/20] x86/mce/apei: Handle variable register array size Yazen Ghannam
2023-11-18 19:32 ` [PATCH 20/20] EDAC/mce_amd: Add support for FRU Text in MCA 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=7b6d0d32-c1c5-4c57-a34c-81c9699c0d49@amd.com \
--to=yazen.ghannam@amd.com \
--cc=Avadhut.Naik@amd.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@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®