diff options
author | Atish Patra <atish.patra@wdc.com> | 2022-02-18 16:46:55 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-03-21 14:58:25 -0700 |
commit | 9b3e150e310ee71d7bae1e31c38a300cfa5e951b (patch) | |
tree | 28265a280435ea8c707d06c1a6e1255a1b44ffe7 /drivers/perf/Kconfig | |
parent | f5bfa23f576fdcc8e0b7fbff44cf70bd69ff9bdb (diff) | |
download | linux-9b3e150e310ee71d7bae1e31c38a300cfa5e951b.tar.bz2 |
RISC-V: Add a simple platform driver for RISC-V legacy perf
The old RISC-V perf implementation allowed counting of only
cycle/instruction counters using perf. Restore that feature by implementing
a simple platform driver under a separate config to provide backward
compatibility. Any existing software stack will continue to work as it is.
However, it provides an easy way out in future where we can remove the
legacy 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>
Diffstat (limited to 'drivers/perf/Kconfig')
-rw-r--r-- | drivers/perf/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index dbc0e3f98be9..386162ad858a 100644 --- a/drivers/perf/Kconfig +++ b/drivers/perf/Kconfig @@ -66,6 +66,16 @@ config RISCV_PMU PMU functionalities in a core library so that different PMU drivers can reuse it. +config RISCV_PMU_LEGACY + depends on RISCV_PMU + bool "RISC-V legacy PMU implementation" + default y + help + Say y if you want to use the legacy CPU performance monitor + implementation on RISC-V based systems. This only allows counting + of cycle/instruction counter and doesn't support counter overflow, + or programmable counters. It will be removed in future. + config ARM_PMU_ACPI depends on ARM_PMU && ACPI def_bool y |