[PATCH v3] EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device

Borislav Petkov bp at suse.de
Sat Dec 12 02:56:07 AEDT 2015


On Thu, Dec 10, 2015 at 01:07:12PM -0600, Scott Wood wrote:
> Originally the mpc85xx-pci-edac driver bound directly to the PCI
> controller node.
> 
> Commit 905e75c46dba5f30 ("powerpc/fsl-pci: Unify pci/pcie
> initialization code") turned the PCI controller code into a platform
> device.  Since we can't have two drivers binding to the same device,
> the edac code was changed to be called into as a library-style
> submodule.  However, this doesn't work if the edac driver is built as a
> module.
> 
> Commit 8d8fcba6d1eab ("EDAC: Rip out the edac_subsys reference
> counting") exposed another problem with this approach --
> mpc85xx_pci_err_probe() was being called in the same early boot phase
> that the PCI controller is initialized, rather than in the
> device_initcall phase that the EDAC layer expects.  This caused a crash
> on boot.
> 
> To fix this, the PCI controller code now creates a child platform
> device specifically for EDAC, which the mpc85xx-pci-edac driver binds
> to.
> 
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> Cc: Jia Hongtao <B38951 at freescale.com>
> Cc: Borislav Petkov <bp at suse.de>
> Cc: Johannes Thumshirn <jthumshirn at suse.de>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> ---
> v3: Fix build with CONFIG_PCI disabled
> 
>  arch/powerpc/sysdev/fsl_pci.c | 28 +++++++++++++++++++++++++++-
>  arch/powerpc/sysdev/fsl_pci.h |  9 ---------
>  drivers/edac/mpc85xx_edac.c   | 38 +++++++++++++++++++++++++++++++++-----
>  include/linux/fsl/edac.h      |  8 ++++++++
>  4 files changed, 68 insertions(+), 15 deletions(-)
>  create mode 100644 include/linux/fsl/edac.h

Applied and rebased the tree so that this fix comes before the
rip-out-reference counting patch so that there's no hole during
bisection.

Thanks guys.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 


More information about the Linuxppc-dev mailing list