Thread (1 message) 1 message, 1 author, 2016-02-21

Re: Fwd: [PATCH v4 03/18] cxl: Define process problem state area at attach time only

From: Manoj Kumar <hidden>
Date: 2016-02-21 21:45:40

Reviewed-by: Manoj Kumar <redacted>

---
Manoj Kumar

Subject: [PATCH v4 03/18] cxl: Define process problem state area at
attach time only
Date: Tue, 16 Feb 2016 22:38:56 +0100
From: Frederic Barrat <redacted>
To: imunsie@au1.ibm.com, michael.neuling@au1.ibm.com,
mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org

Cxl kernel API was defining the process problem state area during
Suggestion:
Cxl -> CXL

quoted hunk
context initialization, making it possible to map the problem state
area before attaching the context. This won't work on a powerVM
guest. So force the logical behavior, like in userspace: attach first,
then map the problem state area.
Remove calls to cxl_assign_psn_space during init. The function is
already called on the attach paths.

Co-authored-by: Christophe Lombard [off-list ref]
Signed-off-by: Frederic Barrat <redacted>
Signed-off-by: Christophe Lombard <redacted>
---
  drivers/misc/cxl/api.c | 11 ++---------
  1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c
index ea3eeb7..b45d857 100644
--- a/drivers/misc/cxl/api.c
+++ b/drivers/misc/cxl/api.c
@@ -51,8 +51,6 @@ struct cxl_context *cxl_dev_context_init(struct
pci_dev *dev)
      if (rc)
          goto err_mapping;

-    cxl_assign_psn_space(ctx);
-
      return ctx;

  err_mapping:
@@ -207,7 +205,6 @@ EXPORT_SYMBOL_GPL(cxl_stop_context);
  void cxl_set_master(struct cxl_context *ctx)
  {
      ctx->master = true;
-    cxl_assign_psn_space(ctx);
  }
  EXPORT_SYMBOL_GPL(cxl_set_master);
@@ -325,15 +322,11 @@ EXPORT_SYMBOL_GPL(cxl_start_work);

  void __iomem *cxl_psa_map(struct cxl_context *ctx)
  {
-    struct cxl_afu *afu = ctx->afu;
-    int rc;
-
-    rc = cxl_afu_check_and_enable(afu);
-    if (rc)
+    if (ctx->status != STARTED)
          return NULL;

      pr_devel("%s: psn_phys%llx size:%llx\n",
-         __func__, afu->psn_phys, afu->adapter->ps_size);
+        __func__, ctx->psn_phys, ctx->psn_size);
      return ioremap(ctx->psn_phys, ctx->psn_size);
  }
  EXPORT_SYMBOL_GPL(cxl_psa_map);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help