Skip to content

Commit 363f266

Browse files
John Garryjoergroedel
authored andcommitted
iommu/vt-d: Remove IOVA domain rcache flushing for CPU offlining
Now that the core code handles flushing per-IOVA domain CPU rcaches, remove the handling here. Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent f598a49 commit 363f266

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4064,35 +4064,6 @@ static struct notifier_block intel_iommu_memory_nb = {
40644064
.priority = 0
40654065
};
40664066

4067-
static void free_all_cpu_cached_iovas(unsigned int cpu)
4068-
{
4069-
int i;
4070-
4071-
for (i = 0; i < g_num_of_iommus; i++) {
4072-
struct intel_iommu *iommu = g_iommus[i];
4073-
struct dmar_domain *domain;
4074-
int did;
4075-
4076-
if (!iommu)
4077-
continue;
4078-
4079-
for (did = 0; did < cap_ndoms(iommu->cap); did++) {
4080-
domain = get_iommu_domain(iommu, (u16)did);
4081-
4082-
if (!domain || domain->domain.type != IOMMU_DOMAIN_DMA)
4083-
continue;
4084-
4085-
iommu_dma_free_cpu_cached_iovas(cpu, &domain->domain);
4086-
}
4087-
}
4088-
}
4089-
4090-
static int intel_iommu_cpu_dead(unsigned int cpu)
4091-
{
4092-
free_all_cpu_cached_iovas(cpu);
4093-
return 0;
4094-
}
4095-
40964067
static void intel_disable_iommus(void)
40974068
{
40984069
struct intel_iommu *iommu = NULL;
@@ -4387,8 +4358,6 @@ int __init intel_iommu_init(void)
43874358
bus_set_iommu(&pci_bus_type, &intel_iommu_ops);
43884359
if (si_domain && !hw_pass_through)
43894360
register_memory_notifier(&intel_iommu_memory_nb);
4390-
cpuhp_setup_state(CPUHP_IOMMU_INTEL_DEAD, "iommu/intel:dead", NULL,
4391-
intel_iommu_cpu_dead);
43924361

43934362
down_read(&dmar_global_lock);
43944363
if (probe_acpi_namespace_devices())

include/linux/cpuhotplug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ enum cpuhp_state {
5757
CPUHP_PAGE_ALLOC_DEAD,
5858
CPUHP_NET_DEV_DEAD,
5959
CPUHP_PCI_XGENE_DEAD,
60-
CPUHP_IOMMU_INTEL_DEAD,
6160
CPUHP_IOMMU_IOVA_DEAD,
6261
CPUHP_LUSTRE_CFS_DEAD,
6362
CPUHP_AP_ARM_CACHE_B15_RAC_DEAD,

0 commit comments

Comments
 (0)