Attached is a suggested patch for supporting POWER4 and POWER6 in the
You'll notice a couple of changes to the common power module,
arch/powerpc/perfmon/perfmon.c. These changes are to correct a couple
of errors. One is that in the pfm_arch_restore_pmds function, it calls
a function to write the pmd registers, but on POWER6, some of those
registers are virtual, and pfm_arch_write_pmd() is incapable of writing
virtual registers. Also, there is a change to the pfm_arch_restore_pmcs
function to reverse the order of the writes so as to ensure the proper
event selection settings before the counters are enabled.
In this patch too, is a small patch to include/asm-powerpc/reg.h to add
a PVR definition for POWER6. I'm not sure this is an appropriate venue
for this change, and that perhaps it should be kept locally inside the
perfmon code until it "magically" appears in some later Linux kernel source.
Please let me know if you have any issues with this patch (formatting,
style, function, etc.).
Thanks for your consideration,
IBM Linux Technology Center, Linux Toolchain