mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
powerpc/powernv: Move pnv_ioda_setup_bus_dma under CONFIG_IOMMU_API
pnv_ioda_setup_bus_dma() is only used when a passed through PE is returned to the host. If the kernel is built without IOMMU support this is dead code. Move it under the #ifdef with the rest of the IOMMU API support. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200705133557.443607-2-oohall@gmail.com
This commit is contained in:
parent
93eacd94e0
commit
e3417faec5
1 changed files with 13 additions and 13 deletions
|
@ -1885,19 +1885,6 @@ static bool pnv_pci_ioda_iommu_bypass_supported(struct pci_dev *pdev,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
|
|
||||||
{
|
|
||||||
struct pci_dev *dev;
|
|
||||||
|
|
||||||
list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
||||||
set_iommu_table_base(&dev->dev, pe->table_group.tables[0]);
|
|
||||||
dev->dev.archdata.dma_offset = pe->tce_bypass_base;
|
|
||||||
|
|
||||||
if ((pe->flags & PNV_IODA_PE_BUS_ALL) && dev->subordinate)
|
|
||||||
pnv_ioda_setup_bus_dma(pe, dev->subordinate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline __be64 __iomem *pnv_ioda_get_inval_reg(struct pnv_phb *phb,
|
static inline __be64 __iomem *pnv_ioda_get_inval_reg(struct pnv_phb *phb,
|
||||||
bool real_mode)
|
bool real_mode)
|
||||||
{
|
{
|
||||||
|
@ -2547,6 +2534,19 @@ static long pnv_pci_ioda2_create_table_userspace(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
|
||||||
|
{
|
||||||
|
struct pci_dev *dev;
|
||||||
|
|
||||||
|
list_for_each_entry(dev, &bus->devices, bus_list) {
|
||||||
|
set_iommu_table_base(&dev->dev, pe->table_group.tables[0]);
|
||||||
|
dev->dev.archdata.dma_offset = pe->tce_bypass_base;
|
||||||
|
|
||||||
|
if ((pe->flags & PNV_IODA_PE_BUS_ALL) && dev->subordinate)
|
||||||
|
pnv_ioda_setup_bus_dma(pe, dev->subordinate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void pnv_ioda2_take_ownership(struct iommu_table_group *table_group)
|
static void pnv_ioda2_take_ownership(struct iommu_table_group *table_group)
|
||||||
{
|
{
|
||||||
struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe,
|
struct pnv_ioda_pe *pe = container_of(table_group, struct pnv_ioda_pe,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue