diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index f778936d75794738d774950e3d20d224a676da4f..dee6ca2fbdb151d4ac2b92d2993425bc07246276 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -4004,6 +4004,7 @@ static int arm_smmu_group_set_mpam(struct iommu_group *group, u16 partid, int i; u32 sid; unsigned long flags; + unsigned int alloc_type; struct arm_smmu_ste *step; struct iommu_domain *domain; struct arm_smmu_device *smmu; @@ -4019,6 +4020,12 @@ static int arm_smmu_group_set_mpam(struct iommu_group *group, u16 partid, struct arm_smmu_master_domain *master_domain; domain = iommu_get_domain_for_group(group); + + alloc_type = domain->type & IOMMU_DOMAIN_ALLOC_FLAGS; + if (alloc_type == IOMMU_DOMAIN_IDENTITY || + alloc_type == IOMMU_DOMAIN_BLOCKED) + return -EINVAL; + smmu_domain = to_smmu_domain(domain); if (!smmu_domain->smmu) @@ -4062,12 +4069,19 @@ static int arm_smmu_group_get_mpam(struct iommu_group *group, u16 *partid, { int err = -EINVAL; unsigned long flags; + unsigned int alloc_type; struct iommu_domain *domain; struct arm_smmu_master *master; struct arm_smmu_domain *smmu_domain; struct arm_smmu_master_domain *master_domain; domain = iommu_get_domain_for_group(group); + + alloc_type = domain->type & IOMMU_DOMAIN_ALLOC_FLAGS; + if (alloc_type == IOMMU_DOMAIN_IDENTITY || + alloc_type == IOMMU_DOMAIN_BLOCKED) + return 0; + smmu_domain = to_smmu_domain(domain); if (!smmu_domain->smmu) diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c index 566bd92dc01087586c4b04f05654691195894404..4da9be7581eaf135f94c48c69a76a71b19f2a768 100644 --- a/drivers/platform/mpam/mpam_devices.c +++ b/drivers/platform/mpam/mpam_devices.c @@ -923,19 +923,9 @@ static u64 mpam_msmon_overflow_val(struct mpam_msc_ris *ris) return GENMASK_ULL(30, 0); } -static const struct midr_range mbwu_flowrate_list[] = { - MIDR_ALL_VERSIONS(MIDR_HISI_TSV110), - MIDR_ALL_VERSIONS(MIDR_HISI_LINXICORE9100), - MIDR_ALL_VERSIONS(MIDR_HISI_HIP12), - { /* sentinel */ } -}; - bool resctrl_arch_would_mbm_overflow(void) { - if (is_midr_in_range_list(read_cpuid_id(), mbwu_flowrate_list)) - return false; - - return true; + return read_cpuid_implementor() == ARM_CPU_IMP_HISI ? false : true; } static void __ris_msmon_read(void *arg) diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c index fb60316199c4e82d787de8bf53d0f9bd1e634f42..66ebfaa26e286f3acef8b325f4ec7fe9162953f6 100644 --- a/fs/resctrl/monitor.c +++ b/fs/resctrl/monitor.c @@ -289,7 +289,7 @@ static void add_rmid_to_limbo(struct rmid_entry *entry) * setup up the limbo worker. */ if (!has_busy_rmid(d)) - cqm_setup_limbo_handler(d, CQM_LIMBOCHECK_INTERVAL, + cqm_setup_limbo_handler(d, 0, RESCTRL_PICK_ANY_CPU); set_bit(idx, d->rmid_busy_llc); entry->busy++;