Commit 8df8a34d authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] IB/mthca: allow address handle creation in interrupt context

Make address handle verbs usable from interrupt context.
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2a4443a6
...@@ -63,7 +63,7 @@ int mthca_create_ah(struct mthca_dev *dev, ...@@ -63,7 +63,7 @@ int mthca_create_ah(struct mthca_dev *dev,
ah->type = MTHCA_AH_PCI_POOL; ah->type = MTHCA_AH_PCI_POOL;
if (dev->hca_type == ARBEL_NATIVE) { if (dev->hca_type == ARBEL_NATIVE) {
ah->av = kmalloc(sizeof *ah->av, GFP_KERNEL); ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC);
if (!ah->av) if (!ah->av)
return -ENOMEM; return -ENOMEM;
...@@ -77,7 +77,7 @@ int mthca_create_ah(struct mthca_dev *dev, ...@@ -77,7 +77,7 @@ int mthca_create_ah(struct mthca_dev *dev,
if (index == -1) if (index == -1)
goto on_hca_fail; goto on_hca_fail;
av = kmalloc(sizeof *av, GFP_KERNEL); av = kmalloc(sizeof *av, GFP_ATOMIC);
if (!av) if (!av)
goto on_hca_fail; goto on_hca_fail;
...@@ -89,7 +89,7 @@ int mthca_create_ah(struct mthca_dev *dev, ...@@ -89,7 +89,7 @@ int mthca_create_ah(struct mthca_dev *dev,
on_hca_fail: on_hca_fail:
if (ah->type == MTHCA_AH_PCI_POOL) { if (ah->type == MTHCA_AH_PCI_POOL) {
ah->av = pci_pool_alloc(dev->av_table.pool, ah->av = pci_pool_alloc(dev->av_table.pool,
SLAB_KERNEL, &ah->avdma); SLAB_ATOMIC, &ah->avdma);
if (!ah->av) if (!ah->av)
return -ENOMEM; return -ENOMEM;
......
...@@ -315,7 +315,7 @@ static struct ib_ah *mthca_ah_create(struct ib_pd *pd, ...@@ -315,7 +315,7 @@ static struct ib_ah *mthca_ah_create(struct ib_pd *pd,
int err; int err;
struct mthca_ah *ah; struct mthca_ah *ah;
ah = kmalloc(sizeof *ah, GFP_KERNEL); ah = kmalloc(sizeof *ah, GFP_ATOMIC);
if (!ah) if (!ah)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment