aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma_v2.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-08 15:01:49 -0400
committerDan Williams <dan.j.williams@intel.com>2009-09-08 20:30:24 -0400
commit09c8a5b85e5f1e74a19bdd7c85547429d51df1cd (patch)
tree9bb255d9f596ab062996de49032875e8b9253971 /drivers/dma/ioat/dma_v2.h
parentad643f54c8514998333bc6c7b201fda2267496be (diff)
ioat: switch watchdog and reset handler from workqueue to timer
In order to support dynamic resizing of the descriptor ring or polling for a descriptor in the presence of a hung channel the reset handler needs to make progress while in a non-preemptible context. The current workqueue implementation precludes polling channel reset completion under spin_lock(). This conversion also allows us to return to opportunistic cleanup in the ioat2 case as the timer implementation guarantees at least one cleanup after every descriptor is submitted. This means the worst case completion latency becomes the timer frequency (for exceptional circumstances), but with the benefit of avoiding busy waiting when the lock is contended. Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma_v2.h')
-rw-r--r--drivers/dma/ioat/dma_v2.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/ioat/dma_v2.h b/drivers/dma/ioat/dma_v2.h
index bdde5373cf66..73b04a2eb4b0 100644
--- a/drivers/dma/ioat/dma_v2.h
+++ b/drivers/dma/ioat/dma_v2.h
@@ -127,6 +127,16 @@ ioat2_get_ring_ent(struct ioat2_dma_chan *ioat, u16 idx)
127 return ioat->ring[idx & ioat2_ring_mask(ioat)]; 127 return ioat->ring[idx & ioat2_ring_mask(ioat)];
128} 128}
129 129
130static inline void ioat2_set_chainaddr(struct ioat2_dma_chan *ioat, u64 addr)
131{
132 struct ioat_chan_common *chan = &ioat->base;
133
134 writel(addr & 0x00000000FFFFFFFF,
135 chan->reg_base + IOAT2_CHAINADDR_OFFSET_LOW);
136 writel(addr >> 32,
137 chan->reg_base + IOAT2_CHAINADDR_OFFSET_HIGH);
138}
139
130int __devinit ioat2_dma_probe(struct ioatdma_device *dev, int dca); 140int __devinit ioat2_dma_probe(struct ioatdma_device *dev, int dca);
131int __devinit ioat3_dma_probe(struct ioatdma_device *dev, int dca); 141int __devinit ioat3_dma_probe(struct ioatdma_device *dev, int dca);
132struct dca_provider * __devinit ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase); 142struct dca_provider * __devinit ioat2_dca_init(struct pci_dev *pdev, void __iomem *iobase);