From: Joerg Roedel Date: Fri, 29 Jul 2022 10:06:56 +0000 (+0200) Subject: Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86... X-Git-Tag: v6.6.17~6865^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c10100a416c16b598bf5155e759307b34dac0d7d;p=platform%2Fkernel%2Flinux-rpi.git Merge branches 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next --- c10100a416c16b598bf5155e759307b34dac0d7d diff --cc MAINTAINERS index 64379c6,3cf9842,3cf9842,3cf9842,3cf9842,3cf9842,8f9ed15,3cf9842,b61dd73..8aa2f0a --- a/MAINTAINERS +++ b/MAINTAINERS @@@@@@@@@@ -10448,10 -10352,10 -10352,10 -10352,10 -10352,10 -10352,10 -10448,10 -10352,10 -10352,21 +10447,21 @@@@@@@@@@ T: git git://git.kernel.org/pub/scm/fs/ F: fs/iomap/ F: include/linux/iomap.h -------- IOMMU DRIVERS ++++++++ IOMMU DMA-API LAYER ++++++++ M: Robin Murphy ++++++++ L: iommu@lists.linux.dev ++++++++ S: Maintained ++++++++ T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git ++++++++ F: drivers/iommu/dma-iommu.c ++++++++ F: drivers/iommu/iova.c ++++++++ F: include/linux/dma-iommu.h ++++++++ F: include/linux/iova.h ++++++++ ++++++++ IOMMU SUBSYSTEM M: Joerg Roedel M: Will Deacon ----- - L: iommu@lists.linux-foundation.org ++++++++ R: Robin Murphy -L: iommu@lists.linux-foundation.org +++++ ++L: iommu@lists.linux.dev S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git F: Documentation/devicetree/bindings/iommu/ diff --cc drivers/iommu/intel/iommu.c index 5c0dce7,4401659,4401659,4401659,4401659,4401659,3ba0d7e,4401659,49d616a..7cca030 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@@@@@@@@@ -314,12 -314,36 -314,36 -314,36 -314,36 -314,36 -300,6 -314,36 -314,36 +300,6 @@@@@@@@@@ static int iommu_skip_te_disable #define IDENTMAP_GFX 2 #define IDENTMAP_AZALIA 4 ------ --int intel_iommu_gfx_mapped; ------ --EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped); ------ -- ------ --DEFINE_SPINLOCK(device_domain_lock); ------ --static LIST_HEAD(device_domain_list); ----- -- ----- --/* ----- -- * Iterate over elements in device_domain_list and call the specified ----- -- * callback @fn against each element. ----- -- */ ----- --int for_each_device_domain(int (*fn)(struct device_domain_info *info, ----- -- void *data), void *data) ----- --{ ----- -- int ret = 0; ----- -- unsigned long flags; ----- -- struct device_domain_info *info; ----- -- ----- -- spin_lock_irqsave(&device_domain_lock, flags); ----- -- list_for_each_entry(info, &device_domain_list, global) { ----- -- ret = fn(info, data); ----- -- if (ret) { ----- -- spin_unlock_irqrestore(&device_domain_lock, flags); ----- -- return ret; ----- -- } ----- -- } ----- -- spin_unlock_irqrestore(&device_domain_lock, flags); ----- -- ----- -- return 0; ----- --} ------ -- const struct iommu_ops intel_iommu_ops; static bool translation_pre_enabled(struct intel_iommu *iommu) @@@@@@@@@@ -1832,18 -1856,18 -1856,18 -1856,18 -1856,18 -1856,18 -1792,18 -1856,18 -1856,18 +1792,18 @@@@@@@@@@ err_unlock static void domain_detach_iommu(struct dmar_domain *domain, struct intel_iommu *iommu) { ------ -- int num; - - assert_spin_locked(&device_domain_lock); - assert_spin_locked(&iommu->lock); ++++++ ++ struct iommu_domain_info *info; ----- -- assert_spin_locked(&device_domain_lock); ----- -- assert_spin_locked(&iommu->lock); ----- -- ------ -- domain->iommu_refcnt[iommu->seq_id] -= 1; ------ -- if (domain->iommu_refcnt[iommu->seq_id] == 0) { ------ -- num = domain->iommu_did[iommu->seq_id]; ------ -- clear_bit(num, iommu->domain_ids); ++++++ ++ spin_lock(&iommu->lock); ++++++ ++ info = xa_load(&domain->iommu_array, iommu->seq_id); ++++++ ++ if (--info->refcnt == 0) { ++++++ ++ clear_bit(info->did, iommu->domain_ids); ++++++ ++ xa_erase(&domain->iommu_array, iommu->seq_id); ++++++ ++ domain->nid = NUMA_NO_NODE; domain_update_iommu_cap(domain); ------ -- domain->iommu_did[iommu->seq_id] = 0; ++++++ ++ kfree(info); } ++++++ ++ spin_unlock(&iommu->lock); } static inline int guestwidth_to_adjustwidth(int gaw)