From: Joerg Roedel Date: Fri, 25 Jun 2021 13:23:25 +0000 (+0200) Subject: Merge branches 'iommu/fixes', 'arm/rockchip', 'arm/smmu', 'x86/vt-d', 'x86/amd',... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2b9d8e3e9a9bb693a8b8bd26ad192db037517759;p=linux.git Merge branches 'iommu/fixes', 'arm/rockchip', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'virtio' and 'core' into next --- 2b9d8e3e9a9bb693a8b8bd26ad192db037517759 diff --cc drivers/iommu/intel/iommu.c index be35284a20160,be35284a20160,be35284a20160,be35284a20160,76a58b8ad6c38,be35284a20160,2f7213f0e7a1a,be35284a20160..a6a07d985709f --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@@@@@@@@ -5392,26 -5392,26 -5392,26 -5392,26 -5429,19 -5392,26 -5389,26 -5392,26 +5426,19 @@@@@@@@@ intel_iommu_dev_has_feat(struct device static int intel_iommu_dev_enable_feat(struct device *dev, enum iommu_dev_features feat) { ---- --- if (feat == IOMMU_DEV_FEAT_AUX) ++++ +++ switch (feat) { ++++ +++ case IOMMU_DEV_FEAT_AUX: return intel_iommu_enable_auxd(dev); ---- --- if (feat == IOMMU_DEV_FEAT_IOPF) ++++ +++ case IOMMU_DEV_FEAT_IOPF: return intel_iommu_dev_has_feat(dev, feat) ? 0 : -ENODEV; ---- --- if (feat == IOMMU_DEV_FEAT_SVA) { ---- --- struct device_domain_info *info = get_domain_info(dev); ---- - - ---- - - if (!info) ---- - - return -EINVAL; ++++ +++ case IOMMU_DEV_FEAT_SVA: ++++ +++ return intel_iommu_enable_sva(dev); - if (!info) - return -EINVAL; - ---- --- if (!info->pasid_enabled || !info->pri_enabled || !info->ats_enabled) ---- --- return -EINVAL; ---- --- ---- --- if (info->iommu->flags & VTD_FLAG_SVM_CAPABLE) ---- --- return 0; ++++ +++ default: ++++ +++ return -ENODEV; } ---- --- ---- --- return -ENODEV; } static int