lkml.org 
[lkml]   [2011]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 221/260] powerpc/perf: Fix sampling enable for PPC970
    Date
    From: Paul Mackerras <paulus@samba.org>

    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: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    arch/powerpc/kernel/ppc970-pmu.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)

    diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
    index 8eff48e..3fee685 100644
    --- a/arch/powerpc/kernel/ppc970-pmu.c
    +++ b/arch/powerpc/kernel/ppc970-pmu.c
    @@ -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;
    --
    1.7.3.3


    \
     
     \ /
      Last update: 2011-01-02 08:33    [W:2.440 / U:0.392 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site