Here is the minimal patch that fixes things that do not work and that
can be noticed fairly easily:
- remove a typo in pfm_check_task_state() which causes
PFM_READ_PMDS to fail when context is in PFM_MASKED state.
- fix a typo in perfmon_mcklinley.h when checking the value
combinations for when writing to PMC14. This could reject a
valid request to program PMC14.
/*
* context is UNLOADED, MASKED, TERMINATED we are safe to go
*/
- if (state != PFM_CTX_LOADED == 0) return 0;
+ if (state != PFM_CTX_LOADED) return 0;
if (state == PFM_CTX_ZOMBIE) return -EINVAL;
val14 = ctx->ctx_pmcs[14];
check_case1 = 1;
break;
- case 14: val8 = ctx->ctx_pmcs[13];
+ case 14: val8 = ctx->ctx_pmcs[8];
val13 = ctx->ctx_pmcs[13];
val14 = *val;
check_case1 = 1;