From: James Morse james.morse@arm.com
resctrl expects RDT like counters that are free running. MPAM's counters don't behave like this as they need a monitor to be allocated first.
Provide the helper that says whether free running counters are supported.
Subsequent patches will make this more intelligent.
Signed-off-by: James Morse james.morse@arm.com --- include/linux/arm_mpam.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/linux/arm_mpam.h b/include/linux/arm_mpam.h index 5fd62e0d131d..d70e4e726fe6 100644 --- a/include/linux/arm_mpam.h +++ b/include/linux/arm_mpam.h @@ -55,6 +55,12 @@ static inline unsigned int resctrl_arch_round_mon_val(unsigned int val) return val; }
+/* MPAM counters requires a monitor to be allocated */ +static inline bool resctrl_arch_event_is_free_running(enum resctrl_event_id evt) +{ + return false; +} + bool resctrl_arch_alloc_capable(void); bool resctrl_arch_mon_capable(void); bool resctrl_arch_is_llc_occupancy_enabled(void);