[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 1/3] x86: identifying the boot cpu



>>> On 12.03.15 at 15:55, <uma.sharma523@xxxxxxxxx> wrote:
> Provide helpers to access the socket and core IDs, resulting from 
> identification phase.
> Initialize socket and core ID to -1 i.e invalid instead of 0.

You still don't say _why_ both of these are needed.

> --- a/xen/arch/x86/smpboot.c
> +++ b/xen/arch/x86/smpboot.c
> @@ -59,7 +59,8 @@ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask);
>  cpumask_t cpu_online_map __read_mostly;
>  EXPORT_SYMBOL(cpu_online_map);
>  
> -struct cpuinfo_x86 cpu_data[NR_CPUS];
> +struct cpuinfo_x86 cpu_data[NR_CPUS] =
> +        { [0 ... NR_CPUS-1] = { .phys_proc_id=-1, .cpu_core_id=-1 } };

And if this initialization is relevant, then upon offlining CPUs you
should put the -1s back.

Also - spaces around = please.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.