On Sun, 2013-09-29 at 19:51 +0800, Lian Minghuan-b31939 wrote:
> >> +/*
> >> + * The fsl_arch_* functions are arch hooks. Those functions are
> >> + * implemented as weak symbols so that they can be overridden by
> >> + * architecture specific code if needed.
> >> + */
> >> +
> >> +/* Return PCI64 DMA offset */
> >> +u64 fsl_arch_pci64_dma_offset(void);
> > Is this always guaranteed to exist?
> [Minghuan] Yes. I define a __weak implementation in pci-fsl.c

I meant is it guaranteed that such a mapping exists?  The API doesn't
give a way to say "no".

Also you should describe what "PCI64 DMA offset" means.

> >> +/* Register PCI/PCIe controller to architecture system */
> >> +int __weak fsl_arch_pci_sys_register(struct fsl_pci *pci);
> >> +
> >> +/* Remove PCI/PCIe controller from architecture system */
> >> +void __weak fsl_arch_pci_sys_remove(struct fsl_pci *pci);
> > Why do these need to be weak?  Won't there be exactly one implementation
> > per supported arch?
> [Minghuan] I added __weak for compiling kernel when selecting pci-fsl 
> module but
> there is no related arch pci implementation.

The module should not be buildable on arches that don't have support.

-Scott



_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to