OSDN Git Service

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)
commitdd50cf7cbc7bdd86483b797ac3d27b37d5aeeaa4
treea43a33c69eeca0b89636d840f1cf4ba42270842f
parentd1720adff3783a2ba7c128e304a385d18962835b
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