[Skiboot] [PATCH 0/6] Enable fast-reboot support for CAPI-2

Vaibhav Jain vaibhav at linux.ibm.com
Sun Sep 16 00:39:19 AEST 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 patchset is as follows:
We start with re-factoring of phb4_set_capi_mode() in the first patch and
in subsequent three patches proceed to implement some features &
scaffolding needed for the above flow. Patch-5 leverages the work done in
previous patches to call a newly introduced skeleton function
disable_capi_mode() during fast-reset. Patch-6 implements a h/w sequence
to disable CAPP, followed by the final patch-7 that suppresses an HMI that
gets triggered during the flow.

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 (7):
  phb4/capp: Update and re-factor phb4_set_capi_mode()
  opal: Introduce opal_del_host_sync_notifier_with_data()
  core/pci: Introduce a new pci_slot_op named completed_sm_run()
  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             |  18 +++
 core/pci-slot.c         |   6 +-
 hw/phb4.c               | 295 +++++++++++++++++++++++++++++++++++-----
 include/opal-internal.h |   2 +
 include/pci-slot.h      |   1 +
 include/phb4.h          |   1 +
 6 files changed, 288 insertions(+), 35 deletions(-)

-- 
2.17.1



More information about the Skiboot mailing list