[PATCH] powerpc/powernv: move dma_get_required_mask from pnv_phb to pci_controller_ops

Daniel Axtens dja at axtens.net
Fri Aug 7 13:46:51 AEST 2015


On Fri, 2015-08-07 at 13:45 +1000, Andrew Donnellan wrote:
> Simplify the dma_get_required_mask call chain by moving it from pnv_phb to
> pci_controller_ops, similar to commit 763d2d8df1ee2b92ff09c
> ("powerpc/powernv: Move dma_set_mask from pnv_phb to pci_controller_ops").
> 
> Previous call chain:
> 
>   0) call dma_get_required_mask() (kernel/dma.c)
>   1) call ppc_md.dma_get_required_mask, if it exists. On powernv, that
>      points to pnv_dma_get_required_mask() (platforms/powernv/setup.c)
>   2) device is PCI, therefore call pnv_pci_dma_get_required_mask()
>      (platforms/powernv/pci.c)
>   3) call phb->dma_get_required_mask if it exists
>   4) it only exists in the ioda case, where it points to
>        pnv_pci_ioda_dma_get_required_mask() (platforms/powernv/pci-ioda.c)
> 
> New call chain:
> 
>   0) call dma_get_required_mask() (kernel/dma.c)
>   1) device is PCI, therefore call pci_controller_ops.dma_get_required_mask
>      if it exists
>   2) in the ioda case, that points to pnv_pci_ioda_dma_get_required_mask()
>      (platforms/powernv/pci-ioda.c)
> 
> In the p5ioc2 case, the call chain remains the same -
> dma_get_required_mask() does not find either a ppc_md call or
> pci_controller_ops call, so it calls __dma_get_required_mask().
> 
> Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> 
Reviewed-by: Daniel Axtens <dja at axtens.net>

-- 
Regards,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 860 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150807/683ac6f8/attachment-0001.sig>


More information about the Linuxppc-dev mailing list