diff options
author | Fenghua Yu <fenghua.yu@intel.com> | 2012-11-13 14:32:49 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-11-14 18:28:11 -0500 |
commit | 8d966a04107e56993a051cd41ead0b4f23ba2414 (patch) | |
tree | 22b94809204a9931c621faf137f57844dc857ea0 | |
parent | 30242aa6023b71325c6b8addac06faf544a85fd0 (diff) |
x86, hotplug: Handle retrigger irq by the first available CPU
The first cpu in irq cfg->domain is likely to be CPU 0 and may not be available
when CPU 0 is offline. Instead of using CPU 0 to handle retriggered irq, we use
first available CPU which is online and in this irq's domain.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/1352835171-3958-13-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 1817fa911024..f78fc2b4deb0 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2199,9 +2199,11 @@ static int ioapic_retrigger_irq(struct irq_data *data) | |||
2199 | { | 2199 | { |
2200 | struct irq_cfg *cfg = data->chip_data; | 2200 | struct irq_cfg *cfg = data->chip_data; |
2201 | unsigned long flags; | 2201 | unsigned long flags; |
2202 | int cpu; | ||
2202 | 2203 | ||
2203 | raw_spin_lock_irqsave(&vector_lock, flags); | 2204 | raw_spin_lock_irqsave(&vector_lock, flags); |
2204 | apic->send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector); | 2205 | cpu = cpumask_first_and(cfg->domain, cpu_online_mask); |
2206 | apic->send_IPI_mask(cpumask_of(cpu), cfg->vector); | ||
2205 | raw_spin_unlock_irqrestore(&vector_lock, flags); | 2207 | raw_spin_unlock_irqrestore(&vector_lock, flags); |
2206 | 2208 | ||
2207 | return 1; | 2209 | return 1; |