x86 msr-index: Simplify syntax for HWP fields
authorLen Brown <len.brown@intel.com>
Tue, 1 Dec 2015 06:36:39 +0000 (01:36 -0500)
committerLen Brown <len.brown@intel.com>
Wed, 17 Feb 2016 06:42:26 +0000 (01:42 -0500)
syntax only, no functional change

Signed-off-by: Len Brown <len.brown@intel.com>
arch/x86/include/asm/msr-index.h

index 690b4027e17c994fdef4a626f270ca8b97ee041a..5c5e7e53d82457d83894aa0752ee1cdc6f6d0d1a 100644 (file)
 #define HWP_PACKAGE_LEVEL_REQUEST_BIT  (1<<11)
 
 /* IA32_HWP_CAPABILITIES */
-#define HWP_HIGHEST_PERF(x)            (x & 0xff)
-#define HWP_GUARANTEED_PERF(x)         ((x & (0xff << 8)) >>8)
-#define HWP_MOSTEFFICIENT_PERF(x)      ((x & (0xff << 16)) >>16)
-#define HWP_LOWEST_PERF(x)             ((x & (0xff << 24)) >>24)
+#define HWP_HIGHEST_PERF(x)            (((x) >> 0) & 0xff)
+#define HWP_GUARANTEED_PERF(x)         (((x) >> 8) & 0xff)
+#define HWP_MOSTEFFICIENT_PERF(x)      (((x) >> 16) & 0xff)
+#define HWP_LOWEST_PERF(x)             (((x) >> 24) & 0xff)
 
 /* IA32_HWP_REQUEST */
 #define HWP_MIN_PERF(x)                (x & 0xff)