Hello,

In debugging a multiplexing problem on perfmon2 for POWER, I discovered that first_intr_pmd in the pfm_regdesc structure is not initialized anywhere (that I can find). This patch adds the code to initialize first_intr_pmd to pfm_pmu_regdesc_init().

- Corey


--
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
[EMAIL PROTECTED]
Index: linux-2.6/perfmon/perfmon_pmu.c
===================================================================
--- linux-2.6.orig/perfmon/perfmon_pmu.c        2008-07-17 14:07:16.000000000 
-0400
+++ linux-2.6/perfmon/perfmon_pmu.c     2008-07-17 14:33:32.000000000 -0400
@@ -65,7 +65,7 @@
 {
        struct pfm_regmap_desc *d;
        u16 n, n2, n_counters, i;
-       int max1, max2, max3;
+       int first_intr_pmd = -1, max1, max2, max3;
 
        /*
         * compute the number of implemented PMC from the
@@ -132,6 +132,8 @@
                 */
                if (d->type & PFM_REG_INTR) {
                        __set_bit(i, cast_ulp(pfm_pmu_conf->regs.intr_pmds));
+                       if (first_intr_pmd == -1)
+                               first_intr_pmd = i;
                        max2 = i;
                }
        }
@@ -143,6 +145,7 @@
        }
 
        pfm_pmu_conf->regs.max_pmd = max1 + 1;
+       pfm_pmu_conf->regs.first_intr_pmd = first_intr_pmd;
        pfm_pmu_conf->regs.max_intr_pmd  = max2 + 1;
 
        pfm_pmu_conf->regs.num_counters = n_counters;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to