Skip to content

Commit

Permalink
cxl: Export some symbols
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Michael Neuling authored and Michael Ellerman committed Jun 3, 2015
1 parent b12994f commit 1a1a94b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions drivers/misc/cxl/cxl.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,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 */
Expand All @@ -650,6 +653,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);
Expand All @@ -662,6 +666,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);
Expand Down
10 changes: 5 additions & 5 deletions drivers/misc/cxl/native.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1a1a94b

Please sign in to comment.