From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [Patch 1/2]xen boot_cpu_data initialize Date: Mon, 9 Mar 2015 10:12:08 +0000 Message-ID: <1425895926.2729.4.camel@citrix.com> References: <20150309071816.GA3629@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6570245184779134880==" Return-path: In-Reply-To: <20150309071816.GA3629@gmail.com> Content-Language: en-US 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.sharma523@gmail.com" Cc: George Dunlap , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============6570245184779134880== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Lzlfss0tvrbDsoP5g9JT" --=-Lzlfss0tvrbDsoP5g9JT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-03-09 at 12:48 +0530, Uma Sharma wrote: > This patch inserts some boot data initilization in xen/arch and > function definition in xen/include. > Signed-off-by: Uma Sharma > So, this is basically the same as patch 1 from this series of mine: http://lists.xen.org/archives/html/xen-devel/2014-08/msg02168.html http://lists.xen.org/archives/html/xen-devel/2014-08/msg02166.html which I still need to rework basing on the comment I got (see the rest of the thread). I haven't done this yet, but will soon and, if Uma is ok with it, I'll add to that the second patch of this series (of course, rataining her Signed-off-by) when sending it. I've been sidetracked by a bunch of other stuff, but I've got time now, and I'll do it right away, is it fine Uma (and others, of course)? Regards, Dario > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c > index d316212..4f3ce15 100644 > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1259,6 +1259,11 @@ void __init noreturn __start_xen(unsigned long mbi= _p) > microcode_grab_module(module_map, mbi, bootstrap_map); > =20 > 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); > =20 > init_idle_domain(); > =20 > @@ -1270,8 +1275,6 @@ void __init noreturn __start_xen(unsigned long mbi_= p) > =20 > arch_init_memory(); > =20 > - identify_cpu(&boot_cpu_data); > - > if ( cpu_has_fxsr ) > set_in_cr4(X86_CR4_OSFXSR); > if ( cpu_has_xmm ) > diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c > index 7ae561c..b4c4cc2 100644 > --- 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); > =20 > -struct cpuinfo_x86 cpu_data[NR_CPUS]; > +struct cpuinfo_x86 cpu_data[NR_CPUS] =3D > + { [0 ... NR_CPUS-1] =3D { .phys_proc_id=3D-1, .cpu_core_id=3D-1 = } }; > =20 > u32 x86_cpu_to_apicid[NR_CPUS] __read_mostly =3D > { [0 ... NR_CPUS-1] =3D BAD_APICID }; > diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/proces= sor.h > index 87d80ff..6ec9588 100644 > --- a/xen/include/asm-x86/processor.h > +++ b/xen/include/asm-x86/processor.h > @@ -214,7 +214,9 @@ extern void detect_extended_topology(struct cpuinfo_x= 86 *c); > =20 > extern void detect_ht(struct cpuinfo_x86 *c); > =20 > +#define boot_cpu_to_core() (boot_cpu_data.cpu_core_id) > #define cpu_to_core(_cpu) (cpu_data[_cpu].cpu_core_id) > +#define boot_cpu_to_socket() (boot_cpu_data.phys_proc_id) > #define cpu_to_socket(_cpu) (cpu_data[_cpu].phys_proc_id) > =20 > unsigned int apicid_to_socket(unsigned int); --=-Lzlfss0tvrbDsoP5g9JT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlT9cfYACgkQk4XaBE3IOsQd5gCfQcImvxllCA1TKyM4LPMq9LxR I/YAnig1HXsvMxNJQ6n0ylj14yVJduUY =mWO8 -----END PGP SIGNATURE----- --=-Lzlfss0tvrbDsoP5g9JT-- --===============6570245184779134880== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6570245184779134880==--