[PATCH 2/3] powerpc/iommu: Cleanup setting of DMA base/offset

Michael Ellerman mpe at ellerman.id.au
Thu Aug 27 11:13:36 AEST 2015


On Wed, 2015-08-26 at 18:52 +1000, Alexey Kardashevskiy wrote:
> On 06/24/2015 03:25 PM, Benjamin Herrenschmidt wrote:
> > Now that the table and the offset can co-exist, we no longer need
> > to flip/flop, we can just establish both once at boot time.
> >
> > Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> > ---
> >   arch/powerpc/platforms/powernv/pci-ioda.c |  3 +--
> >   arch/powerpc/platforms/pseries/iommu.c    |  3 +--
> >   arch/powerpc/sysdev/dart_iommu.c          | 16 +++-------------
> >   3 files changed, 5 insertions(+), 17 deletions(-)
> >
> > diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> > index 5738d31..2c286b57 100644
> > --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> > +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> > @@ -1620,11 +1620,9 @@ static int pnv_pci_ioda_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
> >   	if (bypass) {
> >   		dev_info(&pdev->dev, "Using 64-bit DMA iommu bypass\n");
> >   		set_dma_ops(&pdev->dev, &dma_direct_ops);
> > -		set_dma_offset(&pdev->dev, pe->tce_bypass_base);
> 
> 
> This particular change breaks SRIOV. So some SRIOV code relies on that but 
> I could not spot this place quickly.

Thanks for finding it.

> Also, this specific patch in powerpc/next tree just does not compile 
> because of "powerpc/iommu: Remove dma_data union" but this is another story :)

<redacted>

cheers




More information about the Linuxppc-dev mailing list