F: fs/iomap/
F: include/linux/iomap.h
-------- IOMMU DRIVERS
++++++++ IOMMU DMA-API LAYER
++++++++ M: Robin Murphy <robin.murphy@arm.com>
++++++++ 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 <joro@8bytes.org>
M: Will Deacon <will@kernel.org>
----- - L: iommu@lists.linux-foundation.org
++++++++ R: Robin Murphy <robin.murphy@arm.com>
-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/
#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)
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)