Skip to content
Commit b28f0700 authored by Atish Patra's avatar Atish Patra Committed by Anup Patel
Browse files

lib: sbi: Enable PMU extension for platforms without mcountinhibit



Some platforms such as hifive unmatched doesn't implement mcountinhibit
csr. However, it has hardware events that can be monitored using 2
hpmcounter it has (i.e. mhpmcounter3 & mhpmcounter4).

Currently, PMU extension disabled if mcountinhibit is absent. That's not
really necessary as long as the supervisor OS keeps track of the delta
value of the counters. Without mcountinhibit, the delta value won't be
entirely accurate because the counters are freely running. However, that
should be fine to produce an approximate counter value which can help
performance analysis. Perf sampling won't work though as sscof extension
is not present in hifive unmatched.

Reviewed-by: default avatarAnup Patel <anup.patel@wdc.com>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
parent b628cfd6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment