search for: alloc_cpumask_var

Displaying 20 results from an estimated 50 matches for "alloc_cpumask_var".

2020 Apr 08
5
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
....c b/arch/x86/mm/mmio-mod.c index 109325d77b3e..43fd19b3f118 100644 --- a/arch/x86/mm/mmio-mod.c +++ b/arch/x86/mm/mmio-mod.c @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) int cpu; int err; - if (downed_cpus == NULL && + if (!cpumask_available(downed_cpus) && !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { pr_notice("Failed to allocate mask\n"); goto out; @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) int cpu; int err; - if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0) + if (!cpumask_available(downed_cpus) || cpumask_weight(...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...0 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_...
2013 Jun 20
3
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...0 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_...
2013 Jun 19
2
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...0 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_...
2013 Jun 19
2
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...0 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] [<ffffffffa00d2c29>] virtballoon_...
2013 Sep 27
4
[PATCH net-next] virtio-net: switch to use XPS to choose txq
...er_cpu_ptr(vi->vq_index, cpu) = - ++i % vi->curr_queue_pairs; - } - } } static void virtnet_set_affinity(struct virtnet_info *vi) { + cpumask_var_t cpumask; int i; int cpu; @@ -1100,15 +1087,21 @@ static void virtnet_set_affinity(struct virtnet_info *vi) return; } + if (!alloc_cpumask_var(&cpumask, GFP_KERNEL)) + return; + i = 0; for_each_online_cpu(cpu) { virtqueue_set_affinity(vi->rq[i].vq, cpu); virtqueue_set_affinity(vi->sq[i].vq, cpu); - *per_cpu_ptr(vi->vq_index, cpu) = i; + cpumask_clear(cpumask); + cpumask_set_cpu(cpu, cpumask); + netif_set_xps_qu...
2013 Sep 27
4
[PATCH net-next] virtio-net: switch to use XPS to choose txq
...er_cpu_ptr(vi->vq_index, cpu) = - ++i % vi->curr_queue_pairs; - } - } } static void virtnet_set_affinity(struct virtnet_info *vi) { + cpumask_var_t cpumask; int i; int cpu; @@ -1100,15 +1087,21 @@ static void virtnet_set_affinity(struct virtnet_info *vi) return; } + if (!alloc_cpumask_var(&cpumask, GFP_KERNEL)) + return; + i = 0; for_each_online_cpu(cpu) { virtqueue_set_affinity(vi->rq[i].vq, cpu); virtqueue_set_affinity(vi->sq[i].vq, cpu); - *per_cpu_ptr(vi->vq_index, cpu) = i; + cpumask_clear(cpumask); + cpumask_set_cpu(cpu, cpumask); + netif_set_xps_qu...
2020 May 18
2
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
...gt; > +++ b/arch/x86/mm/mmio-mod.c > > @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) > > int cpu; > > int err; > > > > - if (downed_cpus == NULL && > > + if (!cpumask_available(downed_cpus) && > > !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { > > pr_notice("Failed to allocate mask\n"); > > goto out; > > @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) > > int cpu; > > int err; > > > > - if (downed_cpus...
2017 Jan 27
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...v->msix_names, - GFP_KERNEL); - if (!vp_dev->msix_names) - goto error; - vp_dev->msix_affinity_masks - = kzalloc(nvectors * sizeof *vp_dev->msix_affinity_masks, - GFP_KERNEL); - if (!vp_dev->msix_affinity_masks) - goto error; - for (i = 0; i < nvectors; ++i) - if (!alloc_cpumask_var(&vp_dev->msix_affinity_masks[i], - GFP_KERNEL)) - goto error; - - err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, - PCI_IRQ_MSIX); - if (err < 0) - goto error; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix...
2017 Feb 05
0
[PATCH 2/9] virtio_pci: use shared interrupts for virtqueues
...v->msix_names, - GFP_KERNEL); - if (!vp_dev->msix_names) - goto error; - vp_dev->msix_affinity_masks - = kzalloc(nvectors * sizeof *vp_dev->msix_affinity_masks, - GFP_KERNEL); - if (!vp_dev->msix_affinity_masks) - goto error; - for (i = 0; i < nvectors; ++i) - if (!alloc_cpumask_var(&vp_dev->msix_affinity_masks[i], - GFP_KERNEL)) - goto error; - - err = pci_alloc_irq_vectors(vp_dev->pci_dev, nvectors, nvectors, - PCI_IRQ_MSIX); - if (err < 0) - goto error; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix...
2020 Apr 08
0
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
...--- a/arch/x86/mm/mmio-mod.c > +++ b/arch/x86/mm/mmio-mod.c > @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) > int cpu; > int err; > > - if (downed_cpus == NULL && > + if (!cpumask_available(downed_cpus) && > !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { > pr_notice("Failed to allocate mask\n"); > goto out; > @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) > int cpu; > int err; > > - if (downed_cpus == NULL || cpumask_weigh...
2020 Apr 08
1
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
...++ b/arch/x86/mm/mmio-mod.c > > @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) > > int cpu; > > int err; > > > > - if (downed_cpus == NULL && > > + if (!cpumask_available(downed_cpus) && > > !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { > > pr_notice("Failed to allocate mask\n"); > > goto out; > > @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) > > int cpu; > > int err; > > > > - if (d...
2020 May 18
0
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
...e..43fd19b3f118 100644 > --- a/arch/x86/mm/mmio-mod.c > +++ b/arch/x86/mm/mmio-mod.c > @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) > int cpu; > int err; > > - if (downed_cpus == NULL && > + if (!cpumask_available(downed_cpus) && > !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { > pr_notice("Failed to allocate mask\n"); > goto out; > @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) > int cpu; > int err; > > - if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0) > + if (!cpumask_a...
2020 May 18
0
[PATCH] x86: mmiotrace: Use cpumask_available for cpumask_var_t variables
....c > > > @@ -372,7 +372,7 @@ static void enter_uniprocessor(void) > > > int cpu; > > > int err; > > > > > > - if (downed_cpus == NULL && > > > + if (!cpumask_available(downed_cpus) && > > > !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { > > > pr_notice("Failed to allocate mask\n"); > > > goto out; > > > @@ -402,7 +402,7 @@ static void leave_uniprocessor(void) > > > int cpu; > > > int err; > > > &...
2016 Apr 01
0
[PATCH v3 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k
...d) /* * Call the System Management Mode BIOS. Code provided by Jonathan Buzzard. */ -static int i8k_smm(struct smm_regs *regs) +static int i8k_smm_func(void *par) { int rc; + struct smm_regs *regs = par; int eax = regs->eax; - cpumask_var_t old_mask; /* SMM requires CPU 0 */ - if (!alloc_cpumask_var(&old_mask, GFP_KERNEL)) - return -ENOMEM; - cpumask_copy(old_mask, &current->cpus_allowed); - rc = set_cpus_allowed_ptr(current, cpumask_of(0)); - if (rc) - goto out; - if (smp_processor_id() != 0) { - rc = -EBUSY; - goto out; - } + if (smp_processor_id() != 0) + return -EBUSY; #...
2016 Apr 05
0
[PATCH v4 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k
...d) /* * Call the System Management Mode BIOS. Code provided by Jonathan Buzzard. */ -static int i8k_smm(struct smm_regs *regs) +static int i8k_smm_func(void *par) { int rc; + struct smm_regs *regs = par; int eax = regs->eax; - cpumask_var_t old_mask; /* SMM requires CPU 0 */ - if (!alloc_cpumask_var(&old_mask, GFP_KERNEL)) - return -ENOMEM; - cpumask_copy(old_mask, &current->cpus_allowed); - rc = set_cpus_allowed_ptr(current, cpumask_of(0)); - if (rc) - goto out; - if (smp_processor_id() != 0) { - rc = -EBUSY; - goto out; - } + if (smp_processor_id() != 0) + return -EBUSY; #...
2016 Apr 06
0
[PATCH v5 5/6] dcdbas: make use of smp_call_on_cpu()
...int raise_smi(void *par) { - cpumask_var_t old_mask; - int ret = 0; + struct smi_cmd *smi_cmd = par; - if (smi_cmd->magic != SMI_CMD_MAGIC) { - dev_info(&dcdbas_pdev->dev, "%s: invalid magic value\n", - __func__); - return -EBADR; - } - - /* SMI requires CPU 0 */ - if (!alloc_cpumask_var(&old_mask, GFP_KERNEL)) - return -ENOMEM; - - cpumask_copy(old_mask, &current->cpus_allowed); - set_cpus_allowed_ptr(current, cpumask_of(0)); if (smp_processor_id() != 0) { dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n", __func__); - ret = -EBUSY; - g...
2016 Apr 06
0
[PATCH v5 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k
...d) /* * Call the System Management Mode BIOS. Code provided by Jonathan Buzzard. */ -static int i8k_smm(struct smm_regs *regs) +static int i8k_smm_func(void *par) { int rc; + struct smm_regs *regs = par; int eax = regs->eax; - cpumask_var_t old_mask; /* SMM requires CPU 0 */ - if (!alloc_cpumask_var(&old_mask, GFP_KERNEL)) - return -ENOMEM; - cpumask_copy(old_mask, &current->cpus_allowed); - rc = set_cpus_allowed_ptr(current, cpumask_of(0)); - if (rc) - goto out; - if (smp_processor_id() != 0) { - rc = -EBUSY; - goto out; - } + if (smp_processor_id() != 0) + return -EBUSY; #...
2013 Jun 19
0
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 > [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 > [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 > [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 > [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 > [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 > [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] > [<ffffffffa...
2013 Jun 21
0
[PATCH] virtio-pci: fix leaks of msix_affinity_masks
...00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [<ffffffff816e455e>] kmemleak_alloc+0x5e/0xc0 > [<ffffffff811aa7f1>] kmem_cache_alloc_node_trace+0x141/0x2c0 > [<ffffffff8133ba23>] alloc_cpumask_var_node+0x23/0x80 > [<ffffffff8133ba8e>] alloc_cpumask_var+0xe/0x10 > [<ffffffff813fdb3d>] vp_try_to_find_vqs+0x25d/0x810 > [<ffffffff813fe171>] vp_find_vqs+0x81/0xb0 > [<ffffffffa00d2a05>] init_vqs+0x85/0x120 [virtio_balloon] > [<ffffffffa...