perf, x86: make IBS macros available in perf_event.h
authorRobert Richter <robert.richter@amd.com>
Thu, 25 Feb 2010 18:40:46 +0000 (19:40 +0100)
committerRobert Richter <robert.richter@amd.com>
Mon, 1 Mar 2010 10:23:15 +0000 (11:23 +0100)
This patch moves code from oprofile to perf_event.h to make it also
available for usage by perf.

Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/include/asm/perf_event.h
arch/x86/oprofile/op_model_amd.c

index befd172c82ada4c1c4c4e24b539e79689ddb3054..4933ccde96c4c884655f92219c3e2ab2c43f1070 100644 (file)
@@ -117,6 +117,16 @@ union cpuid10_edx {
  */
 #define X86_PMC_IDX_FIXED_BTS                          (X86_PMC_IDX_FIXED + 16)
 
+/* IbsFetchCtl bits/masks */
+#define IBS_FETCH_RAND_EN              (1ULL<<57)
+#define IBS_FETCH_VAL                  (1ULL<<49)
+#define IBS_FETCH_ENABLE               (1ULL<<48)
+#define IBS_FETCH_CNT_MASK             0xFFFF0000ULL
+
+/* IbsOpCtl bits */
+#define IBS_OP_CNT_CTL                 (1ULL<<19)
+#define IBS_OP_VAL                     (1ULL<<18)
+#define IBS_OP_ENABLE                  (1ULL<<17)
 
 #ifdef CONFIG_PERF_EVENTS
 extern void init_hw_perf_events(void);
index 6a58256dce9f79560a90adf380de6d87344b3490..c67174917305420f2d607b62be302b3908103208 100644 (file)
 
 static unsigned long reset_value[NUM_VIRT_COUNTERS];
 
-/* IbsFetchCtl bits/masks */
-#define IBS_FETCH_RAND_EN              (1ULL<<57)
-#define IBS_FETCH_VAL                  (1ULL<<49)
-#define IBS_FETCH_ENABLE               (1ULL<<48)
-#define IBS_FETCH_CNT_MASK             0xFFFF0000ULL
-
-/* IbsOpCtl bits */
-#define IBS_OP_CNT_CTL                 (1ULL<<19)
-#define IBS_OP_VAL                     (1ULL<<18)
-#define IBS_OP_ENABLE                  (1ULL<<17)
-
 #define IBS_FETCH_SIZE                 6
 #define IBS_OP_SIZE                    12