int msix_shift, int total_shift)
{
struct pci_dev *pdev;
- int rc, i, msix_count;
+ int rc, i, msix_count, node;
pdev = ndev_pdev(ndev);
+ node = dev_to_node(&pdev->dev);
+
/* Mask all doorbell interrupts */
ndev->db_mask = ndev->db_valid_mask;
ndev->reg->db_iowrite(ndev->db_mask,
/* Try to set up msix irq */
- ndev->vec = kcalloc(msix_max, sizeof(*ndev->vec), GFP_KERNEL);
+ ndev->vec = kzalloc_node(msix_max * sizeof(*ndev->vec),
+ GFP_KERNEL, node);
if (!ndev->vec)
goto err_msix_vec_alloc;
- ndev->msix = kcalloc(msix_max, sizeof(*ndev->msix), GFP_KERNEL);
+ ndev->msix = kzalloc_node(msix_max * sizeof(*ndev->msix),
+ GFP_KERNEL, node);
if (!ndev->msix)
goto err_msix_alloc;
const struct pci_device_id *id)
{
struct intel_ntb_dev *ndev;
- int rc;
+ int rc, node;
+
+ node = dev_to_node(&pdev->dev);
if (pdev_is_bwd(pdev)) {
- ndev = kzalloc(sizeof(*ndev), GFP_KERNEL);
+ ndev = kzalloc_node(sizeof(*ndev), GFP_KERNEL, node);
if (!ndev) {
rc = -ENOMEM;
goto err_ndev;
goto err_init_dev;
} else if (pdev_is_snb(pdev)) {
- ndev = kzalloc(sizeof(*ndev), GFP_KERNEL);
+ ndev = kzalloc_node(sizeof(*ndev), GFP_KERNEL, node);
if (!ndev) {
rc = -ENOMEM;
goto err_ndev;