On 23.04.2024 10:56, Sergiy Kibrik wrote: > --- a/xen/arch/x86/cpu/mcheck/mce.c > +++ b/xen/arch/x86/cpu/mcheck/mce.c > @@ -761,7 +761,8 @@ void mcheck_init(struct cpuinfo_x86 *c, bool bsp) > { > case X86_VENDOR_AMD: > case X86_VENDOR_HYGON: > - inited = amd_mcheck_init(c, bsp); > + inited = IS_ENABLED(CONFIG_AMD) ? amd_mcheck_init(c, bsp) : > + mcheck_unset; > break; > > case X86_VENDOR_INTEL: > @@ -769,7 +770,8 @@ void mcheck_init(struct cpuinfo_x86 *c, bool bsp) > { > case 6: > case 15: > - inited = intel_mcheck_init(c, bsp); > + inited = IS_ENABLED(CONFIG_INTEL) ? intel_mcheck_init(c, bsp) : > + mcheck_unset; > break; > } > break;
Same question as on an earlier patch: Why set a value different from what "default:" below here does (really: keeps)? And why not arrange to have that "default:" take care of what's build-disabled? Jan