Skip to content

Commit

Permalink
ARM: 5849/1: ARMv7: fix Oprofile events count
Browse files Browse the repository at this point in the history
On Oprofile ARMv7 the PMNC_D bit was set to lower the PMU IRQs
and so to decrease the risk of errata #628216 from appearing.
The effect of setting the PMNC_D bit is that the CCNT counter
is divided by 64, making the program counter events count
inaccurate.
The new OMAP3 r4 cores should have that errata fixed.

The PMNC_D bit should not be set, this patch fixes it.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Jean PIHET authored and Russell King committed Dec 22, 2009
1 parent cdd90fb commit 3321c2b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/arm/oprofile/op_model_v7.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,8 @@ int armv7_setup_pmnc(void)
return -EBUSY;
}

/*
* Initialize & Reset PMNC: C bit, D bit and P bit.
* Note: Using a slower count for CCNT (D bit: divide by 64) results
* in a more stable system
*/
armv7_pmnc_write(PMNC_P | PMNC_C | PMNC_D);
/* Initialize & Reset PMNC: C bit and P bit */
armv7_pmnc_write(PMNC_P | PMNC_C);


for (cnt = CCNT; cnt < CNTMAX; cnt++) {
Expand Down

0 comments on commit 3321c2b

Please sign in to comment.