Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233795
b: refs/heads/master
c: 0b534cf
h: refs/heads/master
i:
  233793: fd319a1
  233791: 83b670f
v: v3
  • Loading branch information
Thomas Gleixner authored and Matt Turner committed Mar 2, 2011
1 parent 57a6967 commit 062aadc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: eb1e17fb9956eb3156f33cdcd880306102212661
refs/heads/master: 0b534cf3e86c3fec7703173f45fcb9290b77667b
13 changes: 9 additions & 4 deletions trunk/arch/alpha/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,25 @@ static char irq_user_affinity[NR_IRQS];

int irq_select_affinity(unsigned int irq)
{
struct irq_desc *desc = irq_to_desc(irq);
struct irq_data *data = irq_get_irq_data(irq);
struct irq_chip *chip;
static int last_cpu;
int cpu = last_cpu + 1;

if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq])
if (!data)
return 1;
chip = irq_data_get_irq_chip(data);

if (!chip->irq_set_affinity || irq_user_affinity[irq])
return 1;

while (!cpu_possible(cpu) ||
!cpumask_test_cpu(cpu, irq_default_affinity))
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu;

cpumask_copy(desc->affinity, cpumask_of(cpu));
get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu));
cpumask_copy(data->affinity, cpumask_of(cpu));
chip->irq_set_affinity(data, cpumask_of(cpu), false);
return 0;
}
#endif /* CONFIG_SMP */
Expand Down

0 comments on commit 062aadc

Please sign in to comment.