diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ntb/hw/intel/ntb_hw_intel.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c index c5ad7cb1706d..236b7d33b5af 100644 --- a/drivers/ntb/hw/intel/ntb_hw_intel.c +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c | |||
| @@ -413,10 +413,12 @@ static int ndev_init_isr(struct intel_ntb_dev *ndev, | |||
| 413 | int msix_shift, int total_shift) | 413 | int msix_shift, int total_shift) |
| 414 | { | 414 | { |
| 415 | struct pci_dev *pdev; | 415 | struct pci_dev *pdev; |
| 416 | int rc, i, msix_count; | 416 | int rc, i, msix_count, node; |
| 417 | 417 | ||
| 418 | pdev = ndev_pdev(ndev); | 418 | pdev = ndev_pdev(ndev); |
| 419 | 419 | ||
| 420 | node = dev_to_node(&pdev->dev); | ||
| 421 | |||
| 420 | /* Mask all doorbell interrupts */ | 422 | /* Mask all doorbell interrupts */ |
| 421 | ndev->db_mask = ndev->db_valid_mask; | 423 | ndev->db_mask = ndev->db_valid_mask; |
| 422 | ndev->reg->db_iowrite(ndev->db_mask, | 424 | ndev->reg->db_iowrite(ndev->db_mask, |
| @@ -425,11 +427,13 @@ static int ndev_init_isr(struct intel_ntb_dev *ndev, | |||
| 425 | 427 | ||
| 426 | /* Try to set up msix irq */ | 428 | /* Try to set up msix irq */ |
| 427 | 429 | ||
| 428 | ndev->vec = kcalloc(msix_max, sizeof(*ndev->vec), GFP_KERNEL); | 430 | ndev->vec = kzalloc_node(msix_max * sizeof(*ndev->vec), |
| 431 | GFP_KERNEL, node); | ||
| 429 | if (!ndev->vec) | 432 | if (!ndev->vec) |
| 430 | goto err_msix_vec_alloc; | 433 | goto err_msix_vec_alloc; |
| 431 | 434 | ||
| 432 | ndev->msix = kcalloc(msix_max, sizeof(*ndev->msix), GFP_KERNEL); | 435 | ndev->msix = kzalloc_node(msix_max * sizeof(*ndev->msix), |
| 436 | GFP_KERNEL, node); | ||
| 433 | if (!ndev->msix) | 437 | if (!ndev->msix) |
| 434 | goto err_msix_alloc; | 438 | goto err_msix_alloc; |
| 435 | 439 | ||
| @@ -1955,10 +1959,12 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev, | |||
| 1955 | const struct pci_device_id *id) | 1959 | const struct pci_device_id *id) |
| 1956 | { | 1960 | { |
| 1957 | struct intel_ntb_dev *ndev; | 1961 | struct intel_ntb_dev *ndev; |
| 1958 | int rc; | 1962 | int rc, node; |
| 1963 | |||
| 1964 | node = dev_to_node(&pdev->dev); | ||
| 1959 | 1965 | ||
| 1960 | if (pdev_is_bwd(pdev)) { | 1966 | if (pdev_is_bwd(pdev)) { |
| 1961 | ndev = kzalloc(sizeof(*ndev), GFP_KERNEL); | 1967 | ndev = kzalloc_node(sizeof(*ndev), GFP_KERNEL, node); |
| 1962 | if (!ndev) { | 1968 | if (!ndev) { |
| 1963 | rc = -ENOMEM; | 1969 | rc = -ENOMEM; |
| 1964 | goto err_ndev; | 1970 | goto err_ndev; |
| @@ -1975,7 +1981,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev, | |||
| 1975 | goto err_init_dev; | 1981 | goto err_init_dev; |
| 1976 | 1982 | ||
| 1977 | } else if (pdev_is_snb(pdev)) { | 1983 | } else if (pdev_is_snb(pdev)) { |
| 1978 | ndev = kzalloc(sizeof(*ndev), GFP_KERNEL); | 1984 | ndev = kzalloc_node(sizeof(*ndev), GFP_KERNEL, node); |
| 1979 | if (!ndev) { | 1985 | if (!ndev) { |
| 1980 | rc = -ENOMEM; | 1986 | rc = -ENOMEM; |
| 1981 | goto err_ndev; | 1987 | goto err_ndev; |
