powerpc/perf_event: Fix Power6 L1 cache read & write event codes]
authorCarl E. Love <cel@linux.vnet.ibm.com>
Wed, 28 Sep 2011 11:23:33 +0000 (11:23 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 29 Sep 2011 07:04:59 +0000 (17:04 +1000)
commitd15f02eb4e8992cfacfca2ff306e5585bcf721d1
tree31c1d6179aa900d8702353665b8d1d989ec1fbb7
parente69b742a6793dc5bf16f6eedca534d4bc10d68b2
powerpc/perf_event: Fix Power6 L1 cache read & write event codes]

The current L1 cache read event code 0x80082 only counts for thread 0. The
event code 0x280030 should be used to count events on thread 0 and 1. The
patch fixes the event code for the L1 cache read.

The current L1 cache write event code 0x80086 only counts for thread 0. The
event code 0x180032 should be used to count events on thread 0 and 1. The
patch fixes the event code for the L1 cache write.

FYI, the documentation lists three event codes for the L1 cache read event
and three event codes for the L1 cache write event.  The event description
for the event codes is as follows:

L1 cache read requests  0x80082  LSU 0 only
L1 cache read requests  0x8008A  LSU 1 only
L1 cache read requests  0x80030  LSU 1 or LSU 0, counter 2 only.

L1 cache store requests 0x80086  LSU 0 only
L1 cache store requests 0x8008E  LSU 1 only
L1 cache store requests 0x80032  LSU 0 or LSU 1, counter 1 only.

There can only be one request from either LSU 0 or 1 active at a time.

Signed-off-by: Carl Love <cel@us.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/power6-pmu.c