Skip to contentSkip to conversation

ioatdma: make debug output more readable

PATCH Superseded Dave Jiang 3 participants 5 messages Mar 4, 2013 – Mar 7, 2013 dmaengine

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dave Jiang

author
#0 lore raw

PATCH 1/1 ioatdma: make debug output more readable

Making OP field a hex instead of integer to make it more readable. Also add the dump out of the NEXT field.

---
 drivers/dma/ioat/dma.h    |    2 +-
 drivers/dma/ioat/dma_v3.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.h +1 -1
index 53a4cbb..95ae7b3 100644
@@ -179,7 +179,7 @@ __dump_desc_dbg(struct ioat_chan_common *chan, struct ioat_dma_descriptor *hw,
 	struct device *dev = to_dev(chan);
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x"
-		" ctl: %#x (op: %d int_en: %d compl: %d)\n", id,
+		" ctl: %#10.8x (op: %#x int_en: %d compl: %d)\n", id,
 		(unsigned long long) tx->phys,
 		(unsigned long long) hw->next, tx->cookie, tx->flags,
 		hw->ctl, hw->ctl_f.op, hw->ctl_f.int_en, hw->ctl_f.compl_write);
drivers/dma/ioat/dma_v3.c +2 -1
index 53ea4bd..ce6fcee 100644
@@ -605,7 +605,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 	int i;
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) flags: %#x"
-		" sz: %#x ctl: %#x (op: %d int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
+		" sz: %#10.8x ctl: %#x (op: %#x int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
 		desc_id(desc), (unsigned long long) desc->txd.phys,
 		(unsigned long long) (pq_ex ? pq_ex->next : pq->next),
 		desc->txd.flags, pq->size, pq->ctl, pq->ctl_f.op, pq->ctl_f.int_en,
@@ -617,6 +617,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 			(unsigned long long) pq_get_src(descs, i), pq->coef[i]);
 	dev_dbg(dev, "\tP: %#llx\n", pq->p_addr);
 	dev_dbg(dev, "\tQ: %#llx\n", pq->q_addr);
+	dev_dbg(dev, "\tNEXT: %#llx\n", pq->next);
 }
 
 static struct dma_async_tx_descriptor *
#1 lore raw
Quoted 45 lines · Dave Jiang

Making OP field a hex instead of integer to make it more readable. Also add
the dump out of the NEXT field.

---

drivers/dma/ioat/dma.h    |    2 +-
drivers/dma/ioat/dma_v3.c |    3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.h +1 -1
index 53a4cbb..95ae7b3 100644
@@ -179,7 +179,7 @@ __dump_desc_dbg(struct ioat_chan_common *chan, struct
 ioat_dma_descriptor *hw,
 	struct device *dev = to_dev(chan);
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x"
-		" ctl: %#x (op: %d int_en: %d compl: %d)\n", id,
+		" ctl: %#10.8x (op: %#x int_en: %d compl: %d)\n", id,
 		(unsigned long long) tx->phys,
 		(unsigned long long) hw->next, tx->cookie, tx->flags,
		hw->ctl, hw->ctl_f.op, hw->ctl_f.int_en, hw->ctl_f.compl_write);
drivers/dma/ioat/dma_v3.c +0 -0
index 53ea4bd..ce6fcee 100644
@@ -605,7 +605,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct

ioat_ring_ent *desc, struct

	int i;

	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) flags: %#x"
drivers/dma/ioat/dma_v3.c +0 -1
-		" sz: %#x ctl: %#x (op: %d int: %d compl: %d pq: '%s%s' src_cnt:

%d)\n",

drivers/dma/ioat/dma_v3.c +1 -0
+		" sz: %#10.8x ctl: %#x (op: %#x int: %d compl: %d pq: '%s%s' src_cnt:

%d)\n",

		desc_id(desc), (unsigned long long) desc->txd.phys,
		(unsigned long long) (pq_ex ? pq_ex->next : pq->next),
		desc->txd.flags, pq->size, pq->ctl, pq->ctl_f.op, pq->ctl_f.int_en,
drivers/dma/ioat/dma_v3.c +0 -0
@@ -617,6 +617,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct

ioat_ring_ent *desc, struct

			(unsigned long long) pq_get_src(descs, i), pq->coef[i]);
	dev_dbg(dev, "\tP: %#llx\n", pq->p_addr);
	dev_dbg(dev, "\tQ: %#llx\n", pq->q_addr);

drivers/dma/ioat/dma_v3.c dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct · line 620

Quoted 1 line
drivers/dma/ioat/dma_v3.c +1 -0
+	dev_dbg(dev, "\tNEXT: %#llx\n", pq->next);

Looks ok, did you want to distinguish when ->next is pointing to an extended descriptor?

author
#2 lore raw
Quoted 35 lines · Dan Williams
Quoted 32 lines · Dave Jiang

Making OP field a hex instead of integer to make it more readable. Also add
the dump out of the NEXT field.

---

drivers/dma/ioat/dma.h    |    2 +-
drivers/dma/ioat/dma_v3.c |    3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.h +1 -1
index 53a4cbb..95ae7b3 100644
@@ -179,7 +179,7 @@ __dump_desc_dbg(struct ioat_chan_common *chan, struct
 ioat_dma_descriptor *hw,
 	struct device *dev = to_dev(chan);
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x"
-		" ctl: %#x (op: %d int_en: %d compl: %d)\n", id,
+		" ctl: %#10.8x (op: %#x int_en: %d compl: %d)\n", id,
 		(unsigned long long) tx->phys,
 		(unsigned long long) hw->next, tx->cookie, tx->flags,
		hw->ctl, hw->ctl_f.op, hw->ctl_f.int_en, hw->ctl_f.compl_write);
drivers/dma/ioat/dma_v3.c +0 -0
index 53ea4bd..ce6fcee 100644
@@ -605,7 +605,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct

ioat_ring_ent *desc, struct

	int i;
Quoted 16 lines
Quoted 13 lines
	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) flags: %#x"
drivers/dma/ioat/dma_v3.c +0 -1
-		" sz: %#x ctl: %#x (op: %d int: %d compl: %d pq: '%s%s' src_cnt:

%d)\n",

drivers/dma/ioat/dma_v3.c +1 -0
+		" sz: %#10.8x ctl: %#x (op: %#x int: %d compl: %d pq: '%s%s' src_cnt:

%d)\n",

		desc_id(desc), (unsigned long long) desc->txd.phys,
		(unsigned long long) (pq_ex ? pq_ex->next : pq->next),
		desc->txd.flags, pq->size, pq->ctl, pq->ctl_f.op, pq->ctl_f.int_en,
drivers/dma/ioat/dma_v3.c +0 -0
@@ -617,6 +617,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct

ioat_ring_ent *desc, struct

			(unsigned long long) pq_get_src(descs, i), pq->coef[i]);
	dev_dbg(dev, "\tP: %#llx\n", pq->p_addr);
	dev_dbg(dev, "\tQ: %#llx\n", pq->q_addr);

drivers/dma/ioat/dma_v3.c dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct · line 620

Quoted 1 line
drivers/dma/ioat/dma_v3.c +1 -0
+	dev_dbg(dev, "\tNEXT: %#llx\n", pq->next);

Looks ok, did you want to distinguish when ->next is pointing to an extended descriptor?

Probably a good idea. Let me add that

#3 lore raw
In reply to Dave Jiang
Quoted 4 lines · Dave Jiang

Making OP field a hex instead of integer to make it more readable. Also add the dump out of the NEXT field.

Applied thanks

Quoted 40 lines
---
 drivers/dma/ioat/dma.h    |    2 +-
 drivers/dma/ioat/dma_v3.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.h +1 -1
index 53a4cbb..95ae7b3 100644
@@ -179,7 +179,7 @@ __dump_desc_dbg(struct ioat_chan_common *chan, struct ioat_dma_descriptor *hw,
 	struct device *dev = to_dev(chan);
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x"
-		" ctl: %#x (op: %d int_en: %d compl: %d)\n", id,
+		" ctl: %#10.8x (op: %#x int_en: %d compl: %d)\n", id,
 		(unsigned long long) tx->phys,
 		(unsigned long long) hw->next, tx->cookie, tx->flags,
 		hw->ctl, hw->ctl_f.op, hw->ctl_f.int_en, hw->ctl_f.compl_write);
drivers/dma/ioat/dma_v3.c +2 -1
index 53ea4bd..ce6fcee 100644
@@ -605,7 +605,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 	int i;
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) flags: %#x"
-		" sz: %#x ctl: %#x (op: %d int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
+		" sz: %#10.8x ctl: %#x (op: %#x int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
 		desc_id(desc), (unsigned long long) desc->txd.phys,
 		(unsigned long long) (pq_ex ? pq_ex->next : pq->next),
 		desc->txd.flags, pq->size, pq->ctl, pq->ctl_f.op, pq->ctl_f.int_en,
@@ -617,6 +617,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 			(unsigned long long) pq_get_src(descs, i), pq->coef[i]);
 	dev_dbg(dev, "\tP: %#llx\n", pq->p_addr);
 	dev_dbg(dev, "\tQ: %#llx\n", pq->q_addr);
+	dev_dbg(dev, "\tNEXT: %#llx\n", pq->next);
 }
 
 static struct dma_async_tx_descriptor *
#4 lore raw
In reply to Dave Jiang
Quoted 4 lines · Dave Jiang

Making OP field a hex instead of integer to make it more readable. Also add the dump out of the NEXT field.

Applied Thanks

Quoted 40 lines
---
 drivers/dma/ioat/dma.h    |    2 +-
 drivers/dma/ioat/dma_v3.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/dma/ioat/dma.h +1 -1
index 53a4cbb..95ae7b3 100644
@@ -179,7 +179,7 @@ __dump_desc_dbg(struct ioat_chan_common *chan, struct ioat_dma_descriptor *hw,
 	struct device *dev = to_dev(chan);
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) cookie: %d flags: %#x"
-		" ctl: %#x (op: %d int_en: %d compl: %d)\n", id,
+		" ctl: %#10.8x (op: %#x int_en: %d compl: %d)\n", id,
 		(unsigned long long) tx->phys,
 		(unsigned long long) hw->next, tx->cookie, tx->flags,
 		hw->ctl, hw->ctl_f.op, hw->ctl_f.int_en, hw->ctl_f.compl_write);
drivers/dma/ioat/dma_v3.c +2 -1
index 53ea4bd..ce6fcee 100644
@@ -605,7 +605,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 	int i;
 
 	dev_dbg(dev, "desc[%d]: (%#llx->%#llx) flags: %#x"
-		" sz: %#x ctl: %#x (op: %d int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
+		" sz: %#10.8x ctl: %#x (op: %#x int: %d compl: %d pq: '%s%s' src_cnt: %d)\n",
 		desc_id(desc), (unsigned long long) desc->txd.phys,
 		(unsigned long long) (pq_ex ? pq_ex->next : pq->next),
 		desc->txd.flags, pq->size, pq->ctl, pq->ctl_f.op, pq->ctl_f.int_en,
@@ -617,6 +617,7 @@ dump_pq_desc_dbg(struct ioat2_dma_chan *ioat, struct ioat_ring_ent *desc, struct
 			(unsigned long long) pq_get_src(descs, i), pq->coef[i]);
 	dev_dbg(dev, "\tP: %#llx\n", pq->p_addr);
 	dev_dbg(dev, "\tQ: %#llx\n", pq->q_addr);
+	dev_dbg(dev, "\tNEXT: %#llx\n", pq->next);
 }
 
 static struct dma_async_tx_descriptor *