Commit 0b534cf3 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Matt Turner

alpha: irq: Convert affinity to use irq_data

affinity is moving to irq_data. Fix it up.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent eb1e17fb
...@@ -44,11 +44,16 @@ static char irq_user_affinity[NR_IRQS]; ...@@ -44,11 +44,16 @@ static char irq_user_affinity[NR_IRQS];
int irq_select_affinity(unsigned int irq) 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; static int last_cpu;
int cpu = last_cpu + 1; 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; return 1;
while (!cpu_possible(cpu) || while (!cpu_possible(cpu) ||
...@@ -56,8 +61,8 @@ int irq_select_affinity(unsigned int irq) ...@@ -56,8 +61,8 @@ int irq_select_affinity(unsigned int irq)
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu; last_cpu = cpu;
cpumask_copy(desc->affinity, cpumask_of(cpu)); cpumask_copy(data->affinity, cpumask_of(cpu));
get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu)); chip->irq_set_affinity(data, cpumask_of(cpu), false);
return 0; return 0;
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment