The architecture specific parts of resctrl provide helpers likeReviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
is_mbm_total_enabled() and is_mbm_local_enabled() to hide accesses
to the rdt_mon_features bitmap.
Exposing a group of helpers between the architecture and filesystem code
is preferable to a single unsigned-long like rdt_mon_features. Helpers
can be more readable and have a well defined behaviour, while allowing
architectures to hide more complex behaviour.
Once the filesystem parts of resctrl are moved, these existing helpers can
no longer live in internal.h. Move them to include/linux/resctrl.h
Once these are exposed to the wider kernel, they should have a
'resctrl_arch_' prefix, to fit the rest of the arch<->fs interface.
Move and rename the helpers that touch rdt_mon_features directly.
is_mbm_event() and is_mbm_enabled() are only called from rdtgroup.c,
so can be moved into that file.
Signed-off-by: James Morse <james.morse@xxxxxxx>
Tested-by: Carl Worth <carl@xxxxxxxxxxxxxxxxxxxxxx> # arm64
Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>