diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 23:03:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 23:03:47 -0400 |
commit | 71998d1be4ae70e7d320cdd21595c1a02a29c61e (patch) | |
tree | ae386748d50db8b116d0eeaee2106f0f5f9b1c07 /arch/x86/kernel/apic/io_apic.c | |
parent | b2e09f633a3994ee97fa6bc734b533d9c8e6ea0f (diff) | |
parent | fb24da805729ee4a83efa34015948f7d64da4b28 (diff) |
Merge branch 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 irq fixes from Ingo Molnar:
"Two changes: a cpu-hotplug/irq race fix, plus a HyperV related fix"
* 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/irq: Fix fixup_irqs() error handling
x86, irq, pic: Probe for legacy PIC and set legacy_pic appropriately
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 9d0a9795a0f8..81e08eff05ee 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2297,7 +2297,7 @@ int __ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask, | |||
2297 | int err; | 2297 | int err; |
2298 | 2298 | ||
2299 | if (!config_enabled(CONFIG_SMP)) | 2299 | if (!config_enabled(CONFIG_SMP)) |
2300 | return -1; | 2300 | return -EPERM; |
2301 | 2301 | ||
2302 | if (!cpumask_intersects(mask, cpu_online_mask)) | 2302 | if (!cpumask_intersects(mask, cpu_online_mask)) |
2303 | return -EINVAL; | 2303 | return -EINVAL; |
@@ -2328,7 +2328,7 @@ int native_ioapic_set_affinity(struct irq_data *data, | |||
2328 | int ret; | 2328 | int ret; |
2329 | 2329 | ||
2330 | if (!config_enabled(CONFIG_SMP)) | 2330 | if (!config_enabled(CONFIG_SMP)) |
2331 | return -1; | 2331 | return -EPERM; |
2332 | 2332 | ||
2333 | raw_spin_lock_irqsave(&ioapic_lock, flags); | 2333 | raw_spin_lock_irqsave(&ioapic_lock, flags); |
2334 | ret = __ioapic_set_affinity(data, mask, &dest); | 2334 | ret = __ioapic_set_affinity(data, mask, &dest); |
@@ -3001,9 +3001,11 @@ msi_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) | |||
3001 | struct irq_cfg *cfg = data->chip_data; | 3001 | struct irq_cfg *cfg = data->chip_data; |
3002 | struct msi_msg msg; | 3002 | struct msi_msg msg; |
3003 | unsigned int dest; | 3003 | unsigned int dest; |
3004 | int ret; | ||
3004 | 3005 | ||
3005 | if (__ioapic_set_affinity(data, mask, &dest)) | 3006 | ret = __ioapic_set_affinity(data, mask, &dest); |
3006 | return -1; | 3007 | if (ret) |
3008 | return ret; | ||
3007 | 3009 | ||
3008 | __get_cached_msi_msg(data->msi_desc, &msg); | 3010 | __get_cached_msi_msg(data->msi_desc, &msg); |
3009 | 3011 | ||
@@ -3100,9 +3102,11 @@ dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, | |||
3100 | struct irq_cfg *cfg = data->chip_data; | 3102 | struct irq_cfg *cfg = data->chip_data; |
3101 | unsigned int dest, irq = data->irq; | 3103 | unsigned int dest, irq = data->irq; |
3102 | struct msi_msg msg; | 3104 | struct msi_msg msg; |
3105 | int ret; | ||
3103 | 3106 | ||
3104 | if (__ioapic_set_affinity(data, mask, &dest)) | 3107 | ret = __ioapic_set_affinity(data, mask, &dest); |
3105 | return -1; | 3108 | if (ret) |
3109 | return ret; | ||
3106 | 3110 | ||
3107 | dmar_msi_read(irq, &msg); | 3111 | dmar_msi_read(irq, &msg); |
3108 | 3112 | ||
@@ -3149,9 +3153,11 @@ static int hpet_msi_set_affinity(struct irq_data *data, | |||
3149 | struct irq_cfg *cfg = data->chip_data; | 3153 | struct irq_cfg *cfg = data->chip_data; |
3150 | struct msi_msg msg; | 3154 | struct msi_msg msg; |
3151 | unsigned int dest; | 3155 | unsigned int dest; |
3156 | int ret; | ||
3152 | 3157 | ||
3153 | if (__ioapic_set_affinity(data, mask, &dest)) | 3158 | ret = __ioapic_set_affinity(data, mask, &dest); |
3154 | return -1; | 3159 | if (ret) |
3160 | return ret; | ||
3155 | 3161 | ||
3156 | hpet_msi_read(data->handler_data, &msg); | 3162 | hpet_msi_read(data->handler_data, &msg); |
3157 | 3163 | ||
@@ -3218,9 +3224,11 @@ ht_set_affinity(struct irq_data *data, const struct cpumask *mask, bool force) | |||
3218 | { | 3224 | { |
3219 | struct irq_cfg *cfg = data->chip_data; | 3225 | struct irq_cfg *cfg = data->chip_data; |
3220 | unsigned int dest; | 3226 | unsigned int dest; |
3227 | int ret; | ||
3221 | 3228 | ||
3222 | if (__ioapic_set_affinity(data, mask, &dest)) | 3229 | ret = __ioapic_set_affinity(data, mask, &dest); |
3223 | return -1; | 3230 | if (ret) |
3231 | return ret; | ||
3224 | 3232 | ||
3225 | target_ht_irq(data->irq, dest, cfg->vector); | 3233 | target_ht_irq(data->irq, dest, cfg->vector); |
3226 | return IRQ_SET_MASK_OK_NOCOPY; | 3234 | return IRQ_SET_MASK_OK_NOCOPY; |