* [PATCH v2] cxl: Set the valid bit in PE for dedicated mode
@ 2017-09-04 8:48 Vaibhav Jain
2017-09-04 10:09 ` Frederic Barrat
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vaibhav Jain @ 2017-09-04 8:48 UTC (permalink / raw)
To: linuxppc-dev, Frederic Barrat, Michael Ellerman
Cc: Vaibhav Jain, Andrew Donnellan, Christophe Lombard,
Philippe Bergheaud, Alastair D'Silva
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: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
---
Changelog:
v2 -> Removed a call to smp_wmb() after setting the bit [Michael Ellerman]
---
drivers/misc/cxl/native.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index 4a82c313cf71..75df74d59527 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -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;
--
2.13.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cxl: Set the valid bit in PE for dedicated mode
2017-09-04 8:48 [PATCH v2] cxl: Set the valid bit in PE for dedicated mode Vaibhav Jain
@ 2017-09-04 10:09 ` Frederic Barrat
2017-09-05 0:37 ` Andrew Donnellan
2017-10-05 4:21 ` [v2] " Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Frederic Barrat @ 2017-09-04 10:09 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Michael Ellerman
Cc: Andrew Donnellan, Christophe Lombard, Philippe Bergheaud,
Alastair D'Silva
Le 04/09/2017 à 10:48, Vaibhav Jain a écrit :
> 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: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
> ---
> Changelog:
>
> v2 -> Removed a call to smp_wmb() after setting the bit [Michael Ellerman]
> ---
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
>
> drivers/misc/cxl/native.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
> index 4a82c313cf71..75df74d59527 100644
> --- a/drivers/misc/cxl/native.c
> +++ b/drivers/misc/cxl/native.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] cxl: Set the valid bit in PE for dedicated mode
2017-09-04 8:48 [PATCH v2] cxl: Set the valid bit in PE for dedicated mode Vaibhav Jain
2017-09-04 10:09 ` Frederic Barrat
@ 2017-09-05 0:37 ` Andrew Donnellan
2017-10-05 4:21 ` [v2] " Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Donnellan @ 2017-09-05 0:37 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Frederic Barrat, Michael Ellerman
Cc: Christophe Lombard, Philippe Bergheaud, Alastair D'Silva
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
On 04/09/17 18:48, Vaibhav Jain wrote:
> 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: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
> ---
> Changelog:
>
> v2 -> Removed a call to smp_wmb() after setting the bit [Michael Ellerman]
> ---
>
> drivers/misc/cxl/native.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
> index 4a82c313cf71..75df74d59527 100644
> --- a/drivers/misc/cxl/native.c
> +++ b/drivers/misc/cxl/native.c
> @@ -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;
>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [v2] cxl: Set the valid bit in PE for dedicated mode
2017-09-04 8:48 [PATCH v2] cxl: Set the valid bit in PE for dedicated mode Vaibhav Jain
2017-09-04 10:09 ` Frederic Barrat
2017-09-05 0:37 ` Andrew Donnellan
@ 2017-10-05 4:21 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-10-05 4:21 UTC (permalink / raw)
To: Vaibhav Jain, linuxppc-dev, Frederic Barrat
Cc: Philippe Bergheaud, Alastair D'Silva, Vaibhav Jain,
Andrew Donnellan, Christophe Lombard
On Mon, 2017-09-04 at 08:48:25 UTC, Vaibhav Jain wrote:
> 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: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
> Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/8512bffd6226fea259f94fd23fc3b6
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-05 4:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-04 8:48 [PATCH v2] cxl: Set the valid bit in PE for dedicated mode Vaibhav Jain
2017-09-04 10:09 ` Frederic Barrat
2017-09-05 0:37 ` Andrew Donnellan
2017-10-05 4:21 ` [v2] " Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.