<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/fsl/edac.h, branch v4.9.16</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device</title>
<updated>2015-12-11T15:56:16+00:00</updated>
<author>
<name>Scott Wood</name>
<email>scottwood@freescale.com</email>
</author>
<published>2015-12-10T19:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=666db563d3d9fffcfc019e3d1a980dac47601a71'/>
<id>666db563d3d9fffcfc019e3d1a980dac47601a71</id>
<content type='text'>
Originally the mpc85xx-pci-edac driver bound directly to the PCI
controller node.

Commit

  905e75c46dba ("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

  8d8fcba6d1ea ("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.

Reported-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Daniel Axtens &lt;dja@axtens.net&gt;
Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: Jia Hongtao &lt;B38951@freescale.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.com&gt;
Cc: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Cc: linux-edac &lt;linux-edac@vger.kernel.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Masanari Iida &lt;standby24x7@gmail.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Link: http://lkml.kernel.org/r/1449774432-18593-1-git-send-email-scottwood@freescale.com
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally the mpc85xx-pci-edac driver bound directly to the PCI
controller node.

Commit

  905e75c46dba ("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

  8d8fcba6d1ea ("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.

Reported-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Daniel Axtens &lt;dja@axtens.net&gt;
Cc: Doug Thompson &lt;dougthompson@xmission.com&gt;
Cc: Jia Hongtao &lt;B38951@freescale.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.com&gt;
Cc: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Cc: linux-edac &lt;linux-edac@vger.kernel.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Masanari Iida &lt;standby24x7@gmail.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Link: http://lkml.kernel.org/r/1449774432-18593-1-git-send-email-scottwood@freescale.com
Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
