lkml.org 
[lkml]   [2016]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
From
Date
On 11/08/2016 03:55 PM, Christoph Hellwig wrote:
> [please trim the f***king context in your replies, thanks..]
>
> On Tue, Nov 08, 2016 at 09:15:27AM +0100, Hannes Reinecke wrote:
>>> +irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>>> {
>>> - int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
>>> + int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
>>> + int affv = nvecs - affd->pre_vectors - affd->post_vectors;
>>> nodemask_t nodemsk = NODE_MASK_NONE;
>>> struct cpumask *masks;
>>> cpumask_var_t nmsk;
>> Check for NULL affd?
>
> We expect all callers to pass a valid one.

Which you don't in this patch:

@@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev,
void __iomem *base,
int ret, i;

if (affinity) {
- masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
+ masks = irq_create_affinity_masks(nvec, NULL);
if (!masks)
pr_err("Unable to allocate affinity masks, ignoring\n");
}

Cheers,

Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

\
 
 \ /
  Last update: 2016-11-08 15:59    [W:0.178 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site