Skip to content

Commit e60b5f7

Browse files
committed
Merge tag 'powerpc-5.0-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fix from Michael Ellerman: "One fix for an oops when using SRIOV, introduced by the recent changes to support compound IOMMU groups. Thanks to Alexey Kardashevskiy" * tag 'powerpc-5.0-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv/sriov: Register IOMMU groups for VFs
2 parents 6089a91 + 8f5b273 commit e60b5f7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

arch/powerpc/platforms/powernv/pci-ioda.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,8 @@ static void pnv_ioda_setup_vf_PE(struct pci_dev *pdev, u16 num_vfs)
15931593

15941594
pnv_pci_ioda2_setup_dma_pe(phb, pe);
15951595
#ifdef CONFIG_IOMMU_API
1596+
iommu_register_group(&pe->table_group,
1597+
pe->phb->hose->global_number, pe->pe_number);
15961598
pnv_ioda_setup_bus_iommu_group(pe, &pe->table_group, NULL);
15971599
#endif
15981600
}

arch/powerpc/platforms/powernv/pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,8 @@ static int pnv_tce_iommu_bus_notifier(struct notifier_block *nb,
11471147
return 0;
11481148

11491149
pe = &phb->ioda.pe_array[pdn->pe_number];
1150+
if (!pe->table_group.group)
1151+
return 0;
11501152
iommu_add_device(&pe->table_group, dev);
11511153
return 0;
11521154
case BUS_NOTIFY_DEL_DEVICE:

0 commit comments

Comments
 (0)