From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH for-next 05/18] IB/hfi1: Fix trace sparse errors
Date: Fri, 01 Jul 2016 16:01:11 -0700 [thread overview]
Message-ID: <20160701230111.20160.9865.stgit@scvm10.sc.intel.com> (raw)
In-Reply-To: <20160701225824.20160.19055.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
From: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Fix sparse errors by making sure the fast assign destinations
are host cpu typed.
For the void __iomem *, just make the field match source
data.
Fix a bug where the hw_free trace printed the pointer vs.
the dereferenced value.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/hfi1/trace_ctxts.h | 8 ++--
drivers/infiniband/hw/hfi1/trace_tx.h | 54 +++++++++++++++---------------
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/trace_ctxts.h b/drivers/infiniband/hw/hfi1/trace_ctxts.h
index 5052d49..31654bb 100644
--- a/drivers/infiniband/hw/hfi1/trace_ctxts.h
+++ b/drivers/infiniband/hw/hfi1/trace_ctxts.h
@@ -56,7 +56,7 @@
#define TRACE_SYSTEM hfi1_ctxts
#define UCTXT_FMT \
- "cred:%u, credaddr:0x%llx, piobase:0x%llx, rcvhdr_cnt:%u, " \
+ "cred:%u, credaddr:0x%llx, piobase:0x%p, rcvhdr_cnt:%u, " \
"rcvbase:0x%llx, rcvegrc:%u, rcvegrb:0x%llx"
TRACE_EVENT(hfi1_uctxtdata,
TP_PROTO(struct hfi1_devdata *dd, struct hfi1_ctxtdata *uctxt),
@@ -65,7 +65,7 @@ TRACE_EVENT(hfi1_uctxtdata,
__field(unsigned int, ctxt)
__field(u32, credits)
__field(u64, hw_free)
- __field(u64, piobase)
+ __field(void __iomem *, piobase)
__field(u16, rcvhdrq_cnt)
__field(u64, rcvhdrq_phys)
__field(u32, eager_cnt)
@@ -74,8 +74,8 @@ TRACE_EVENT(hfi1_uctxtdata,
TP_fast_assign(DD_DEV_ASSIGN(dd);
__entry->ctxt = uctxt->ctxt;
__entry->credits = uctxt->sc->credits;
- __entry->hw_free = (u64)uctxt->sc->hw_free;
- __entry->piobase = (u64)uctxt->sc->base_addr;
+ __entry->hw_free = le64_to_cpu(*uctxt->sc->hw_free);
+ __entry->piobase = uctxt->sc->base_addr;
__entry->rcvhdrq_cnt = uctxt->rcvhdrq_cnt;
__entry->rcvhdrq_phys = uctxt->rcvhdrq_phys;
__entry->eager_cnt = uctxt->egrbufs.alloced;
diff --git a/drivers/infiniband/hw/hfi1/trace_tx.h b/drivers/infiniband/hw/hfi1/trace_tx.h
index 79c93ec..415d6be 100644
--- a/drivers/infiniband/hw/hfi1/trace_tx.h
+++ b/drivers/infiniband/hw/hfi1/trace_tx.h
@@ -369,22 +369,22 @@ TRACE_EVENT(hfi1_sdma_user_header,
__field(u16, ctxt)
__field(u8, subctxt)
__field(u16, req)
- __field(__le32, pbc0)
- __field(__le32, pbc1)
- __field(__be32, lrh0)
- __field(__be32, lrh1)
- __field(__be32, bth0)
- __field(__be32, bth1)
- __field(__be32, bth2)
- __field(__le32, kdeth0)
- __field(__le32, kdeth1)
- __field(__le32, kdeth2)
- __field(__le32, kdeth3)
- __field(__le32, kdeth4)
- __field(__le32, kdeth5)
- __field(__le32, kdeth6)
- __field(__le32, kdeth7)
- __field(__le32, kdeth8)
+ __field(u32, pbc0)
+ __field(u32, pbc1)
+ __field(u32, lrh0)
+ __field(u32, lrh1)
+ __field(u32, bth0)
+ __field(u32, bth1)
+ __field(u32, bth2)
+ __field(u32, kdeth0)
+ __field(u32, kdeth1)
+ __field(u32, kdeth2)
+ __field(u32, kdeth3)
+ __field(u32, kdeth4)
+ __field(u32, kdeth5)
+ __field(u32, kdeth6)
+ __field(u32, kdeth7)
+ __field(u32, kdeth8)
__field(u32, tidval)
),
TP_fast_assign(
@@ -397,22 +397,22 @@ TRACE_EVENT(hfi1_sdma_user_header,
__entry->ctxt = ctxt;
__entry->subctxt = subctxt;
__entry->req = req;
- __entry->pbc0 = pbc[0];
- __entry->pbc1 = pbc[1];
+ __entry->pbc0 = le32_to_cpu(pbc[0]);
+ __entry->pbc1 = le32_to_cpu(pbc[1]);
__entry->lrh0 = be32_to_cpu(lrh[0]);
__entry->lrh1 = be32_to_cpu(lrh[1]);
__entry->bth0 = be32_to_cpu(bth[0]);
__entry->bth1 = be32_to_cpu(bth[1]);
__entry->bth2 = be32_to_cpu(bth[2]);
- __entry->kdeth0 = kdeth[0];
- __entry->kdeth1 = kdeth[1];
- __entry->kdeth2 = kdeth[2];
- __entry->kdeth3 = kdeth[3];
- __entry->kdeth4 = kdeth[4];
- __entry->kdeth5 = kdeth[5];
- __entry->kdeth6 = kdeth[6];
- __entry->kdeth7 = kdeth[7];
- __entry->kdeth8 = kdeth[8];
+ __entry->kdeth0 = le32_to_cpu(kdeth[0]);
+ __entry->kdeth1 = le32_to_cpu(kdeth[1]);
+ __entry->kdeth2 = le32_to_cpu(kdeth[2]);
+ __entry->kdeth3 = le32_to_cpu(kdeth[3]);
+ __entry->kdeth4 = le32_to_cpu(kdeth[4]);
+ __entry->kdeth5 = le32_to_cpu(kdeth[5]);
+ __entry->kdeth6 = le32_to_cpu(kdeth[6]);
+ __entry->kdeth7 = le32_to_cpu(kdeth[7]);
+ __entry->kdeth8 = le32_to_cpu(kdeth[8]);
__entry->tidval = tidval;
),
TP_printk(USDMA_HDR_FORMAT,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-07-01 23:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 23:00 [PATCH for-next 00/18] IB/hfi1, rdmavt, qib: First batch of fixes for 4.8 Dennis Dalessandro
[not found] ` <20160701225824.20160.19055.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-07-01 23:00 ` [PATCH for-next 01/18] IB/hfi1: Clean up port state structure definition Dennis Dalessandro
2016-07-01 23:00 ` [PATCH for-next 02/18] IB/hfi1: Remove unnecessary done label in hfi1_write_iter Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 03/18] IB/hfi1: Fix typo Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 04/18] IB/hfi1: Separate tracepoints into specific headers Dennis Dalessandro
2016-07-01 23:01 ` Dennis Dalessandro [this message]
2016-07-01 23:01 ` [PATCH for-next 06/18] IB/hfi1: Add VL XmitDiscards counters to the opapmaquery Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 07/18] IB/hfi1: Add counter to track unsupported packets drop Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 08/18] IB/hfi1: Add global structure for affinity assignments Dennis Dalessandro
[not found] ` <20160701230127.20160.68709.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-07-25 14:52 ` [PATCH v2] " Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 09/18] IB/hfi1: Reserve and collapse CPU cores for contexts Dennis Dalessandro
[not found] ` <20160701230133.20160.76302.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-07-25 14:54 ` [PATCH v2] " Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 10/18] IB/hfi1: Refine user process affinity algorithm Dennis Dalessandro
[not found] ` <20160701230138.20160.5753.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-07-25 14:54 ` [PATCH v2] " Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 11/18] IB/hfi1: Use built-in i2c bit-shift bus adapter Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 12/18] IB/hfi1: Remove TWSI references Dennis Dalessandro
2016-07-01 23:01 ` [PATCH for-next 13/18] IB/hfi1: Improve SDMA engine assignment for user SDMA Dennis Dalessandro
2016-07-01 23:02 ` [PATCH for-next 14/18] IB/hfi1: Correct receive packet handler assignment Dennis Dalessandro
2016-07-01 23:02 ` [PATCH for-next 15/18] IB/rdmavt: Add data structures and routines for table driven post send Dennis Dalessandro
2016-07-01 23:02 ` [PATCH for-next 16/18] IB/hfi1: Add hfi1 post send tables Dennis Dalessandro
2016-07-01 23:02 ` [PATCH for-next 17/18] IB/qib: Add qib post send table Dennis Dalessandro
2016-07-01 23:02 ` [PATCH for-next 18/18] IB/rdmavt: Use new driver specific " Dennis Dalessandro
2016-08-02 19:58 ` [PATCH for-next 00/18] IB/hfi1, rdmavt, qib: First batch of fixes for 4.8 Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160701230111.20160.9865.stgit@scvm10.sc.intel.com \
--to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox