]> www.infradead.org Git - nvme.git/commitdiff
Merge branches 'fixes', 'arm/smmu', 'intel/vt-d', 'amd/amd-vi' and 'core' into next
authorJoerg Roedel <jroedel@suse.de>
Fri, 13 Sep 2024 10:53:05 +0000 (12:53 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 13 Sep 2024 10:53:05 +0000 (12:53 +0200)
1  2  3  4  5 
MAINTAINERS
drivers/iommu/amd/iommu.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h
drivers/iommu/intel/pasid.c
drivers/iommu/io-pgtable-arm.c

diff --cc MAINTAINERS
Simple merge
index 6bc4030a6ba8ed118fbb8695aa7334b2cb5441db,b19e8c0f48fa25f1594d983e2f17a23f7571c4a7,b19e8c0f48fa25f1594d983e2f17a23f7571c4a7,f4dfabb3e14d37f17dccd28399f0c0c95f3a09d2,98054497d343bc778b34230ae259cced916f9906..8364cd6fa47d016311c7d79ed218adfea90fcbb6
@@@@@@ -1549,29 -1549,29 -1549,29 -1565,13 -1549,29 +1565,13 @@@@@@ void amd_iommu_dev_flush_pasid_pages(st
        iommu_completion_wait(iommu);
     }
     
--- -void amd_iommu_dev_flush_pasid_all(struct iommu_dev_data *dev_data,
--- -                              ioasid_t pasid)
+++ +static void dev_flush_pasid_all(struct iommu_dev_data *dev_data,
+++ +                           ioasid_t pasid)
     {
 ----   amd_iommu_dev_flush_pasid_pages(dev_data, 0,
 ----                                   CMD_INV_IOMMU_ALL_PAGES_ADDRESS, pasid);
 -- -}
 -- -
 -- -void amd_iommu_domain_flush_complete(struct protection_domain *domain)
 -- -{
 -- -   int i;
 -- -
 -- -   for (i = 0; i < amd_iommu_get_num_iommus(); ++i) {
 -- -           if (domain && !domain->dev_iommu[i])
 -- -                   continue;
 -- -
 -- -           /*
 -- -            * Devices of this domain are behind this IOMMU
 -- -            * We need to wait for completion of all commands.
 -- -            */
 -- -           iommu_completion_wait(amd_iommus[i]);
 -- -   }
 ++++   amd_iommu_dev_flush_pasid_pages(dev_data, pasid, 0,
 ++++                                   CMD_INV_IOMMU_ALL_PAGES_ADDRESS);
     }
     
-    void amd_iommu_domain_flush_complete(struct protection_domain *domain)
-    {
-       int i;
-    
-       for (i = 0; i < amd_iommu_get_num_iommus(); ++i) {
-               if (domain && !domain->dev_iommu[i])
-                       continue;
-    
-               /*
-                * Devices of this domain are behind this IOMMU
-                * We need to wait for completion of all commands.
-                */
-               iommu_completion_wait(amd_iommus[i]);
-       }
-    }
-    
     /* Flush the not present cache if it exists */
     static void domain_flush_np_cache(struct protection_domain *domain,
                dma_addr_t iova, size_t size)
@@@@@@ -2201,8 -2201,8 -2201,8 -2194,9 -2201,11 +2194,12 @@@@@@ static struct iommu_device *amd_iommu_p
                                             pci_max_pasids(to_pci_dev(dev)));
        }
     
+++ +out_err:
        iommu_completion_wait(iommu);
     
++++    if (dev_is_pci(dev))
++++            pci_prepare_ats(to_pci_dev(dev), PAGE_SHIFT);
++++ 
        return iommu_dev;
     }
     
index ed2b106e02dd10faf4188975ad45f0ba4dc97907,edc625ec261dd107292a04e2c18b556a0ae0ff57,a31460f9f3d4216b00ab27e0f051ea0cb42e9752,a31460f9f3d4216b00ab27e0f051ea0cb42e9752,9bc50bded5af7298325579a9c9d119b5dc5a9245..737c5b88235510e3ddb91a28cecbdcdc14854b32
@@@@@@ -4315,9 -4337,38 -4315,9 -4315,9 -4321,9 +4343,38 @@@@@@ static int arm_smmu_device_hw_probe(str
     }
     
     #ifdef CONFIG_ACPI
- ---static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu)
+ +++#ifdef CONFIG_TEGRA241_CMDQV
+ +++static void acpi_smmu_dsdt_probe_tegra241_cmdqv(struct acpi_iort_node *node,
+ +++                                           struct arm_smmu_device *smmu)
+ +++{
+ +++   const char *uid = kasprintf(GFP_KERNEL, "%u", node->identifier);
+ +++   struct acpi_device *adev;
+ +++
+ +++   /* Look for an NVDA200C node whose _UID matches the SMMU node ID */
+ +++   adev = acpi_dev_get_first_match_dev("NVDA200C", uid, -1);
+ +++   if (adev) {
+ +++           /* Tegra241 CMDQV driver is responsible for put_device() */
+ +++           smmu->impl_dev = &adev->dev;
+ +++           smmu->options |= ARM_SMMU_OPT_TEGRA241_CMDQV;
+ +++           dev_info(smmu->dev, "found companion CMDQV device: %s\n",
+ +++                    dev_name(smmu->impl_dev));
+ +++   }
+ +++   kfree(uid);
+ +++}
+ +++#else
+ +++static void acpi_smmu_dsdt_probe_tegra241_cmdqv(struct acpi_iort_node *node,
+ +++                                           struct arm_smmu_device *smmu)
+ ++ {
    -   switch (model) {
+ +++}
+ +++#endif
+ +++
+ +++static int acpi_smmu_iort_probe_model(struct acpi_iort_node *node,
+ +++                                 struct arm_smmu_device *smmu)
    +{
- --    switch (model) {
+ +++   struct acpi_iort_smmu_v3 *iort_smmu =
+ +++           (struct acpi_iort_smmu_v3 *)node->node_data;
+ +++
+ +++   switch (iort_smmu->model) {
        case ACPI_IORT_SMMU_V3_CAVIUM_CN99XX:
                smmu->options |= ARM_SMMU_OPT_PAGE0_REGS_ONLY;
                break;
Simple merge
Simple merge
Simple merge
Simple merge