[Skiboot] [RFC 11/12] npu2-opencapi: Handle OPAL_UNMAP_PE operation on set_pe() callback

Andrew Donnellan ajd at linux.ibm.com
Thu Jun 20 16:57:13 AEST 2019


On 19/6/19 10:45 pm, Frederic Barrat wrote:
> In a hot-unplug scenario, the OS will try to unmap the PE. Skiboot
> doesn't do anything with the linux PE for opencapi other than being a
> mailbox, but at least let's be consistent.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>

Need to remove the __unused annotation from the function signature.

Apart from that:

Reviewed-by: Andrew Donnellan <ajd at linux.ibm.com>


> ---
>   hw/npu2-opencapi.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
> index c9a8410e..dd238235 100644
> --- a/hw/npu2-opencapi.c
> +++ b/hw/npu2-opencapi.c
> @@ -1497,6 +1497,8 @@ static int64_t npu2_opencapi_set_pe(struct phb *phb,
>   	 * functions on the device, the OS can define many PEs, we
>   	 * only keep one, the OS will handle it.
>   	 */
> +	if (action == OPAL_UNMAP_PE)
> +		pe_num = -1;
>   	dev->linux_pe = pe_num;
>   	return OPAL_SUCCESS;
>   }
> 

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd at linux.ibm.com             IBM Australia Limited



More information about the Skiboot mailing list