diff options
author | Roland Dreier <roland@topspin.com> | 2005-06-27 14:36:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 15:11:44 -0700 |
commit | 64dc81fca7f6d5c51e50ffa850640ad8358acd1f (patch) | |
tree | 919ca8d2ea8567a1de4bba989a123b77340b989a /drivers/infiniband/hw/mthca/mthca_eq.c | |
parent | bb2af78bcdbb8801791de33f1775c98b9178daab (diff) | |
download | op-kernel-dev-64dc81fca7f6d5c51e50ffa850640ad8358acd1f.zip op-kernel-dev-64dc81fca7f6d5c51e50ffa850640ad8358acd1f.tar.gz |
[PATCH] IB/mthca: Use dma_alloc_coherent instead of pci_alloc_consistent
Switch all allocations of coherent memory from pci_alloc_consistent() to
dma_alloc_coherent(), so that we can pass GFP_KERNEL. This should help when
the system is low on memory.
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_eq.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_eq.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index 7500ebc..970cba2 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c @@ -501,8 +501,8 @@ static int __devinit mthca_create_eq(struct mthca_dev *dev, eq_context = MAILBOX_ALIGN(mailbox); for (i = 0; i < npages; ++i) { - eq->page_list[i].buf = pci_alloc_consistent(dev->pdev, - PAGE_SIZE, &t); + eq->page_list[i].buf = dma_alloc_coherent(&dev->pdev->dev, + PAGE_SIZE, &t, GFP_KERNEL); if (!eq->page_list[i].buf) goto err_out_free; @@ -582,10 +582,10 @@ static int __devinit mthca_create_eq(struct mthca_dev *dev, err_out_free: for (i = 0; i < npages; ++i) if (eq->page_list[i].buf) - pci_free_consistent(dev->pdev, PAGE_SIZE, - eq->page_list[i].buf, - pci_unmap_addr(&eq->page_list[i], - mapping)); + dma_free_coherent(&dev->pdev->dev, PAGE_SIZE, + eq->page_list[i].buf, + pci_unmap_addr(&eq->page_list[i], + mapping)); kfree(eq->page_list); kfree(dma_list); |