summaryrefslogtreecommitdiff
path: root/drivers/misc/ocxl/afu_irq.c
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>2018-01-23 14:31:44 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-24 03:42:59 +0300
commit92add22e84788d44e978662ca6bcd585f9ac081e (patch)
treec9dd4a0501f9c0ca3342e28349fae69af642b78c /drivers/misc/ocxl/afu_irq.c
parent280b983ce2b8759722d911ea4b5af66e95d84e09 (diff)
downloadlinux-92add22e84788d44e978662ca6bcd585f9ac081e.tar.xz
ocxl: Add trace points
Define a few trace points so that we can use the standard tracing mechanism for debug and/or monitoring. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/ocxl/afu_irq.c')
-rw-r--r--drivers/misc/ocxl/afu_irq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c
index f40d853de401..e70cfa24577f 100644
--- a/drivers/misc/ocxl/afu_irq.c
+++ b/drivers/misc/ocxl/afu_irq.c
@@ -4,6 +4,7 @@
#include <linux/eventfd.h>
#include <asm/pnv-ocxl.h>
#include "ocxl_internal.h"
+#include "trace.h"
struct afu_irq {
int id;
@@ -28,6 +29,7 @@ static irqreturn_t afu_irq_handler(int virq, void *data)
{
struct afu_irq *irq = (struct afu_irq *) data;
+ trace_ocxl_afu_irq_receive(virq);
if (irq->ev_ctx)
eventfd_signal(irq->ev_ctx, 1);
return IRQ_HANDLED;
@@ -102,6 +104,8 @@ int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset)
*irq_offset = irq_id_to_offset(ctx, irq->id);
+ trace_ocxl_afu_irq_alloc(ctx->pasid, irq->id, irq->virq, irq->hw_irq,
+ *irq_offset);
mutex_unlock(&ctx->irq_lock);
return 0;
@@ -117,6 +121,7 @@ err_unlock:
static void afu_irq_free(struct afu_irq *irq, struct ocxl_context *ctx)
{
+ trace_ocxl_afu_irq_free(ctx->pasid, irq->id);
if (ctx->mapping)
unmap_mapping_range(ctx->mapping,
irq_id_to_offset(ctx, irq->id),