diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-12 17:19:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-12 17:19:47 -0500 |
commit | 0a6cb34f46c22cc10e7400c1673ac978fc5c056e (patch) | |
tree | 9c1a609565851ebfef4ac600bb93433fbd6e467b | |
parent | 15e5cda9e676c712e56de9fb63079da6530d10ad (diff) | |
parent | 24c65bc7037e7d0f362c0df70d17dd72ee64b8b9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- stack corruption fix for pseries hwrng driver
- add missing DMA unmap in caam crypto driver
- fix NUMA crash in qat crypto driver
- fix buggy mapping of zero-length associated data in qat crypto driver
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
hwrng: pseries - port to new read API and fix stack corruption
crypto: caam - fix missing dma unmap on error path
crypto: qat - Enforce valid numa configuration
crypto: qat - Prevent dma mapping zero length assoc data
-rw-r--r-- | drivers/char/hw_random/pseries-rng.c | 11 | ||||
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 29 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_accel_devices.h | 3 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/adf_transport.c | 12 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_algs.c | 7 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_crypto.c | 8 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_dh895xcc/adf_admin.c | 2 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 32 | ||||
-rw-r--r-- | drivers/crypto/qat/qat_dh895xcc/adf_isr.c | 2 |
9 files changed, 53 insertions, 53 deletions
diff --git a/drivers/char/hw_random/pseries-rng.c b/drivers/char/hw_random/pseries-rng.c index 6226aa08c36a..bcf86f91800a 100644 --- a/drivers/char/hw_random/pseries-rng.c +++ b/drivers/char/hw_random/pseries-rng.c | |||
@@ -25,18 +25,21 @@ | |||
25 | #include <asm/vio.h> | 25 | #include <asm/vio.h> |
26 | 26 | ||
27 | 27 | ||
28 | static int pseries_rng_data_read(struct hwrng *rng, u32 *data) | 28 | static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) |
29 | { | 29 | { |
30 | u64 buffer[PLPAR_HCALL_BUFSIZE]; | ||
31 | size_t size = max < 8 ? max : 8; | ||
30 | int rc; | 32 | int rc; |
31 | 33 | ||
32 | rc = plpar_hcall(H_RANDOM, (unsigned long *)data); | 34 | rc = plpar_hcall(H_RANDOM, (unsigned long *)buffer); |
33 | if (rc != H_SUCCESS) { | 35 | if (rc != H_SUCCESS) { |
34 | pr_err_ratelimited("H_RANDOM call failed %d\n", rc); | 36 | pr_err_ratelimited("H_RANDOM call failed %d\n", rc); |
35 | return -EIO; | 37 | return -EIO; |
36 | } | 38 | } |
39 | memcpy(data, buffer, size); | ||
37 | 40 | ||
38 | /* The hypervisor interface returns 64 bits */ | 41 | /* The hypervisor interface returns 64 bits */ |
39 | return 8; | 42 | return size; |
40 | } | 43 | } |
41 | 44 | ||
42 | /** | 45 | /** |
@@ -55,7 +58,7 @@ static unsigned long pseries_rng_get_desired_dma(struct vio_dev *vdev) | |||
55 | 58 | ||
56 | static struct hwrng pseries_rng = { | 59 | static struct hwrng pseries_rng = { |
57 | .name = KBUILD_MODNAME, | 60 | .name = KBUILD_MODNAME, |
58 | .data_read = pseries_rng_data_read, | 61 | .read = pseries_rng_read, |
59 | }; | 62 | }; |
60 | 63 | ||
61 | static int __init pseries_rng_probe(struct vio_dev *dev, | 64 | static int __init pseries_rng_probe(struct vio_dev *dev, |
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index 871703c49d2c..e1eaf4ff9762 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c | |||
@@ -48,23 +48,29 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | |||
48 | u32 *desc; | 48 | u32 *desc; |
49 | struct split_key_result result; | 49 | struct split_key_result result; |
50 | dma_addr_t dma_addr_in, dma_addr_out; | 50 | dma_addr_t dma_addr_in, dma_addr_out; |
51 | int ret = 0; | 51 | int ret = -ENOMEM; |
52 | 52 | ||
53 | desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); | 53 | desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA); |
54 | if (!desc) { | 54 | if (!desc) { |
55 | dev_err(jrdev, "unable to allocate key input memory\n"); | 55 | dev_err(jrdev, "unable to allocate key input memory\n"); |
56 | return -ENOMEM; | 56 | return ret; |
57 | } | 57 | } |
58 | 58 | ||
59 | init_job_desc(desc, 0); | ||
60 | |||
61 | dma_addr_in = dma_map_single(jrdev, (void *)key_in, keylen, | 59 | dma_addr_in = dma_map_single(jrdev, (void *)key_in, keylen, |
62 | DMA_TO_DEVICE); | 60 | DMA_TO_DEVICE); |
63 | if (dma_mapping_error(jrdev, dma_addr_in)) { | 61 | if (dma_mapping_error(jrdev, dma_addr_in)) { |
64 | dev_err(jrdev, "unable to map key input memory\n"); | 62 | dev_err(jrdev, "unable to map key input memory\n"); |
65 | kfree(desc); | 63 | goto out_free; |
66 | return -ENOMEM; | ||
67 | } | 64 | } |
65 | |||
66 | dma_addr_out = dma_map_single(jrdev, key_out, split_key_pad_len, | ||
67 | DMA_FROM_DEVICE); | ||
68 | if (dma_mapping_error(jrdev, dma_addr_out)) { | ||
69 | dev_err(jrdev, "unable to map key output memory\n"); | ||
70 | goto out_unmap_in; | ||
71 | } | ||
72 | |||
73 | init_job_desc(desc, 0); | ||
68 | append_key(desc, dma_addr_in, keylen, CLASS_2 | KEY_DEST_CLASS_REG); | 74 | append_key(desc, dma_addr_in, keylen, CLASS_2 | KEY_DEST_CLASS_REG); |
69 | 75 | ||
70 | /* Sets MDHA up into an HMAC-INIT */ | 76 | /* Sets MDHA up into an HMAC-INIT */ |
@@ -81,13 +87,6 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | |||
81 | * FIFO_STORE with the explicit split-key content store | 87 | * FIFO_STORE with the explicit split-key content store |
82 | * (0x26 output type) | 88 | * (0x26 output type) |
83 | */ | 89 | */ |
84 | dma_addr_out = dma_map_single(jrdev, key_out, split_key_pad_len, | ||
85 | DMA_FROM_DEVICE); | ||
86 | if (dma_mapping_error(jrdev, dma_addr_out)) { | ||
87 | dev_err(jrdev, "unable to map key output memory\n"); | ||
88 | kfree(desc); | ||
89 | return -ENOMEM; | ||
90 | } | ||
91 | append_fifo_store(desc, dma_addr_out, split_key_len, | 90 | append_fifo_store(desc, dma_addr_out, split_key_len, |
92 | LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); | 91 | LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); |
93 | 92 | ||
@@ -115,10 +114,10 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | |||
115 | 114 | ||
116 | dma_unmap_single(jrdev, dma_addr_out, split_key_pad_len, | 115 | dma_unmap_single(jrdev, dma_addr_out, split_key_pad_len, |
117 | DMA_FROM_DEVICE); | 116 | DMA_FROM_DEVICE); |
117 | out_unmap_in: | ||
118 | dma_unmap_single(jrdev, dma_addr_in, keylen, DMA_TO_DEVICE); | 118 | dma_unmap_single(jrdev, dma_addr_in, keylen, DMA_TO_DEVICE); |
119 | 119 | out_free: | |
120 | kfree(desc); | 120 | kfree(desc); |
121 | |||
122 | return ret; | 121 | return ret; |
123 | } | 122 | } |
124 | EXPORT_SYMBOL(gen_split_key); | 123 | EXPORT_SYMBOL(gen_split_key); |
diff --git a/drivers/crypto/qat/qat_common/adf_accel_devices.h b/drivers/crypto/qat/qat_common/adf_accel_devices.h index 9282381b03ce..fe7b3f06f6e6 100644 --- a/drivers/crypto/qat/qat_common/adf_accel_devices.h +++ b/drivers/crypto/qat/qat_common/adf_accel_devices.h | |||
@@ -198,8 +198,7 @@ struct adf_accel_dev { | |||
198 | struct dentry *debugfs_dir; | 198 | struct dentry *debugfs_dir; |
199 | struct list_head list; | 199 | struct list_head list; |
200 | struct module *owner; | 200 | struct module *owner; |
201 | uint8_t accel_id; | ||
202 | uint8_t numa_node; | ||
203 | struct adf_accel_pci accel_pci_dev; | 201 | struct adf_accel_pci accel_pci_dev; |
202 | uint8_t accel_id; | ||
204 | } __packed; | 203 | } __packed; |
205 | #endif | 204 | #endif |
diff --git a/drivers/crypto/qat/qat_common/adf_transport.c b/drivers/crypto/qat/qat_common/adf_transport.c index 5f3fa45348b4..9dd2cb72a4e8 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c | |||
@@ -419,9 +419,10 @@ static int adf_init_bank(struct adf_accel_dev *accel_dev, | |||
419 | WRITE_CSR_RING_BASE(csr_addr, bank_num, i, 0); | 419 | WRITE_CSR_RING_BASE(csr_addr, bank_num, i, 0); |
420 | ring = &bank->rings[i]; | 420 | ring = &bank->rings[i]; |
421 | if (hw_data->tx_rings_mask & (1 << i)) { | 421 | if (hw_data->tx_rings_mask & (1 << i)) { |
422 | ring->inflights = kzalloc_node(sizeof(atomic_t), | 422 | ring->inflights = |
423 | GFP_KERNEL, | 423 | kzalloc_node(sizeof(atomic_t), |
424 | accel_dev->numa_node); | 424 | GFP_KERNEL, |
425 | dev_to_node(&GET_DEV(accel_dev))); | ||
425 | if (!ring->inflights) | 426 | if (!ring->inflights) |
426 | goto err; | 427 | goto err; |
427 | } else { | 428 | } else { |
@@ -469,13 +470,14 @@ int adf_init_etr_data(struct adf_accel_dev *accel_dev) | |||
469 | int i, ret; | 470 | int i, ret; |
470 | 471 | ||
471 | etr_data = kzalloc_node(sizeof(*etr_data), GFP_KERNEL, | 472 | etr_data = kzalloc_node(sizeof(*etr_data), GFP_KERNEL, |
472 | accel_dev->numa_node); | 473 | dev_to_node(&GET_DEV(accel_dev))); |
473 | if (!etr_data) | 474 | if (!etr_data) |
474 | return -ENOMEM; | 475 | return -ENOMEM; |
475 | 476 | ||
476 | num_banks = GET_MAX_BANKS(accel_dev); | 477 | num_banks = GET_MAX_BANKS(accel_dev); |
477 | size = num_banks * sizeof(struct adf_etr_bank_data); | 478 | size = num_banks * sizeof(struct adf_etr_bank_data); |
478 | etr_data->banks = kzalloc_node(size, GFP_KERNEL, accel_dev->numa_node); | 479 | etr_data->banks = kzalloc_node(size, GFP_KERNEL, |
480 | dev_to_node(&GET_DEV(accel_dev))); | ||
479 | if (!etr_data->banks) { | 481 | if (!etr_data->banks) { |
480 | ret = -ENOMEM; | 482 | ret = -ENOMEM; |
481 | goto err_bank; | 483 | goto err_bank; |
diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index f2e2f158cfbe..9e9619cd4a79 100644 --- a/drivers/crypto/qat/qat_common/qat_algs.c +++ b/drivers/crypto/qat/qat_common/qat_algs.c | |||
@@ -596,7 +596,8 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, | |||
596 | if (unlikely(!n)) | 596 | if (unlikely(!n)) |
597 | return -EINVAL; | 597 | return -EINVAL; |
598 | 598 | ||
599 | bufl = kmalloc_node(sz, GFP_ATOMIC, inst->accel_dev->numa_node); | 599 | bufl = kmalloc_node(sz, GFP_ATOMIC, |
600 | dev_to_node(&GET_DEV(inst->accel_dev))); | ||
600 | if (unlikely(!bufl)) | 601 | if (unlikely(!bufl)) |
601 | return -ENOMEM; | 602 | return -ENOMEM; |
602 | 603 | ||
@@ -605,6 +606,8 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, | |||
605 | goto err; | 606 | goto err; |
606 | 607 | ||
607 | for_each_sg(assoc, sg, assoc_n, i) { | 608 | for_each_sg(assoc, sg, assoc_n, i) { |
609 | if (!sg->length) | ||
610 | continue; | ||
608 | bufl->bufers[bufs].addr = dma_map_single(dev, | 611 | bufl->bufers[bufs].addr = dma_map_single(dev, |
609 | sg_virt(sg), | 612 | sg_virt(sg), |
610 | sg->length, | 613 | sg->length, |
@@ -640,7 +643,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst, | |||
640 | struct qat_alg_buf *bufers; | 643 | struct qat_alg_buf *bufers; |
641 | 644 | ||
642 | buflout = kmalloc_node(sz, GFP_ATOMIC, | 645 | buflout = kmalloc_node(sz, GFP_ATOMIC, |
643 | inst->accel_dev->numa_node); | 646 | dev_to_node(&GET_DEV(inst->accel_dev))); |
644 | if (unlikely(!buflout)) | 647 | if (unlikely(!buflout)) |
645 | goto err; | 648 | goto err; |
646 | bloutp = dma_map_single(dev, buflout, sz, DMA_TO_DEVICE); | 649 | bloutp = dma_map_single(dev, buflout, sz, DMA_TO_DEVICE); |
diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c index 0d59bcb50de1..828f2a686aab 100644 --- a/drivers/crypto/qat/qat_common/qat_crypto.c +++ b/drivers/crypto/qat/qat_common/qat_crypto.c | |||
@@ -109,12 +109,14 @@ struct qat_crypto_instance *qat_crypto_get_instance_node(int node) | |||
109 | 109 | ||
110 | list_for_each(itr, adf_devmgr_get_head()) { | 110 | list_for_each(itr, adf_devmgr_get_head()) { |
111 | accel_dev = list_entry(itr, struct adf_accel_dev, list); | 111 | accel_dev = list_entry(itr, struct adf_accel_dev, list); |
112 | if (accel_dev->numa_node == node && adf_dev_started(accel_dev)) | 112 | if ((node == dev_to_node(&GET_DEV(accel_dev)) || |
113 | dev_to_node(&GET_DEV(accel_dev)) < 0) | ||
114 | && adf_dev_started(accel_dev)) | ||
113 | break; | 115 | break; |
114 | accel_dev = NULL; | 116 | accel_dev = NULL; |
115 | } | 117 | } |
116 | if (!accel_dev) { | 118 | if (!accel_dev) { |
117 | pr_err("QAT: Could not find device on give node\n"); | 119 | pr_err("QAT: Could not find device on node %d\n", node); |
118 | accel_dev = adf_devmgr_get_first(); | 120 | accel_dev = adf_devmgr_get_first(); |
119 | } | 121 | } |
120 | if (!accel_dev || !adf_dev_started(accel_dev)) | 122 | if (!accel_dev || !adf_dev_started(accel_dev)) |
@@ -164,7 +166,7 @@ static int qat_crypto_create_instances(struct adf_accel_dev *accel_dev) | |||
164 | 166 | ||
165 | for (i = 0; i < num_inst; i++) { | 167 | for (i = 0; i < num_inst; i++) { |
166 | inst = kzalloc_node(sizeof(*inst), GFP_KERNEL, | 168 | inst = kzalloc_node(sizeof(*inst), GFP_KERNEL, |
167 | accel_dev->numa_node); | 169 | dev_to_node(&GET_DEV(accel_dev))); |
168 | if (!inst) | 170 | if (!inst) |
169 | goto err; | 171 | goto err; |
170 | 172 | ||
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_admin.c b/drivers/crypto/qat/qat_dh895xcc/adf_admin.c index 978d6c56639d..53c491b59f07 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_admin.c +++ b/drivers/crypto/qat/qat_dh895xcc/adf_admin.c | |||
@@ -108,7 +108,7 @@ int adf_init_admin_comms(struct adf_accel_dev *accel_dev) | |||
108 | uint64_t reg_val; | 108 | uint64_t reg_val; |
109 | 109 | ||
110 | admin = kzalloc_node(sizeof(*accel_dev->admin), GFP_KERNEL, | 110 | admin = kzalloc_node(sizeof(*accel_dev->admin), GFP_KERNEL, |
111 | accel_dev->numa_node); | 111 | dev_to_node(&GET_DEV(accel_dev))); |
112 | if (!admin) | 112 | if (!admin) |
113 | return -ENOMEM; | 113 | return -ENOMEM; |
114 | admin->virt_addr = dma_zalloc_coherent(&GET_DEV(accel_dev), PAGE_SIZE, | 114 | admin->virt_addr = dma_zalloc_coherent(&GET_DEV(accel_dev), PAGE_SIZE, |
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_drv.c b/drivers/crypto/qat/qat_dh895xcc/adf_drv.c index 0d0435a41be9..948f66be262b 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_drv.c +++ b/drivers/crypto/qat/qat_dh895xcc/adf_drv.c | |||
@@ -119,21 +119,6 @@ static void adf_cleanup_accel(struct adf_accel_dev *accel_dev) | |||
119 | kfree(accel_dev); | 119 | kfree(accel_dev); |
120 | } | 120 | } |
121 | 121 | ||
122 | static uint8_t adf_get_dev_node_id(struct pci_dev *pdev) | ||
123 | { | ||
124 | unsigned int bus_per_cpu = 0; | ||
125 | struct cpuinfo_x86 *c = &cpu_data(num_online_cpus() - 1); | ||
126 | |||
127 | if (!c->phys_proc_id) | ||
128 | return 0; | ||
129 | |||
130 | bus_per_cpu = 256 / (c->phys_proc_id + 1); | ||
131 | |||
132 | if (bus_per_cpu != 0) | ||
133 | return pdev->bus->number / bus_per_cpu; | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static int qat_dev_start(struct adf_accel_dev *accel_dev) | 122 | static int qat_dev_start(struct adf_accel_dev *accel_dev) |
138 | { | 123 | { |
139 | int cpus = num_online_cpus(); | 124 | int cpus = num_online_cpus(); |
@@ -235,7 +220,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
235 | void __iomem *pmisc_bar_addr = NULL; | 220 | void __iomem *pmisc_bar_addr = NULL; |
236 | char name[ADF_DEVICE_NAME_LENGTH]; | 221 | char name[ADF_DEVICE_NAME_LENGTH]; |
237 | unsigned int i, bar_nr; | 222 | unsigned int i, bar_nr; |
238 | uint8_t node; | ||
239 | int ret; | 223 | int ret; |
240 | 224 | ||
241 | switch (ent->device) { | 225 | switch (ent->device) { |
@@ -246,12 +230,19 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
246 | return -ENODEV; | 230 | return -ENODEV; |
247 | } | 231 | } |
248 | 232 | ||
249 | node = adf_get_dev_node_id(pdev); | 233 | if (num_possible_nodes() > 1 && dev_to_node(&pdev->dev) < 0) { |
250 | accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, node); | 234 | /* If the accelerator is connected to a node with no memory |
235 | * there is no point in using the accelerator since the remote | ||
236 | * memory transaction will be very slow. */ | ||
237 | dev_err(&pdev->dev, "Invalid NUMA configuration.\n"); | ||
238 | return -EINVAL; | ||
239 | } | ||
240 | |||
241 | accel_dev = kzalloc_node(sizeof(*accel_dev), GFP_KERNEL, | ||
242 | dev_to_node(&pdev->dev)); | ||
251 | if (!accel_dev) | 243 | if (!accel_dev) |
252 | return -ENOMEM; | 244 | return -ENOMEM; |
253 | 245 | ||
254 | accel_dev->numa_node = node; | ||
255 | INIT_LIST_HEAD(&accel_dev->crypto_list); | 246 | INIT_LIST_HEAD(&accel_dev->crypto_list); |
256 | 247 | ||
257 | /* Add accel device to accel table. | 248 | /* Add accel device to accel table. |
@@ -264,7 +255,8 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
264 | 255 | ||
265 | accel_dev->owner = THIS_MODULE; | 256 | accel_dev->owner = THIS_MODULE; |
266 | /* Allocate and configure device configuration structure */ | 257 | /* Allocate and configure device configuration structure */ |
267 | hw_data = kzalloc_node(sizeof(*hw_data), GFP_KERNEL, node); | 258 | hw_data = kzalloc_node(sizeof(*hw_data), GFP_KERNEL, |
259 | dev_to_node(&pdev->dev)); | ||
268 | if (!hw_data) { | 260 | if (!hw_data) { |
269 | ret = -ENOMEM; | 261 | ret = -ENOMEM; |
270 | goto out_err; | 262 | goto out_err; |
diff --git a/drivers/crypto/qat/qat_dh895xcc/adf_isr.c b/drivers/crypto/qat/qat_dh895xcc/adf_isr.c index 67ec61e51185..d96ee21b9b77 100644 --- a/drivers/crypto/qat/qat_dh895xcc/adf_isr.c +++ b/drivers/crypto/qat/qat_dh895xcc/adf_isr.c | |||
@@ -168,7 +168,7 @@ static int adf_isr_alloc_msix_entry_table(struct adf_accel_dev *accel_dev) | |||
168 | uint32_t msix_num_entries = hw_data->num_banks + 1; | 168 | uint32_t msix_num_entries = hw_data->num_banks + 1; |
169 | 169 | ||
170 | entries = kzalloc_node(msix_num_entries * sizeof(*entries), | 170 | entries = kzalloc_node(msix_num_entries * sizeof(*entries), |
171 | GFP_KERNEL, accel_dev->numa_node); | 171 | GFP_KERNEL, dev_to_node(&GET_DEV(accel_dev))); |
172 | if (!entries) | 172 | if (!entries) |
173 | return -ENOMEM; | 173 | return -ENOMEM; |
174 | 174 | ||