[Skiboot] [PATCH v4 3/8] capp/phb: Introduce 'struct capp' to hold capp related info in 'struct phb'

christophe lombard clombard at linux.vnet.ibm.com
Mon Jan 14 21:22:57 AEDT 2019


Le 13/01/2019 à 06:37, Vaibhav Jain a écrit :
> Previously struct proc_chip member 'capp_phb3_attached_mask' was used
> for Power-8 to keep track of PHB attached to the single CAPP on the
> chip. CAPP on that chip supported a flexible PHB assignment
> scheme. However since then new chips only support a static assignment
> i.e a CAPP can only be attached to a specific PEC.
> 
> Hence instead of using 'proc_chip.capp_phb4_attached_mask' to manage
> CAPP <-> PEC assignments which needs a global lock (capi_lock) to be
> updated, we introduce a new struct named 'capp' a pointer to which
> resides inside struct 'phb4'. Since updates to struct 'phb4' already
> happen in context of phb_lock; this eliminates the
> need to use mutex 'capi_lock' while updating
> 'capp_phb4_attached_mask'.
> 
> This struct is also used to hold CAPP specific variables such as
> pointer to the 'struct phb' to which the CAPP is attached,
> 'capp_xscom_offset' which is the xscom offset to be added to CAPP
> registers in case there are more than 1 on the chip, 'capp_index'
> which is the index of the CAPP on the chip, and attached_pe' which is
> the process endpoint index to which CAPP is attached. Finally member
> 'chip_id' holds the chip-id thats used for performing xscom
> read/writes.
> 
> Also new helpers named capp_xscom_read()/write() are introduced to
> make access to CAPP xscom registers easier.
> 
> Signed-off-by: Vaibhav Jain <vaibhav at linux.ibm.com>
> ---

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



More information about the Skiboot mailing list