linux-stable/arch/arc
Alexey Brodkin 36481cf7fb ARCv2: perf: Support sampling events using overflow interrupts
In times of ARC 700 performance counters didn't have support of
interrupt an so for ARC we only had support of non-sampling events.

Put simply only "perf stat" was functional.

Now with ARC HS we have support of interrupts in performance counters
which this change introduces support of.

ARC performance counters act in the following way in regard of
interrupts generation.
 [1] A counter counts starting from value set in PCT_COUNT register pair
 [2] Once counter reaches value set in PCT_INT_CNT interrupt is raised

Basic setup look like this:
 [1] PCT_COUNT = 0;
 [2] PCT_INT_CNT = __limit_value__;
 [3] Enable interrupts for that counter and let it run
 [4] Let counter reach its limit
 [5] Handle interrupt when it happens

Note that PCT HW block is build in CPU core and so ints interrupt
line (which is basically OR of all counters IRQs) is wired directly to
top-level IRQC. That means do de-assert PCT interrupt it's required to
reset IRQs from all counters that have reached their limit values.

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>
2015-08-27 14:57:43 +05:30
..
boot ARC: add/fix some comments in code - no functional change 2015-08-20 19:05:49 +05:30
configs ARCv2: [vdk] dts files and defconfig for HS38 VDK 2015-06-25 06:00:21 +05:30
include ARCv2: perf: Support sampling events using overflow interrupts 2015-08-27 14:57:43 +05:30
kernel ARCv2: perf: Support sampling events using overflow interrupts 2015-08-27 14:57:43 +05:30
lib ARCv2: lib: memset: Don't assume 64-bit load/stores 2015-07-20 17:44:37 +03:00
mm ARC: Eliminate some ARCv2 specific code for ARCompact build 2015-08-21 15:06:43 +05:30
oprofile ARC: OProfile support 2013-02-15 23:16:00 +05:30
plat-axs10x ARC: add/fix some comments in code - no functional change 2015-08-20 19:05:49 +05:30
plat-sim ARCv2: [nsim*hs*] Support simulation platforms for HS38x cores 2015-06-25 06:00:19 +05:30
plat-tb10x ARC: [plat*] move code out of .init_machine into common 2014-10-13 14:46:13 +05:30
Kbuild
Kconfig ARC: Enable HAVE_FUTEX_CMPXCHG 2015-08-20 18:16:01 +05:30
Kconfig.debug ARC: With earlycon in use, retire EARLY_PRINTK 2015-05-11 11:20:21 +05:30
Makefile ARCv2: add knob for DIV_REV in Kconfig 2015-07-20 13:33:30 +03:00