parisc/irq: Use access helper irq_data_get_affinity_mask()
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 1 Jun 2015 08:05:32 +0000 (16:05 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 31 Jul 2015 20:20:04 +0000 (22:20 +0200)
Use access helper irq_data_get_affinity_mask() to hide implementation
details of struct irq_desc.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Link: http://lkml.kernel.org/r/1433145945-789-24-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/parisc/kernel/irq.c
drivers/parisc/iosapic.c

index f3191db6e2e94151868129466924b2a456b91ede..413ec3c3f9cc509099b25bf3fc60e0de8195ba53 100644 (file)
@@ -131,7 +131,7 @@ static int cpu_set_affinity_irq(struct irq_data *d, const struct cpumask *dest,
        if (cpu_dest < 0)
                return -1;
 
-       cpumask_copy(d->affinity, dest);
+       cpumask_copy(irq_data_get_affinity_mask(d), dest);
 
        return 0;
 }
@@ -339,7 +339,7 @@ unsigned long txn_affinity_addr(unsigned int irq, int cpu)
 {
 #ifdef CONFIG_SMP
        struct irq_data *d = irq_get_irq_data(irq);
-       cpumask_copy(d->affinity, cpumask_of(cpu));
+       cpumask_copy(irq_data_get_affinity_mask(d), cpumask_of(cpu));
 #endif
 
        return per_cpu(cpu_data, cpu).txn_addr;
@@ -508,7 +508,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
        unsigned long eirr_val;
        int irq, cpu = smp_processor_id();
 #ifdef CONFIG_SMP
-       struct irq_desc *desc;
+       struct irq_data *irq_data;
        cpumask_t dest;
 #endif
 
@@ -522,9 +522,9 @@ void do_cpu_irq_mask(struct pt_regs *regs)
        irq = eirr_to_irq(eirr_val);
 
 #ifdef CONFIG_SMP
-       desc = irq_to_desc(irq);
-       cpumask_copy(&dest, desc->irq_data.affinity);
-       if (irqd_is_per_cpu(&desc->irq_data) &&
+       irq_data = irq_get_irq_data(irq);
+       cpumask_copy(&dest, irq_data_get_affinity_mask(irq_data));
+       if (irqd_is_per_cpu(irq_data) &&
            !cpumask_test_cpu(smp_processor_id(), &dest)) {
                int cpu = cpumask_first(&dest);
 
index 9ee04b4b68bf39569acd6dd360c62a6cb4e4b76e..144c77dfe4b195864f37165cee0a71506e723b87 100644 (file)
@@ -691,7 +691,7 @@ static int iosapic_set_affinity_irq(struct irq_data *d,
        if (dest_cpu < 0)
                return -1;
 
-       cpumask_copy(d->affinity, cpumask_of(dest_cpu));
+       cpumask_copy(irq_data_get_affinity_mask(d), cpumask_of(dest_cpu));
        vi->txn_addr = txn_affinity_addr(d->irq, dest_cpu);
 
        spin_lock_irqsave(&iosapic_lock, flags);