Skip to content

Commit

Permalink
cxl: Add cookie parameter to afu_release_irqs()
Browse files Browse the repository at this point in the history
Add cookie parameter to afu_release_irqs() so that we can pass in a different
cookie than the context structure.  This will be useful for other kernel
drivers that want to call this but get their own cookie back in the interrupt
handler.

Update all existing call sites.

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 bfcdc8f commit 6428832
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/misc/cxl/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void __detach_context(struct cxl_context *ctx)
return;

WARN_ON(cxl_detach_process(ctx));
afu_release_irqs(ctx);
afu_release_irqs(ctx, ctx);
flush_work(&ctx->fault_work); /* Only needed for dedicated process */
wake_up_all(&ctx->wq);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/cxl/cxl.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ void cxl_release_psl_err_irq(struct cxl *adapter);
int cxl_register_serr_irq(struct cxl_afu *afu);
void cxl_release_serr_irq(struct cxl_afu *afu);
int afu_register_irqs(struct cxl_context *ctx, u32 count);
void afu_release_irqs(struct cxl_context *ctx);
void afu_release_irqs(struct cxl_context *ctx, void *cookie);
irqreturn_t cxl_slice_irq_err(int irq, void *data);

int cxl_debugfs_init(void);
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/cxl/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static long afu_ioctl_start_work(struct cxl_context *ctx,

if ((rc = cxl_attach_process(ctx, false, work.work_element_descriptor,
amr))) {
afu_release_irqs(ctx);
afu_release_irqs(ctx, ctx);
goto out;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/cxl/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int afu_register_irqs(struct cxl_context *ctx, u32 count)
return -ENOMEM;
}

void afu_release_irqs(struct cxl_context *ctx)
void afu_release_irqs(struct cxl_context *ctx, void *cookie)
{
irq_hw_number_t hwirq;
unsigned int virq;
Expand All @@ -488,7 +488,7 @@ void afu_release_irqs(struct cxl_context *ctx)
for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) {
virq = irq_find_mapping(NULL, hwirq);
if (virq)
cxl_unmap_irq(virq, ctx);
cxl_unmap_irq(virq, cookie);
}
}

Expand Down

0 comments on commit 6428832

Please sign in to comment.