Skip to content

Commit 1fba2bf

Browse files
committed
Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add"
This reverts commit ed8b94f. Gaurav reported that there are still problems with the patch and it should be reverted pending a fuller fix. Link: https://lore.kernel.org/all/4f6fc1ac-7a76-4447-9d0e-f55c0be373f8@linux.ibm.com/ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 1c57b9f commit 1fba2bf

File tree

3 files changed

+5
-23
lines changed

3 files changed

+5
-23
lines changed

arch/powerpc/include/asm/ppc-pci.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ void *pci_traverse_device_nodes(struct device_node *start,
2929
void *(*fn)(struct device_node *, void *),
3030
void *data);
3131
extern void pci_devs_phb_init_dynamic(struct pci_controller *phb);
32-
extern void ppc_iommu_register_device(struct pci_controller *phb);
33-
extern void ppc_iommu_unregister_device(struct pci_controller *phb);
34-
3532

3633
/* From rtas_pci.h */
3734
extern void init_pci_config_tokens (void);

arch/powerpc/kernel/iommu.c

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,21 +1388,6 @@ static const struct attribute_group *spapr_tce_iommu_groups[] = {
13881388
NULL,
13891389
};
13901390

1391-
void ppc_iommu_register_device(struct pci_controller *phb)
1392-
{
1393-
iommu_device_sysfs_add(&phb->iommu, phb->parent,
1394-
spapr_tce_iommu_groups, "iommu-phb%04x",
1395-
phb->global_number);
1396-
iommu_device_register(&phb->iommu, &spapr_tce_iommu_ops,
1397-
phb->parent);
1398-
}
1399-
1400-
void ppc_iommu_unregister_device(struct pci_controller *phb)
1401-
{
1402-
iommu_device_unregister(&phb->iommu);
1403-
iommu_device_sysfs_remove(&phb->iommu);
1404-
}
1405-
14061391
/*
14071392
* This registers IOMMU devices of PHBs. This needs to happen
14081393
* after core_initcall(iommu_init) + postcore_initcall(pci_driver_init) and
@@ -1413,7 +1398,11 @@ static int __init spapr_tce_setup_phb_iommus_initcall(void)
14131398
struct pci_controller *hose;
14141399

14151400
list_for_each_entry(hose, &hose_list, list_node) {
1416-
ppc_iommu_register_device(hose);
1401+
iommu_device_sysfs_add(&hose->iommu, hose->parent,
1402+
spapr_tce_iommu_groups, "iommu-phb%04x",
1403+
hose->global_number);
1404+
iommu_device_register(&hose->iommu, &spapr_tce_iommu_ops,
1405+
hose->parent);
14171406
}
14181407
return 0;
14191408
}

arch/powerpc/platforms/pseries/pci_dlpar.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ struct pci_controller *init_phb_dynamic(struct device_node *dn)
3535

3636
pseries_msi_allocate_domains(phb);
3737

38-
ppc_iommu_register_device(phb);
39-
4038
/* Create EEH devices for the PHB */
4139
eeh_phb_pe_create(phb);
4240

@@ -78,8 +76,6 @@ int remove_phb_dynamic(struct pci_controller *phb)
7876
}
7977
}
8078

81-
ppc_iommu_unregister_device(phb);
82-
8379
pseries_msi_free_domains(phb);
8480

8581
/* Keep a reference so phb isn't freed yet */

0 commit comments

Comments
 (0)