[Skiboot] [PATCH 1/7] phb4/capp: Update and re-factor phb4_set_capi_mode()

Vaibhav Jain vaibhav at linux.ibm.com
Fri Sep 21 15:02:07 AEST 2018

Thanks for reviewing this patch Stewart

Stewart Smith <stewart at linux.ibm.com> writes:

> Instead of using a mutex for this, what about using a flag variable?
Yes good idea. I am working on v2 that will uses a flag in a newly
introduced 'struct capp *' stored in the struct phb. That should get rid
of the capi mutex lock as the call to set_capi_mode is already done in
context of phb_lock.

> If it really can take seconds, then it should be an async OPAL call
> anyway so as not to hold a CPU spinning in OPAL doing nothing.
At present capp init doesnt take that much time and is usually
completed within ~0.2ms. However I am working on a feature that would
require CAPP init to go through a phb creset which will be considerably
longer. But that will be driven by pci reset state machine and wouldnt
hold the execution thread in opal for long.

Vaibhav Jain <vaibhav at linux.ibm.com>
Linux Technology Center, IBM India Pvt. Ltd.

More information about the Skiboot mailing list