Commit 8512bffd authored by Vaibhav Jain's avatar Vaibhav Jain Committed by Michael Ellerman

cxl: Set the valid bit in PE for dedicated mode

Make sure to set the valid-bit in software-state field of the
populated PE. This was earlier missing for dedicated mode AFUs, hence
was causing a PSL freeze when the AFU was activated.
Signed-off-by: default avatarVaibhav Jain <vaibhav@linux.vnet.ibm.com>
Acked-by: default avatarFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 03b8abed
......@@ -897,6 +897,14 @@ int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr)
if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes)
afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx);
ctx->elem->software_state = cpu_to_be32(CXL_PE_SOFTWARE_STATE_V);
/*
* Ideally we should do a wmb() here to make sure the changes to the
* PE are visible to the card before we call afu_enable.
* On ppc64 though all mmios are preceded by a 'sync' instruction hence
* we dont dont need one here.
*/
result = cxl_ops->afu_reset(afu);
if (result)
return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment