summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/perf/isa207-common.h
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>2017-10-09 19:42:40 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-20 20:53:11 +1100
commit2d46d4877b1afd14059393a48bdb8ce27955174c (patch)
treeab63b2fd93f73819eaaa4e2a59962f4e0b405f88 /arch/powerpc/perf/isa207-common.h
parent8c31459d6138b07537346d976e7c30c760a1de01 (diff)
downloadtalos-obmc-linux-2d46d4877b1afd14059393a48bdb8ce27955174c.tar.gz
talos-obmc-linux-2d46d4877b1afd14059393a48bdb8ce27955174c.zip
powerpc/perf: Fix unit_sel/cache_sel checks
Raw event code has couple of fields "unit" and "cache" in it, to capture the "unit" to monitor for a given pmcxsel and cache reload qualifier to program in MMCR1. isa207_get_constraint() refers "unit" field to update the MMCRC (L2/L3) Event bus control fields with "cache" bits of the raw event code. These are power8 specific and not supported by PowerISA v3.0 pmu. So wrap the checks to be power8 specific. Also, "cache" bit field is referred to update MMCR1[16:17] and this check can be power8 specific. Fixes: 7ffd948fae4cd ('powerpc/perf: factor out power8 pmu functions') Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/perf/isa207-common.h')
-rw-r--r--arch/powerpc/perf/isa207-common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/perf/isa207-common.h b/arch/powerpc/perf/isa207-common.h
index 0028f4b9490d..e5a621699a6d 100644
--- a/arch/powerpc/perf/isa207-common.h
+++ b/arch/powerpc/perf/isa207-common.h
@@ -163,8 +163,8 @@
#define MMCR1_COMBINE_SHIFT(pmc) (35 - ((pmc) - 1))
#define MMCR1_PMCSEL_SHIFT(pmc) (24 - (((pmc) - 1)) * 8)
#define MMCR1_FAB_SHIFT 36
-#define MMCR1_DC_QUAL_SHIFT 47
-#define MMCR1_IC_QUAL_SHIFT 46
+#define MMCR1_DC_IC_QUAL_MASK 0x3
+#define MMCR1_DC_IC_QUAL_SHIFT 46
/* MMCR1 Combine bits macro for power9 */
#define p9_MMCR1_COMBINE_SHIFT(pmc) (38 - ((pmc - 1) * 2))
OpenPOWER on IntegriCloud