From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH 1/2] x86: during boot, anticipate identifying the boot cpu Date: Mon, 25 Aug 2014 09:39:02 +0100 Message-ID: <53FB1246020000780002D125@mail.emea.novell.com> References: <20140822165628.32764.15082.stgit@Solace.lan> <20140822171534.32764.77550.stgit@Solace.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XLpnu-000809-Pf for xen-devel@lists.xenproject.org; Mon, 25 Aug 2014 08:39:06 +0000 In-Reply-To: <20140822171534.32764.77550.stgit@Solace.lan> 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: Dario Faggioli Cc: george.dunlap@eu.citrix.com, Andrew Cooper , keir@xen.org, xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 22.08.14 at 19:15, wrote: > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1262,6 +1262,12 @@ void __init noreturn __start_xen(unsigned long mbi_p) > > timer_init(); > > + /* > + * Identify the boot CPU, in case the scheduler initialization > + * needs to know about it (e.g., topology, etc.) > + */ > + identify_cpu(&boot_cpu_data); > + > init_idle_domain(); > > trap_init(); > @@ -1272,8 +1278,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) > > arch_init_memory(); > > - identify_cpu(&boot_cpu_data); > - > if ( cpu_has_fxsr ) > set_in_cr4(X86_CR4_OSFXSR); > if ( cpu_has_xmm ) I'm not sure about this part: It currently makes quite a bit of sense to have identify_cpu() immediately before explicit users of the gathered data (all code following up to the alternative_instructions() call). Perhaps if you move identify_cpu(), all the others should get moved too? Jan