[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a902c13-bfdf-4319-9e31-81c199ecf65c@intel.com>
Date: Mon, 21 Oct 2024 11:26:02 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: "Luck, Tony" <tony.luck@...el.com>, "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
CC: "bp@...en8.de" <bp@...en8.de>, "tglx@...utronix.de" <tglx@...utronix.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>, "hpa@...or.com" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>, "linux-edac@...r.kernel.org"
<linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 06/10] x86/mce: Convert multiple if () statements into
a switch() statement
On 10/21/2024 10:51 AM, Luck, Tony wrote:
>> But looking at the prior or the later checks, I see the '<' operator
>> used directly on platform names. So, the new check seems inline with
>> that i.e. in this case, any model or family after the said platform
>> supports MCE broadcasting.
>
> Intel model number allocation policies aren't necessarily sequential.
Model numbers are assumed to be sequential at least within family 6.
if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xe)) &&
cfg->monarch_timeout < 0)
There is another check in early_init_intel() which does this:
if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) {
rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
> So range checks need to be used with caution. They should be safe
> enough when done to simplify code that checks very old models.
>
...
> Range checks across families may be even more problematic.
I agree. Maybe we should avoid range checks across families altogether
forward (>) or backward (<).
For example, does the following change from Qiuxu, unintentionally
become applicable to Quark CPUs with family -> 5?
> /*
> * There are also broken BIOSes on some Pentium M and
> * earlier systems:
> */
> - if (c->x86 == 6 && c->x86_model <= 13 && cfg->bootlog < 0)
> + if (c->x86_vfm < INTEL_CORE_YONAH && cfg->bootlog < 0)
> cfg->bootlog = 0;
Powered by blists - more mailing lists