Commit c149e4cd authored by Jiang Liu's avatar Jiang Liu Committed by Thomas Gleixner

x86/irq: Use access helper irq_data_get_affinity_mask()

This is a preparatory patch for moving irq_data struct members.
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ff96b4d0
...@@ -2541,7 +2541,7 @@ void __init setup_ioapic_dest(void) ...@@ -2541,7 +2541,7 @@ void __init setup_ioapic_dest(void)
* Honour affinities which have been set in early boot * Honour affinities which have been set in early boot
*/ */
if (!irqd_can_balance(idata) || irqd_affinity_was_set(idata)) if (!irqd_can_balance(idata) || irqd_affinity_was_set(idata))
mask = idata->affinity; mask = irq_data_get_affinity_mask(idata);
else else
mask = apic->target_cpus(); mask = apic->target_cpus();
......
...@@ -496,7 +496,8 @@ static int apic_set_affinity(struct irq_data *irq_data, ...@@ -496,7 +496,8 @@ static int apic_set_affinity(struct irq_data *irq_data,
if (err) { if (err) {
struct irq_data *top = irq_get_irq_data(irq); struct irq_data *top = irq_get_irq_data(irq);
if (assign_irq_vector(irq, data, top->affinity)) if (assign_irq_vector(irq, data,
irq_data_get_affinity_mask(top)))
pr_err("Failed to recover vector for irq %d\n", irq); pr_err("Failed to recover vector for irq %d\n", irq);
return err; return err;
} }
......
...@@ -348,7 +348,8 @@ int check_irq_vectors_for_cpu_disable(void) ...@@ -348,7 +348,8 @@ int check_irq_vectors_for_cpu_disable(void)
continue; continue;
data = irq_desc_get_irq_data(desc); data = irq_desc_get_irq_data(desc);
cpumask_copy(&affinity_new, data->affinity); cpumask_copy(&affinity_new,
irq_data_get_affinity_mask(data));
cpumask_clear_cpu(this_cpu, &affinity_new); cpumask_clear_cpu(this_cpu, &affinity_new);
/* Do not count inactive or per-cpu irqs. */ /* Do not count inactive or per-cpu irqs. */
...@@ -426,7 +427,7 @@ void fixup_irqs(void) ...@@ -426,7 +427,7 @@ void fixup_irqs(void)
raw_spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
data = irq_desc_get_irq_data(desc); data = irq_desc_get_irq_data(desc);
affinity = data->affinity; affinity = irq_data_get_affinity_mask(data);
if (!irq_has_action(irq) || irqd_is_per_cpu(data) || if (!irq_has_action(irq) || irqd_is_per_cpu(data) ||
cpumask_subset(affinity, cpu_online_mask)) { cpumask_subset(affinity, cpu_online_mask)) {
raw_spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
......
...@@ -336,7 +336,7 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu) ...@@ -336,7 +336,7 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
BUG_ON(irq == -1); BUG_ON(irq == -1);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(cpu)); cpumask_copy(irq_get_affinity_mask(irq), cpumask_of(cpu));
#endif #endif
xen_evtchn_port_bind_to_cpu(info, cpu); xen_evtchn_port_bind_to_cpu(info, cpu);
...@@ -373,7 +373,7 @@ static void xen_irq_init(unsigned irq) ...@@ -373,7 +373,7 @@ static void xen_irq_init(unsigned irq)
struct irq_info *info; struct irq_info *info;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* By default all event channels notify CPU#0. */ /* By default all event channels notify CPU#0. */
cpumask_copy(irq_get_irq_data(irq)->affinity, cpumask_of(0)); cpumask_copy(irq_get_affinity_mask(irq), cpumask_of(0));
#endif #endif
info = kzalloc(sizeof(*info), GFP_KERNEL); info = kzalloc(sizeof(*info), GFP_KERNEL);
......
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