Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298200
b: refs/heads/master
c: 241fc64
h: refs/heads/master
v: v3
  • Loading branch information
Prarit Bhargava authored and Thomas Gleixner committed Mar 29, 2012
1 parent d245012 commit ca6864f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3f79e38d51f8a419f4c484a86ece4baea35b993
refs/heads/master: 241fc640be783f903e74b6d9c68481c01873f758
9 changes: 8 additions & 1 deletion trunk/kernel/irq/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
{
struct irq_chip *chip = irq_desc_get_chip(desc);
struct cpumask *set = irq_default_affinity;
int ret;
int ret, node = desc->irq_data.node;

/* Excludes PER_CPU and NO_BALANCE interrupts */
if (!irq_can_set_affinity(irq))
Expand All @@ -301,6 +301,13 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
}

cpumask_and(mask, cpu_online_mask, set);
if (node != NUMA_NO_NODE) {
const struct cpumask *nodemask = cpumask_of_node(node);

/* make sure at least one of the cpus in nodemask is online */
if (cpumask_intersects(mask, nodemask))
cpumask_and(mask, mask, nodemask);
}
ret = chip->irq_set_affinity(&desc->irq_data, mask, false);
switch (ret) {
case IRQ_SET_MASK_OK:
Expand Down

0 comments on commit ca6864f

Please sign in to comment.