]> git.baikalelectronics.ru Git - kernel.git/commit
perf/marvell: cn10k DDR perfmon event overflow handling
authorBharat Bhushan <bbhushan2@marvell.com>
Fri, 11 Feb 2022 04:53:45 +0000 (10:23 +0530)
committerWill Deacon <will@kernel.org>
Tue, 8 Mar 2022 11:17:37 +0000 (11:17 +0000)
commit8b5aaf9d80efdbffc38c793842ca33fc2ae3b630
treef1144fcbe041d96dc12d31a6245924dee38078cd
parent3e2b2a56929cc7d98ee32bfee68d4fbf5bb6e155
perf/marvell: cn10k DDR perfmon event overflow handling

CN10k DSS h/w perfmon does not support event overflow interrupt, so
periodic timer is being used. Each event counter is 48bit, which in worst
case scenario can increment at maximum 5.6 GT/s. At this rate it may take
many hours to overflow these counters. Therefore polling period for
overflow is set to 100 sec, which can be changed using sysfs parameter.

Two fixed event counters starts counting from zero on overflow, so
overflow condition is when new count less than previous count. While
eight programmable event counters freezes at maximum value. Also individual
counter cannot be restarted, so need to restart all eight counters.

Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Reviewed-by: Bhaskara Budiredla <bbudiredla@marvell.com>
Link: https://lore.kernel.org/r/20220211045346.17894-4-bbhushan2@marvell.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/marvell_cn10k_ddr_pmu.c