RE: [PATCH v2 06/10] x86/mce: Convert multiple if () statements into a switch() statement

From: Luck, Tony
Date: Mon Oct 21 2024 - 12:07:02 EST


> /*
> * All newer Intel systems support MCE broadcasting. Enable
> * synchronization with a one second timeout.
> */
> - if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xe)) &&
> - cfg->monarch_timeout < 0)
> + if (c->x86_vfm >= INTEL_CORE_YONAH && cfg->monarch_timeout < 0)
> cfg->monarch_timeout = USEC_PER_SEC;

This change is correct. But the old code makes it more explicit that
CPUs in families > 6 take this action. As the author of the VFM changes
it's clear to me, maybe less so to others?

But maybe its OK. The comment does help a lot. Anyone else have thoughts on this?

-Tony