From: "Jan Beulich" Subject: Re: [PATCH v1 1/3] x86: identifying the boot cpu Date: Thu, 12 Mar 2015 16:14:44 +0000 Message-ID: <5501C9840200007800069445@mail.emea.novell.com> References: <20150312145504.GA8420@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150312145504.GA8420@gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Uma Sharma Cc: andrew.cooper3@citrix.com, dario.faggioli@citrix.com, keir@xen.org, George.Dunlap@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 12.03.15 at 15:55, 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