summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-01-12 14:21:45 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-01-12 14:28:21 -0300
commitb4bb6f05e4b25e66825956006c3d5cbe5b73eaec (patch)
tree4822f61941791dee7aa7e9ff4d95c393bb72a21a
parent8de78328f041f10a2b546fdb3791a87ba6b742e6 (diff)
Revert "perf powerpc: Add data source encodings for power10 platform"
This was in a patchkit mixing up kernel with tools/ parts and I mistakenly got it merged in the perf tools tree, revert it, it'll go via the PowerPC kernel tree. This reverts commit af2b24f228a0373ac65eb7a502e0bc31e2c0269d. Cc: kajoljain <kjain@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Link: http://lore.kernel.org/lkml/20220112171659.531d22ce@canb.auug.org.au Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--arch/powerpc/perf/isa207-common.c54
1 files changed, 12 insertions, 42 deletions
diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
index 0c8b1a5cfe5c..7ea873ab2e6f 100644
--- a/arch/powerpc/perf/isa207-common.c
+++ b/arch/powerpc/perf/isa207-common.c
@@ -229,28 +229,13 @@ static inline u64 isa207_find_source(u64 idx, u32 sub_idx)
ret = PH(LVL, L3);
break;
case 4:
- if (cpu_has_feature(CPU_FTR_ARCH_31)) {
- ret = P(SNOOP, HIT);
-
- if (sub_idx == 1)
- ret |= PH(LVL, LOC_RAM) | LEVEL(RAM);
- else if (sub_idx == 2 || sub_idx == 3)
- ret |= P(LVL, HIT) | LEVEL(PMEM);
- else if (sub_idx == 4)
- ret |= PH(LVL, REM_RAM1) | REM | LEVEL(RAM) | P(HOPS, 2);
- else if (sub_idx == 5 || sub_idx == 7)
- ret |= P(LVL, HIT) | LEVEL(PMEM) | REM;
- else if (sub_idx == 6)
- ret |= PH(LVL, REM_RAM2) | REM | LEVEL(RAM) | P(HOPS, 3);
- } else {
- if (sub_idx <= 1)
- ret = PH(LVL, LOC_RAM);
- else if (sub_idx > 1 && sub_idx <= 2)
- ret = PH(LVL, REM_RAM1);
- else
- ret = PH(LVL, REM_RAM2);
- ret |= P(SNOOP, HIT);
- }
+ if (sub_idx <= 1)
+ ret = PH(LVL, LOC_RAM);
+ else if (sub_idx > 1 && sub_idx <= 2)
+ ret = PH(LVL, REM_RAM1);
+ else
+ ret = PH(LVL, REM_RAM2);
+ ret |= P(SNOOP, HIT);
break;
case 5:
if (cpu_has_feature(CPU_FTR_ARCH_31)) {
@@ -276,26 +261,11 @@ static inline u64 isa207_find_source(u64 idx, u32 sub_idx)
}
break;
case 6:
- if (cpu_has_feature(CPU_FTR_ARCH_31)) {
- if (sub_idx == 0)
- ret = PH(LVL, REM_CCE1) | LEVEL(ANY_CACHE) | REM |
- P(SNOOP, HIT) | P(HOPS, 2);
- else if (sub_idx == 1)
- ret = PH(LVL, REM_CCE1) | LEVEL(ANY_CACHE) | REM |
- P(SNOOP, HITM) | P(HOPS, 2);
- else if (sub_idx == 2)
- ret = PH(LVL, REM_CCE2) | LEVEL(ANY_CACHE) | REM |
- P(SNOOP, HIT) | P(HOPS, 3);
- else if (sub_idx == 3)
- ret = PH(LVL, REM_CCE2) | LEVEL(ANY_CACHE) | REM |
- P(SNOOP, HITM) | P(HOPS, 3);
- } else {
- ret = PH(LVL, REM_CCE2);
- if (sub_idx == 0 || sub_idx == 2)
- ret |= P(SNOOP, HIT);
- else if (sub_idx == 1 || sub_idx == 3)
- ret |= P(SNOOP, HITM);
- }
+ ret = PH(LVL, REM_CCE2);
+ if ((sub_idx == 0) || (sub_idx == 2))
+ ret |= P(SNOOP, HIT);
+ else if ((sub_idx == 1) || (sub_idx == 3))
+ ret |= P(SNOOP, HITM);
break;
case 7:
ret = PM(LVL, L1);