[Skiboot] [PATCH v4 2/2] phb4: set PBCQ Tunnel BAR for tunneled operations

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


Le 10/01/2018 à 15:47, Philippe Bergheaud a écrit :
> P9 supports PCI tunneled operations (atomics and as_notify) that are
> initiated by devices.
> 
> A subset of the tunneled operations require a response, that must be
> sent back from the host to the device. For example, an atomic compare
> and swap will return the compare status, as swap will only performed
> in case of success.  Similarly, as_notify reports if the target thread
> has been woken up or not, because the operation may fail.
> 
> To enable tunneled operations, a device driver must tell the host where
> it expects tunneled operation responses, by setting the PBCQ Tunnel BAR
> Response register with a specific value within the range of its BARs.
> 
> This register is currently initialized by enable_capi_mode(). But, as
> tunneled operations may also operate in PCI mode, a new API is required
> to set the PBCQ Tunnel BAR Response register, without switching to CAPI
> mode.
> 
> This patch provides two new OPAL calls to get/set the PBCQ Tunnel
> BAR Response register.
> 
> Note: as there is only one PBCQ Tunnel BAR register, shared between
> all the devices connected to the same PHB, only one of these devices
> will be able to use tunneled operations, at any time.
> 
> Signed-off-by: Philippe Bergheaud <felix at linux.vnet.ibm.com>
> ---
> Changelog:
> 
> v2: Adjust new OPAL call numbers.
> 
> v3: Rebase on skiboot 5.9.6.
>      Document new OPAL calls in doc/opal-api.
> 
> v4: opal_pci_get_pbcq_tunnel_bar():
>        - check that addr parameter is valid
>        - update doc/opal-api
>      enable_capi_mode():
>        - explain why we do not touch an existing tunnel bar value
>        - reuse psl tnr addr value verbatim, and shift it by 8
> ---
>   core/pci-opal.c                                    | 36 ++++++++++
>   .../opal-pci-get-set-pbcq-tunnel-bar-159-160.rst   | 76 ++++++++++++++++++++++
>   hw/phb4.c                                          | 71 ++++++++++++++++++--
>   include/opal-api.h                                 |  4 +-
>   include/pci.h                                      |  4 ++
>   5 files changed, 185 insertions(+), 6 deletions(-)
>   create mode 100644 doc/opal-api/opal-pci-get-set-pbcq-tunnel-bar-159-160.rst
> 

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



More information about the Skiboot mailing list