From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v3 1/7] x86/numa: Make use of NUMA_NO_NODE consistent Date: Mon, 16 Feb 2015 13:57:11 +0000 Message-ID: <1424095029.6968.19.camel@citrix.com> References: <1423512275-6531-1-git-send-email-boris.ostrovsky@oracle.com> <1423512275-6531-2-git-send-email-boris.ostrovsky@oracle.com> <54D9E076.1080604@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5000269275093752127==" Return-path: In-Reply-To: <54D9E076.1080604@citrix.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: Andrew Cooper Cc: Wei Liu , Ian Campbell , "port-xen@netbsd.org" , "xen-devel@lists.xen.org" , "jbeulich@suse.com" , Stefano Stabellini , "ufimtseva@gmail.com" , Ian Jackson , "boris.ostrovsky@oracle.com" , "Keir (Xen.org)" List-Id: xen-devel@lists.xenproject.org --===============5000269275093752127== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-/0asfd+Gi6696ZO1WN4D" --=-/0asfd+Gi6696ZO1WN4D Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-02-10 at 10:41 +0000, Andrew Cooper wrote: > On 09/02/15 20:04, Boris Ostrovsky wrote: > > diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c > > index 29fc724..4dfa1c3 100644 > > --- a/xen/arch/x86/srat.c > > +++ b/xen/arch/x86/srat.c > > @@ -21,13 +21,16 @@ > > #include > > #include > > =20 > > +#define MAX_PXM 255 > > + > > static struct acpi_table_slit *__read_mostly acpi_slit; > > =20 > > static nodemask_t memory_nodes_parsed __initdata; > > static nodemask_t processor_nodes_parsed __initdata; > > static nodemask_t nodes_found __initdata; > > static struct node nodes[MAX_NUMNODES] __initdata; > > -static u8 __read_mostly pxm2node[256] =3D { [0 ... 255] =3D NUMA_NO_NO= DE }; > > +static u8 __read_mostly pxm2node[MAX_PXM + 1] =3D > > + { [0 ... MAX_PXM] =3D NUMA_NO_NODE }; > > =20 > > =20 > > static int num_node_memblks; > > @@ -37,21 +40,29 @@ static int memblk_nodeid[NR_NODE_MEMBLKS]; > > =20 > > static int node_to_pxm(int n); > > =20 > > -int pxm_to_node(int pxm) > > +u8 pxm_to_node(int pxm) >=20 > You can make these parameters unsigned and do away with the unsigned > casting. pxm appears to be unsigned in all the relevant call chains. >=20 +1 > > diff --git a/xen/include/asm-x86/numa.h b/xen/include/asm-x86/numa.h > > index 5959860..2a43827 100644 > > --- a/xen/include/asm-x86/numa.h > > +++ b/xen/include/asm-x86/numa.h > > @@ -21,7 +21,7 @@ struct node { > > =20 > > extern int compute_hash_shift(struct node *nodes, int numnodes, > > int *nodeids); > > -extern int pxm_to_node(int nid); > > +extern u8 pxm_to_node(int nid); >=20 > The parameter should presumably be named pxm? >=20 +1 :-) Regards, Dario --=-/0asfd+Gi6696ZO1WN4D 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 iEYEABECAAYFAlTh9zUACgkQk4XaBE3IOsRrywCfVBitI2EnYcvgIwElYAjBE3Px WAAAn0WHxceD5y9aHCTSwKvs/aAX3Z3e =3n5D -----END PGP SIGNATURE----- --=-/0asfd+Gi6696ZO1WN4D-- --===============5000269275093752127== 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 --===============5000269275093752127==--