]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Fix bit twiddling in sparc_pmu_enable_event().
authorDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2012 20:05:25 +0000 (13:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2012 20:05:25 +0000 (13:05 -0700)
commita8d909581ff987b2164813a87d356fbf7ecc55c8
treef35eaea2baa8b83f4ffed9c12f55dbd2e32abb25
parent5630601df06743a2afd13df6262b0b1793bdbc33
sparc64: Fix bit twiddling in sparc_pmu_enable_event().

There was a serious disconnect in the logic happening in
sparc_pmu_disable_event() vs. sparc_pmu_enable_event().

Event disable is implemented by programming a NOP event into the PCR.

However, event enable was not reversing this operation.  Instead, it
was setting the User/Priv/Hypervisor trace enable bits.

That's not sparc_pmu_enable_event()'s job, that's what
sparc_pmu_enable() and sparc_pmu_disable() do .

The intent of sparc_pmu_enable_event() is clear, since it first clear
out the event type encoding field.  So fix this by OR'ing in the event
encoding rather than the trace enable bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/perf_event.c