@@ -124,9 +124,9 @@ static const u64 p6_perfmon_event_map[] =
124124 [PERF_COUNT_HW_BUS_CYCLES ] = 0x0062 ,
125125};
126126
127- static u64 p6_pmu_event_map (int event )
127+ static u64 p6_pmu_event_map (int hw_event )
128128{
129- return p6_perfmon_event_map [event ];
129+ return p6_perfmon_event_map [hw_event ];
130130}
131131
132132/*
@@ -137,7 +137,7 @@ static u64 p6_pmu_event_map(int event)
137137 */
138138#define P6_NOP_COUNTER 0x0000002EULL
139139
140- static u64 p6_pmu_raw_event (u64 event )
140+ static u64 p6_pmu_raw_event (u64 hw_event )
141141{
142142#define P6_EVNTSEL_EVENT_MASK 0x000000FFULL
143143#define P6_EVNTSEL_UNIT_MASK 0x0000FF00ULL
@@ -152,7 +152,7 @@ static u64 p6_pmu_raw_event(u64 event)
152152 P6_EVNTSEL_INV_MASK | \
153153 P6_EVNTSEL_COUNTER_MASK)
154154
155- return event & P6_EVNTSEL_MASK ;
155+ return hw_event & P6_EVNTSEL_MASK ;
156156}
157157
158158
@@ -170,16 +170,16 @@ static const u64 intel_perfmon_event_map[] =
170170 [PERF_COUNT_HW_BUS_CYCLES ] = 0x013c ,
171171};
172172
173- static u64 intel_pmu_event_map (int event )
173+ static u64 intel_pmu_event_map (int hw_event )
174174{
175- return intel_perfmon_event_map [event ];
175+ return intel_perfmon_event_map [hw_event ];
176176}
177177
178178/*
179- * Generalized hw caching related event table, filled
179+ * Generalized hw caching related hw_event table, filled
180180 * in on a per model basis. A value of 0 means
181- * 'not supported', -1 means 'event makes no sense on
182- * this CPU', any other value means the raw event
181+ * 'not supported', -1 means 'hw_event makes no sense on
182+ * this CPU', any other value means the raw hw_event
183183 * ID.
184184 */
185185
@@ -463,7 +463,7 @@ static const u64 atom_hw_cache_event_ids
463463 },
464464};
465465
466- static u64 intel_pmu_raw_event (u64 event )
466+ static u64 intel_pmu_raw_event (u64 hw_event )
467467{
468468#define CORE_EVNTSEL_EVENT_MASK 0x000000FFULL
469469#define CORE_EVNTSEL_UNIT_MASK 0x0000FF00ULL
@@ -478,7 +478,7 @@ static u64 intel_pmu_raw_event(u64 event)
478478 CORE_EVNTSEL_INV_MASK | \
479479 CORE_EVNTSEL_COUNTER_MASK)
480480
481- return event & CORE_EVNTSEL_MASK ;
481+ return hw_event & CORE_EVNTSEL_MASK ;
482482}
483483
484484static const u64 amd_hw_cache_event_ids
@@ -585,12 +585,12 @@ static const u64 amd_perfmon_event_map[] =
585585 [PERF_COUNT_HW_BRANCH_MISSES ] = 0x00c5 ,
586586};
587587
588- static u64 amd_pmu_event_map (int event )
588+ static u64 amd_pmu_event_map (int hw_event )
589589{
590- return amd_perfmon_event_map [event ];
590+ return amd_perfmon_event_map [hw_event ];
591591}
592592
593- static u64 amd_pmu_raw_event (u64 event )
593+ static u64 amd_pmu_raw_event (u64 hw_event )
594594{
595595#define K7_EVNTSEL_EVENT_MASK 0x7000000FFULL
596596#define K7_EVNTSEL_UNIT_MASK 0x00000FF00ULL
@@ -605,7 +605,7 @@ static u64 amd_pmu_raw_event(u64 event)
605605 K7_EVNTSEL_INV_MASK | \
606606 K7_EVNTSEL_COUNTER_MASK)
607607
608- return event & K7_EVNTSEL_MASK ;
608+ return hw_event & K7_EVNTSEL_MASK ;
609609}
610610
611611/*
@@ -956,7 +956,7 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
956956 }
957957
958958 /*
959- * Raw event type provide the config in the event structure
959+ * Raw hw_event type provide the config in the hw_event structure
960960 */
961961 if (attr -> type == PERF_TYPE_RAW ) {
962962 hwc -> config |= x86_pmu .raw_event (attr -> config );
@@ -1245,7 +1245,7 @@ x86_perf_counter_set_period(struct perf_counter *counter,
12451245 ret = 1 ;
12461246 }
12471247 /*
1248- * Quirk: certain CPUs dont like it if just 1 event is left:
1248+ * Quirk: certain CPUs dont like it if just 1 hw_event is left:
12491249 */
12501250 if (unlikely (left < 2 ))
12511251 left = 2 ;
@@ -1337,23 +1337,23 @@ static void amd_pmu_enable_counter(struct hw_perf_counter *hwc, int idx)
13371337static int
13381338fixed_mode_idx (struct perf_counter * counter , struct hw_perf_counter * hwc )
13391339{
1340- unsigned int event ;
1340+ unsigned int hw_event ;
13411341
1342- event = hwc -> config & ARCH_PERFMON_EVENT_MASK ;
1342+ hw_event = hwc -> config & ARCH_PERFMON_EVENT_MASK ;
13431343
1344- if (unlikely ((event ==
1344+ if (unlikely ((hw_event ==
13451345 x86_pmu .event_map (PERF_COUNT_HW_BRANCH_INSTRUCTIONS )) &&
13461346 (hwc -> sample_period == 1 )))
13471347 return X86_PMC_IDX_FIXED_BTS ;
13481348
13491349 if (!x86_pmu .num_counters_fixed )
13501350 return -1 ;
13511351
1352- if (unlikely (event == x86_pmu .event_map (PERF_COUNT_HW_INSTRUCTIONS )))
1352+ if (unlikely (hw_event == x86_pmu .event_map (PERF_COUNT_HW_INSTRUCTIONS )))
13531353 return X86_PMC_IDX_FIXED_INSTRUCTIONS ;
1354- if (unlikely (event == x86_pmu .event_map (PERF_COUNT_HW_CPU_CYCLES )))
1354+ if (unlikely (hw_event == x86_pmu .event_map (PERF_COUNT_HW_CPU_CYCLES )))
13551355 return X86_PMC_IDX_FIXED_CPU_CYCLES ;
1356- if (unlikely (event == x86_pmu .event_map (PERF_COUNT_HW_BUS_CYCLES )))
1356+ if (unlikely (hw_event == x86_pmu .event_map (PERF_COUNT_HW_BUS_CYCLES )))
13571357 return X86_PMC_IDX_FIXED_BUS_CYCLES ;
13581358
13591359 return -1 ;
@@ -1970,7 +1970,7 @@ static int intel_pmu_init(void)
19701970
19711971 /*
19721972 * Check whether the Architectural PerfMon supports
1973- * Branch Misses Retired Event or not.
1973+ * Branch Misses Retired hw_event or not.
19741974 */
19751975 cpuid (10 , & eax .full , & ebx , & unused , & edx .full );
19761976 if (eax .split .mask_length <= ARCH_PERFMON_BRANCH_MISSES_RETIRED )
0 commit comments