]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[IA64] Normalize return value of chip->irq_set_affinity() method
authorJiang Liu <liuj97@gmail.com>
Fri, 30 Mar 2012 15:11:36 +0000 (23:11 +0800)
committerTony Luck <tony.luck@intel.com>
Fri, 30 Mar 2012 20:33:56 +0000 (13:33 -0700)
On IA64 platforms, interrupt controller chip's irq_set_affinity() method
always copies affinity mask to irq_data->affinity field but still returns
0(IRQ_SET_MASK_OK). That return value causes the interrupt core logic
unnecessarily copies the mask to irq_data->affinity field again.
So return IRQ_SET_MASK_OK_NOCOPY instead of IRQ_SET_MASK_OK to get rid of
the duplicated copy operation.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Link: http://marc.info/?l=linux-ia64&m=133312092912438&w=2
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/msi_ia64.c
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/msi_sn.c

index b0f9afebb1467d4e2eccf6c16601c7257f378620..98f5fa6ffd28c2e9d544c53c7d8e02ebe061d309 100644 (file)
@@ -374,8 +374,10 @@ iosapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
                iosapic_write(iosapic, IOSAPIC_RTE_LOW(rte_index), low32);
        }
 
+       return IRQ_SET_MASK_OK_NOCOPY;
+#else
+       return IRQ_SET_MASK_OK;
 #endif
-       return 0;
 }
 
 /*
index 94e0db72d4a68591370de63af9db07baaae203ab..e155770fad42e741df7e6f36394e1f9e1e3e91f1 100644 (file)
@@ -41,7 +41,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
        write_msi_msg(irq, &msg);
        cpumask_copy(idata->affinity, cpumask_of(cpu));
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 #endif /* CONFIG_SMP */
 
@@ -157,7 +157,7 @@ static int dmar_msi_set_affinity(struct irq_data *data,
        dmar_msi_write(irq, &msg);
        cpumask_copy(data->affinity, mask);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 #endif /* CONFIG_SMP */
 
index dfac09ab027a2a6717da2d9eeef40d6f24b9f8e5..f444208c1b02f4f7dfd170abe15558823438faec 100644 (file)
@@ -216,7 +216,7 @@ static int sn_set_affinity_irq(struct irq_data *data,
                                 sn_irq_lh[irq], list)
                (void)sn_retarget_vector(sn_irq_info, nasid, slice);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 
 #ifdef CONFIG_SMP
index 2b98b9e088def963ac47033c4717fa5ea4f24075..ebb5b55ea5d2411d58c7170f9745b8c746736518 100644 (file)
@@ -208,7 +208,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
        write_msi_msg(irq, &msg);
        cpumask_copy(data->affinity, cpu_mask);
 
-       return 0;
+       return IRQ_SET_MASK_OK_NOCOPY;
 }
 #endif /* CONFIG_SMP */