From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 01 of 10 [RFC]] libxc: Generalize xenctl_cpumap to just xenctl_map Date: Wed, 11 Apr 2012 18:31:32 +0200 Message-ID: <1334161892.4298.6.camel@Solace> References: <4F85AC6C.10407@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9153043721192644181==" Return-path: In-Reply-To: <4F85AC6C.10407@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Andre Przywara , Ian Campbell , Stefano Stabellini , Juergen Gross , Ian Jackson , "xen-devel@lists.xen.org" , Jan Beulich List-Id: xen-devel@lists.xenproject.org --===============9153043721192644181== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-Yvo8lG+g664ln3S22pCX" --=-Yvo8lG+g664ln3S22pCX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-04-11 at 17:08 +0100, George Dunlap wrote: > On 11/04/12 14:17, Dario Faggioli wrote: > > In preparation for adding an xc_nodemap_t and its related > > hadling logic. Just add one indirection layer, and try to > > retain the interface as much as possible (although some > > small bits here and there have been affected). > This patch is fine with me on the whole (one comment below), but in this= =20 > kind of a patch I think you need to include exactly what it is patch=20 > does. I.e.: >=20 > 1. Replace xenctl_cpumap with xenctl_map > 2. Implement bitmap_to_xenctl_map and the reverse > 3. Re-implement cpumask_to_xenctl_map with bitmap_to_xenctl_map and vice= =20 > versa. > 4. Other than #3, no functional changes. > Ok, I can do that when reposting (and for other similar patches as well). > > diff --git a/xen/include/xen/cpumask.h b/xen/include/xen/cpumask.h > > --- a/xen/include/xen/cpumask.h > > +++ b/xen/include/xen/cpumask.h > > @@ -424,8 +424,8 @@ extern cpumask_t cpu_present_map; > > #define for_each_present_cpu(cpu) for_each_cpu(cpu,&cpu_present_map) > > > > /* Copy to/from cpumap provided by control tools. */ > > -struct xenctl_cpumap; > > -int cpumask_to_xenctl_cpumap(struct xenctl_cpumap *, const cpumask_t *= ); > > -int xenctl_cpumap_to_cpumask(cpumask_var_t *, const struct xenctl_cpum= ap *); > > +struct xenctl_map; > > +int cpumask_to_xenctl_cpumap(struct xenctl_map *, const cpumask_t *); > > +int xenctl_cpumap_to_cpumask(cpumask_var_t *, const struct xenctl_map = *); > You should probably s/cpumap/map/; in the function names as well. > Well, I retained the old name as the callers expect to use these functions as that old name says, i.e., passing a cpumap and wanting a cpumask back (for the first one). Thus, I was trying to avoid affecting callers, exploiting the fact that xenctl_cpumap is a typedef to libxl_map after all. However, if that is too ugly, I surely can change function names, as well as provide one more layer of indirection (xenctl_cpumap_to_cpumask calling xenctl_map_to_cpumask). Just let me know what you prefer. :-) Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-Yvo8lG+g664ln3S22pCX 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 v1.4.12 (GNU/Linux) iEYEABECAAYFAk+FseQACgkQk4XaBE3IOsRW+QCdG/jSKjPRef3tSgAuJqm+xZNe vwsAn0pSH+gaD+ITmP8JMKsOj2ANVIrN =Dl21 -----END PGP SIGNATURE----- --=-Yvo8lG+g664ln3S22pCX-- --===============9153043721192644181== 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 --===============9153043721192644181==--