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 06/20] x86/mce/amd: Use helper for GPU UMC bank type checks
Date: Mon, 27 Nov 2023 10:12:16 -0500 [thread overview]
Message-ID: <79e63555-a46b-43aa-ab2c-161e1cb80904@amd.com> (raw)
In-Reply-To: <20231127114648.GNZWSBqPq3AzQkwk+S@fat_crate.local>
On 11/27/2023 6:46 AM, Borislav Petkov wrote:
> On Sat, Nov 18, 2023 at 01:32:34PM -0600, Yazen Ghannam wrote:
>> +/* GPU UMCs have MCATYPE=0x1.*/
>> +bool smca_gpu_umc_bank_type(u64 ipid)
>> +{
>> + if (!smca_umc_bank_type(ipid))
>> + return false;
>> +
>> + return FIELD_GET(MCI_IPID_MCATYPE, ipid) == 0x1;
>> +}
>
> And now this tells you that you want to use
>
> u32 hwid_mcatype; /* (hwid,mcatype) tuple */
>
> everywhere and do your macros around that thing.
>
> No need for yet another helper as this all is static information which
> doesn't change.
>
>> +EXPORT_SYMBOL_GPL(smca_gpu_umc_bank_type);
>
> Definitely not another export.
>
Right, we already use the tuple thing. Patch 8 in this set uses the
tuple to look up (search for) the bank type at runtime. This is in order
to get rid of all the per-CPU stuff.
Now I figured it'd be good to have special helpers to do a quick check
for the UMC bank types. Because memory errors will be the most commonly
reported errors.
But it's likely not important to save a few cycles here. Especially
since the helpers will be used in the notifier chain and not in the #MC
handler, etc.
I'll think on it a bit more, but this patch and the previous one can
likely be dropped.
Thanks,
Yazen
next prev parent reply other threads:[~2023-11-27 15:12 UTC|newest]
Thread overview: 29+ 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-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-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
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 [this message]
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=79e63555-a46b-43aa-ab2c-161e1cb80904@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