@@ -779,8 +779,10 @@ static void mpam_ris_hw_probe(struct mpam_msc_ris *ris)
u32 ccap_features = mpam_read_partsel_reg(msc, CCAP_IDR);
props->cmax_wd = FIELD_GET(MPAMF_CCAP_IDR_CMAX_WD, ccap_features);
- if (props->cmax_wd)
- mpam_set_feature(mpam_feat_ccap_part, props);
+ if (props->cmax_wd) {
+ if (!FIELD_GET(MPAMF_CCAP_IDR_NO_CMAX, ccap_features))
+ mpam_set_feature(mpam_feat_ccap_part, props);
+ }
}
/* Cache Portion partitioning */
@@ -450,6 +450,7 @@ void mpam_resctrl_exit(void);
/* MPAMF_CCAP_IDR - MPAM features cache capacity partitioning ID register */
#define MPAMF_CCAP_IDR_CMAX_WD GENMASK(5, 0)
+#define MPAMF_CCAP_IDR_NO_CMAX BIT(30)
/* MPAMF_MBW_IDR - MPAM features memory bandwidth partitioning ID register */
#define MPAMF_MBW_IDR_BWA_WD GENMASK(5, 0)
According to Arm Architecture MPAM Reference Manual (version DDI 0598D.b), to check whether hardware supports the CMAX feature or not, not only needs to check the CMAX_WD field of the MPAMF_CCAP_IDR register, but also needs to check the NO_CMAX field. Fixes: a275036b6767 ("arm_mpam: Probe and reset the rest of the features") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- drivers/platform/arm64/mpam/mpam_devices.c | 6 ++++-- drivers/platform/arm64/mpam/mpam_internal.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)