linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: mpe@ellerman.id.au, benh@kernel.crashing.org
Cc: imunsie@au.ibm.com, linuxppc-dev@ozlabs.org, mikey@neuling.org,
	Daniel Axtens <dja@axtens.net>,
	"Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
	"Manoj N. Kumar" <manoj@linux.vnet.ibm.com>,
	brking@linux.vnet.ibm.com
Subject: [PATCH v2 13/21] cxl: Export some symbols
Date: Tue, 26 May 2015 10:20:10 +1000	[thread overview]
Message-ID: <1432599618-26844-14-git-send-email-mikey@neuling.org> (raw)
In-Reply-To: <1432599618-26844-1-git-send-email-mikey@neuling.org>

Export some symbols which will soon be used elsewhere in this driver.

Now they are global we rename them so to avoid collisions.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
---
 drivers/misc/cxl/cxl.h    |  5 +++++
 drivers/misc/cxl/native.c | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h
index 8180680..58a9b2b 100644
--- a/drivers/misc/cxl/cxl.h
+++ b/drivers/misc/cxl/cxl.h
@@ -632,6 +632,9 @@ int cxl_context_init(struct cxl_context *ctx, struct cxl_afu *afu, bool master,
 		     struct address_space *mapping);
 void cxl_context_free(struct cxl_context *ctx);
 int cxl_context_iomap(struct cxl_context *ctx, struct vm_area_struct *vma);
+unsigned int cxl_map_irq(struct cxl *adapter, irq_hw_number_t hwirq,
+			 irq_handler_t handler, void *cookie, const char *name);
+void cxl_unmap_irq(unsigned int virq, void *cookie);
 int __detach_context(struct cxl_context *ctx);
 
 /* This matches the layout of the H_COLLECT_CA_INT_INFO retbuf */
@@ -646,6 +649,7 @@ struct cxl_irq_info {
 	u64 padding[3]; /* to match the expected retbuf size for plpar_hcall9 */
 };
 
+void cxl_assign_psn_space(struct cxl_context *ctx);
 int cxl_attach_process(struct cxl_context *ctx, bool kernel, u64 wed,
 			    u64 amr);
 int cxl_detach_process(struct cxl_context *ctx);
@@ -658,6 +662,7 @@ int cxl_afu_slbia(struct cxl_afu *afu);
 int cxl_tlb_slb_invalidate(struct cxl *adapter);
 int cxl_afu_disable(struct cxl_afu *afu);
 int __cxl_afu_reset(struct cxl_afu *afu);
+int cxl_afu_check_and_enable(struct cxl_afu *afu);
 int cxl_psl_purge(struct cxl_afu *afu);
 
 void cxl_stop_trace(struct cxl *cxl);
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index f85b6ae..615ccbf 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -83,7 +83,7 @@ int __cxl_afu_reset(struct cxl_afu *afu)
 			   false);
 }
 
-static int afu_check_and_enable(struct cxl_afu *afu)
+int cxl_afu_check_and_enable(struct cxl_afu *afu)
 {
 	if (afu->enabled)
 		return 0;
@@ -379,7 +379,7 @@ static int remove_process_element(struct cxl_context *ctx)
 }
 
 
-static void assign_psn_space(struct cxl_context *ctx)
+void cxl_assign_psn_space(struct cxl_context *ctx)
 {
 	if (!ctx->afu->pp_size || ctx->master) {
 		ctx->psn_phys = ctx->afu->psn_phys;
@@ -435,7 +435,7 @@ static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
 	u64 sr;
 	int r, result;
 
-	assign_psn_space(ctx);
+	cxl_assign_psn_space(ctx);
 
 	ctx->elem->ctxtime = 0; /* disable */
 	ctx->elem->lpid = cpu_to_be32(mfspr(SPRN_LPID));
@@ -477,7 +477,7 @@ static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
 	ctx->elem->common.wed = cpu_to_be64(wed);
 
 	/* first guy needs to enable */
-	if ((result = afu_check_and_enable(ctx->afu)))
+	if ((result = cxl_afu_check_and_enable(ctx->afu)))
 		return result;
 
 	add_process_element(ctx);
@@ -564,7 +564,7 @@ static int attach_dedicated(struct cxl_context *ctx, u64 wed, u64 amr)
 	cxl_p2n_write(afu, CXL_PSL_AMR_An, amr);
 
 	/* master only context for dedicated */
-	assign_psn_space(ctx);
+	cxl_assign_psn_space(ctx);
 
 	if ((rc = __cxl_afu_reset(afu)))
 		return rc;
-- 
2.1.0

  parent reply	other threads:[~2015-05-26  0:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  0:19 [PATCH v2 00/21] cxl: Add AFU virtual PHB and in kernel API Michael Neuling
2015-05-26  0:19 ` [PATCH v2 01/21] powerpc/copro: Fix faulting kernel segments Michael Neuling
2015-05-26  0:19 ` [PATCH v2 02/21] powerpc/pci: Export symbols for CXL Michael Neuling
2015-05-26  0:20 ` [PATCH v2 03/21] powerpc/pci: Add release_device() hook to phb ops Michael Neuling
2015-05-26  0:20 ` [PATCH v2 04/21] powerpc: Add cxl context to device archdata Michael Neuling
2015-05-26  0:20 ` [PATCH v2 05/21] powerpc/pci: Add shutdown hook to pci_controller_ops Michael Neuling
2015-05-26  0:20 ` [PATCH v2 06/21] cxl: Document external user of existing API Michael Neuling
2015-05-26  0:20 ` [PATCH v2 07/21] cxl: Add shutdown hook Michael Neuling
2015-05-26  0:20 ` [PATCH v2 08/21] cxl: Re-order card init to check the VSEC earlier Michael Neuling
2015-05-26  0:20 ` [PATCH v2 09/21] cxl: Dump debug info on the AFU configuration record Michael Neuling
2015-05-26  0:20 ` [PATCH v2 10/21] cxl: Add cookie parameter to afu_release_irqs() Michael Neuling
2015-05-26  0:20 ` [PATCH v2 11/21] cxl: Rework detach context functions Michael Neuling
2015-05-26  0:20 ` [PATCH v2 12/21] cxl: cxl_afu_reset() -> __cxl_afu_reset() Michael Neuling
2015-05-26  0:20 ` Michael Neuling [this message]
2015-05-26  0:20 ` [PATCH v2 14/21] cxl: Only check pid for userspace contexts Michael Neuling
2015-05-26  0:20 ` [PATCH v2 15/21] cxl: Split afu_register_irqs() function Michael Neuling
2015-05-26  0:20 ` [PATCH v2 16/21] cxl: Configure PSL for kernel contexts and merge code Michael Neuling
2015-05-26  0:20 ` [PATCH v2 17/21] cxl: Rework context lifetimes Michael Neuling
2015-05-26  0:20 ` [PATCH v2 18/21] cxl: Cleanup Makefile Michael Neuling
2015-05-26  0:20 ` [PATCH v2 19/21] cxl: Move include file cxl.h -> cxl-base.h Michael Neuling
2015-05-26  0:20 ` [PATCH v2 20/21] cxl: Export file ops for use by API Michael Neuling
2015-05-26  0:20 ` [PATCH v2 21/21] cxl: Add AFU virtual PHB and kernel API Michael Neuling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432599618-26844-14-git-send-email-mikey@neuling.org \
    --to=mikey@neuling.org \
    --cc=benh@kernel.crashing.org \
    --cc=brking@linux.vnet.ibm.com \
    --cc=dja@axtens.net \
    --cc=imunsie@au.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=manoj@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=mrochs@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).