On 6/2/2009, you committed a patch from Victor Jimenez, which I had asked that
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,
IBM Linux Technology Center, Linux Toolchain