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

Re: [Xen-devel] [PATCH v2 6/9] x86/intel_pstate: the main boby of the intel_pstate driver



>>> On 08.06.15 at 10:18, <wei.w.wang@xxxxxxxxx> wrote:
> Regarding the self-documenting related comment here, which of the following 
> do you think is better?
> 1) 
> #define BYT_MIN_PSTATE_SHIFT            8
> #define BYT_MAX_PSTATE_SHIFT           16
> #define BYT_PSTATE_MASK                       0x7f
> #define BYT_TURBO_CONTROL_BIT        32
> 
> 2)
> #define BYT_MIN_PSTATE(value)     (((value) >> 8) & 0x7F)
> #define BYT_MAX_PSTATE(value)    (((value) >> 16) & 0x7F)
> #define BYT_SET_TURBO_CONTROL_BIT(value)    ((val) |= (u64)1 << 32)

I think the first two of 2) and the fourth one of 1) are the best
combination, but I'd really leave it up to you (with, if using it, the
val vs value issue fixed in the last one).

Jan


_______________________________________________
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®.