lkml.org 
[lkml]   [2010]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 02/13] sparc64: Fix maybe_change_configuration() PCR setting.
    From: David S. Miller <davem@davemloft.net>

    Need to mask out the existing event bits before OR'ing in
    the new ones.

    Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    arch/sparc/kernel/perf_event.c | 1 +
    1 file changed, 1 insertion(+)

    Index: linux-2.6/arch/sparc/kernel/perf_event.c
    ===================================================================
    --- linux-2.6.orig/arch/sparc/kernel/perf_event.c
    +++ linux-2.6/arch/sparc/kernel/perf_event.c
    @@ -657,6 +657,7 @@ static u64 maybe_change_configuration(st
    cpuc->current_idx[i] = idx;

    enc = perf_event_get_enc(cpuc->events[i]);
    + pcr &= ~mask_for_index(idx);
    pcr |= event_encoding(enc, idx);
    }
    out:



    \
     
     \ /
      Last update: 2010-07-09 10:45    [W:0.036 / U:30.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site