On 21.11.2019 00:05, Chao Gao wrote:
> --- a/xen/arch/x86/cpu/common.c
> +++ b/xen/arch/x86/cpu/common.c
> @@ -337,7 +337,11 @@ void __init early_cpu_init(void)
>       }
>  
>       if (!(c->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)))
> +     {
>               park_offline_cpus = opt_mce;
> +             if (park_offline_cpus && !zalloc_cpumask_var(&cpu_parked_map))
> +                     panic("No memory for CPU parked map\n");
> +     }

Maybe shorter as

        if (!(c->x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) && opt_mce)
        {
                if (!zalloc_cpumask_var(&cpu_parked_map))
                        panic("No memory for CPU parked map\n");
                park_offline_cpus = true;
        }

?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to