[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79e63555-a46b-43aa-ab2c-161e1cb80904@amd.com>
Date: Mon, 27 Nov 2023 10:12:16 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: yazen.ghannam@....com, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org, tony.luck@...el.com, x86@...nel.org,
Avadhut.Naik@....com, Smita.KoralahalliChannabasappa@....com,
amd-gfx@...ts.freedesktop.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 06/20] x86/mce/amd: Use helper for GPU UMC bank type
checks
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
Powered by blists - more mailing lists