linux/arch/powerpc/platforms/powernv
Wei Yang 0dc2830e0a powerpc/powernv: Support PCI config restore for VFs
After PE reset, OPAL API opal_pci_reinit() is called on all devices
contained in the PE to reinitialize them. While skiboot is not aware of
VFs, we have to implement the function in kernel to reinitialize VFs after
reset on PE for VFs.

In this patch, two functions pnv_pci_fixup_vf_mps() and
pnv_eeh_restore_vf_config() both manipulate the MPS of the VF, since for a
VF it has three cases.

1. Normal creation for a VF
   In this case, pnv_pci_fixup_vf_mps() is called to make the MPS a proper
   value compared with its parent.
2. EEH recovery without VF removed
   In this case, MPS is stored in pci_dn and pnv_eeh_restore_vf_config() is
   called to restore it and reinitialize other part.
3. EEH recovery with VF removed
   In this case, VF will be removed then re-created. Both functions are
   called. First pnv_pci_fixup_vf_mps() is called to store the proper MPS
   to pci_dn and then pnv_eeh_restore_vf_config() is called to do proper
   thing.

This introduces two functions: pnv_pci_fixup_vf_mps() to fixup the VF's
MPS to make sure it is equal to parent's and store this value in pci_dn
for future use. pnv_eeh_restore_vf_config() to re-initialize on VF by
restoring MPS, disabling completion timeout, enabling SERR, etc.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-03-09 09:58:22 +11:00
..
Kconfig
Makefile powerpc/powernv: Remove support for p5ioc2 2016-02-08 22:03:37 +11:00
eeh-powernv.c powerpc/powernv: Support PCI config restore for VFs 2016-03-09 09:58:22 +11:00
idle.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
npu-dma.c powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
opal-async.c
opal-dump.c
opal-elog.c
opal-flash.c
opal-hmi.c
opal-irqchip.c powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion" 2015-12-18 22:24:15 +11:00
opal-kmsg.c powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages 2016-01-13 12:35:17 +11:00
opal-lpc.c
opal-memory-errors.c
opal-msglog.c powerpc/powernv: don't create OPAL msglog sysfs entry if memcons init fails 2016-02-22 20:31:55 +11:00
opal-nvram.c
opal-power.c
opal-prd.c
opal-rtc.c powerpc/powernv: Only delay opal_rtc_read() retry when necessary 2015-12-27 19:12:40 +11:00
opal-sensor.c
opal-sysparam.c
opal-tracepoints.c
opal-wrappers.S powerpc/powernv: Add a kmsg_dumper that flushes console output on panic 2015-12-27 19:12:40 +11:00
opal-xscom.c powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL 2015-12-17 22:40:54 +11:00
opal.c powerpc/powernv: new function to access OPAL msglog 2016-02-09 20:27:04 +11:00
pci-ioda.c powerpc fixes for 4.5 #3 2016-02-25 21:52:58 +11:00
pci.c powerpc fixes for 4.5 #3 2016-02-25 21:52:58 +11:00
pci.h powerpc fixes for 4.5 #3 2016-02-25 21:52:58 +11:00
powernv.h
rng.c
setup.c powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL 2015-12-17 22:40:54 +11:00
smp.c powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL 2015-12-17 22:40:54 +11:00
subcore-asm.S
subcore.c powerpc/powernv: Create separate subcores CPU feature bit 2016-02-22 20:47:46 +11:00
subcore.h