Hi, Here are two quick fixes we found for the pfm_pmu_register() routine during our testing.
1/2 In pfm_pmu_register(), the check for virtual read-only PMDs is not very intuitive. Since we've already checked if the PMD is virtual, just add a check under that if statement to see if the PMD is also read-only. Obviously this is just a coding style issue, but Carl and I both got tripped up a couple times trying to understand when the pmd_sread and pmd_swrite routines are required. I think this helps make that a bit clearer. And it also eliminates a few instructions (not that this code path is performance sensitive). 2/2 The pfm_read_pmd() routine in include/linux/perfmon.h always attempts to call pmd_sread if the register is marked as virtual. Therefore, in pfm_pmu_register(), the PMU is required to have a pmd_sread function if there are any virtual PMDs, not just if there are read-only virtual PMDs. Thanks, -- Kevin Corry [EMAIL PROTECTED] http://www.ibm.com/linux/ _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
