提交 31acd18b 编写于 作者: M Mike Marciniszyn 提交者: Doug Ledford

IB/hfi1: Take advantage of kvzalloc_node in sdma initialization

The code that allocates the tx ring in the sdma code fails to take
advantage of kvzalloc variations.

Fix by converting to use kvzalloc_node.
Reported-by: NLeon Romanovsky <leon@kernel.org>
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 45a041cc
......@@ -1465,13 +1465,8 @@ int sdma_init(struct hfi1_devdata *dd, u8 port)
if (!sde->descq)
goto bail;
sde->tx_ring =
kcalloc(descq_cnt, sizeof(struct sdma_txreq *),
GFP_KERNEL);
if (!sde->tx_ring)
sde->tx_ring =
vzalloc(
sizeof(struct sdma_txreq *) *
descq_cnt);
kvzalloc_node(sizeof(struct sdma_txreq *) * descq_cnt,
GFP_KERNEL, dd->node);
if (!sde->tx_ring)
goto bail;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册