Message ID | 20181016023003.41327-1-aik@ozlabs.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | f21b0a45e4e48eafca38f11612244c5bd454a6c2 |
Headers | show |
Series | [kernel] powerpc/powernv/ioda1: Remove dead code for a single device PE | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | next/apply_patch Successfully applied |
snowpatch_ozlabs/checkpatch | success | Test checkpatch on branch next |
snowpatch_ozlabs/build-ppc64le | success | Test build-ppc64le on branch next |
snowpatch_ozlabs/build-ppc64be | success | Test build-ppc64be on branch next |
snowpatch_ozlabs/build-ppc64e | success | Test build-ppc64e on branch next |
snowpatch_ozlabs/build-ppc32 | success | Test build-ppc32 on branch next |
Ping? On 16/10/2018 13:30, Alexey Kardashevskiy wrote: > At the moment PNV_IODA_PE_DEV is only used for NPU PEs which are not > present on IODA1 machines (i.e. POWER7) so let's remove a piece of > dead code. > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> > --- > > We might actually want to get rid of the entire IODA1 there. > --- > arch/powerpc/platforms/powernv/pci-ioda.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c > index cde7102..78b61f0 100644 > --- a/arch/powerpc/platforms/powernv/pci-ioda.c > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c > @@ -2367,15 +2367,7 @@ static void pnv_pci_ioda1_setup_dma_pe(struct pnv_phb *phb, > pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; > iommu_init_table(tbl, phb->hose->node); > > - if (pe->flags & PNV_IODA_PE_DEV) { > - /* > - * Setting table base here only for carrying iommu_group > - * further down to let iommu_add_device() do the job. > - * pnv_pci_ioda_dma_dev_setup will override it later anyway. > - */ > - set_iommu_table_base(&pe->pdev->dev, tbl); > - iommu_add_device(&pe->pdev->dev); > - } else if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) > + if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) > pnv_ioda_setup_bus_dma(pe, pe->pbus, true); > > return; >
On Thu, Nov 08, 2018 at 04:45:04PM +1100, Alexey Kardashevskiy wrote: > Ping? > > > On 16/10/2018 13:30, Alexey Kardashevskiy wrote: > > At the moment PNV_IODA_PE_DEV is only used for NPU PEs which are not > > present on IODA1 machines (i.e. POWER7) so let's remove a piece of > > dead code. > > > > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> > > --- > > > > We might actually want to get rid of the entire IODA1 there. > > --- > > arch/powerpc/platforms/powernv/pci-ioda.c | 10 +--------- > > 1 file changed, 1 insertion(+), 9 deletions(-) > > > > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c > > index cde7102..78b61f0 100644 > > --- a/arch/powerpc/platforms/powernv/pci-ioda.c > > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c > > @@ -2367,15 +2367,7 @@ static void pnv_pci_ioda1_setup_dma_pe(struct pnv_phb *phb, > > pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; > > iommu_init_table(tbl, phb->hose->node); > > > > - if (pe->flags & PNV_IODA_PE_DEV) { > > - /* > > - * Setting table base here only for carrying iommu_group > > - * further down to let iommu_add_device() do the job. > > - * pnv_pci_ioda_dma_dev_setup will override it later anyway. > > - */ > > - set_iommu_table_base(&pe->pdev->dev, tbl); > > - iommu_add_device(&pe->pdev->dev); > > - } else if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) > > + if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) > > pnv_ioda_setup_bus_dma(pe, pe->pbus, true); > > > > return; > > > > -- > Alexey > Looks good to me. It's pretty easy to see that PNV_IODA_PE_DEV is only set for PHBs that are PNV_PHB_NPU_NVLINK or PNV_PHB_NPU_OCAPI, so: Reviewed-by: Sam Bobroff <sbobroff@linux.ibm.com>
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index cde7102..78b61f0 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -2367,15 +2367,7 @@ static void pnv_pci_ioda1_setup_dma_pe(struct pnv_phb *phb, pe->table_group.tce32_size = tbl->it_size << tbl->it_page_shift; iommu_init_table(tbl, phb->hose->node); - if (pe->flags & PNV_IODA_PE_DEV) { - /* - * Setting table base here only for carrying iommu_group - * further down to let iommu_add_device() do the job. - * pnv_pci_ioda_dma_dev_setup will override it later anyway. - */ - set_iommu_table_base(&pe->pdev->dev, tbl); - iommu_add_device(&pe->pdev->dev); - } else if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) + if (pe->flags & (PNV_IODA_PE_BUS | PNV_IODA_PE_BUS_ALL)) pnv_ioda_setup_bus_dma(pe, pe->pbus, true); return;
At the moment PNV_IODA_PE_DEV is only used for NPU PEs which are not present on IODA1 machines (i.e. POWER7) so let's remove a piece of dead code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> --- We might actually want to get rid of the entire IODA1 there. --- arch/powerpc/platforms/powernv/pci-ioda.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)