diff options
author | Mitko Haralanov <mitko.haralanov@intel.com> | 2016-03-08 11:14:59 -0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-21 15:55:22 -0400 |
commit | 353b71c7c08ed75fe83843a382e5ca53376d07ca (patch) | |
tree | d44bfd87ef75365fb6c96253b3cc3e118dee0ac9 /drivers/staging | |
parent | df5a00f81dab36b3479a2b84c836e98e701c78bc (diff) | |
download | linux-353b71c7c08ed75fe83843a382e5ca53376d07ca.tar.bz2 |
IB/hfi1: Add MMU tracing
Add a new tracepoint type for the MMU functions and calls
to that tracepoint to allow tracing of MMU functionality.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rdma/hfi1/mmu_rb.c | 10 | ||||
-rw-r--r-- | drivers/staging/rdma/hfi1/trace.c | 1 | ||||
-rw-r--r-- | drivers/staging/rdma/hfi1/trace.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/mmu_rb.c b/drivers/staging/rdma/hfi1/mmu_rb.c index 540e267eee3c..c30373df3874 100644 --- a/drivers/staging/rdma/hfi1/mmu_rb.c +++ b/drivers/staging/rdma/hfi1/mmu_rb.c @@ -157,6 +157,8 @@ int hfi1_mmu_rb_insert(struct rb_root *root, struct mmu_rb_node *mnode) return -EINVAL; spin_lock_irqsave(&handler->lock, flags); + hfi1_cdbg(MMU, "Inserting node addr 0x%llx, len %u", mnode->addr, + mnode->len); node = __mmu_rb_search(handler, mnode->addr, mnode->len); if (node) { ret = -EINVAL; @@ -181,7 +183,11 @@ static struct mmu_rb_node *__mmu_rb_search(struct mmu_rb_handler *handler, { struct mmu_rb_node *node; + hfi1_cdbg(MMU, "Searching for addr 0x%llx, len %u", addr, len); node = __mmu_int_rb_iter_first(handler->root, addr, len); + if (node) + hfi1_cdbg(MMU, "Found node addr 0x%llx, len %u", node->addr, + node->len); return node; } @@ -189,6 +195,8 @@ static void __mmu_rb_remove(struct mmu_rb_handler *handler, struct mmu_rb_node *node, bool arg) { /* Validity of handler and node pointers has been checked by caller. */ + hfi1_cdbg(MMU, "Removing node addr 0x%llx, len %u", node->addr, + node->len); __mmu_int_rb_remove(node, handler->root); if (handler->ops->remove) handler->ops->remove(handler->root, node, arg); @@ -266,6 +274,8 @@ static void mmu_notifier_mem_invalidate(struct mmu_notifier *mn, spin_lock_irqsave(&handler->lock, flags); for (node = __mmu_int_rb_iter_first(root, start, end); node; node = __mmu_int_rb_iter_next(node, start, end)) { + hfi1_cdbg(MMU, "Invalidating node addr 0x%llx, len %u", + node->addr, node->len); if (handler->ops->invalidate(root, node)) __mmu_rb_remove(handler, node, true); } diff --git a/drivers/staging/rdma/hfi1/trace.c b/drivers/staging/rdma/hfi1/trace.c index 6821d7c377e5..8b62fefcf903 100644 --- a/drivers/staging/rdma/hfi1/trace.c +++ b/drivers/staging/rdma/hfi1/trace.c @@ -232,3 +232,4 @@ __hfi1_trace_fn(DC8051); __hfi1_trace_fn(FIRMWARE); __hfi1_trace_fn(RCVCTRL); __hfi1_trace_fn(TID); +__hfi1_trace_fn(MMU); diff --git a/drivers/staging/rdma/hfi1/trace.h b/drivers/staging/rdma/hfi1/trace.h index 4d91c18fa694..963dc948c38a 100644 --- a/drivers/staging/rdma/hfi1/trace.h +++ b/drivers/staging/rdma/hfi1/trace.h @@ -1340,6 +1340,7 @@ __hfi1_trace_def(DC8051); __hfi1_trace_def(FIRMWARE); __hfi1_trace_def(RCVCTRL); __hfi1_trace_def(TID); +__hfi1_trace_def(MMU); #define hfi1_cdbg(which, fmt, ...) \ __hfi1_trace_##which(__func__, fmt, ##__VA_ARGS__) |