Loading drivers/iommu/arm-smmu.c +17 −0 Original line number Diff line number Diff line Loading @@ -1557,6 +1557,19 @@ static irqreturn_t arm_smmu_global_fault(int irq, void *dev) return IRQ_HANDLED; } static bool arm_smmu_master_attached(struct arm_smmu_device *smmu, struct iommu_fwspec *fwspec) { int i, idx; for_each_cfg_sme(fwspec, i, idx) { if (smmu->s2crs[idx].attach_count) return true; } return false; } static int arm_smmu_set_pt_format(struct arm_smmu_domain *smmu_domain, struct io_pgtable_cfg *pgtbl_cfg) { Loading Loading @@ -1967,6 +1980,10 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, /* Publish page table ops for map/unmap */ smmu_domain->pgtbl_ops = pgtbl_ops; if (arm_smmu_is_slave_side_secure(smmu_domain) && !arm_smmu_master_attached(smmu, dev->iommu_fwspec)) arm_smmu_restore_sec_cfg(smmu, cfg->cbndx); return 0; out_clear_smmu: Loading Loading
drivers/iommu/arm-smmu.c +17 −0 Original line number Diff line number Diff line Loading @@ -1557,6 +1557,19 @@ static irqreturn_t arm_smmu_global_fault(int irq, void *dev) return IRQ_HANDLED; } static bool arm_smmu_master_attached(struct arm_smmu_device *smmu, struct iommu_fwspec *fwspec) { int i, idx; for_each_cfg_sme(fwspec, i, idx) { if (smmu->s2crs[idx].attach_count) return true; } return false; } static int arm_smmu_set_pt_format(struct arm_smmu_domain *smmu_domain, struct io_pgtable_cfg *pgtbl_cfg) { Loading Loading @@ -1967,6 +1980,10 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain, /* Publish page table ops for map/unmap */ smmu_domain->pgtbl_ops = pgtbl_ops; if (arm_smmu_is_slave_side_secure(smmu_domain) && !arm_smmu_master_attached(smmu, dev->iommu_fwspec)) arm_smmu_restore_sec_cfg(smmu, cfg->cbndx); return 0; out_clear_smmu: Loading