]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iommu/vt-d: Remove IOVA domain rcache flushing for CPU offlining
authorJohn Garry <john.garry@huawei.com>
Thu, 25 Mar 2021 12:29:59 +0000 (20:29 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 7 Apr 2021 08:27:27 +0000 (10:27 +0200)
Now that the core code handles flushing per-IOVA domain CPU rcaches,
remove the handling here.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1616675401-151997-3-git-send-email-john.garry@huawei.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c
include/linux/cpuhotplug.h

index 1c32522220bc85970fbac751dabd5bc65f26894c..be5ea16ca26ff6cea611ffdab69fdc299ad04254 100644 (file)
@@ -4064,35 +4064,6 @@ static struct notifier_block intel_iommu_memory_nb = {
        .priority = 0
 };
 
-static void free_all_cpu_cached_iovas(unsigned int cpu)
-{
-       int i;
-
-       for (i = 0; i < g_num_of_iommus; i++) {
-               struct intel_iommu *iommu = g_iommus[i];
-               struct dmar_domain *domain;
-               int did;
-
-               if (!iommu)
-                       continue;
-
-               for (did = 0; did < cap_ndoms(iommu->cap); did++) {
-                       domain = get_iommu_domain(iommu, (u16)did);
-
-                       if (!domain || domain->domain.type != IOMMU_DOMAIN_DMA)
-                               continue;
-
-                       iommu_dma_free_cpu_cached_iovas(cpu, &domain->domain);
-               }
-       }
-}
-
-static int intel_iommu_cpu_dead(unsigned int cpu)
-{
-       free_all_cpu_cached_iovas(cpu);
-       return 0;
-}
-
 static void intel_disable_iommus(void)
 {
        struct intel_iommu *iommu = NULL;
@@ -4387,8 +4358,6 @@ int __init intel_iommu_init(void)
        bus_set_iommu(&pci_bus_type, &intel_iommu_ops);
        if (si_domain && !hw_pass_through)
                register_memory_notifier(&intel_iommu_memory_nb);
-       cpuhp_setup_state(CPUHP_IOMMU_INTEL_DEAD, "iommu/intel:dead", NULL,
-                         intel_iommu_cpu_dead);
 
        down_read(&dmar_global_lock);
        if (probe_acpi_namespace_devices())
index cedac99865577770e5070c01e496ffd3be4988a4..85996494bec10f99fc63482f99143de3bdb51fb8 100644 (file)
@@ -57,7 +57,6 @@ enum cpuhp_state {
        CPUHP_PAGE_ALLOC_DEAD,
        CPUHP_NET_DEV_DEAD,
        CPUHP_PCI_XGENE_DEAD,
-       CPUHP_IOMMU_INTEL_DEAD,
        CPUHP_IOMMU_IOVA_DEAD,
        CPUHP_LUSTRE_CFS_DEAD,
        CPUHP_AP_ARM_CACHE_B15_RAC_DEAD,