diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-02-23 14:13:50 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-02-23 14:13:50 -0500 |
| commit | e60b5f79bd7529e76b13cf1e85823abbd0e33634 (patch) | |
| tree | 67d54525fe5b0618e64749a86a8438cc1ea31d8a /arch | |
| parent | 6089a91fc02e0a4f8962f0df1be236c44248d7ea (diff) | |
| parent | 8f5b27347e88b171c755562f0090ce40e514fc00 (diff) | |
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
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/platforms/powernv/pci.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 7db3119f8a5b..145373f0e5dc 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
| @@ -1593,6 +1593,8 @@ static void pnv_ioda_setup_vf_PE(struct pci_dev *pdev, u16 num_vfs) | |||
| 1593 | 1593 | ||
| 1594 | pnv_pci_ioda2_setup_dma_pe(phb, pe); | 1594 | pnv_pci_ioda2_setup_dma_pe(phb, pe); |
| 1595 | #ifdef CONFIG_IOMMU_API | 1595 | #ifdef CONFIG_IOMMU_API |
| 1596 | iommu_register_group(&pe->table_group, | ||
| 1597 | pe->phb->hose->global_number, pe->pe_number); | ||
| 1596 | pnv_ioda_setup_bus_iommu_group(pe, &pe->table_group, NULL); | 1598 | pnv_ioda_setup_bus_iommu_group(pe, &pe->table_group, NULL); |
| 1597 | #endif | 1599 | #endif |
| 1598 | } | 1600 | } |
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index 45fb70b4bfa7..ef9448a907c6 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c | |||
| @@ -1147,6 +1147,8 @@ static int pnv_tce_iommu_bus_notifier(struct notifier_block *nb, | |||
| 1147 | return 0; | 1147 | return 0; |
| 1148 | 1148 | ||
| 1149 | pe = &phb->ioda.pe_array[pdn->pe_number]; | 1149 | pe = &phb->ioda.pe_array[pdn->pe_number]; |
| 1150 | if (!pe->table_group.group) | ||
| 1151 | return 0; | ||
| 1150 | iommu_add_device(&pe->table_group, dev); | 1152 | iommu_add_device(&pe->table_group, dev); |
| 1151 | return 0; | 1153 | return 0; |
| 1152 | case BUS_NOTIFY_DEL_DEVICE: | 1154 | case BUS_NOTIFY_DEL_DEVICE: |
