diff options
author | Jiang Liu <liuj97@gmail.com> | 2012-03-30 11:11:35 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-05-24 17:16:33 -0400 |
commit | f841d792e38f75f5e25b0b66f7b5d235d180a735 (patch) | |
tree | 52657a4c6b9d2ff9ff6b2b4ed98a9e2dd2b2cecf | |
parent | 151766fce8bee0e3e6076c8b829f9fcc0a2412ae (diff) |
x86: Return IRQ_SET_MASK_OK_NOCOPY from irq affinity functions
The interrupt chip irq_set_affinity() functions copy the affinity mask
to irq_data->affinity but return 0, i.e. IRQ_SET_MASK_OK.
IRQ_SET_MASK_OK causes the core code to do another redundant copy.
Return IRQ_SET_MASK_OK_NOCOPY to avoid this.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Cliff Wickman <cpw@sgi.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Keping Chen <chenkeping@huawei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-4-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 9 | ||||
-rw-r--r-- | arch/x86/platform/uv/uv_irq.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index ac96561d1a99..bce2001b2644 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2270,6 +2270,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask, | |||
2270 | /* Only the high 8 bits are valid. */ | 2270 | /* Only the high 8 bits are valid. */ |
2271 | dest = SET_APIC_LOGICAL_ID(dest); | 2271 | dest = SET_APIC_LOGICAL_ID(dest); |
2272 | __target_IO_APIC_irq(irq, dest, data->chip_data); | 2272 | __target_IO_APIC_irq(irq, dest, data->chip_data); |
2273 | ret = IRQ_SET_MASK_OK_NOCOPY; | ||
2273 | } | 2274 | } |
2274 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | 2275 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
2275 | return ret; | 2276 | return ret; |
@@ -3092,7 +3093,7 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) | |||
3092 | 3093 | ||
3093 | __write_msi_msg(data->msi_desc, &msg); | 3094 | __write_msi_msg(data->msi_desc, &msg); |
3094 | 3095 | ||
3095 | return 0; | 3096 | return IRQ_SET_MASK_OK_NOCOPY; |
3096 | } | 3097 | } |
3097 | #endif /* CONFIG_SMP */ | 3098 | #endif /* CONFIG_SMP */ |
3098 | 3099 | ||
@@ -3214,7 +3215,7 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, | |||
3214 | 3215 | ||
3215 | dmar_msi_write(irq, &msg); | 3216 | dmar_msi_write(irq, &msg); |
3216 | 3217 | ||
3217 | return 0; | 3218 | return IRQ_SET_MASK_OK_NOCOPY; |
3218 | } | 3219 | } |
3219 | 3220 | ||
3220 | #endif /* CONFIG_SMP */ | 3221 | #endif /* CONFIG_SMP */ |
@@ -3267,7 +3268,7 @@ static int hpet_msi_set_affinity(struct irq_data *data, | |||
3267 | 3268 | ||
3268 | hpet_msi_write(data->handler_data, &msg); | 3269 | hpet_msi_write(data->handler_data, &msg); |
3269 | 3270 | ||
3270 | return 0; | 3271 | return IRQ_SET_MASK_OK_NOCOPY; |
3271 | } | 3272 | } |
3272 | 3273 | ||
3273 | #endif /* CONFIG_SMP */ | 3274 | #endif /* CONFIG_SMP */ |
@@ -3340,7 +3341,7 @@ ht_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) | |||
3340 | return -1; | 3341 | return -1; |
3341 | 3342 | ||
3342 | target_ht_irq(data->irq, dest, cfg->vector); | 3343 | target_ht_irq(data->irq, dest, cfg->vector); |
3343 | return 0; | 3344 | return IRQ_SET_MASK_OK_NOCOPY; |
3344 | } | 3345 | } |
3345 | 3346 | ||
3346 | #endif | 3347 | #endif |
diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index f25c2765a5c9..a22c41656b52 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c | |||
@@ -222,7 +222,7 @@ uv_set_irq_affinity(struct irq_data *data, const struct cpumask *mask, | |||
222 | if (cfg->move_in_progress) | 222 | if (cfg->move_in_progress) |
223 | send_cleanup_vector(cfg); | 223 | send_cleanup_vector(cfg); |
224 | 224 | ||
225 | return 0; | 225 | return IRQ_SET_MASK_OK_NOCOPY; |
226 | } | 226 | } |
227 | 227 | ||
228 | /* | 228 | /* |