From: "Jan Beulich" Subject: Re: [PATCH] x86: correct socket_cpumask allocation for AP Date: Wed, 08 Jul 2015 13:38:53 +0100 Message-ID: <559D35FD020000780008E354@mail.emea.novell.com> References: <1436348218-29172-1-git-send-email-chao.p.peng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436348218-29172-1-git-send-email-chao.p.peng@linux.intel.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: Chao Peng Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 08.07.15 at 11:36, wrote: > @@ -84,11 +85,21 @@ void *stack_base[NR_CPUS]; > static void smp_store_cpu_info(int id) > { > struct cpuinfo_x86 *c = cpu_data + id; > + unsigned int socket; > > *c = boot_cpu_data; > if ( id != 0 ) > + { > identify_cpu(c); > > + socket = cpu_to_socket(id); > + if ( !socket_cpumask[socket] ) > + { > + socket_cpumask[socket] = secondary_socket_cpumask; > + secondary_socket_cpumask = NULL; I don't think this will build with small enough NR_CPUS. Which raises the question whether the use of cpumask_var_t is suitable here in the first place. Jan