From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v5 03/13] x86: detect and initialize Intel CAT feature Date: Mon, 20 Apr 2015 18:13:12 +0200 Message-ID: <1429546392.18810.17.camel@citrix.com> References: <1429281230-4352-1-git-send-email-chao.p.peng@linux.intel.com> <1429281230-4352-4-git-send-email-chao.p.peng@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7171853218778907730==" Return-path: In-Reply-To: <1429281230-4352-4-git-send-email-chao.p.peng@linux.intel.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: Chao Peng Cc: keir@xen.org, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, will.auld@intel.com, JBeulich@suse.com, wei.liu2@citrix.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org --===============7171853218778907730== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-NLU6pyeXqWqSG1g+FQJq" --=-NLU6pyeXqWqSG1g+FQJq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2015-04-17 at 22:33 +0800, Chao Peng wrote: > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -19,14 +19,25 @@ > #include > =20 > #define PSR_CMT (1<<0) > +#define PSR_CAT (1<<1) > + > +struct psr_cat_socket_info { > + bool_t initialized; > + bool_t enabled; > + unsigned int cbm_len; > + unsigned int cos_max; > +}; > Can't we ditch 'initialized' from within the struct and have a (global) bitmap, with one bit for each socket, expressing the same? And that also for 'enabled'. It's probably, at least up to a certain extent, a matter of taste (and I personally think it will look better), but it also should produce tighter code... Regards, Dario --=-NLU6pyeXqWqSG1g+FQJq 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 iEYEABECAAYFAlU1JZgACgkQk4XaBE3IOsTGnACeJhIBgiOrY76+ncC9Bn/37EZu kBwAoI91xMz79n4QeAmqrw9pb0KVGCP6 =/Yib -----END PGP SIGNATURE----- --=-NLU6pyeXqWqSG1g+FQJq-- --===============7171853218778907730== 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 --===============7171853218778907730==--