Hi Stephane,
On 6/2/2009, you committed a patch from Victor Jimenez, which I had asked that
you commit.
When doing some testing today using that code, I found that it causes BUG() to
be called because pfm_arch_read() is called instead of pfm_read_pmd(). Despite
the suggestion of a "arch-specific" functionality difference between
pfm_read_pmd() and pfm_arch_read_pmd(), pfm_read_pmd() can dispatch to a virtual
register read function - pmd_sread(), whereas pfm_arch_read_pmd() can only read
hardware registers. This was causing pfm_arch_read_pmd() to be called with an
unrecognized hardware register number (a virtual register number).
I am attaching a patch that more closely brings together the pfm_save_pmds
function in perfmon/perfmon.c, and the pfm_save_pmds_no_clear() in
arch/powerpc/perfmon/perfmon.c. They now both call pfm_read_pmd().
I have tested this patch on Power6 and it does fix the regression.
Thanks for your consideration,
- Corey
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjash...@us.ibm.com
diff --git a/arch/powerpc/perfmon/perfmon.c b/arch/powerpc/perfmon/perfmon.c
index f5077cc..6e8d9cf 100644
--- a/arch/powerpc/perfmon/perfmon.c
+++ b/arch/powerpc/perfmon/perfmon.c
@@ -37,7 +37,7 @@ static void pfm_save_pmds_no_clear(struct pfm_context *ctx,
* save HW PMD, for counters, reconstruct 64-bit value
*/
for_each_bit(i, cast_ulp(set->used_pmds), ctx->regs.max_pmd) {
- val = pfm_arch_read_pmd(ctx, i);
+ val = pfm_read_pmd(ctx, i);
if (likely(test_bit(i, cast_ulp(ctx->regs.cnt_pmds))))
val = (set->pmds[i].value & ~ovfl_mask) |
(val & ovfl_mask);
------------------------------------------------------------------------------
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel