From: Greg Kroah-Hartman Date: Sun, 12 Oct 2014 03:54:51 +0000 (-0700) Subject: 3.17-stable patches X-Git-Tag: v3.17.1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=debe7ae00d86ce2dca7671815bdf45ef685fa497;p=thirdparty%2Fkernel%2Fstable-queue.git 3.17-stable patches added patches: arm-tell-irq-work-about-self-ipi-support.patch irq_work-force-raised-irq-work-to-run-on-irq-work-interrupt.patch irq_work-introduce-arch_irq_work_has_interrupt.patch x86-tell-irq-work-about-self-ipi-support.patch --- diff --git a/queue-3.17/arm-tell-irq-work-about-self-ipi-support.patch b/queue-3.17/arm-tell-irq-work-about-self-ipi-support.patch new file mode 100644 index 00000000000..a462cdd7e4e --- /dev/null +++ b/queue-3.17/arm-tell-irq-work-about-self-ipi-support.patch @@ -0,0 +1,63 @@ +From 09f6edd424218eb69078551b2ecfada1f2d098eb Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Sat, 16 Aug 2014 18:47:53 +0200 +Subject: arm: Tell irq work about self IPI support + +From: Frederic Weisbecker + +commit 09f6edd424218eb69078551b2ecfada1f2d098eb upstream. + +ARM irq work IPI support depends on SMP support. That information is +partly known at early boottime. Lets implement +arch_irq_work_has_interrupt() accordingly. + +Acked-by: Peter Zijlstra (Intel) +Cc: Ingo Molnar +Cc: Paul E. McKenney +Cc: Peter Zijlstra +Cc: Russell King +Cc: Thomas Gleixner +Signed-off-by: Frederic Weisbecker +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/include/asm/Kbuild | 1 - + arch/arm/include/asm/irq_work.h | 11 +++++++++++ + arch/arm/kernel/smp.c | 2 +- + 3 files changed, 12 insertions(+), 2 deletions(-) + +--- a/arch/arm/include/asm/Kbuild ++++ b/arch/arm/include/asm/Kbuild +@@ -11,7 +11,6 @@ generic-y += hash.h + generic-y += ioctl.h + generic-y += ipcbuf.h + generic-y += irq_regs.h +-generic-y += irq_work.h + generic-y += kdebug.h + generic-y += local.h + generic-y += local64.h +--- /dev/null ++++ b/arch/arm/include/asm/irq_work.h +@@ -0,0 +1,11 @@ ++#ifndef __ASM_ARM_IRQ_WORK_H ++#define __ASM_ARM_IRQ_WORK_H ++ ++#include ++ ++static inline bool arch_irq_work_has_interrupt(void) ++{ ++ return is_smp(); ++} ++ ++#endif /* _ASM_ARM_IRQ_WORK_H */ +--- a/arch/arm/kernel/smp.c ++++ b/arch/arm/kernel/smp.c +@@ -503,7 +503,7 @@ void arch_send_call_function_single_ipi( + #ifdef CONFIG_IRQ_WORK + void arch_irq_work_raise(void) + { +- if (is_smp()) ++ if (arch_irq_work_has_interrupt()) + smp_cross_call(cpumask_of(smp_processor_id()), IPI_IRQ_WORK); + } + #endif diff --git a/queue-3.17/irq_work-force-raised-irq-work-to-run-on-irq-work-interrupt.patch b/queue-3.17/irq_work-force-raised-irq-work-to-run-on-irq-work-interrupt.patch new file mode 100644 index 00000000000..1f2ce15476a --- /dev/null +++ b/queue-3.17/irq_work-force-raised-irq-work-to-run-on-irq-work-interrupt.patch @@ -0,0 +1,147 @@ +From 76a33061b9323b7fdb220ae5fa116c10833ec22e Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Sat, 16 Aug 2014 18:37:19 +0200 +Subject: irq_work: Force raised irq work to run on irq work interrupt + +From: Frederic Weisbecker + +commit 76a33061b9323b7fdb220ae5fa116c10833ec22e upstream. + +The nohz full kick, which restarts the tick when any resource depend +on it, can't be executed anywhere given the operation it does on timers. +If it is called from the scheduler or timers code, chances are that +we run into a deadlock. + +This is why we run the nohz full kick from an irq work. That way we make +sure that the kick runs on a virgin context. + +However if that's the case when irq work runs in its own dedicated +self-ipi, things are different for the big bunch of archs that don't +support the self triggered way. In order to support them, irq works are +also handled by the timer interrupt as fallback. + +Now when irq works run on the timer interrupt, the context isn't blank. +More precisely, they can run in the context of the hrtimer that runs the +tick. But the nohz kick cancels and restarts this hrtimer and cancelling +an hrtimer from itself isn't allowed. This is why we run in an endless +loop: + + Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 2 + CPU: 2 PID: 7538 Comm: kworker/u8:8 Not tainted 3.16.0+ #34 + Workqueue: btrfs-endio-write normal_work_helper [btrfs] + ffff880244c06c88 000000001b486fe1 ffff880244c06bf0 ffffffff8a7f1e37 + ffffffff8ac52a18 ffff880244c06c78 ffffffff8a7ef928 0000000000000010 + ffff880244c06c88 ffff880244c06c20 000000001b486fe1 0000000000000000 + Call Trace: + ] dump_stack+0x4e/0x7a + [] panic+0xd4/0x207 + [] watchdog_overflow_callback+0x118/0x120 + [] __perf_event_overflow+0xae/0x350 + [] ? perf_event_task_disable+0xa0/0xa0 + [] ? x86_perf_event_set_period+0xbf/0x150 + [] perf_event_overflow+0x14/0x20 + [] intel_pmu_handle_irq+0x206/0x410 + [] perf_event_nmi_handler+0x2b/0x50 + [] nmi_handle+0xd2/0x390 + [] ? nmi_handle+0x5/0x390 + [] ? match_held_lock+0x8/0x1b0 + [] default_do_nmi+0x72/0x1c0 + [] do_nmi+0xb8/0x100 + [] end_repeat_nmi+0x1e/0x2e + [] ? match_held_lock+0x8/0x1b0 + [] ? match_held_lock+0x8/0x1b0 + [] ? match_held_lock+0x8/0x1b0 + <] lock_acquired+0xaf/0x450 + [] ? lock_hrtimer_base.isra.20+0x25/0x50 + [] _raw_spin_lock_irqsave+0x78/0x90 + [] ? lock_hrtimer_base.isra.20+0x25/0x50 + [] lock_hrtimer_base.isra.20+0x25/0x50 + [] hrtimer_try_to_cancel+0x33/0x1e0 + [] hrtimer_cancel+0x1a/0x30 + [] tick_nohz_restart+0x17/0x90 + [] __tick_nohz_full_check+0xc3/0x100 + [] nohz_full_kick_work_func+0xe/0x10 + [] irq_work_run_list+0x44/0x70 + [] irq_work_run+0x2a/0x50 + [] update_process_times+0x5b/0x70 + [] tick_sched_handle.isra.21+0x25/0x60 + [] tick_sched_timer+0x41/0x60 + [] __run_hrtimer+0x72/0x470 + [] ? tick_sched_do_timer+0xb0/0xb0 + [] hrtimer_interrupt+0x117/0x270 + [] local_apic_timer_interrupt+0x37/0x60 + [] smp_apic_timer_interrupt+0x3f/0x50 + [] apic_timer_interrupt+0x6f/0x80 + +To fix this we force non-lazy irq works to run on irq work self-IPIs +when available. That ability of the arch to trigger irq work self IPIs +is available with arch_irq_work_has_interrupt(). + +Reported-by: Catalin Iacob +Reported-by: Dave Jones +Acked-by: Peter Zijlstra (Intel) +Cc: Ingo Molnar +Cc: Paul E. McKenney +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Signed-off-by: Frederic Weisbecker +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/irq_work.h | 1 + + kernel/irq_work.c | 15 +++++++++++++-- + kernel/time/timer.c | 2 +- + 3 files changed, 15 insertions(+), 3 deletions(-) + +--- a/include/linux/irq_work.h ++++ b/include/linux/irq_work.h +@@ -39,6 +39,7 @@ bool irq_work_queue_on(struct irq_work * + #endif + + void irq_work_run(void); ++void irq_work_tick(void); + void irq_work_sync(struct irq_work *work); + + #ifdef CONFIG_IRQ_WORK +--- a/kernel/irq_work.c ++++ b/kernel/irq_work.c +@@ -115,8 +115,10 @@ bool irq_work_needs_cpu(void) + + raised = &__get_cpu_var(raised_list); + lazy = &__get_cpu_var(lazy_list); +- if (llist_empty(raised) && llist_empty(lazy)) +- return false; ++ ++ if (llist_empty(raised) || arch_irq_work_has_interrupt()) ++ if (llist_empty(lazy)) ++ return false; + + /* All work should have been flushed before going offline */ + WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); +@@ -171,6 +173,15 @@ void irq_work_run(void) + } + EXPORT_SYMBOL_GPL(irq_work_run); + ++void irq_work_tick(void) ++{ ++ struct llist_head *raised = &__get_cpu_var(raised_list); ++ ++ if (!llist_empty(raised) && !arch_irq_work_has_interrupt()) ++ irq_work_run_list(raised); ++ irq_work_run_list(&__get_cpu_var(lazy_list)); ++} ++ + /* + * Synchronize against the irq_work @entry, ensures the entry is not + * currently in use. +--- a/kernel/time/timer.c ++++ b/kernel/time/timer.c +@@ -1385,7 +1385,7 @@ void update_process_times(int user_tick) + rcu_check_callbacks(cpu, user_tick); + #ifdef CONFIG_IRQ_WORK + if (in_irq()) +- irq_work_run(); ++ irq_work_tick(); + #endif + scheduler_tick(); + run_posix_cpu_timers(p); diff --git a/queue-3.17/irq_work-introduce-arch_irq_work_has_interrupt.patch b/queue-3.17/irq_work-introduce-arch_irq_work_has_interrupt.patch new file mode 100644 index 00000000000..788dc97cae5 --- /dev/null +++ b/queue-3.17/irq_work-introduce-arch_irq_work_has_interrupt.patch @@ -0,0 +1,380 @@ +From c5c38ef3d70377dc504a6a3f611a3ec814bc757b Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Sat, 6 Sep 2014 15:43:02 +0200 +Subject: irq_work: Introduce arch_irq_work_has_interrupt() + +From: Peter Zijlstra + +commit c5c38ef3d70377dc504a6a3f611a3ec814bc757b upstream. + +The nohz full code needs irq work to trigger its own interrupt so that +the subsystem can work even when the tick is stopped. + +Lets introduce arch_irq_work_has_interrupt() that archs can override to +tell about their support for this ability. + +Signed-off-by: Peter Zijlstra +Cc: Ingo Molnar +Cc: Paul E. McKenney +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Signed-off-by: Frederic Weisbecker +Signed-off-by: Greg Kroah-Hartman + +--- + arch/alpha/include/asm/Kbuild | 1 + + arch/arc/include/asm/Kbuild | 1 + + arch/arm/include/asm/Kbuild | 1 + + arch/arm64/include/asm/Kbuild | 3 ++- + arch/avr32/include/asm/Kbuild | 1 + + arch/blackfin/include/asm/Kbuild | 1 + + arch/c6x/include/asm/Kbuild | 1 + + arch/cris/include/asm/Kbuild | 1 + + arch/frv/include/asm/Kbuild | 1 + + arch/hexagon/include/asm/Kbuild | 1 + + arch/ia64/include/asm/Kbuild | 1 + + arch/m32r/include/asm/Kbuild | 1 + + arch/m68k/include/asm/Kbuild | 1 + + arch/metag/include/asm/Kbuild | 1 + + arch/microblaze/include/asm/Kbuild | 1 + + arch/mips/include/asm/Kbuild | 1 + + arch/mn10300/include/asm/Kbuild | 1 + + arch/openrisc/include/asm/Kbuild | 1 + + arch/parisc/include/asm/Kbuild | 1 + + arch/powerpc/include/asm/Kbuild | 1 + + arch/s390/include/asm/Kbuild | 1 + + arch/score/include/asm/Kbuild | 1 + + arch/sh/include/asm/Kbuild | 1 + + arch/sparc/include/asm/Kbuild | 1 + + arch/tile/include/asm/Kbuild | 1 + + arch/um/include/asm/Kbuild | 1 + + arch/unicore32/include/asm/Kbuild | 1 + + arch/x86/include/asm/Kbuild | 1 + + arch/xtensa/include/asm/Kbuild | 1 + + include/asm-generic/irq_work.h | 10 ++++++++++ + include/linux/irq_work.h | 2 ++ + 31 files changed, 42 insertions(+), 1 deletion(-) + +--- a/arch/alpha/include/asm/Kbuild ++++ b/arch/alpha/include/asm/Kbuild +@@ -4,6 +4,7 @@ generic-y += clkdev.h + generic-y += cputime.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/arc/include/asm/Kbuild ++++ b/arch/arc/include/asm/Kbuild +@@ -18,6 +18,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kmap_types.h + generic-y += kvm_para.h + generic-y += local.h +--- a/arch/arm/include/asm/Kbuild ++++ b/arch/arm/include/asm/Kbuild +@@ -11,6 +11,7 @@ generic-y += hash.h + generic-y += ioctl.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += local.h + generic-y += local64.h +--- a/arch/arm64/include/asm/Kbuild ++++ b/arch/arm64/include/asm/Kbuild +@@ -9,8 +9,8 @@ generic-y += current.h + generic-y += delay.h + generic-y += div64.h + generic-y += dma.h +-generic-y += emergency-restart.h + generic-y += early_ioremap.h ++generic-y += emergency-restart.h + generic-y += errno.h + generic-y += ftrace.h + generic-y += hash.h +@@ -19,6 +19,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- a/arch/avr32/include/asm/Kbuild ++++ b/arch/avr32/include/asm/Kbuild +@@ -9,6 +9,7 @@ generic-y += exec.h + generic-y += futex.h + generic-y += hash.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += local.h + generic-y += local64.h + generic-y += mcs_spinlock.h +--- a/arch/blackfin/include/asm/Kbuild ++++ b/arch/blackfin/include/asm/Kbuild +@@ -15,6 +15,7 @@ generic-y += hw_irq.h + generic-y += ioctl.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- a/arch/c6x/include/asm/Kbuild ++++ b/arch/c6x/include/asm/Kbuild +@@ -22,6 +22,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += local.h +--- a/arch/cris/include/asm/Kbuild ++++ b/arch/cris/include/asm/Kbuild +@@ -8,6 +8,7 @@ generic-y += clkdev.h + generic-y += cputime.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += kvm_para.h + generic-y += linkage.h + generic-y += mcs_spinlock.h +--- a/arch/frv/include/asm/Kbuild ++++ b/arch/frv/include/asm/Kbuild +@@ -3,6 +3,7 @@ generic-y += clkdev.h + generic-y += cputime.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/hexagon/include/asm/Kbuild ++++ b/arch/hexagon/include/asm/Kbuild +@@ -23,6 +23,7 @@ generic-y += ioctls.h + generic-y += iomap.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += local.h +--- a/arch/ia64/include/asm/Kbuild ++++ b/arch/ia64/include/asm/Kbuild +@@ -2,6 +2,7 @@ + generic-y += clkdev.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += kvm_para.h + generic-y += mcs_spinlock.h + generic-y += preempt.h +--- a/arch/m32r/include/asm/Kbuild ++++ b/arch/m32r/include/asm/Kbuild +@@ -3,6 +3,7 @@ generic-y += clkdev.h + generic-y += cputime.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += module.h + generic-y += preempt.h +--- a/arch/m68k/include/asm/Kbuild ++++ b/arch/m68k/include/asm/Kbuild +@@ -11,6 +11,7 @@ generic-y += hw_irq.h + generic-y += ioctl.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- a/arch/metag/include/asm/Kbuild ++++ b/arch/metag/include/asm/Kbuild +@@ -19,6 +19,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- a/arch/microblaze/include/asm/Kbuild ++++ b/arch/microblaze/include/asm/Kbuild +@@ -5,6 +5,7 @@ generic-y += cputime.h + generic-y += device.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/mips/include/asm/Kbuild ++++ b/arch/mips/include/asm/Kbuild +@@ -3,6 +3,7 @@ generic-y += cputime.h + generic-y += current.h + generic-y += emergency-restart.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += local64.h + generic-y += mcs_spinlock.h + generic-y += mutex.h +--- a/arch/mn10300/include/asm/Kbuild ++++ b/arch/mn10300/include/asm/Kbuild +@@ -4,6 +4,7 @@ generic-y += clkdev.h + generic-y += cputime.h + generic-y += exec.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/openrisc/include/asm/Kbuild ++++ b/arch/openrisc/include/asm/Kbuild +@@ -31,6 +31,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- a/arch/parisc/include/asm/Kbuild ++++ b/arch/parisc/include/asm/Kbuild +@@ -10,6 +10,7 @@ generic-y += exec.h + generic-y += hash.h + generic-y += hw_irq.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kvm_para.h + generic-y += local.h +--- a/arch/powerpc/include/asm/Kbuild ++++ b/arch/powerpc/include/asm/Kbuild +@@ -1,6 +1,7 @@ + + generic-y += clkdev.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += rwsem.h +--- a/arch/s390/include/asm/Kbuild ++++ b/arch/s390/include/asm/Kbuild +@@ -2,6 +2,7 @@ + + generic-y += clkdev.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/score/include/asm/Kbuild ++++ b/arch/score/include/asm/Kbuild +@@ -6,6 +6,7 @@ generic-y += barrier.h + generic-y += clkdev.h + generic-y += cputime.h + generic-y += hash.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += preempt.h + generic-y += scatterlist.h +--- a/arch/sh/include/asm/Kbuild ++++ b/arch/sh/include/asm/Kbuild +@@ -12,6 +12,7 @@ generic-y += hash.h + generic-y += ioctl.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kvm_para.h + generic-y += local.h + generic-y += local64.h +--- a/arch/sparc/include/asm/Kbuild ++++ b/arch/sparc/include/asm/Kbuild +@@ -8,6 +8,7 @@ generic-y += emergency-restart.h + generic-y += exec.h + generic-y += hash.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += linkage.h + generic-y += local.h + generic-y += local64.h +--- a/arch/tile/include/asm/Kbuild ++++ b/arch/tile/include/asm/Kbuild +@@ -17,6 +17,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += local.h + generic-y += local64.h + generic-y += mcs_spinlock.h +--- a/arch/um/include/asm/Kbuild ++++ b/arch/um/include/asm/Kbuild +@@ -14,6 +14,7 @@ generic-y += hash.h + generic-y += hw_irq.h + generic-y += io.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += mcs_spinlock.h + generic-y += mutex.h +--- a/arch/unicore32/include/asm/Kbuild ++++ b/arch/unicore32/include/asm/Kbuild +@@ -22,6 +22,7 @@ generic-y += ioctl.h + generic-y += ioctls.h + generic-y += ipcbuf.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += local.h +--- a/arch/x86/include/asm/Kbuild ++++ b/arch/x86/include/asm/Kbuild +@@ -7,5 +7,6 @@ genhdr-y += unistd_x32.h + generic-y += clkdev.h + generic-y += cputime.h + generic-y += early_ioremap.h ++generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += scatterlist.h +--- a/arch/xtensa/include/asm/Kbuild ++++ b/arch/xtensa/include/asm/Kbuild +@@ -12,6 +12,7 @@ generic-y += hardirq.h + generic-y += hash.h + generic-y += ioctl.h + generic-y += irq_regs.h ++generic-y += irq_work.h + generic-y += kdebug.h + generic-y += kmap_types.h + generic-y += kvm_para.h +--- /dev/null ++++ b/include/asm-generic/irq_work.h +@@ -0,0 +1,10 @@ ++#ifndef __ASM_IRQ_WORK_H ++#define __ASM_IRQ_WORK_H ++ ++static inline bool arch_irq_work_has_interrupt(void) ++{ ++ return false; ++} ++ ++#endif /* __ASM_IRQ_WORK_H */ ++ +--- a/include/linux/irq_work.h ++++ b/include/linux/irq_work.h +@@ -42,6 +42,8 @@ void irq_work_run(void); + void irq_work_sync(struct irq_work *work); + + #ifdef CONFIG_IRQ_WORK ++#include ++ + bool irq_work_needs_cpu(void); + #else + static inline bool irq_work_needs_cpu(void) { return false; } diff --git a/queue-3.17/series b/queue-3.17/series new file mode 100644 index 00000000000..391219db110 --- /dev/null +++ b/queue-3.17/series @@ -0,0 +1,4 @@ +irq_work-introduce-arch_irq_work_has_interrupt.patch +irq_work-force-raised-irq-work-to-run-on-irq-work-interrupt.patch +x86-tell-irq-work-about-self-ipi-support.patch +arm-tell-irq-work-about-self-ipi-support.patch diff --git a/queue-3.17/x86-tell-irq-work-about-self-ipi-support.patch b/queue-3.17/x86-tell-irq-work-about-self-ipi-support.patch new file mode 100644 index 00000000000..a97286a7cdb --- /dev/null +++ b/queue-3.17/x86-tell-irq-work-about-self-ipi-support.patch @@ -0,0 +1,63 @@ +From 3010279f0fc36f0388872203e63ca49912f648fd Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Sat, 16 Aug 2014 18:47:15 +0200 +Subject: x86: Tell irq work about self IPI support + +From: Frederic Weisbecker + +commit 3010279f0fc36f0388872203e63ca49912f648fd upstream. + +x86 supports irq work self-IPIs when local apic is available. This is +partly known on runtime so lets implement arch_irq_work_has_interrupt() +accordingly. + +This should be safely called after setup_arch(). + +Acked-by: Peter Zijlstra (Intel) +Cc: Ingo Molnar +Cc: Paul E. McKenney +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Signed-off-by: Frederic Weisbecker +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/Kbuild | 1 - + arch/x86/include/asm/irq_work.h | 11 +++++++++++ + arch/x86/kernel/irq_work.c | 2 +- + 3 files changed, 12 insertions(+), 2 deletions(-) + +--- a/arch/x86/include/asm/Kbuild ++++ b/arch/x86/include/asm/Kbuild +@@ -7,6 +7,5 @@ genhdr-y += unistd_x32.h + generic-y += clkdev.h + generic-y += cputime.h + generic-y += early_ioremap.h +-generic-y += irq_work.h + generic-y += mcs_spinlock.h + generic-y += scatterlist.h +--- /dev/null ++++ b/arch/x86/include/asm/irq_work.h +@@ -0,0 +1,11 @@ ++#ifndef _ASM_IRQ_WORK_H ++#define _ASM_IRQ_WORK_H ++ ++#include ++ ++static inline bool arch_irq_work_has_interrupt(void) ++{ ++ return cpu_has_apic; ++} ++ ++#endif /* _ASM_IRQ_WORK_H */ +--- a/arch/x86/kernel/irq_work.c ++++ b/arch/x86/kernel/irq_work.c +@@ -41,7 +41,7 @@ __visible void smp_trace_irq_work_interr + void arch_irq_work_raise(void) + { + #ifdef CONFIG_X86_LOCAL_APIC +- if (!cpu_has_apic) ++ if (!arch_irq_work_has_interrupt()) + return; + + apic->send_IPI_self(IRQ_WORK_VECTOR);