Commit 6c63e423 authored by Sebastian Sanchez's avatar Sebastian Sanchez Committed by Greg Kroah-Hartman

staging/rdma/hfi1: Convert dd_dev_info() to hfi1_cdbg() in process startup

Replacing dd_dev_info() for hfi1_cdbg() to avoid generating syslog
output for every context that is open by PSM.
Reviewed-by: default avatarMitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: default avatarSebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: default avatarJubin John <jubin.john@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e23afff9
...@@ -663,9 +663,9 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) ...@@ -663,9 +663,9 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma)
} }
vma->vm_flags = flags; vma->vm_flags = flags;
dd_dev_info(dd, hfi1_cdbg(PROC,
"%s: %u:%u type:%u io/vf:%d/%d, addr:0x%llx, len:%lu(%lu), flags:0x%lx\n", "%u:%u type:%u io/vf:%d/%d, addr:0x%llx, len:%lu(%lu), flags:0x%lx\n",
__func__, ctxt, subctxt, type, mapio, vmf, memaddr, memlen, ctxt, subctxt, type, mapio, vmf, memaddr, memlen,
vma->vm_end - vma->vm_start, vma->vm_flags); vma->vm_end - vma->vm_start, vma->vm_flags);
pfn = (unsigned long)(memaddr >> PAGE_SHIFT); pfn = (unsigned long)(memaddr >> PAGE_SHIFT);
if (vmf) { if (vmf) {
...@@ -989,8 +989,8 @@ static int allocate_ctxt(struct file *fp, struct hfi1_devdata *dd, ...@@ -989,8 +989,8 @@ static int allocate_ctxt(struct file *fp, struct hfi1_devdata *dd,
if (!uctxt->sc) if (!uctxt->sc)
return -ENOMEM; return -ENOMEM;
dbg("allocated send context %u(%u)\n", uctxt->sc->sw_index, hfi1_cdbg(PROC, "allocated send context %u(%u)\n", uctxt->sc->sw_index,
uctxt->sc->hw_context); uctxt->sc->hw_context);
ret = sc_enable(uctxt->sc); ret = sc_enable(uctxt->sc);
if (ret) if (ret)
return ret; return ret;
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
#include "hfi.h" #include "hfi.h"
#include "device.h" #include "device.h"
#include "common.h" #include "common.h"
#include "trace.h"
#include "mad.h" #include "mad.h"
#include "sdma.h" #include "sdma.h"
#include "debugfs.h" #include "debugfs.h"
...@@ -208,7 +209,7 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt) ...@@ -208,7 +209,7 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt)
if (rcd) { if (rcd) {
u32 rcvtids, max_entries; u32 rcvtids, max_entries;
dd_dev_info(dd, "%s: setting up context %u\n", __func__, ctxt); hfi1_cdbg(PROC, "setting up context %u\n", ctxt);
INIT_LIST_HEAD(&rcd->qp_wait_list); INIT_LIST_HEAD(&rcd->qp_wait_list);
rcd->ppd = ppd; rcd->ppd = ppd;
...@@ -279,8 +280,9 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt) ...@@ -279,8 +280,9 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt)
rcd->ctxt); rcd->ctxt);
rcd->egrbufs.count = MAX_EAGER_ENTRIES; rcd->egrbufs.count = MAX_EAGER_ENTRIES;
} }
dd_dev_info(dd, "ctxt%u: max Eager buffer RcvArray entries: %u\n", hfi1_cdbg(PROC,
rcd->ctxt, rcd->egrbufs.count); "ctxt%u: max Eager buffer RcvArray entries: %u\n",
rcd->ctxt, rcd->egrbufs.count);
/* /*
* Allocate array that will hold the eager buffer accounting * Allocate array that will hold the eager buffer accounting
...@@ -308,8 +310,8 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt) ...@@ -308,8 +310,8 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt)
*/ */
if (rcd->egrbufs.size < hfi1_max_mtu) { if (rcd->egrbufs.size < hfi1_max_mtu) {
rcd->egrbufs.size = __roundup_pow_of_two(hfi1_max_mtu); rcd->egrbufs.size = __roundup_pow_of_two(hfi1_max_mtu);
dd_dev_info(dd, hfi1_cdbg(PROC,
"ctxt%u: eager bufs size too small. Adjusting to %zu\n", "ctxt%u: eager bufs size too small. Adjusting to %zu\n",
rcd->ctxt, rcd->egrbufs.size); rcd->ctxt, rcd->egrbufs.size);
} }
rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE; rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE;
...@@ -1660,9 +1662,11 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) ...@@ -1660,9 +1662,11 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
rcd->egrbufs.numbufs = idx; rcd->egrbufs.numbufs = idx;
rcd->egrbufs.size = alloced_bytes; rcd->egrbufs.size = alloced_bytes;
dd_dev_info(dd, "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %zuKB\n", hfi1_cdbg(PROC,
rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size, "ctxt%u: Alloced %u rcv tid entries @ %uKB, total %zuKB\n",
rcd->egrbufs.size); rcd->ctxt, rcd->egrbufs.alloced, rcd->egrbufs.rcvtid_size,
rcd->egrbufs.size);
/* /*
* Set the contexts rcv array head update threshold to the closest * Set the contexts rcv array head update threshold to the closest
...@@ -1683,13 +1687,14 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) ...@@ -1683,13 +1687,14 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
rcd->expected_count = MAX_TID_PAIR_ENTRIES * 2; rcd->expected_count = MAX_TID_PAIR_ENTRIES * 2;
rcd->expected_base = rcd->eager_base + egrtop; rcd->expected_base = rcd->eager_base + egrtop;
dd_dev_info(dd, "ctxt%u: eager:%u, exp:%u, egrbase:%u, expbase:%u\n", hfi1_cdbg(PROC, "ctxt%u: eager:%u, exp:%u, egrbase:%u, expbase:%u\n",
rcd->ctxt, rcd->egrbufs.alloced, rcd->expected_count, rcd->ctxt, rcd->egrbufs.alloced, rcd->expected_count,
rcd->eager_base, rcd->expected_base); rcd->eager_base, rcd->expected_base);
if (!hfi1_rcvbuf_validate(rcd->egrbufs.rcvtid_size, PT_EAGER, &order)) { if (!hfi1_rcvbuf_validate(rcd->egrbufs.rcvtid_size, PT_EAGER, &order)) {
dd_dev_err(dd, "ctxt%u: current Eager buffer size is invalid %u\n", hfi1_cdbg(PROC,
rcd->ctxt, rcd->egrbufs.rcvtid_size); "ctxt%u: current Eager buffer size is invalid %u\n",
rcd->ctxt, rcd->egrbufs.rcvtid_size);
ret = -EINVAL; ret = -EINVAL;
goto bail; goto bail;
} }
......
...@@ -815,15 +815,16 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type, ...@@ -815,15 +815,16 @@ struct send_context *sc_alloc(struct hfi1_devdata *dd, int type,
} }
} }
dd_dev_info(dd, hfi1_cdbg(PIO,
"Send context %u(%u) %s group %u credits %u credit_ctrl 0x%llx threshold %u\n", "Send context %u(%u) %s group %u credits %u credit_ctrl 0x%llx threshold %u\n",
sw_index, sw_index,
hw_context, hw_context,
sc_type_name(type), sc_type_name(type),
sc->group, sc->group,
sc->credits, sc->credits,
sc->credit_ctrl, sc->credit_ctrl,
thresh); thresh);
return sc; return sc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment