diff options
author | Michael Neuling <mikey@neuling.org> | 2015-05-27 09:07:07 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-03 06:27:17 +0300 |
commit | 6428832a7bfae73345706d63a228a6ce60af0081 (patch) | |
tree | 07c521ff77d82219c477d2589ec8932d7284ef3f /drivers/misc | |
parent | bfcdc8fffe738c4c06673ed0e447a718b43b7311 (diff) | |
download | linux-6428832a7bfae73345706d63a228a6ce60af0081.tar.xz |
cxl: Add cookie parameter to afu_release_irqs()
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/cxl/context.c | 2 | ||||
-rw-r--r-- | drivers/misc/cxl/cxl.h | 2 | ||||
-rw-r--r-- | drivers/misc/cxl/file.c | 2 | ||||
-rw-r--r-- | drivers/misc/cxl/irq.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/misc/cxl/context.c b/drivers/misc/cxl/context.c index 78ce990d77ca..36bb8e4195d5 100644 --- a/drivers/misc/cxl/context.c +++ b/drivers/misc/cxl/context.c @@ -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); } diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h index b361b48d1b01..a4dadc5b5dd7 100644 --- a/drivers/misc/cxl/cxl.h +++ b/drivers/misc/cxl/cxl.h @@ -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); diff --git a/drivers/misc/cxl/file.c b/drivers/misc/cxl/file.c index 985523443829..676e2c8bc1ab 100644 --- a/drivers/misc/cxl/file.c +++ b/drivers/misc/cxl/file.c @@ -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; } diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c index c8929c526691..c740c7bc2bd2 100644 --- a/drivers/misc/cxl/irq.c +++ b/drivers/misc/cxl/irq.c @@ -477,7 +477,7 @@ out: 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; @@ -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); } } |