[RFC PATCH 5/9] x86: Tell irq work about self IPI support

From: Frederic Weisbecker
Date: Thu Aug 21 2014 - 10:53:19 EST


x86 supports irq work when local apic is available. This is partly known
on runtime so lets implement arch_irq_work_has_own_interrupt()
accordingly.

This should be safely called after setup_arch().

Cc: Catalin Iacob <iacobcatalin@xxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
---
arch/x86/kernel/irq_work.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c
index 54f60a2..b5f8fff 100644
--- a/arch/x86/kernel/irq_work.c
+++ b/arch/x86/kernel/irq_work.c
@@ -38,6 +38,11 @@ __visible void smp_trace_irq_work_interrupt(struct pt_regs *regs)
exiting_irq();
}

+int __init arch_irq_work_has_own_interrupt(void)
+{
+ return cpu_has_apic;
+}
+
void arch_irq_work_raise(void)
{
if (!cpu_has_apic)
--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/