summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2016-02-10 15:00:32 -0700
committerVinod Koul <vinod.koul@intel.com>2016-02-15 23:06:53 +0530
commitdd4645ebb7d100bb04ba38ec58b499cbe95322fa (patch)
tree3d1a8fff4a89b359952d77249dcccc5a9cc9276c /drivers/dma/ioat/dma.h
parentcd60cd96137f6cb3ea82cace9225626619e7a52d (diff)
downloadlinux-dd4645ebb7d100bb04ba38ec58b499cbe95322fa.tar.gz
linux-dd4645ebb7d100bb04ba38ec58b499cbe95322fa.tar.bz2
linux-dd4645ebb7d100bb04ba38ec58b499cbe95322fa.zip
dmaengine: IOATDMA: Allocate DMA descriptor ring in contig DMA memory
Future IOATDMA hardware will take advantage of descriptors residing in contiguous memory. Setting the descriptor ring in max config DMA memory of 2MB. Each channel will need 2 of these chunks. This should provide 64k of 64B descriptors. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.h')
-rw-r--r--drivers/dma/ioat/dma.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index 5f2f9fbcf184..57a9b83db455 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -62,7 +62,6 @@ enum ioat_irq_mode {
* struct ioatdma_device - internal representation of a IOAT device
* @pdev: PCI-Express device
* @reg_base: MMIO register space base address
- * @dma_pool: for allocating DMA descriptors
* @completion_pool: DMA buffers for completion ops
* @sed_hw_pool: DMA super descriptor pools
* @dma_dev: embedded struct dma_device
@@ -76,7 +75,6 @@ enum ioat_irq_mode {
struct ioatdma_device {
struct pci_dev *pdev;
void __iomem *reg_base;
- struct dma_pool *dma_pool;
struct dma_pool *completion_pool;
#define MAX_SED_POOLS 5
struct dma_pool *sed_hw_pool[MAX_SED_POOLS];
@@ -90,6 +88,11 @@ struct ioatdma_device {
u32 cap;
};
+struct ioat_descs {
+ void *virt;
+ dma_addr_t hw;
+};
+
struct ioatdma_chan {
struct dma_chan dma_chan;
void __iomem *reg_base;
@@ -132,6 +135,8 @@ struct ioatdma_chan {
u16 produce;
struct ioat_ring_ent **ring;
spinlock_t prep_lock;
+ struct ioat_descs descs[2];
+ int desc_chunks;
};
struct ioat_sysfs_entry {
@@ -301,6 +306,8 @@ static inline bool is_ioat_bug(unsigned long err)
}
#define IOAT_MAX_ORDER 16
+#define IOAT_MAX_DESCS 65536
+#define IOAT_DESCS_PER_2M 32768
static inline u32 ioat_ring_size(struct ioatdma_chan *ioat_chan)
{