]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/perf: Fix sampling enable for PPC970
authorPaul Mackerras <paulus@samba.org>
Thu, 9 Sep 2010 19:02:40 +0000 (19:02 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 18:59:43 +0000 (10:59 -0800)
commit 9f5f9ffe50e90ed73040d2100db8bfc341cee352 upstream.

The logic to distinguish marked instruction events from ordinary events
on PPC970 and derivatives was flawed.  The result is that instruction
sampling didn't get enabled in the PMU for some marked instruction
events, so they would never trigger.  This fixes it by adding the
appropriate break statements in the switch statement.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/ppc970-pmu.c

index 8eff48e20dba8ae056f9f4469642a5cdc453aefc..3fee685de4df49e01a3a85ff069f3d409354c924 100644 (file)
@@ -169,9 +169,11 @@ static int p970_marked_instr_event(u64 event)
        switch (unit) {
        case PM_VPU:
                mask = 0x4c;            /* byte 0 bits 2,3,6 */
+               break;
        case PM_LSU0:
                /* byte 2 bits 0,2,3,4,6; all of byte 1 */
                mask = 0x085dff00;
+               break;
        case PM_LSU1L:
                mask = 0x50 << 24;      /* byte 3 bits 4,6 */
                break;