[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 06/13] x86/PMU: Add public xenpmu.h



On 09/23/2013 09:16 AM, Jan Beulich wrote:
On 23.09.13 at 15:04, Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx> wrote:
Am Freitag 20 September 2013, 05:42:05 schrieb Boris Ostrovsky:
+    uint64_t fix_counters[XENPMU_CORE2_MAX_FIXED_PMCS];
+    struct {
+        uint64_t counter;
+        uint64_t control;
+    } arch_msr_pair[XENPMU_CORE2_MAX_ARCH_PMCS];
+};
+
+#define MAX(x, y)                 ((x) > (y) ? (x) : (y))
Maybe using MAX() from xen/kernel.h ?
Certainly not - this is a public header; a definition of MAX() is as
misplaced here.


Since I use MAX only once and only here I will just drop it and change XENPMU_MAX_CTXT_SZ which is

#define XENPMU_MAX_CTXT_SZ        MAX(sizeof(struct amd_vpmu_context),\
                                      sizeof(struct core2_vpmu_context))

into

#define XENPMU_MAX_CTXT_SZ       (sizeof(struct amd_vpmu_context) >\
sizeof(struct core2_vpmu_context) ?\
sizeof(struct amd_vpmu_context) :\
sizeof(struct core2_vpmu_context))

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.