[PATCH v3 16/19] powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to controller_ops

Daniel Axtens dja at axtens.net
Fri Apr 10 12:36:28 AEST 2015


Hi Scott,

This is part of the larger set to move controller ops into a generic
structure. The original cover letter is at
https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-March/126837.html

The commit message should have been reworded when I sent out version 2.
Apologies. Here's a more accurate summary, which will appear in v4.

powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to
controller_ops

Move the installation of DMA operations out of swiotlb's subsys
initcall, and into the generic PCI controller operations struct.

These ops are installed conditionally, based on the ppc_swiotlb_enable
global. The global can be set in two places:
 - swiotlb_detect_4g, which is always called at the arch initcall level
 - setup_pci_atmu, which is called as part of the fsl_add_bridge and
fsl_pci_syscore_do_resume. fsl_pci_syscore_do_resume is called late
enough that any changes as a result of that call will have no effect.

As such, if we test the global and set the operations as part of
fsl_add_bridge, after the call to setup_pci_atmu, we can be confident
that it will cover all the PCI implementations affected by the changes
to dma-swiotlb.c.

Regards,
Daniel

On Thu, 2015-04-09 at 20:28 -0500, Scott Wood wrote:
> On Fri, 2015-04-10 at 10:11 +1000, Daniel Axtens wrote:
> > Moves the setup out of swiotlb's subsys init call, and into an new
> > structure.
> 
> "a new"
> 
> > fsl_pci.c is the only thing that checks the ppc_swiotlb_enable global,
> > so we can be confident that patching it will cover all the PCI
> > implementations affected by the changes to dma-swiotlb.c.
> 
> Do you mean the only thing that sets ppc_swiotlb_enable (fsl_pci.c
> doesn't check it)?  It's also set by swiotlb_detect_4g().
> 
> Where is the rest of this patchset?  What is the problem being solved?
> 
> -Scott
> 
> 

-------------- 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/20150410/fa744eb0/attachment.sig>


More information about the Linuxppc-dev mailing list