From 09208df4fd9f07558e57c847ee9c89c687923e05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Eranian?= Date: Mon, 15 Sep 2003 01:24:02 -0700 Subject: [PATCH] [PATCH] ia64: minor perfmon2 patch This patch fixes a typo in pfm_write_pmcs() in the test for the default value. The code was using the lop index instead of the register index in the PMC_DFL_VAL() macro. This was causing valid values for some PMCs to be rejected. --- arch/ia64/kernel/perfmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index b7365a87f59af..cd70db2ee33a6 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2905,7 +2905,7 @@ pfm_write_pmcs(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) * - system-wide session: PMCx.pm=1 (privileged monitor) * - per-task : PMCx.pm=0 (user monitor) */ - if ((is_monitor || is_counting) && value != PMC_DFL_VAL(i) && PFM_CHECK_PMC_PM(ctx, cnum, value)) { + if ((is_monitor || is_counting) && value != PMC_DFL_VAL(cnum) && PFM_CHECK_PMC_PM(ctx, cnum, value)) { DPRINT(("pmc%u pmc_pm=%ld fl_system=%d\n", cnum, PMC_PM(cnum, value), -- 2.53.0