[Skiboot] [PATCH v3 6/8] capp/phb4: Introduce PHB4 flag, PHB4_CAPP_DISABLE to disable CAPP

christophe lombard clombard at linux.vnet.ibm.com
Wed Jan 9 22:44:18 AEDT 2019


Le 08/01/2019 à 10:59, Vaibhav Jain a écrit :
> This patch introduces a PHB4 flag PHB4_CAPP_DISABLE and scaffolding
> necessary to handle it during CRESET flow. The flag is set when CAPP
> is request to switch to PCIe mode via call to phb4_set_capi_mode()
> with mode OPAL_PHB_CAPI_MODE_PCIE. This starts the below sequence that
> ultimately ends in newly introduced phb4_slot_sm_run_completed()
> 
> 1. Set PHB4_CAPP_DISABLE to phb4->flags.
> 
> 2. Start a CRESET on the phb slot. This also starts the opal pci reset
> state machine.
> 
> 3. Wait for slot state to be PHB4_SLOT_CRESET_WAIT_CQ.
> 
> 4. Perform CAPP recovery as PHB is still fenced, by calling
> do_capp_recovery_scoms().
> 
> 5. Call newly introduced 'disable_capi_mode()' to disable CAPP.
> 
> 6. Wait for slot reset to complete while it transitions to
> PHB4_SLOT_FRESET and optionally to PHB4_SLOT_LINK_START.
> 
> 7. Once slot reset is complete opal pci-core state machine will call
> slot->ops.completed_sm_run().
> 
> 8. For PHB4 this branches newly introduced 'phb4_slot_sm_run_completed()'.
> 
> 9. Inside this function we mark the CAPP as disabled and un-register
> the opal syncer phb4_host_sync_reset().
> 
> 10. Optionally if the slot reset was unsuccessful disable
> fast-reboot.
> 
> ****************************
> Notes:
> ****************************
> a. Function 'disable_capi_mode()' performs various sanity tests on CAPP to
> to determine if its ok to disable it and perform necessary xscoms
> to disable it. However the current implementation proposed in this
> patch is a skeleton one that just does sanity tests. A followup patch
> will be proposed that implements the xscoms necessary to disable CAPP.
> 
> b. The sequence expects that Opal PCI reset state machine makes
> forward progress hence needs someone to call slot->ops.run_sm(). This
> can be either from phb4_host_sync_reset() or opal_pci_poll().
> 
> Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
> ---
> Change-log
> 
> v3:	Use 'struct capp *' from struct phb4 instead of struct phb.
> 	Minor typo fixed. [ Andrew ]
> 
> v2:	Removed the usage of global mutex 'capi_lock'. [Andrew, Stewart]
> 	Populate and use the newly introduced 'struct capp' to
> 	maintain the state of capp.
> ---

Thanks.

Reviewed-by: Christophe Lombard <clombard at linux.vnet.ibm.com>



More information about the Skiboot mailing list