[Skiboot] [PATCH v2 0/8] Enable fast-reboot support for CAPI-2
Vaibhav Jain
vaibhav at linux.ibm.com
Mon Dec 10 01:17:36 AEDT 2018
Presently enabling CAPP for a CAPI-2 adapter disables fast-reset [1]. This
was needed as CAPP uses PHB to interact with the CAPI adapter and we need
to explicitly enable special mode on the PHB to allow CAPP traffic to flow.
Without gracefully shutting down CAPP, PEC/PHB and CAPP will be forced to
go in a fence loop during fast-reboot. This happens as CAPP, when it sees
PHB link down raise CAPP FIR(31:PHB Link Down) and goes into recovery. PEC
on the other hand when it sees CAPP error raises NFIR(24:cxa_pe_capp_error)
and again raises a fence.
To break this fence loop, this patch-set issues a CRESET to the PHB
attached to the CAPP during fast-reset. During this CRESET we execute a h/w
sequence to disable CAPP and reset the PEC/PHB registers. We also leverage
the Opal syncers framework to drive Opal creset state machine during
fast-reboot. At a very high level following flow executed to disable CAPP:
1. Issue CRESET on the PHB
2. During CRESET disable CAPP
3. Once CRESET completes let fast-reboot continue.
The structure of patch-set is as follows:
First 4 patches are re-factoring/modification patches that implement necessary
infrastructure needed for forcing a creset at kernel shutdown. We start with
slight modification of opal-syncers framework followed by a patch that
introduces a new pci_slot_op named 'completed_sm_run()' that makes it easier to
detect when pci reset state machine is completed. We then introduce a new struct
named 'capp' as a member of 'struct phb'. The fourth patch refactors the
phb4_set_capi_mode() function to use newly introduced 'struct capp'
With above infrastructure in place subsequent 4 patches implements in sequence
needed to perform various h/w routines to disable CAPP when pci creset is
triggered during kernel shutdown.
Credits:
This patchset is based earlier work by "Andrew Donnellan" to implemented
support for CAPI fast-reboot in [2].
References:
[1]: 53c4553d('capp: Disable fast-reboot when capp is enabled')
[2]: ddb880fe('fast-reboot: remove CAPI check')
Vaibhav Jain (8):
opal: Update opal_del_host_sync_notifier() to accept 'void *data'
core/pci: Introduce a new pci_slot_op named completed_sm_run()
capp/phb: Introduce 'struct capp' to hold capp related info in 'struct
phb'
phb4/capp: Update and re-factor phb4_set_capi_mode()
capp/phb4: Force CAPP to PCIe mode during kernel shutdown
capp/phb4: Introduce PHB4 flag, PHB4_CAPP_DISABLE to disable CAPP
phb4/capp: Implement sequence to disable CAPP and enable fast-reset
capp/phb4: Prevent HMI from getting triggered when disabling CAPP
core/opal.c | 7 +-
core/pci-slot.c | 6 +-
hw/phb4.c | 347 +++++++++++++++++++++++++++++++++++-----
include/capp.h | 7 +
include/chip.h | 1 -
include/opal-internal.h | 2 +-
include/pci-slot.h | 1 +
include/pci.h | 3 +
include/phb4.h | 1 +
9 files changed, 331 insertions(+), 44 deletions(-)
Change-log:
v2: * Addressed various review comments from Stewart, Fred, Andrew and Vasant.
* Introduced a new struct named 'capp' as member of 'struct phb' to hold
CAPP related info.
* Re-ordered the patches.
--
2.19.2
More information about the Skiboot
mailing list