]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Rearrange setting of ldbar for thread-imc
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>
Tue, 16 Apr 2019 09:48:28 +0000 (15:18 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 16:54:59 +0000 (02:54 +1000)
commite7f676e08f95f220f3cb511d43d40a7d5dc8e63e
treea43a33c69eeca0b89636d840f1cf4ba42270842f
parent5f44553e3397d1ccf45751468624351863ef9060
powerpc/perf: Rearrange setting of ldbar for thread-imc

LDBAR holds the memory address allocated for each cpu. For thread-imc
the mode bit (i.e bit 1) of LDBAR is set to accumulation.
Currently, ldbar is loaded with per cpu memory address and mode set to
accumulation at boot time.

To enable trace-imc, the mode bit of ldbar should be set to 'trace'. So to
accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc
to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del().

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/imc-pmu.c