powerpc/perf: Define perf_event_print_debug() to print PMU register values
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>
Fri, 14 Mar 2014 05:00:27 +0000 (16:00 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 23 Mar 2014 22:48:23 +0000 (09:48 +1100)
commit5f6d0380c64051400961accf99ec41e70ec6d8ca
treed297d2cf7e012765b7134b8e88caa8570a0c1649
parent2f0695232cdc2820790abde5422d7f493f972ccc
powerpc/perf: Define perf_event_print_debug() to print PMU register values

Currently the sysrq ShowRegs command does not print any PMU registers as
we have an empty definition for perf_event_print_debug(). This patch
defines perf_event_print_debug() to print various PMU registers.

Example output:

CPU: 0 PMU registers, ppmu = POWER7 n_counters = 6
PMC1:  00000000 PMC2: 00000000 PMC3: 00000000 PMC4: 00000000
PMC5:  00000000 PMC6: 00000000 PMC7: deadbeef PMC8: deadbeef
MMCR0: 0000000080000000 MMCR1: 0000000000000000 MMCRA: 0f00000001000000
SIAR:  0000000000000000 SDAR:  0000000000000000 SIER:  0000000000000000

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
[mpe: Fix 32 bit build and rework formatting for compactness]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/perf_event_server.h
arch/powerpc/perf/core-book3s.c