aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index fa27210f1dfd..27a67536511e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -426,15 +426,18 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
426/** 426/**
427 * init_alloc_desc_masks - allocate cpumasks for irq_desc 427 * init_alloc_desc_masks - allocate cpumasks for irq_desc
428 * @desc: pointer to irq_desc struct 428 * @desc: pointer to irq_desc struct
429 * @cpu: cpu which will be handling the cpumasks
429 * @boot: true if need bootmem 430 * @boot: true if need bootmem
430 * 431 *
431 * Allocates affinity and pending_mask cpumask if required. 432 * Allocates affinity and pending_mask cpumask if required.
432 * Returns true if successful (or not required). 433 * Returns true if successful (or not required).
433 * Side effect: affinity has all bits set, pending_mask has all bits clear. 434 * Side effect: affinity has all bits set, pending_mask has all bits clear.
434 */ 435 */
435static inline bool init_alloc_desc_masks(struct irq_desc *desc, int node, 436static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
436 bool boot) 437 bool boot)
437{ 438{
439 int node;
440
438 if (boot) { 441 if (boot) {
439 alloc_bootmem_cpumask_var(&desc->affinity); 442 alloc_bootmem_cpumask_var(&desc->affinity);
440 cpumask_setall(desc->affinity); 443 cpumask_setall(desc->affinity);
@@ -446,6 +449,8 @@ static inline bool init_alloc_desc_masks(struct irq_desc *desc, int node,
446 return true; 449 return true;
447 } 450 }
448 451
452 node = cpu_to_node(cpu);
453
449 if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node)) 454 if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node))
450 return false; 455 return false;
451 cpumask_setall(desc->affinity); 456 cpumask_setall(desc->affinity);
@@ -484,7 +489,7 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
484 489
485#else /* !CONFIG_SMP */ 490#else /* !CONFIG_SMP */
486 491
487static inline bool init_alloc_desc_masks(struct irq_desc *desc, int node, 492static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
488 bool boot) 493 bool boot)
489{ 494{
490 return true; 495 return true;