[PATCH v3 13/29] arm_mpam: Probe the hardware features resctrl supports
Jonathan Cameron
jonathan.cameron at huawei.com
Fri Oct 24 10:47:51 PDT 2025
On Fri, 17 Oct 2025 18:56:29 +0000
James Morse <james.morse at arm.com> wrote:
> Expand the probing support with the control and monitor types
> we can use with resctrl.
>
> CC: Dave Martin <Dave.Martin at arm.com>
> Signed-off-by: James Morse <james.morse at arm.com>
> Reviewed-by: Jonathan Cameron <jonathan.cameron at huawei.com>
> Reviewed-by: Fenghua Yu <fenghuay at nvidia.com>
> Tested-by: Fenghua Yu <fenghuay at nvidia.com>
Trivial thing inline. LGTM.
> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h
> index 1afc52b36328..be9ea0aab6d2 100644
> --- a/drivers/resctrl/mpam_internal.h
> +++ b/drivers/resctrl/mpam_internal.h
> @@ -5,6 +5,7 @@
> #define MPAM_INTERNAL_H
>
> #include <linux/arm_mpam.h>
> +#include <linux/bitmap.h>
> #include <linux/cpumask.h>
> #include <linux/io.h>
> #include <linux/llist.h>
> @@ -13,6 +14,7 @@
> #include <linux/sizes.h>
> #include <linux/spinlock.h>
> #include <linux/srcu.h>
> +#include <linux/types.h>
>
> #define MPAM_MSC_MAX_NUM_RIS 16
>
> @@ -111,6 +113,33 @@ static inline void mpam_mon_sel_lock_init(struct mpam_msc *msc)
> raw_spin_lock_init(&msc->_mon_sel_lock);
> }
>
> +/* Bits for mpam features bitmaps */
> +enum mpam_device_features {
> + mpam_feat_cpor_part = 0,
Given you are using this for internal stuff and the numbers don't mean anything explicit
I think you can drop the = 0.
> + mpam_feat_mbw_part,
> + mpam_feat_mbw_min,
> + mpam_feat_mbw_max,
> + mpam_feat_msmon,
> + mpam_feat_msmon_csu,
> + mpam_feat_msmon_csu_hw_nrdy,
> + mpam_feat_msmon_mbwu,
> + mpam_feat_msmon_mbwu_hw_nrdy,
> + MPAM_FEATURE_LAST
> +};
More information about the linux-arm-kernel
mailing list