Lines Matching defs:event
13 #define MAX_ALT 3 /* Maximum number of event alternative codes */
16 * Bits in event code for MPC7450 family
33 * -1: event code is invalid
37 static int mpc7450_classify_event(u32 event)
41 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK;
47 event &= PM_PMCSEL_MSK;
48 if (event <= 1)
50 if (event <= 7)
52 if (event <= 13)
54 if (event <= 22)
77 static int mpc7450_threshold_use(u32 event)
81 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK;
82 sel = event & PM_PMCSEL_MSK;
150 static int mpc7450_get_constraint(u64 event, unsigned long *maskp,
157 class = mpc7450_classify_event(event);
161 pmc = ((unsigned int)event >> PM_PMC_SH) & PM_PMC_MSK;
169 tuse = mpc7450_threshold_use(event);
171 thresh = ((unsigned int)event >> PM_THRESH_SH) & PM_THRESH_MSK;
176 if ((unsigned int)event & PM_THRMULT_MSKS)
208 static int find_alternative(u32 event)
213 if (event < event_alternatives[i][0])
216 if (event == event_alternatives[i][j])
222 static int mpc7450_get_alternatives(u64 event, unsigned int flags, u64 alt[])
227 alt[0] = event;
229 i = find_alternative((u32)event);
233 if (ae && ae != (u32)event)
259 static int mpc7450_compute_mmcr(u64 event[], int n_ev, unsigned int hwc[],
277 class = mpc7450_classify_event(event[i]);
284 /* Second pass: allocate PMCs from most specific event to least */
287 ev = event[event_index[class][i]];
362 * are event codes.