]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/eeh: EEH for pSeries hot plug
authorSam Bobroff <sbobroff@linux.ibm.com>
Fri, 16 Aug 2019 04:48:09 +0000 (14:48 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Aug 2019 13:12:40 +0000 (23:12 +1000)
commitff41e393420b8ec0f71decd3fc1071c4396bcb74
tree5b5b66c88c60c8ab0605c8919f1911888c4c6a57
parent578953c3651fdc2fba6b30c5d51baf23600b8d72
powerpc/eeh: EEH for pSeries hot plug

On PowerNV and pSeries, devices currently acquire EEH support from
several different places: Boot-time devices from eeh_probe_devices()
and eeh_addr_cache_build(), Virtual Function devices from the pcibios
bus add device hooks and hot plugged devices from pci_hp_add_devices()
(with other platforms using other methods as well).  Unfortunately,
pSeries machines currently discover hot plugged devices using
pci_rescan_bus(), not pci_hp_add_devices(), and so those devices do
not receive EEH support.

Rather than adding another case for pci_rescan_bus(), this change
widens the scope of the pcibios bus add device hooks so that they can
handle all devices. As a side effect this also supports devices
discovered after manually rescanning via /sys/bus/pci/rescan.

Note that on PowerNV, this change allows the EEH subsystem to become
enabled after boot as long as it has not been forced off, which was
not previously possible (it was already possible on pSeries).

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/72ae8ae9c54097158894a52de23690448de38ea9.1565930772.git.sbobroff@linux.ibm.com
arch/powerpc/kernel/eeh.c
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/pseries/eeh_pseries.c