#define MAX_EVENT_ALTERNATIVES 8
 #define MAX_LIMITED_HWCOUNTERS 2
 
+struct perf_event;
+
 /*
  * This struct provides the constants and functions needed to
  * describe the PMU on a particular POWER-family CPU.
        unsigned long   add_fields;
        unsigned long   test_adder;
        int             (*compute_mmcr)(u64 events[], int n_ev,
-                               unsigned int hwc[], unsigned long mmcr[]);
+                               unsigned int hwc[], unsigned long mmcr[],
+                               struct perf_event *pevents[]);
        int             (*get_constraint)(u64 event_id, unsigned long *mskp,
                                unsigned long *valp);
        int             (*get_alternatives)(u64 event_id, unsigned int flags,
 
        memset(cpuhw->mmcr, 0, sizeof(cpuhw->mmcr));
 
        if (ppmu->compute_mmcr(cpuhw->events, cpuhw->n_events, hwc_index,
-                              cpuhw->mmcr)) {
+                              cpuhw->mmcr, cpuhw->event)) {
                /* shouldn't ever get here */
                printk(KERN_ERR "oops compute_mmcr failed\n");
                goto out;
 
 /*
  * Compute MMCR0/1/2 values for a set of events.
  */
-static int mpc7450_compute_mmcr(u64 event[], int n_ev,
-                               unsigned int hwc[], unsigned long mmcr[])
+static int mpc7450_compute_mmcr(u64 event[], int n_ev, unsigned int hwc[],
+                               unsigned long mmcr[],
+                               struct perf_event *pevents[])
 {
        u8 event_index[N_CLASSES][N_COUNTER];
        int n_classevent[N_CLASSES];
 
 }
 
 static int p4_compute_mmcr(u64 event[], int n_ev,
-                          unsigned int hwc[], unsigned long mmcr[])
+                          unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr0 = 0, mmcr1 = 0, mmcra = 0;
        unsigned int pmc, unit, byte, psel, lower;
 
 }
 
 static int power5p_compute_mmcr(u64 event[], int n_ev,
-                               unsigned int hwc[], unsigned long mmcr[])
+                               unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr1 = 0;
        unsigned long mmcra = 0;
 
 }
 
 static int power5_compute_mmcr(u64 event[], int n_ev,
-                              unsigned int hwc[], unsigned long mmcr[])
+                              unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr1 = 0;
        unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
 
  * Assign PMC numbers and compute MMCR1 value for a set of events
  */
 static int p6_compute_mmcr(u64 event[], int n_ev,
-                          unsigned int hwc[], unsigned long mmcr[])
+                          unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr1 = 0;
        unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
 
 }
 
 static int power7_compute_mmcr(u64 event[], int n_ev,
-                              unsigned int hwc[], unsigned long mmcr[])
+                              unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr1 = 0;
        unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
 
 }
 
 static int power8_compute_mmcr(u64 event[], int n_ev,
-                              unsigned int hwc[], unsigned long mmcr[])
+                              unsigned int hwc[], unsigned long mmcr[],
+                              struct perf_event *pevents[])
 {
        unsigned long mmcra, mmcr1, unit, combine, psel, cache, val;
        unsigned int pmc, pmc_inuse;
 
 }
 
 static int p970_compute_mmcr(u64 event[], int n_ev,
-                            unsigned int hwc[], unsigned long mmcr[])
+                            unsigned int hwc[], unsigned long mmcr[], struct perf_event *pevents[])
 {
        unsigned long mmcr0 = 0, mmcr1 = 0, mmcra = 0;
        unsigned int pmc, unit, byte, psel;