RISC-V: Add a perf core library for pmu drivers
authorAtish Patra <atish.patra@wdc.com>
Sat, 19 Feb 2022 00:46:54 +0000 (16:46 -0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Mon, 21 Mar 2022 21:58:21 +0000 (14:58 -0700)
commitf5bfa23f576fdcc8e0b7fbff44cf70bd69ff9bdb
tree086c1566d6523df658c35fa89ba73147965373b3
parentc631121dd16ee57ceb0d6a48e1357382b98350fd
RISC-V: Add a perf core library for pmu drivers

Implement a perf core library that can support all the essential perf
features in future. It can also accommodate any type of PMU implementation
in future. Currently, both SBI based perf driver and legacy driver
implemented uses the library. Most of the common perf functionalities
are kept in this core library wile PMU specific driver can implement PMU
specific features. For example, the SBI specific functionality will be
implemented in the SBI specific driver.

Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
drivers/perf/Kconfig
drivers/perf/Makefile
drivers/perf/riscv_pmu.c [new file with mode: 0644]
include/linux/perf/riscv_pmu.h [new file with mode: 0644]