Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARCv2: perf: Finally introduce HS perf unit

With all features in place, the ARC HS pct block can now be effectively
allowed to be probed/used

Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

+24 -3
+17
Documentation/devicetree/bindings/arc/archs-pct.txt
··· 1 + * ARC HS Performance Counters 2 + 3 + The ARC HS can be configured with a pipeline performance monitor for counting 4 + CPU and cache events like cache misses and hits. Like conventional PCT there 5 + are 100+ hardware conditions dynamically mapped to upto 32 counters. 6 + It also supports overflow interrupts. 7 + 8 + Required properties: 9 + 10 + - compatible : should contain 11 + "snps,archs-pct" 12 + 13 + Example: 14 + 15 + pmu { 16 + compatible = "snps,archs-pct"; 17 + };
+1 -1
MAINTAINERS
··· 9874 9874 M: Vineet Gupta <vgupta@synopsys.com> 9875 9875 S: Supported 9876 9876 F: arch/arc/ 9877 - F: Documentation/devicetree/bindings/arc/ 9877 + F: Documentation/devicetree/bindings/arc/* 9878 9878 F: drivers/tty/serial/arc_uart.c 9879 9879 T: git git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git 9880 9880
+4 -1
arch/arc/include/asm/perf_event.h
··· 105 105 [PERF_COUNT_HW_INSTRUCTIONS] = "iall", 106 106 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = "ijmp", /* Excludes ZOL jumps */ 107 107 [PERF_COUNT_ARC_BPOK] = "bpok", /* NP-NT, PT-T, PNT-NT */ 108 + #ifdef CONFIG_ISA_ARCV2 109 + [PERF_COUNT_HW_BRANCH_MISSES] = "bpmp", 110 + #else 108 111 [PERF_COUNT_HW_BRANCH_MISSES] = "bpfail", /* NP-T, PT-NT, PNT-T */ 109 - 112 + #endif 110 113 [PERF_COUNT_ARC_LDC] = "imemrdc", /* Instr: mem read cached */ 111 114 [PERF_COUNT_ARC_STC] = "imemwrc", /* Instr: mem write cached */ 112 115
+2 -1
arch/arc/kernel/perf_event.c
··· 551 551 #ifdef CONFIG_OF 552 552 static const struct of_device_id arc_pmu_match[] = { 553 553 { .compatible = "snps,arc700-pct" }, 554 + { .compatible = "snps,archs-pct" }, 554 555 {}, 555 556 }; 556 557 MODULE_DEVICE_TABLE(of, arc_pmu_match); ··· 559 558 560 559 static struct platform_driver arc_pmu_driver = { 561 560 .driver = { 562 - .name = "arc700-pct", 561 + .name = "arc-pct", 563 562 .of_match_table = of_match_ptr(arc_pmu_match), 564 563 }, 565 564 .probe = arc_pmu_device_probe,