lib: sbi: Allow programmable counters to monitor cycle/instret events
authorAtish Patra <atish.patra@wdc.com>
Mon, 8 Nov 2021 18:53:02 +0000 (10:53 -0800)
committerAnup Patel <anup@brainfault.org>
Thu, 11 Nov 2021 12:18:45 +0000 (17:48 +0530)
commit0c304b661965d81ba2194b54a0c71f4c2e5cab16
treec95d6230fbd16b7753807ea7acabbed9f1fc1e14
parent2363f950bcc497d8bd42654d32d05522fd24b9d7
lib: sbi: Allow programmable counters to monitor cycle/instret events

A platform may use programmable counters for cycle/instret events.
The priv spec allows that provided that cycle/instret also report those
events in addition to the programmable counters. We should allow that
functionality in OpenSBI.

Reviewed-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_pmu.h
lib/sbi/sbi_pmu.c