|
@@ -297,14 +297,15 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt,
|
|
* The resulting value will be rounded down to the closest
|
|
* The resulting value will be rounded down to the closest
|
|
* multiple of dd->rcv_entries.group_size.
|
|
* multiple of dd->rcv_entries.group_size.
|
|
*/
|
|
*/
|
|
- rcd->egrbufs.buffers = kcalloc(rcd->egrbufs.count,
|
|
|
|
- sizeof(*rcd->egrbufs.buffers),
|
|
|
|
- GFP_KERNEL);
|
|
|
|
|
|
+ rcd->egrbufs.buffers = kzalloc_node(
|
|
|
|
+ rcd->egrbufs.count * sizeof(*rcd->egrbufs.buffers),
|
|
|
|
+ GFP_KERNEL, numa);
|
|
if (!rcd->egrbufs.buffers)
|
|
if (!rcd->egrbufs.buffers)
|
|
goto bail;
|
|
goto bail;
|
|
- rcd->egrbufs.rcvtids = kcalloc(rcd->egrbufs.count,
|
|
|
|
- sizeof(*rcd->egrbufs.rcvtids),
|
|
|
|
- GFP_KERNEL);
|
|
|
|
|
|
+ rcd->egrbufs.rcvtids = kzalloc_node(
|
|
|
|
+ rcd->egrbufs.count *
|
|
|
|
+ sizeof(*rcd->egrbufs.rcvtids),
|
|
|
|
+ GFP_KERNEL, numa);
|
|
if (!rcd->egrbufs.rcvtids)
|
|
if (!rcd->egrbufs.rcvtids)
|
|
goto bail;
|
|
goto bail;
|
|
rcd->egrbufs.size = eager_buffer_size;
|
|
rcd->egrbufs.size = eager_buffer_size;
|
|
@@ -322,8 +323,8 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt,
|
|
rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE;
|
|
rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE;
|
|
|
|
|
|
if (ctxt < dd->first_user_ctxt) { /* N/A for PSM contexts */
|
|
if (ctxt < dd->first_user_ctxt) { /* N/A for PSM contexts */
|
|
- rcd->opstats = kzalloc(sizeof(*rcd->opstats),
|
|
|
|
- GFP_KERNEL);
|
|
|
|
|
|
+ rcd->opstats = kzalloc_node(sizeof(*rcd->opstats),
|
|
|
|
+ GFP_KERNEL, numa);
|
|
if (!rcd->opstats)
|
|
if (!rcd->opstats)
|
|
goto bail;
|
|
goto bail;
|
|
}
|
|
}
|