]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ia64: fix 2 more perfmon2 bugs
authorStéphane Eranian <eranian@hpl.hp.com>
Mon, 27 Oct 2003 14:45:37 +0000 (06:45 -0800)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Mon, 27 Oct 2003 14:45:37 +0000 (06:45 -0800)
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.

arch/ia64/kernel/perfmon.c
arch/ia64/kernel/perfmon_mckinley.h

index 5e454f190439f48d91e0958e5c5537d20b461d38..034b8ecb425542dcd73053882f3496ca9109182b 100644 (file)
@@ -4717,7 +4717,7 @@ pfm_check_task_state(pfm_context_t *ctx, int cmd, unsigned long flags)
        /*
         * 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;
 
index 28818def428bca3ebd8f1a382bf931e41a388488..5a15a7ac54e6c73c159d15d4391694df24cdf8ad 100644 (file)
@@ -167,7 +167,7 @@ pfm_mck_pmc_check(struct task_struct *task, pfm_context_t *ctx, unsigned int cnu
                         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;