diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-01-29 00:58:13 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-01-29 00:58:13 +0100 |
commit | 661b3d8201862c54ea5c8ab55406c45cadc906a0 (patch) | |
tree | d8a21dc13df59a27366df459fc5980ae5459ba2e /target | |
parent | 1a97cdb80945a675353ff4e9e01a3b9b0f50d419 (diff) |
linux: update to 4.9.6
Diffstat (limited to 'target')
-rw-r--r-- | target/config/Config.in.kernelversion | 2 | ||||
-rw-r--r-- | target/linux/config/Config.in.kernel | 4 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/crisv32_ethernet_driver.patch (renamed from target/linux/patches/4.9.4/crisv32_ethernet_driver.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/initramfs-nosizelimit.patch (renamed from target/linux/patches/4.9.4/initramfs-nosizelimit.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/ld-or1k.patch (renamed from target/linux/patches/4.9.4/ld-or1k.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/macsonic.patch (renamed from target/linux/patches/4.9.4/macsonic.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/microblaze-sigaltstack.patch (renamed from target/linux/patches/4.9.4/microblaze-sigaltstack.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/or1k-more-ram.patch (renamed from target/linux/patches/4.9.4/or1k-more-ram.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/patch-realtime (renamed from target/linux/patches/4.9.4/patch-realtime) | 5882 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/sh2.patch (renamed from target/linux/patches/4.9.4/sh2.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/startup.patch (renamed from target/linux/patches/4.9.4/startup.patch) | 0 | ||||
-rw-r--r-- | target/linux/patches/4.9.6/vdso2.patch (renamed from target/linux/patches/4.9.4/vdso2.patch) | 0 |
12 files changed, 2071 insertions, 3817 deletions
diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion index f3b9c54bc..eacd516c2 100644 --- a/target/config/Config.in.kernelversion +++ b/target/config/Config.in.kernelversion @@ -24,7 +24,7 @@ config ADK_TARGET_KERNEL_VERSION_GIT select ADK_TARGET_KERNEL_IMAGE if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK config ADK_TARGET_KERNEL_VERSION_4_9 - bool "4.9.4" + bool "4.9.6" depends on !ADK_TARGET_ARCH_CRIS depends on !ADK_TARGET_ARCH_METAG depends on !ADK_TARGET_ARCH_NDS32 diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel index e27ddb951..8086a4bf7 100644 --- a/target/linux/config/Config.in.kernel +++ b/target/linux/config/Config.in.kernel @@ -168,7 +168,7 @@ config ADK_KERNEL_PREEMPT_RTB depends on !ADK_KERNEL_OPROFILE depends on ADK_TARGET_KERNEL_VERSION_4_1 \ || ADK_TARGET_KERNEL_VERSION_4_4 \ - || ADK_TARGET_KERNEL_VERSION_4_8 + || ADK_TARGET_KERNEL_VERSION_4_9 help Preemptible Kernel (Basic RT) @@ -179,7 +179,7 @@ config ADK_KERNEL_PREEMPT_RT_FULL depends on !ADK_KERNEL_OPROFILE depends on ADK_TARGET_KERNEL_VERSION_4_1 \ || ADK_TARGET_KERNEL_VERSION_4_4 \ - || ADK_TARGET_KERNEL_VERSION_4_8 + || ADK_TARGET_KERNEL_VERSION_4_9 help Fully Preemptible Kernel (RealTime) https://www.kernel.org/pub/linux/kernel/projects/rt/ diff --git a/target/linux/patches/4.9.4/crisv32_ethernet_driver.patch b/target/linux/patches/4.9.6/crisv32_ethernet_driver.patch index 0cef202fc..0cef202fc 100644 --- a/target/linux/patches/4.9.4/crisv32_ethernet_driver.patch +++ b/target/linux/patches/4.9.6/crisv32_ethernet_driver.patch diff --git a/target/linux/patches/4.9.4/initramfs-nosizelimit.patch b/target/linux/patches/4.9.6/initramfs-nosizelimit.patch index 40d2f6bd8..40d2f6bd8 100644 --- a/target/linux/patches/4.9.4/initramfs-nosizelimit.patch +++ b/target/linux/patches/4.9.6/initramfs-nosizelimit.patch diff --git a/target/linux/patches/4.9.4/ld-or1k.patch b/target/linux/patches/4.9.6/ld-or1k.patch index 264f9166f..264f9166f 100644 --- a/target/linux/patches/4.9.4/ld-or1k.patch +++ b/target/linux/patches/4.9.6/ld-or1k.patch diff --git a/target/linux/patches/4.9.4/macsonic.patch b/target/linux/patches/4.9.6/macsonic.patch index 75a6fcad2..75a6fcad2 100644 --- a/target/linux/patches/4.9.4/macsonic.patch +++ b/target/linux/patches/4.9.6/macsonic.patch diff --git a/target/linux/patches/4.9.4/microblaze-sigaltstack.patch b/target/linux/patches/4.9.6/microblaze-sigaltstack.patch index c4064e8b9..c4064e8b9 100644 --- a/target/linux/patches/4.9.4/microblaze-sigaltstack.patch +++ b/target/linux/patches/4.9.6/microblaze-sigaltstack.patch diff --git a/target/linux/patches/4.9.4/or1k-more-ram.patch b/target/linux/patches/4.9.6/or1k-more-ram.patch index de848c838..de848c838 100644 --- a/target/linux/patches/4.9.4/or1k-more-ram.patch +++ b/target/linux/patches/4.9.6/or1k-more-ram.patch diff --git a/target/linux/patches/4.9.4/patch-realtime b/target/linux/patches/4.9.6/patch-realtime index d3a9ebee7..abc03f9f5 100644 --- a/target/linux/patches/4.9.4/patch-realtime +++ b/target/linux/patches/4.9.6/patch-realtime @@ -1,6 +1,18 @@ -diff -Nur linux-4.8.15.orig/arch/arm/include/asm/switch_to.h linux-4.8.15/arch/arm/include/asm/switch_to.h ---- linux-4.8.15.orig/arch/arm/include/asm/switch_to.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/include/asm/switch_to.h 2017-01-01 17:07:11.543137886 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/include/asm/irq.h linux-4.9.6/arch/arm/include/asm/irq.h +--- linux-4.9.6.orig/arch/arm/include/asm/irq.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/include/asm/irq.h 2017-01-28 13:59:09.887654498 +0100 +@@ -22,6 +22,8 @@ + #endif + + #ifndef __ASSEMBLY__ ++#include <linux/cpumask.h> ++ + struct irqaction; + struct pt_regs; + extern void migrate_irqs(void); +diff -Nur linux-4.9.6.orig/arch/arm/include/asm/switch_to.h linux-4.9.6/arch/arm/include/asm/switch_to.h +--- linux-4.9.6.orig/arch/arm/include/asm/switch_to.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/include/asm/switch_to.h 2017-01-28 13:59:09.887654498 +0100 @@ -3,6 +3,13 @@ #include <linux/thread_info.h> @@ -23,9 +35,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/include/asm/switch_to.h linux-4.8.15/arch/a last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ } while (0) -diff -Nur linux-4.8.15.orig/arch/arm/include/asm/thread_info.h linux-4.8.15/arch/arm/include/asm/thread_info.h ---- linux-4.8.15.orig/arch/arm/include/asm/thread_info.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/include/asm/thread_info.h 2017-01-01 17:07:11.547138137 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/include/asm/thread_info.h linux-4.9.6/arch/arm/include/asm/thread_info.h +--- linux-4.9.6.orig/arch/arm/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/include/asm/thread_info.h 2017-01-28 13:59:09.887654498 +0100 @@ -49,6 +49,7 @@ struct thread_info { unsigned long flags; /* low level flags */ @@ -62,9 +74,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/include/asm/thread_info.h linux-4.8.15/arch #endif /* __KERNEL__ */ #endif /* __ASM_ARM_THREAD_INFO_H */ -diff -Nur linux-4.8.15.orig/arch/arm/Kconfig linux-4.8.15/arch/arm/Kconfig ---- linux-4.8.15.orig/arch/arm/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/Kconfig 2017-01-01 17:07:11.487134269 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/Kconfig linux-4.9.6/arch/arm/Kconfig +--- linux-4.9.6.orig/arch/arm/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/Kconfig 2017-01-28 13:59:09.887654498 +0100 @@ -36,7 +36,7 @@ select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT) select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6 @@ -82,9 +94,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/Kconfig linux-4.8.15/arch/arm/Kconfig select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE) select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_SYSCALL_TRACEPOINTS -diff -Nur linux-4.8.15.orig/arch/arm/kernel/asm-offsets.c linux-4.8.15/arch/arm/kernel/asm-offsets.c ---- linux-4.8.15.orig/arch/arm/kernel/asm-offsets.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/asm-offsets.c 2017-01-01 17:07:11.587140711 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/asm-offsets.c linux-4.9.6/arch/arm/kernel/asm-offsets.c +--- linux-4.9.6.orig/arch/arm/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/asm-offsets.c 2017-01-28 13:59:09.887654498 +0100 @@ -65,6 +65,7 @@ BLANK(); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); @@ -93,9 +105,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/asm-offsets.c linux-4.8.15/arch/arm/ DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.8.15.orig/arch/arm/kernel/entry-armv.S linux-4.8.15/arch/arm/kernel/entry-armv.S ---- linux-4.8.15.orig/arch/arm/kernel/entry-armv.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/entry-armv.S 2017-01-01 17:07:11.611142259 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-armv.S linux-4.9.6/arch/arm/kernel/entry-armv.S +--- linux-4.9.6.orig/arch/arm/kernel/entry-armv.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/entry-armv.S 2017-01-28 13:59:09.887654498 +0100 @@ -220,11 +220,18 @@ #ifdef CONFIG_PREEMPT @@ -133,9 +145,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/entry-armv.S linux-4.8.15/arch/arm/k #endif __und_fault: -diff -Nur linux-4.8.15.orig/arch/arm/kernel/entry-common.S linux-4.8.15/arch/arm/kernel/entry-common.S ---- linux-4.8.15.orig/arch/arm/kernel/entry-common.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/entry-common.S 2017-01-01 17:07:11.615142513 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/entry-common.S linux-4.9.6/arch/arm/kernel/entry-common.S +--- linux-4.9.6.orig/arch/arm/kernel/entry-common.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/entry-common.S 2017-01-28 13:59:09.887654498 +0100 @@ -36,7 +36,9 @@ UNWIND(.cantunwind ) disable_irq_notrace @ disable interrupts @@ -160,9 +172,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/entry-common.S linux-4.8.15/arch/arm UNWIND(.fnend ) ENDPROC(ret_fast_syscall) -diff -Nur linux-4.8.15.orig/arch/arm/kernel/patch.c linux-4.8.15/arch/arm/kernel/patch.c ---- linux-4.8.15.orig/arch/arm/kernel/patch.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/patch.c 2017-01-01 17:07:11.623143039 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/patch.c linux-4.9.6/arch/arm/kernel/patch.c +--- linux-4.9.6.orig/arch/arm/kernel/patch.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/patch.c 2017-01-28 13:59:09.895654805 +0100 @@ -15,7 +15,7 @@ unsigned int insn; }; @@ -190,10 +202,10 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/patch.c linux-4.8.15/arch/arm/kernel else __release(&patch_lock); } -diff -Nur linux-4.8.15.orig/arch/arm/kernel/process.c linux-4.8.15/arch/arm/kernel/process.c ---- linux-4.8.15.orig/arch/arm/kernel/process.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/process.c 2017-01-01 17:07:11.631143548 +0100 -@@ -323,6 +323,30 @@ +diff -Nur linux-4.9.6.orig/arch/arm/kernel/process.c linux-4.9.6/arch/arm/kernel/process.c +--- linux-4.9.6.orig/arch/arm/kernel/process.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/process.c 2017-01-28 13:59:09.895654805 +0100 +@@ -322,6 +322,30 @@ } #ifdef CONFIG_MMU @@ -224,9 +236,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/process.c linux-4.8.15/arch/arm/kern #ifdef CONFIG_KUSER_HELPERS /* * The vectors page is always readable from user space for the -diff -Nur linux-4.8.15.orig/arch/arm/kernel/signal.c linux-4.8.15/arch/arm/kernel/signal.c ---- linux-4.8.15.orig/arch/arm/kernel/signal.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/signal.c 2017-01-01 17:07:11.659145353 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/signal.c linux-4.9.6/arch/arm/kernel/signal.c +--- linux-4.9.6.orig/arch/arm/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/signal.c 2017-01-28 13:59:09.895654805 +0100 @@ -572,7 +572,8 @@ */ trace_hardirqs_off(); @@ -237,9 +249,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/signal.c linux-4.8.15/arch/arm/kerne schedule(); } else { if (unlikely(!user_mode(regs))) -diff -Nur linux-4.8.15.orig/arch/arm/kernel/smp.c linux-4.8.15/arch/arm/kernel/smp.c ---- linux-4.8.15.orig/arch/arm/kernel/smp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/smp.c 2017-01-01 17:07:11.671146131 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/smp.c linux-4.9.6/arch/arm/kernel/smp.c +--- linux-4.9.6.orig/arch/arm/kernel/smp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/smp.c 2017-01-28 13:59:09.895654805 +0100 @@ -234,8 +234,6 @@ flush_cache_louis(); local_flush_tlb_all(); @@ -259,9 +271,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/smp.c linux-4.8.15/arch/arm/kernel/s pr_notice("CPU%u: shutdown\n", cpu); /* -diff -Nur linux-4.8.15.orig/arch/arm/kernel/unwind.c linux-4.8.15/arch/arm/kernel/unwind.c ---- linux-4.8.15.orig/arch/arm/kernel/unwind.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kernel/unwind.c 2017-01-01 17:07:11.671146131 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/kernel/unwind.c linux-4.9.6/arch/arm/kernel/unwind.c +--- linux-4.9.6.orig/arch/arm/kernel/unwind.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kernel/unwind.c 2017-01-28 13:59:09.895654805 +0100 @@ -93,7 +93,7 @@ static const struct unwind_idx *__origin_unwind_idx; extern const struct unwind_idx __stop_unwind_idx[]; @@ -313,10 +325,10 @@ diff -Nur linux-4.8.15.orig/arch/arm/kernel/unwind.c linux-4.8.15/arch/arm/kerne kfree(tab); } -diff -Nur linux-4.8.15.orig/arch/arm/kvm/arm.c linux-4.8.15/arch/arm/kvm/arm.c ---- linux-4.8.15.orig/arch/arm/kvm/arm.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/kvm/arm.c 2017-01-01 17:07:11.675146381 +0100 -@@ -584,7 +584,7 @@ +diff -Nur linux-4.9.6.orig/arch/arm/kvm/arm.c linux-4.9.6/arch/arm/kvm/arm.c +--- linux-4.9.6.orig/arch/arm/kvm/arm.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/kvm/arm.c 2017-01-28 13:59:09.895654805 +0100 +@@ -619,7 +619,7 @@ * involves poking the GIC, which must be done in a * non-preemptible context. */ @@ -325,7 +337,7 @@ diff -Nur linux-4.8.15.orig/arch/arm/kvm/arm.c linux-4.8.15/arch/arm/kvm/arm.c kvm_pmu_flush_hwstate(vcpu); kvm_timer_flush_hwstate(vcpu); kvm_vgic_flush_hwstate(vcpu); -@@ -605,7 +605,7 @@ +@@ -640,7 +640,7 @@ kvm_pmu_sync_hwstate(vcpu); kvm_timer_sync_hwstate(vcpu); kvm_vgic_sync_hwstate(vcpu); @@ -334,7 +346,7 @@ diff -Nur linux-4.8.15.orig/arch/arm/kvm/arm.c linux-4.8.15/arch/arm/kvm/arm.c continue; } -@@ -661,7 +661,7 @@ +@@ -696,7 +696,7 @@ kvm_vgic_sync_hwstate(vcpu); @@ -343,9 +355,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/kvm/arm.c linux-4.8.15/arch/arm/kvm/arm.c ret = handle_exit(vcpu, run, ret); } -diff -Nur linux-4.8.15.orig/arch/arm/mach-exynos/platsmp.c linux-4.8.15/arch/arm/mach-exynos/platsmp.c ---- linux-4.8.15.orig/arch/arm/mach-exynos/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-exynos/platsmp.c 2017-01-01 17:07:11.707148443 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-exynos/platsmp.c linux-4.9.6/arch/arm/mach-exynos/platsmp.c +--- linux-4.9.6.orig/arch/arm/mach-exynos/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-exynos/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -229,7 +229,7 @@ return (void __iomem *)(S5P_VA_SCU); } @@ -393,9 +405,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-exynos/platsmp.c linux-4.8.15/arch/arm return pen_release != -1 ? ret : 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mach-hisi/platmcpm.c linux-4.8.15/arch/arm/mach-hisi/platmcpm.c ---- linux-4.8.15.orig/arch/arm/mach-hisi/platmcpm.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-hisi/platmcpm.c 2017-01-01 17:07:11.747151017 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-hisi/platmcpm.c linux-4.9.6/arch/arm/mach-hisi/platmcpm.c +--- linux-4.9.6.orig/arch/arm/mach-hisi/platmcpm.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-hisi/platmcpm.c 2017-01-28 13:59:09.895654805 +0100 @@ -61,7 +61,7 @@ static void __iomem *sysctrl, *fabric; @@ -481,9 +493,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-hisi/platmcpm.c linux-4.8.15/arch/arm/ return 0; } #endif -diff -Nur linux-4.8.15.orig/arch/arm/mach-omap2/omap-smp.c linux-4.8.15/arch/arm/mach-omap2/omap-smp.c ---- linux-4.8.15.orig/arch/arm/mach-omap2/omap-smp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-omap2/omap-smp.c 2017-01-01 17:07:11.763152049 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-omap2/omap-smp.c linux-4.9.6/arch/arm/mach-omap2/omap-smp.c +--- linux-4.9.6.orig/arch/arm/mach-omap2/omap-smp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-omap2/omap-smp.c 2017-01-28 13:59:09.895654805 +0100 @@ -64,7 +64,7 @@ .startup_addr = omap5_secondary_startup, }; @@ -522,9 +534,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-omap2/omap-smp.c linux-4.8.15/arch/arm return 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mach-prima2/platsmp.c linux-4.8.15/arch/arm/mach-prima2/platsmp.c ---- linux-4.8.15.orig/arch/arm/mach-prima2/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-prima2/platsmp.c 2017-01-01 17:07:11.795154111 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-prima2/platsmp.c linux-4.9.6/arch/arm/mach-prima2/platsmp.c +--- linux-4.9.6.orig/arch/arm/mach-prima2/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-prima2/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -22,7 +22,7 @@ static void __iomem *clk_base; @@ -563,9 +575,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-prima2/platsmp.c linux-4.8.15/arch/arm return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mach-qcom/platsmp.c linux-4.8.15/arch/arm/mach-qcom/platsmp.c ---- linux-4.8.15.orig/arch/arm/mach-qcom/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-qcom/platsmp.c 2017-01-01 17:07:11.803154626 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-qcom/platsmp.c linux-4.9.6/arch/arm/mach-qcom/platsmp.c +--- linux-4.9.6.orig/arch/arm/mach-qcom/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-qcom/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -46,7 +46,7 @@ extern void secondary_startup_arm(void); @@ -604,9 +616,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-qcom/platsmp.c linux-4.8.15/arch/arm/m return ret; } -diff -Nur linux-4.8.15.orig/arch/arm/mach-spear/platsmp.c linux-4.8.15/arch/arm/mach-spear/platsmp.c ---- linux-4.8.15.orig/arch/arm/mach-spear/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-spear/platsmp.c 2017-01-01 17:07:11.847157467 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-spear/platsmp.c linux-4.9.6/arch/arm/mach-spear/platsmp.c +--- linux-4.9.6.orig/arch/arm/mach-spear/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-spear/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -32,7 +32,7 @@ sync_cache_w(&pen_release); } @@ -645,9 +657,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-spear/platsmp.c linux-4.8.15/arch/arm/ return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mach-sti/platsmp.c linux-4.8.15/arch/arm/mach-sti/platsmp.c ---- linux-4.8.15.orig/arch/arm/mach-sti/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mach-sti/platsmp.c 2017-01-01 17:07:11.851157720 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mach-sti/platsmp.c linux-4.9.6/arch/arm/mach-sti/platsmp.c +--- linux-4.9.6.orig/arch/arm/mach-sti/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mach-sti/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -35,7 +35,7 @@ sync_cache_w(&pen_release); } @@ -686,9 +698,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mach-sti/platsmp.c linux-4.8.15/arch/arm/ma return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mm/fault.c linux-4.8.15/arch/arm/mm/fault.c ---- linux-4.8.15.orig/arch/arm/mm/fault.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mm/fault.c 2017-01-01 17:07:11.879159524 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mm/fault.c linux-4.9.6/arch/arm/mm/fault.c +--- linux-4.9.6.orig/arch/arm/mm/fault.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mm/fault.c 2017-01-28 13:59:09.895654805 +0100 @@ -430,6 +430,9 @@ if (addr < TASK_SIZE) return do_page_fault(addr, fsr, regs); @@ -709,9 +721,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mm/fault.c linux-4.8.15/arch/arm/mm/fault.c do_bad_area(addr, fsr, regs); return 0; } -diff -Nur linux-4.8.15.orig/arch/arm/mm/highmem.c linux-4.8.15/arch/arm/mm/highmem.c ---- linux-4.8.15.orig/arch/arm/mm/highmem.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/mm/highmem.c 2017-01-01 17:07:11.879159524 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/mm/highmem.c linux-4.9.6/arch/arm/mm/highmem.c +--- linux-4.9.6.orig/arch/arm/mm/highmem.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/mm/highmem.c 2017-01-28 13:59:09.895654805 +0100 @@ -34,6 +34,11 @@ return *ptep; } @@ -842,9 +854,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/mm/highmem.c linux-4.8.15/arch/arm/mm/highm + } +} +#endif -diff -Nur linux-4.8.15.orig/arch/arm/plat-versatile/platsmp.c linux-4.8.15/arch/arm/plat-versatile/platsmp.c ---- linux-4.8.15.orig/arch/arm/plat-versatile/platsmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm/plat-versatile/platsmp.c 2017-01-01 17:07:11.939163389 +0100 +diff -Nur linux-4.9.6.orig/arch/arm/plat-versatile/platsmp.c linux-4.9.6/arch/arm/plat-versatile/platsmp.c +--- linux-4.9.6.orig/arch/arm/plat-versatile/platsmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm/plat-versatile/platsmp.c 2017-01-28 13:59:09.895654805 +0100 @@ -32,7 +32,7 @@ sync_cache_w(&pen_release); } @@ -883,9 +895,9 @@ diff -Nur linux-4.8.15.orig/arch/arm/plat-versatile/platsmp.c linux-4.8.15/arch/ return pen_release != -1 ? -ENOSYS : 0; } -diff -Nur linux-4.8.15.orig/arch/arm64/include/asm/thread_info.h linux-4.8.15/arch/arm64/include/asm/thread_info.h ---- linux-4.8.15.orig/arch/arm64/include/asm/thread_info.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm64/include/asm/thread_info.h 2017-01-01 17:07:12.027169062 +0100 +diff -Nur linux-4.9.6.orig/arch/arm64/include/asm/thread_info.h linux-4.9.6/arch/arm64/include/asm/thread_info.h +--- linux-4.9.6.orig/arch/arm64/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm64/include/asm/thread_info.h 2017-01-28 13:59:09.895654805 +0100 @@ -49,6 +49,7 @@ mm_segment_t addr_limit; /* address limit */ struct task_struct *task; /* main task structure */ @@ -894,7 +906,7 @@ diff -Nur linux-4.8.15.orig/arch/arm64/include/asm/thread_info.h linux-4.8.15/ar int cpu; /* cpu */ }; -@@ -109,6 +110,7 @@ +@@ -112,6 +113,7 @@ #define TIF_NEED_RESCHED 1 #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ #define TIF_FOREIGN_FPSTATE 3 /* CPU's FP state is not current's */ @@ -902,7 +914,7 @@ diff -Nur linux-4.8.15.orig/arch/arm64/include/asm/thread_info.h linux-4.8.15/ar #define TIF_NOHZ 7 #define TIF_SYSCALL_TRACE 8 #define TIF_SYSCALL_AUDIT 9 -@@ -124,6 +126,7 @@ +@@ -127,6 +129,7 @@ #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_FOREIGN_FPSTATE (1 << TIF_FOREIGN_FPSTATE) @@ -910,20 +922,21 @@ diff -Nur linux-4.8.15.orig/arch/arm64/include/asm/thread_info.h linux-4.8.15/ar #define _TIF_NOHZ (1 << TIF_NOHZ) #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) -@@ -132,7 +135,8 @@ +@@ -135,7 +138,9 @@ #define _TIF_32BIT (1 << TIF_32BIT) #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ - _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE) + _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \ + _TIF_NEED_RESCHED_LAZY) ++#define _TIF_NEED_RESCHED_MASK (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY) #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \ -diff -Nur linux-4.8.15.orig/arch/arm64/Kconfig linux-4.8.15/arch/arm64/Kconfig ---- linux-4.8.15.orig/arch/arm64/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm64/Kconfig 2017-01-01 17:07:11.979165970 +0100 -@@ -90,6 +90,7 @@ +diff -Nur linux-4.9.6.orig/arch/arm64/Kconfig linux-4.9.6/arch/arm64/Kconfig +--- linux-4.9.6.orig/arch/arm64/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm64/Kconfig 2017-01-28 13:59:09.895654805 +0100 +@@ -91,6 +91,7 @@ select HAVE_PERF_EVENTS select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP @@ -931,7 +944,7 @@ diff -Nur linux-4.8.15.orig/arch/arm64/Kconfig linux-4.8.15/arch/arm64/Kconfig select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RCU_TABLE_FREE select HAVE_SYSCALL_TRACEPOINTS -@@ -689,7 +690,7 @@ +@@ -694,7 +695,7 @@ config XEN bool "Xen guest support on ARM64" @@ -940,10 +953,10 @@ diff -Nur linux-4.8.15.orig/arch/arm64/Kconfig linux-4.8.15/arch/arm64/Kconfig select SWIOTLB_XEN select PARAVIRT help -diff -Nur linux-4.8.15.orig/arch/arm64/kernel/asm-offsets.c linux-4.8.15/arch/arm64/kernel/asm-offsets.c ---- linux-4.8.15.orig/arch/arm64/kernel/asm-offsets.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm64/kernel/asm-offsets.c 2017-01-01 17:07:12.079172403 +0100 -@@ -37,6 +37,7 @@ +diff -Nur linux-4.9.6.orig/arch/arm64/kernel/asm-offsets.c linux-4.9.6/arch/arm64/kernel/asm-offsets.c +--- linux-4.9.6.orig/arch/arm64/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm64/kernel/asm-offsets.c 2017-01-28 13:59:09.895654805 +0100 +@@ -38,6 +38,7 @@ BLANK(); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); @@ -951,10 +964,10 @@ diff -Nur linux-4.8.15.orig/arch/arm64/kernel/asm-offsets.c linux-4.8.15/arch/ar DEFINE(TI_ADDR_LIMIT, offsetof(struct thread_info, addr_limit)); DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.8.15.orig/arch/arm64/kernel/entry.S linux-4.8.15/arch/arm64/kernel/entry.S ---- linux-4.8.15.orig/arch/arm64/kernel/entry.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/arm64/kernel/entry.S 2017-01-01 17:07:12.083172658 +0100 -@@ -434,11 +434,16 @@ +diff -Nur linux-4.9.6.orig/arch/arm64/kernel/entry.S linux-4.9.6/arch/arm64/kernel/entry.S +--- linux-4.9.6.orig/arch/arm64/kernel/entry.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm64/kernel/entry.S 2017-01-28 13:59:09.895654805 +0100 +@@ -428,11 +428,16 @@ #ifdef CONFIG_PREEMPT ldr w24, [tsk, #TI_PREEMPT] // get preempt count @@ -974,7 +987,7 @@ diff -Nur linux-4.8.15.orig/arch/arm64/kernel/entry.S linux-4.8.15/arch/arm64/ke #endif #ifdef CONFIG_TRACE_IRQFLAGS bl trace_hardirqs_on -@@ -452,6 +457,7 @@ +@@ -446,6 +451,7 @@ 1: bl preempt_schedule_irq // irq en/disable is done inside ldr x0, [tsk, #TI_FLAGS] // get new tasks TI_FLAGS tbnz x0, #TIF_NEED_RESCHED, 1b // needs rescheduling? @@ -982,17 +995,21 @@ diff -Nur linux-4.8.15.orig/arch/arm64/kernel/entry.S linux-4.8.15/arch/arm64/ke ret x24 #endif -@@ -708,6 +714,7 @@ - */ - work_pending: - tbnz x1, #TIF_NEED_RESCHED, work_resched -+ tbnz x1, #TIF_NEED_RESCHED_LAZY, work_resched - /* TIF_SIGPENDING, TIF_NOTIFY_RESUME or TIF_FOREIGN_FPSTATE case */ - mov x0, sp // 'regs' - enable_irq // enable interrupts for do_notify_resume() -diff -Nur linux-4.8.15.orig/arch/Kconfig linux-4.8.15/arch/Kconfig ---- linux-4.8.15.orig/arch/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/Kconfig 2017-01-01 17:07:11.431130672 +0100 +diff -Nur linux-4.9.6.orig/arch/arm64/kernel/signal.c linux-4.9.6/arch/arm64/kernel/signal.c +--- linux-4.9.6.orig/arch/arm64/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/arm64/kernel/signal.c 2017-01-28 13:59:09.895654805 +0100 +@@ -409,7 +409,7 @@ + */ + trace_hardirqs_off(); + do { +- if (thread_flags & _TIF_NEED_RESCHED) { ++ if (thread_flags & _TIF_NEED_RESCHED_MASK) { + schedule(); + } else { + local_irq_enable(); +diff -Nur linux-4.9.6.orig/arch/Kconfig linux-4.9.6/arch/Kconfig +--- linux-4.9.6.orig/arch/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/Kconfig 2017-01-28 13:59:09.887654498 +0100 @@ -9,6 +9,7 @@ tristate "OProfile system profiling" depends on PROFILING @@ -1009,10 +1026,10 @@ diff -Nur linux-4.8.15.orig/arch/Kconfig linux-4.8.15/arch/Kconfig help This option enables a transparent branch optimization that makes certain almost-always-true or almost-always-false branch -diff -Nur linux-4.8.15.orig/arch/mips/Kconfig linux-4.8.15/arch/mips/Kconfig ---- linux-4.8.15.orig/arch/mips/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/mips/Kconfig 2017-01-01 17:07:12.275185025 +0100 -@@ -2480,7 +2480,7 @@ +diff -Nur linux-4.9.6.orig/arch/mips/Kconfig linux-4.9.6/arch/mips/Kconfig +--- linux-4.9.6.orig/arch/mips/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/mips/Kconfig 2017-01-28 13:59:09.895654805 +0100 +@@ -2514,7 +2514,7 @@ # config HIGHMEM bool "High Memory Support" @@ -1021,9 +1038,9 @@ diff -Nur linux-4.8.15.orig/arch/mips/Kconfig linux-4.8.15/arch/mips/Kconfig config CPU_SUPPORTS_HIGHMEM bool -diff -Nur linux-4.8.15.orig/arch/powerpc/include/asm/thread_info.h linux-4.8.15/arch/powerpc/include/asm/thread_info.h ---- linux-4.8.15.orig/arch/powerpc/include/asm/thread_info.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/include/asm/thread_info.h 2017-01-01 17:07:12.499199453 +0100 +diff -Nur linux-4.9.6.orig/arch/powerpc/include/asm/thread_info.h linux-4.9.6/arch/powerpc/include/asm/thread_info.h +--- linux-4.9.6.orig/arch/powerpc/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/include/asm/thread_info.h 2017-01-28 13:59:09.895654805 +0100 @@ -43,6 +43,8 @@ int cpu; /* cpu we're on */ int preempt_count; /* 0 => preemptable, @@ -1070,10 +1087,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/include/asm/thread_info.h linux-4.8.15/ /* Bits in local_flags */ /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ -diff -Nur linux-4.8.15.orig/arch/powerpc/Kconfig linux-4.8.15/arch/powerpc/Kconfig ---- linux-4.8.15.orig/arch/powerpc/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/Kconfig 2017-01-01 17:07:12.435195331 +0100 -@@ -57,10 +57,11 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/Kconfig linux-4.9.6/arch/powerpc/Kconfig +--- linux-4.9.6.orig/arch/powerpc/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/Kconfig 2017-01-28 13:59:09.895654805 +0100 +@@ -52,10 +52,11 @@ config RWSEM_GENERIC_SPINLOCK bool @@ -1086,7 +1103,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/Kconfig linux-4.8.15/arch/powerpc/Kconf config GENERIC_LOCKBREAK bool -@@ -140,6 +141,7 @@ +@@ -134,6 +135,7 @@ select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER @@ -1094,7 +1111,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/Kconfig linux-4.8.15/arch/powerpc/Kconf select HAVE_MOD_ARCH_SPECIFIC select MODULES_USE_ELF_RELA select CLONE_BACKWARDS -@@ -326,7 +328,7 @@ +@@ -321,7 +323,7 @@ config HIGHMEM bool "High memory support" @@ -1103,9 +1120,9 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/Kconfig linux-4.8.15/arch/powerpc/Kconf source kernel/Kconfig.hz source kernel/Kconfig.preempt -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/asm-offsets.c linux-4.8.15/arch/powerpc/kernel/asm-offsets.c ---- linux-4.8.15.orig/arch/powerpc/kernel/asm-offsets.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/asm-offsets.c 2017-01-01 17:07:12.519200744 +0100 +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/asm-offsets.c linux-4.9.6/arch/powerpc/kernel/asm-offsets.c +--- linux-4.9.6.orig/arch/powerpc/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/asm-offsets.c 2017-01-28 13:59:09.895654805 +0100 @@ -156,6 +156,7 @@ DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); @@ -1114,9 +1131,9 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/asm-offsets.c linux-4.8.15/arch/ DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_32.S linux-4.8.15/arch/powerpc/kernel/entry_32.S ---- linux-4.8.15.orig/arch/powerpc/kernel/entry_32.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/entry_32.S 2017-01-01 17:07:12.531201514 +0100 +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_32.S linux-4.9.6/arch/powerpc/kernel/entry_32.S +--- linux-4.9.6.orig/arch/powerpc/kernel/entry_32.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/entry_32.S 2017-01-28 13:59:09.895654805 +0100 @@ -835,7 +835,14 @@ cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ bne restore @@ -1165,10 +1182,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_32.S linux-4.8.15/arch/pow bne- do_resched andi. r0,r9,_TIF_USER_WORK_MASK beq restore_user -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_64.S linux-4.8.15/arch/powerpc/kernel/entry_64.S ---- linux-4.8.15.orig/arch/powerpc/kernel/entry_64.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/entry_64.S 2017-01-01 17:07:12.535201773 +0100 -@@ -657,7 +657,7 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/entry_64.S linux-4.9.6/arch/powerpc/kernel/entry_64.S +--- linux-4.9.6.orig/arch/powerpc/kernel/entry_64.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/entry_64.S 2017-01-28 13:59:09.895654805 +0100 +@@ -656,7 +656,7 @@ bl restore_math b restore #endif @@ -1177,7 +1194,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_64.S linux-4.8.15/arch/pow beq 2f bl restore_interrupts SCHEDULE_USER -@@ -719,10 +719,18 @@ +@@ -718,10 +718,18 @@ #ifdef CONFIG_PREEMPT /* Check if we need to preempt */ @@ -1197,7 +1214,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_64.S linux-4.8.15/arch/pow cmpwi cr1,r8,0 ld r0,SOFTE(r1) cmpdi r0,0 -@@ -739,7 +747,7 @@ +@@ -738,7 +746,7 @@ /* Re-test flags and eventually loop */ CURRENT_THREAD_INFO(r9, r1) ld r4,TI_FLAGS(r9) @@ -1206,10 +1223,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/entry_64.S linux-4.8.15/arch/pow bne 1b /* -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/irq.c linux-4.8.15/arch/powerpc/kernel/irq.c ---- linux-4.8.15.orig/arch/powerpc/kernel/irq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/irq.c 2017-01-01 17:07:12.539202039 +0100 -@@ -633,6 +633,7 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/irq.c linux-4.9.6/arch/powerpc/kernel/irq.c +--- linux-4.9.6.orig/arch/powerpc/kernel/irq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/irq.c 2017-01-28 13:59:09.895654805 +0100 +@@ -638,6 +638,7 @@ } } @@ -1217,7 +1234,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/irq.c linux-4.8.15/arch/powerpc/ void do_softirq_own_stack(void) { struct thread_info *curtp, *irqtp; -@@ -650,6 +651,7 @@ +@@ -655,6 +656,7 @@ if (irqtp->flags) set_bits(irqtp->flags, &curtp->flags); } @@ -1225,10 +1242,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/irq.c linux-4.8.15/arch/powerpc/ irq_hw_number_t virq_to_hw(unsigned int virq) { -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_32.S linux-4.8.15/arch/powerpc/kernel/misc_32.S ---- linux-4.8.15.orig/arch/powerpc/kernel/misc_32.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/misc_32.S 2017-01-01 17:07:12.543202293 +0100 -@@ -40,6 +40,7 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_32.S linux-4.9.6/arch/powerpc/kernel/misc_32.S +--- linux-4.9.6.orig/arch/powerpc/kernel/misc_32.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/misc_32.S 2017-01-28 13:59:09.895654805 +0100 +@@ -41,6 +41,7 @@ * We store the saved ksp_limit in the unused part * of the STACK_FRAME_OVERHEAD */ @@ -1236,7 +1253,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_32.S linux-4.8.15/arch/powe _GLOBAL(call_do_softirq) mflr r0 stw r0,4(r1) -@@ -56,6 +57,7 @@ +@@ -57,6 +58,7 @@ stw r10,THREAD+KSP_LIMIT(r2) mtlr r0 blr @@ -1244,10 +1261,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_32.S linux-4.8.15/arch/powe /* * void call_do_irq(struct pt_regs *regs, struct thread_info *irqtp); -diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_64.S linux-4.8.15/arch/powerpc/kernel/misc_64.S ---- linux-4.8.15.orig/arch/powerpc/kernel/misc_64.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kernel/misc_64.S 2017-01-01 17:07:12.543202293 +0100 -@@ -30,6 +30,7 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/kernel/misc_64.S linux-4.9.6/arch/powerpc/kernel/misc_64.S +--- linux-4.9.6.orig/arch/powerpc/kernel/misc_64.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kernel/misc_64.S 2017-01-28 13:59:09.895654805 +0100 +@@ -31,6 +31,7 @@ .text @@ -1255,7 +1272,7 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_64.S linux-4.8.15/arch/powe _GLOBAL(call_do_softirq) mflr r0 std r0,16(r1) -@@ -40,6 +41,7 @@ +@@ -41,6 +42,7 @@ ld r0,16(r1) mtlr r0 blr @@ -1263,10 +1280,10 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kernel/misc_64.S linux-4.8.15/arch/powe _GLOBAL(call_do_irq) mflr r0 -diff -Nur linux-4.8.15.orig/arch/powerpc/kvm/Kconfig linux-4.8.15/arch/powerpc/kvm/Kconfig ---- linux-4.8.15.orig/arch/powerpc/kvm/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/kvm/Kconfig 2017-01-01 17:07:12.587205132 +0100 -@@ -172,6 +172,7 @@ +diff -Nur linux-4.9.6.orig/arch/powerpc/kvm/Kconfig linux-4.9.6/arch/powerpc/kvm/Kconfig +--- linux-4.9.6.orig/arch/powerpc/kvm/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/kvm/Kconfig 2017-01-28 13:59:09.895654805 +0100 +@@ -175,6 +175,7 @@ config KVM_MPIC bool "KVM in-kernel MPIC emulation" depends on KVM && E500 @@ -1274,9 +1291,9 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/kvm/Kconfig linux-4.8.15/arch/powerpc/k select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQFD select HAVE_KVM_IRQ_ROUTING -diff -Nur linux-4.8.15.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.8.15/arch/powerpc/platforms/ps3/device-init.c ---- linux-4.8.15.orig/arch/powerpc/platforms/ps3/device-init.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/powerpc/platforms/ps3/device-init.c 2017-01-01 17:07:12.623207443 +0100 +diff -Nur linux-4.9.6.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.9.6/arch/powerpc/platforms/ps3/device-init.c +--- linux-4.9.6.orig/arch/powerpc/platforms/ps3/device-init.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/powerpc/platforms/ps3/device-init.c 2017-01-28 13:59:09.895654805 +0100 @@ -752,7 +752,7 @@ } pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op); @@ -1286,9 +1303,9 @@ diff -Nur linux-4.8.15.orig/arch/powerpc/platforms/ps3/device-init.c linux-4.8.1 dev->done.done || kthread_should_stop()); if (kthread_should_stop()) res = -EINTR; -diff -Nur linux-4.8.15.orig/arch/sh/kernel/irq.c linux-4.8.15/arch/sh/kernel/irq.c ---- linux-4.8.15.orig/arch/sh/kernel/irq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/sh/kernel/irq.c 2017-01-01 17:07:12.687211566 +0100 +diff -Nur linux-4.9.6.orig/arch/sh/kernel/irq.c linux-4.9.6/arch/sh/kernel/irq.c +--- linux-4.9.6.orig/arch/sh/kernel/irq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/sh/kernel/irq.c 2017-01-28 13:59:09.895654805 +0100 @@ -147,6 +147,7 @@ hardirq_ctx[cpu] = NULL; } @@ -1305,10 +1322,10 @@ diff -Nur linux-4.8.15.orig/arch/sh/kernel/irq.c linux-4.8.15/arch/sh/kernel/irq #else static inline void handle_one_irq(unsigned int irq) { -diff -Nur linux-4.8.15.orig/arch/sparc/Kconfig linux-4.8.15/arch/sparc/Kconfig ---- linux-4.8.15.orig/arch/sparc/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/sparc/Kconfig 2017-01-01 17:07:12.723213881 +0100 -@@ -187,12 +187,10 @@ +diff -Nur linux-4.9.6.orig/arch/sparc/Kconfig linux-4.9.6/arch/sparc/Kconfig +--- linux-4.9.6.orig/arch/sparc/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/sparc/Kconfig 2017-01-28 13:59:09.895654805 +0100 +@@ -194,12 +194,10 @@ source kernel/Kconfig.hz config RWSEM_GENERIC_SPINLOCK @@ -1323,9 +1340,9 @@ diff -Nur linux-4.8.15.orig/arch/sparc/Kconfig linux-4.8.15/arch/sparc/Kconfig config GENERIC_HWEIGHT bool -diff -Nur linux-4.8.15.orig/arch/sparc/kernel/irq_64.c linux-4.8.15/arch/sparc/kernel/irq_64.c ---- linux-4.8.15.orig/arch/sparc/kernel/irq_64.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/sparc/kernel/irq_64.c 2017-01-01 17:07:12.763216468 +0100 +diff -Nur linux-4.9.6.orig/arch/sparc/kernel/irq_64.c linux-4.9.6/arch/sparc/kernel/irq_64.c +--- linux-4.9.6.orig/arch/sparc/kernel/irq_64.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/sparc/kernel/irq_64.c 2017-01-28 13:59:09.895654805 +0100 @@ -854,6 +854,7 @@ set_irq_regs(old_regs); } @@ -1342,9 +1359,9 @@ diff -Nur linux-4.8.15.orig/arch/sparc/kernel/irq_64.c linux-4.8.15/arch/sparc/k #ifdef CONFIG_HOTPLUG_CPU void fixup_irqs(void) -diff -Nur linux-4.8.15.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.8.15/arch/x86/crypto/aesni-intel_glue.c ---- linux-4.8.15.orig/arch/x86/crypto/aesni-intel_glue.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/crypto/aesni-intel_glue.c 2017-01-01 17:07:12.971229856 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.9.6/arch/x86/crypto/aesni-intel_glue.c +--- linux-4.9.6.orig/arch/x86/crypto/aesni-intel_glue.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/crypto/aesni-intel_glue.c 2017-01-28 13:59:09.895654805 +0100 @@ -372,14 +372,14 @@ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -1437,9 +1454,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/crypto/aesni-intel_glue.c linux-4.8.15/arch return err; } -diff -Nur linux-4.8.15.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.8.15/arch/x86/crypto/cast5_avx_glue.c ---- linux-4.8.15.orig/arch/x86/crypto/cast5_avx_glue.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/crypto/cast5_avx_glue.c 2017-01-01 17:07:12.979230370 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.9.6/arch/x86/crypto/cast5_avx_glue.c +--- linux-4.9.6.orig/arch/x86/crypto/cast5_avx_glue.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/crypto/cast5_avx_glue.c 2017-01-28 13:59:09.895654805 +0100 @@ -59,7 +59,7 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk, bool enc) @@ -1519,9 +1536,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/crypto/cast5_avx_glue.c linux-4.8.15/arch/x if (walk.nbytes) { ctr_crypt_final(desc, &walk); err = blkcipher_walk_done(desc, &walk, 0); -diff -Nur linux-4.8.15.orig/arch/x86/crypto/glue_helper.c linux-4.8.15/arch/x86/crypto/glue_helper.c ---- linux-4.8.15.orig/arch/x86/crypto/glue_helper.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/crypto/glue_helper.c 2017-01-01 17:07:12.983230644 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/crypto/glue_helper.c linux-4.9.6/arch/x86/crypto/glue_helper.c +--- linux-4.9.6.orig/arch/x86/crypto/glue_helper.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/crypto/glue_helper.c 2017-01-28 13:59:09.895654805 +0100 @@ -39,7 +39,7 @@ void *ctx = crypto_blkcipher_ctx(desc->tfm); const unsigned int bsize = 128 / 8; @@ -1637,10 +1654,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/crypto/glue_helper.c linux-4.8.15/arch/x86/ return err; } EXPORT_SYMBOL_GPL(glue_xts_crypt_128bit); -diff -Nur linux-4.8.15.orig/arch/x86/entry/common.c linux-4.8.15/arch/x86/entry/common.c ---- linux-4.8.15.orig/arch/x86/entry/common.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/entry/common.c 2017-01-01 17:07:13.071236305 +0100 -@@ -136,7 +136,7 @@ +diff -Nur linux-4.9.6.orig/arch/x86/entry/common.c linux-4.9.6/arch/x86/entry/common.c +--- linux-4.9.6.orig/arch/x86/entry/common.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/entry/common.c 2017-01-28 13:59:09.899654958 +0100 +@@ -129,7 +129,7 @@ #define EXIT_TO_USERMODE_LOOP_FLAGS \ (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE | \ @@ -1649,7 +1666,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/common.c linux-4.8.15/arch/x86/entry/ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags) { -@@ -152,9 +152,16 @@ +@@ -145,9 +145,16 @@ /* We have work to do. */ local_irq_enable(); @@ -1667,10 +1684,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/common.c linux-4.8.15/arch/x86/entry/ if (cached_flags & _TIF_UPROBE) uprobe_notify_resume(regs); -diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_32.S linux-4.8.15/arch/x86/entry/entry_32.S ---- linux-4.8.15.orig/arch/x86/entry/entry_32.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/entry/entry_32.S 2017-01-01 17:07:13.071236305 +0100 -@@ -271,8 +271,25 @@ +diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_32.S linux-4.9.6/arch/x86/entry/entry_32.S +--- linux-4.9.6.orig/arch/x86/entry/entry_32.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/entry/entry_32.S 2017-01-28 13:59:09.899654958 +0100 +@@ -308,8 +308,25 @@ ENTRY(resume_kernel) DISABLE_INTERRUPTS(CLBR_ANY) need_resched: @@ -1685,21 +1702,21 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_32.S linux-4.8.15/arch/x86/entr + cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count) + jne restore_all + -+ GET_THREAD_INFO(%ebp) -+ cmpl $0,TI_preempt_lazy_count(%ebp) # non-zero preempt_lazy_count ? ++ movl PER_CPU_VAR(current_task), %ebp ++ cmpl $0,TASK_TI_preempt_lazy_count(%ebp) # non-zero preempt_lazy_count ? + jnz restore_all + -+ testl $_TIF_NEED_RESCHED_LAZY, TI_flags(%ebp) ++ testl $_TIF_NEED_RESCHED_LAZY, TASK_TI_flags(%ebp) + jz restore_all +test_int_off: +#endif testl $X86_EFLAGS_IF, PT_EFLAGS(%esp) # interrupts off (exception path) ? jz restore_all call preempt_schedule_irq -diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_64.S linux-4.8.15/arch/x86/entry/entry_64.S ---- linux-4.8.15.orig/arch/x86/entry/entry_64.S 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/entry/entry_64.S 2017-01-01 17:07:13.071236305 +0100 -@@ -512,7 +512,23 @@ +diff -Nur linux-4.9.6.orig/arch/x86/entry/entry_64.S linux-4.9.6/arch/x86/entry/entry_64.S +--- linux-4.9.6.orig/arch/x86/entry/entry_64.S 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/entry/entry_64.S 2017-01-28 13:59:09.899654958 +0100 +@@ -546,7 +546,23 @@ bt $9, EFLAGS(%rsp) /* were interrupts off? */ jnc 1f 0: cmpl $0, PER_CPU_VAR(__preempt_count) @@ -1712,18 +1729,18 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_64.S linux-4.8.15/arch/x86/entr + cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count) + jnz 1f + -+ GET_THREAD_INFO(%rcx) -+ cmpl $0, TI_preempt_lazy_count(%rcx) ++ movq PER_CPU_VAR(current_task), %rcx ++ cmpl $0, TASK_TI_preempt_lazy_count(%rcx) + jnz 1f + -+ bt $TIF_NEED_RESCHED_LAZY,TI_flags(%rcx) ++ bt $TIF_NEED_RESCHED_LAZY,TASK_TI_flags(%rcx) + jnc 1f +do_preempt_schedule_irq: +#endif call preempt_schedule_irq jmp 0b 1: -@@ -817,6 +833,7 @@ +@@ -894,6 +910,7 @@ jmp 2b .previous @@ -1731,7 +1748,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_64.S linux-4.8.15/arch/x86/entr /* Call softirq on interrupt stack. Interrupts are off. */ ENTRY(do_softirq_own_stack) pushq %rbp -@@ -829,6 +846,7 @@ +@@ -906,6 +923,7 @@ decl PER_CPU_VAR(irq_count) ret END(do_softirq_own_stack) @@ -1739,9 +1756,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/entry/entry_64.S linux-4.8.15/arch/x86/entr #ifdef CONFIG_XEN idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0 -diff -Nur linux-4.8.15.orig/arch/x86/include/asm/preempt.h linux-4.8.15/arch/x86/include/asm/preempt.h ---- linux-4.8.15.orig/arch/x86/include/asm/preempt.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/include/asm/preempt.h 2017-01-01 17:07:13.123239646 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/include/asm/preempt.h linux-4.9.6/arch/x86/include/asm/preempt.h +--- linux-4.9.6.orig/arch/x86/include/asm/preempt.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/include/asm/preempt.h 2017-01-28 13:59:09.899654958 +0100 @@ -79,17 +79,46 @@ * a decrement which hits zero means we have no preempt_count and should * reschedule. @@ -1790,12 +1807,12 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/preempt.h linux-4.8.15/arch/x86 } #ifdef CONFIG_PREEMPT -diff -Nur linux-4.8.15.orig/arch/x86/include/asm/signal.h linux-4.8.15/arch/x86/include/asm/signal.h ---- linux-4.8.15.orig/arch/x86/include/asm/signal.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/include/asm/signal.h 2017-01-01 17:07:13.123239646 +0100 -@@ -23,6 +23,19 @@ - unsigned long sig[_NSIG_WORDS]; - } sigset_t; +diff -Nur linux-4.9.6.orig/arch/x86/include/asm/signal.h linux-4.9.6/arch/x86/include/asm/signal.h +--- linux-4.9.6.orig/arch/x86/include/asm/signal.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/include/asm/signal.h 2017-01-28 13:59:09.899654958 +0100 +@@ -27,6 +27,19 @@ + #define SA_IA32_ABI 0x02000000u + #define SA_X32_ABI 0x01000000u +/* + * Because some traps use the IST stack, we must keep preemption @@ -1813,9 +1830,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/signal.h linux-4.8.15/arch/x86/ #ifndef CONFIG_COMPAT typedef sigset_t compat_sigset_t; #endif -diff -Nur linux-4.8.15.orig/arch/x86/include/asm/stackprotector.h linux-4.8.15/arch/x86/include/asm/stackprotector.h ---- linux-4.8.15.orig/arch/x86/include/asm/stackprotector.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/include/asm/stackprotector.h 2017-01-01 17:07:13.127239912 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/include/asm/stackprotector.h linux-4.9.6/arch/x86/include/asm/stackprotector.h +--- linux-4.9.6.orig/arch/x86/include/asm/stackprotector.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/include/asm/stackprotector.h 2017-01-28 13:59:09.899654958 +0100 @@ -59,7 +59,7 @@ */ static __always_inline void boot_init_stack_canary(void) @@ -1841,19 +1858,25 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/stackprotector.h linux-4.8.15/a tsc = rdtsc(); canary += tsc + (tsc << 32UL); -diff -Nur linux-4.8.15.orig/arch/x86/include/asm/thread_info.h linux-4.8.15/arch/x86/include/asm/thread_info.h ---- linux-4.8.15.orig/arch/x86/include/asm/thread_info.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/include/asm/thread_info.h 2017-01-01 17:07:13.127239912 +0100 -@@ -57,6 +57,8 @@ - __u32 flags; /* low level flags */ - __u32 status; /* thread synchronous flags */ - __u32 cpu; /* current CPU */ -+ int preempt_lazy_count; /* 0 => lazy preemptable +diff -Nur linux-4.9.6.orig/arch/x86/include/asm/thread_info.h linux-4.9.6/arch/x86/include/asm/thread_info.h +--- linux-4.9.6.orig/arch/x86/include/asm/thread_info.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/include/asm/thread_info.h 2017-01-28 13:59:09.899654958 +0100 +@@ -54,11 +54,14 @@ + + struct thread_info { + unsigned long flags; /* low level flags */ ++ int preempt_lazy_count; /* 0 => lazy preemptable + <0 => BUG */ }; #define INIT_THREAD_INFO(tsk) \ -@@ -73,6 +75,10 @@ + { \ + .flags = 0, \ ++ .preempt_lazy_count = 0, \ + } + + #define init_stack (init_thread_union.stack) +@@ -67,6 +70,10 @@ #include <asm/asm-offsets.h> @@ -1864,7 +1887,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/thread_info.h linux-4.8.15/arch #endif /* -@@ -91,6 +97,7 @@ +@@ -85,6 +92,7 @@ #define TIF_SYSCALL_EMU 6 /* syscall emulation active */ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SECCOMP 8 /* secure computing */ @@ -1872,7 +1895,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/thread_info.h linux-4.8.15/arch #define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */ #define TIF_UPROBE 12 /* breakpointed or singlestepping */ #define TIF_NOTSC 16 /* TSC is not accessible in userland */ -@@ -115,6 +122,7 @@ +@@ -108,6 +116,7 @@ #define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU) #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) @@ -1880,7 +1903,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/thread_info.h linux-4.8.15/arch #define _TIF_USER_RETURN_NOTIFY (1 << TIF_USER_RETURN_NOTIFY) #define _TIF_UPROBE (1 << TIF_UPROBE) #define _TIF_NOTSC (1 << TIF_NOTSC) -@@ -151,6 +159,8 @@ +@@ -143,6 +152,8 @@ #define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY) #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW) @@ -1889,10 +1912,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/thread_info.h linux-4.8.15/arch #define STACK_WARN (THREAD_SIZE/8) /* -diff -Nur linux-4.8.15.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.8.15/arch/x86/include/asm/uv/uv_bau.h ---- linux-4.8.15.orig/arch/x86/include/asm/uv/uv_bau.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/include/asm/uv/uv_bau.h 2017-01-01 17:07:13.127239912 +0100 -@@ -615,9 +615,9 @@ +diff -Nur linux-4.9.6.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.9.6/arch/x86/include/asm/uv/uv_bau.h +--- linux-4.9.6.orig/arch/x86/include/asm/uv/uv_bau.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/include/asm/uv/uv_bau.h 2017-01-28 13:59:09.899654958 +0100 +@@ -624,9 +624,9 @@ cycles_t send_message; cycles_t period_end; cycles_t period_time; @@ -1905,7 +1928,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.8.15/arch/x /* tunables */ int max_concurr; int max_concurr_const; -@@ -776,15 +776,15 @@ +@@ -815,15 +815,15 @@ * to be lowered below the current 'v'. atomic_add_unless can only stop * on equal. */ @@ -1925,9 +1948,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/include/asm/uv/uv_bau.h linux-4.8.15/arch/x return 1; } -diff -Nur linux-4.8.15.orig/arch/x86/Kconfig linux-4.8.15/arch/x86/Kconfig ---- linux-4.8.15.orig/arch/x86/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/Kconfig 2017-01-01 17:07:12.915226253 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/Kconfig linux-4.9.6/arch/x86/Kconfig +--- linux-4.9.6.orig/arch/x86/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/Kconfig 2017-01-28 13:59:09.895654805 +0100 @@ -17,6 +17,7 @@ ### Arch settings config X86 @@ -1936,7 +1959,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/Kconfig linux-4.8.15/arch/x86/Kconfig select ACPI_LEGACY_TABLES_LOOKUP if ACPI select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI select ANON_INODES -@@ -231,8 +232,11 @@ +@@ -232,8 +233,11 @@ def_bool y depends on ISA_DMA_API @@ -1949,7 +1972,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/Kconfig linux-4.8.15/arch/x86/Kconfig config GENERIC_CALIBRATE_DELAY def_bool y -@@ -885,7 +889,7 @@ +@@ -897,7 +901,7 @@ config MAXSMP bool "Enable Maximum number of SMP Processors and NUMA Nodes" depends on X86_64 && SMP && DEBUG_KERNEL @@ -1958,9 +1981,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/Kconfig linux-4.8.15/arch/x86/Kconfig ---help--- Enable maximum number of CPUS and NUMA Nodes for this architecture. If unsure, say N. -diff -Nur linux-4.8.15.orig/arch/x86/kernel/acpi/boot.c linux-4.8.15/arch/x86/kernel/acpi/boot.c ---- linux-4.8.15.orig/arch/x86/kernel/acpi/boot.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/acpi/boot.c 2017-01-01 17:07:13.171242740 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/kernel/acpi/boot.c linux-4.9.6/arch/x86/kernel/acpi/boot.c +--- linux-4.9.6.orig/arch/x86/kernel/acpi/boot.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/acpi/boot.c 2017-01-28 13:59:09.899654958 +0100 @@ -87,7 +87,9 @@ * ->ioapic_mutex * ->ioapic_lock @@ -1971,9 +1994,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/acpi/boot.c linux-4.8.15/arch/x86/ke /* -------------------------------------------------------------------------- Boot-time Configuration -diff -Nur linux-4.8.15.orig/arch/x86/kernel/apic/io_apic.c linux-4.8.15/arch/x86/kernel/apic/io_apic.c ---- linux-4.8.15.orig/arch/x86/kernel/apic/io_apic.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/apic/io_apic.c 2017-01-01 17:07:13.263248666 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/kernel/apic/io_apic.c linux-4.9.6/arch/x86/kernel/apic/io_apic.c +--- linux-4.9.6.orig/arch/x86/kernel/apic/io_apic.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/apic/io_apic.c 2017-01-28 13:59:09.899654958 +0100 @@ -1712,7 +1712,8 @@ static inline bool ioapic_irqd_mask(struct irq_data *data) { @@ -1984,36 +2007,36 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/apic/io_apic.c linux-4.8.15/arch/x86 mask_ioapic_irq(data); return true; } -diff -Nur linux-4.8.15.orig/arch/x86/kernel/asm-offsets.c linux-4.8.15/arch/x86/kernel/asm-offsets.c ---- linux-4.8.15.orig/arch/x86/kernel/asm-offsets.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/asm-offsets.c 2017-01-01 17:07:13.279249693 +0100 -@@ -31,6 +31,7 @@ - BLANK(); - OFFSET(TI_flags, thread_info, flags); - OFFSET(TI_status, thread_info, status); -+ OFFSET(TI_preempt_lazy_count, thread_info, preempt_lazy_count); +diff -Nur linux-4.9.6.orig/arch/x86/kernel/asm-offsets.c linux-4.9.6/arch/x86/kernel/asm-offsets.c +--- linux-4.9.6.orig/arch/x86/kernel/asm-offsets.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/asm-offsets.c 2017-01-28 13:59:09.899654958 +0100 +@@ -36,6 +36,7 @@ BLANK(); + OFFSET(TASK_TI_flags, task_struct, thread_info.flags); ++ OFFSET(TASK_TI_preempt_lazy_count, task_struct, thread_info.preempt_lazy_count); OFFSET(TASK_addr_limit, task_struct, thread.addr_limit); -@@ -88,4 +89,5 @@ + + BLANK(); +@@ -91,4 +92,5 @@ BLANK(); DEFINE(PTREGS_SIZE, sizeof(struct pt_regs)); + DEFINE(_PREEMPT_ENABLED, PREEMPT_ENABLED); } -diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x86/kernel/cpu/mcheck/mce.c ---- linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/cpu/mcheck/mce.c 2017-01-01 17:07:13.335253297 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.9.6/arch/x86/kernel/cpu/mcheck/mce.c +--- linux-4.9.6.orig/arch/x86/kernel/cpu/mcheck/mce.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/cpu/mcheck/mce.c 2017-01-28 13:59:09.899654958 +0100 @@ -41,6 +41,8 @@ #include <linux/debugfs.h> #include <linux/irq_work.h> #include <linux/export.h> +#include <linux/jiffies.h> +#include <linux/swork.h> + #include <linux/jump_label.h> #include <asm/processor.h> - #include <asm/traps.h> -@@ -1291,7 +1293,7 @@ +@@ -1317,7 +1319,7 @@ static unsigned long check_interval = INITIAL_CHECK_INTERVAL; static DEFINE_PER_CPU(unsigned long, mce_next_interval); /* in jiffies */ @@ -2022,7 +2045,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x static unsigned long mce_adjust_timer_default(unsigned long interval) { -@@ -1300,32 +1302,18 @@ +@@ -1326,32 +1328,18 @@ static unsigned long (*mce_adjust_timer)(unsigned long interval) = mce_adjust_timer_default; @@ -2061,7 +2084,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x iv = __this_cpu_read(mce_next_interval); if (mce_available(this_cpu_ptr(&cpu_info))) { -@@ -1348,7 +1336,7 @@ +@@ -1374,7 +1362,7 @@ done: __this_cpu_write(mce_next_interval, iv); @@ -2070,7 +2093,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x } /* -@@ -1356,7 +1344,7 @@ +@@ -1382,7 +1370,7 @@ */ void mce_timer_kick(unsigned long interval) { @@ -2079,7 +2102,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x unsigned long iv = __this_cpu_read(mce_next_interval); __restart_timer(t, interval); -@@ -1371,7 +1359,7 @@ +@@ -1397,7 +1385,7 @@ int cpu; for_each_online_cpu(cpu) @@ -2088,7 +2111,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x } static void mce_do_trigger(struct work_struct *work) -@@ -1381,6 +1369,56 @@ +@@ -1407,6 +1395,56 @@ static DECLARE_WORK(mce_trigger_work, mce_do_trigger); @@ -2145,7 +2168,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x /* * Notify the user(s) about new machine check events. * Can be called from interrupt context, but not from machine check/NMI -@@ -1388,19 +1426,8 @@ +@@ -1414,19 +1452,8 @@ */ int mce_notify_irq(void) { @@ -2166,7 +2189,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x return 1; } return 0; -@@ -1717,7 +1744,7 @@ +@@ -1732,7 +1759,7 @@ } } @@ -2175,7 +2198,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x { unsigned long iv = check_interval * HZ; -@@ -1726,16 +1753,17 @@ +@@ -1741,16 +1768,17 @@ per_cpu(mce_next_interval, cpu) = iv; @@ -2197,7 +2220,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x mce_start_timer(cpu, t); } -@@ -2459,6 +2487,8 @@ +@@ -2475,6 +2503,8 @@ if (!mce_available(raw_cpu_ptr(&cpu_info))) return; @@ -2206,7 +2229,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x if (!(action & CPU_TASKS_FROZEN)) cmci_clear(); -@@ -2481,6 +2511,7 @@ +@@ -2497,6 +2527,7 @@ if (b->init) wrmsrl(msr_ops.ctl(i), b->ctl); } @@ -2214,7 +2237,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x } /* Get notified when a cpu comes on/off. Be hotplug friendly. */ -@@ -2488,7 +2519,6 @@ +@@ -2504,7 +2535,6 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -2222,7 +2245,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x switch (action & ~CPU_TASKS_FROZEN) { case CPU_ONLINE: -@@ -2508,11 +2538,9 @@ +@@ -2524,11 +2554,9 @@ break; case CPU_DOWN_PREPARE: smp_call_function_single(cpu, mce_disable_cpu, &action, 1); @@ -2234,7 +2257,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x break; } -@@ -2551,6 +2579,10 @@ +@@ -2567,6 +2595,10 @@ goto err_out; } @@ -2245,69 +2268,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/cpu/mcheck/mce.c linux-4.8.15/arch/x if (!zalloc_cpumask_var(&mce_device_initialized, GFP_KERNEL)) { err = -ENOMEM; goto err_out; -diff -Nur linux-4.8.15.orig/arch/x86/kernel/dumpstack_32.c linux-4.8.15/arch/x86/kernel/dumpstack_32.c ---- linux-4.8.15.orig/arch/x86/kernel/dumpstack_32.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/dumpstack_32.c 2017-01-01 17:07:13.351254342 +0100 -@@ -42,7 +42,7 @@ - unsigned long *stack, unsigned long bp, - const struct stacktrace_ops *ops, void *data) - { -- const unsigned cpu = get_cpu(); -+ const unsigned cpu = get_cpu_light(); - int graph = 0; - u32 *prev_esp; - -@@ -84,7 +84,7 @@ - break; - touch_nmi_watchdog(); - } -- put_cpu(); -+ put_cpu_light(); - } - EXPORT_SYMBOL(dump_trace); - -diff -Nur linux-4.8.15.orig/arch/x86/kernel/dumpstack_64.c linux-4.8.15/arch/x86/kernel/dumpstack_64.c ---- linux-4.8.15.orig/arch/x86/kernel/dumpstack_64.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/dumpstack_64.c 2017-01-01 17:07:13.351254342 +0100 -@@ -152,7 +152,7 @@ - unsigned long *stack, unsigned long bp, - const struct stacktrace_ops *ops, void *data) - { -- const unsigned cpu = get_cpu(); -+ const unsigned cpu = get_cpu_light(); - unsigned long *irq_stack = (unsigned long *)per_cpu(irq_stack_ptr, cpu); - unsigned long dummy; - unsigned used = 0; -@@ -239,7 +239,7 @@ - * This handles the process stack: - */ - bp = ops->walk_stack(task, stack, bp, ops, data, NULL, &graph); -- put_cpu(); -+ put_cpu_light(); - } - EXPORT_SYMBOL(dump_trace); - -@@ -253,7 +253,7 @@ - int cpu; - int i; - -- preempt_disable(); -+ migrate_disable(); - cpu = smp_processor_id(); - - irq_stack_end = (unsigned long *)(per_cpu(irq_stack_ptr, cpu)); -@@ -299,7 +299,7 @@ - stack++; - touch_nmi_watchdog(); - } -- preempt_enable(); -+ migrate_enable(); - - pr_cont("\n"); - show_trace_log_lvl(task, regs, sp, bp, log_lvl); -diff -Nur linux-4.8.15.orig/arch/x86/kernel/irq_32.c linux-4.8.15/arch/x86/kernel/irq_32.c ---- linux-4.8.15.orig/arch/x86/kernel/irq_32.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/irq_32.c 2017-01-01 17:07:13.351254342 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/kernel/irq_32.c linux-4.9.6/arch/x86/kernel/irq_32.c +--- linux-4.9.6.orig/arch/x86/kernel/irq_32.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/irq_32.c 2017-01-28 13:59:09.899654958 +0100 @@ -127,6 +127,7 @@ cpu, per_cpu(hardirq_stack, cpu), per_cpu(softirq_stack, cpu)); } @@ -2324,9 +2287,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/irq_32.c linux-4.8.15/arch/x86/kerne bool handle_irq(struct irq_desc *desc, struct pt_regs *regs) { -diff -Nur linux-4.8.15.orig/arch/x86/kernel/process_32.c linux-4.8.15/arch/x86/kernel/process_32.c ---- linux-4.8.15.orig/arch/x86/kernel/process_32.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kernel/process_32.c 2017-01-01 17:07:13.359254847 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/kernel/process_32.c linux-4.9.6/arch/x86/kernel/process_32.c +--- linux-4.9.6.orig/arch/x86/kernel/process_32.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kernel/process_32.c 2017-01-28 13:59:09.899654958 +0100 @@ -35,6 +35,7 @@ #include <linux/uaccess.h> #include <linux/io.h> @@ -2335,7 +2298,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/process_32.c linux-4.8.15/arch/x86/k #include <asm/pgtable.h> #include <asm/ldt.h> -@@ -210,6 +211,35 @@ +@@ -195,6 +196,35 @@ } EXPORT_SYMBOL_GPL(start_thread); @@ -2371,7 +2334,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/process_32.c linux-4.8.15/arch/x86/k /* * switch_to(x,y) should switch tasks from x to y. -@@ -286,6 +316,8 @@ +@@ -271,6 +301,8 @@ task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT)) __switch_to_xtra(prev_p, next_p, tss); @@ -2380,10 +2343,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/kernel/process_32.c linux-4.8.15/arch/x86/k /* * Leave lazy mode, flushing any hypercalls made here. * This must be done before restoring TLS segments so -diff -Nur linux-4.8.15.orig/arch/x86/kvm/lapic.c linux-4.8.15/arch/x86/kvm/lapic.c ---- linux-4.8.15.orig/arch/x86/kvm/lapic.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kvm/lapic.c 2017-01-01 17:07:13.379256138 +0100 -@@ -1938,6 +1938,7 @@ +diff -Nur linux-4.9.6.orig/arch/x86/kvm/lapic.c linux-4.9.6/arch/x86/kvm/lapic.c +--- linux-4.9.6.orig/arch/x86/kvm/lapic.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kvm/lapic.c 2017-01-28 13:59:09.899654958 +0100 +@@ -1939,6 +1939,7 @@ hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); apic->lapic_timer.timer.function = apic_timer_fn; @@ -2391,10 +2354,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/kvm/lapic.c linux-4.8.15/arch/x86/kvm/lapic /* * APIC is created enabled. This will prevent kvm_lapic_set_base from -diff -Nur linux-4.8.15.orig/arch/x86/kvm/x86.c linux-4.8.15/arch/x86/kvm/x86.c ---- linux-4.8.15.orig/arch/x86/kvm/x86.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/kvm/x86.c 2017-01-01 17:07:13.415258465 +0100 -@@ -5877,6 +5877,13 @@ +diff -Nur linux-4.9.6.orig/arch/x86/kvm/x86.c linux-4.9.6/arch/x86/kvm/x86.c +--- linux-4.9.6.orig/arch/x86/kvm/x86.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/kvm/x86.c 2017-01-28 13:59:09.903655111 +0100 +@@ -5932,6 +5932,13 @@ goto out; } @@ -2408,9 +2371,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/kvm/x86.c linux-4.8.15/arch/x86/kvm/x86.c r = kvm_mmu_module_init(); if (r) goto out_free_percpu; -diff -Nur linux-4.8.15.orig/arch/x86/mm/highmem_32.c linux-4.8.15/arch/x86/mm/highmem_32.c ---- linux-4.8.15.orig/arch/x86/mm/highmem_32.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/mm/highmem_32.c 2017-01-01 17:07:13.443260261 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/mm/highmem_32.c linux-4.9.6/arch/x86/mm/highmem_32.c +--- linux-4.9.6.orig/arch/x86/mm/highmem_32.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/mm/highmem_32.c 2017-01-28 13:59:09.903655111 +0100 @@ -32,10 +32,11 @@ */ void *kmap_atomic_prot(struct page *page, pgprot_t prot) @@ -2455,9 +2418,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/mm/highmem_32.c linux-4.8.15/arch/x86/mm/hi } EXPORT_SYMBOL(__kunmap_atomic); -diff -Nur linux-4.8.15.orig/arch/x86/mm/iomap_32.c linux-4.8.15/arch/x86/mm/iomap_32.c ---- linux-4.8.15.orig/arch/x86/mm/iomap_32.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/mm/iomap_32.c 2017-01-01 17:07:13.471262063 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/mm/iomap_32.c linux-4.9.6/arch/x86/mm/iomap_32.c +--- linux-4.9.6.orig/arch/x86/mm/iomap_32.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/mm/iomap_32.c 2017-01-28 13:59:09.903655111 +0100 @@ -56,6 +56,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot) @@ -2490,10 +2453,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/mm/iomap_32.c linux-4.8.15/arch/x86/mm/ioma kpte_clear_flush(kmap_pte-idx, vaddr); kmap_atomic_idx_pop(); } -diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/platform/uv/tlb_uv.c ---- linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/platform/uv/tlb_uv.c 2017-01-01 17:07:13.575268756 +0100 -@@ -729,9 +729,9 @@ +diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/tlb_uv.c linux-4.9.6/arch/x86/platform/uv/tlb_uv.c +--- linux-4.9.6.orig/arch/x86/platform/uv/tlb_uv.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/platform/uv/tlb_uv.c 2017-01-28 13:59:09.903655111 +0100 +@@ -748,9 +748,9 @@ quiesce_local_uvhub(hmaster); @@ -2505,7 +2468,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ end_uvhub_quiesce(hmaster); -@@ -751,9 +751,9 @@ +@@ -770,9 +770,9 @@ quiesce_local_uvhub(hmaster); @@ -2517,7 +2480,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ end_uvhub_quiesce(hmaster); -@@ -774,7 +774,7 @@ +@@ -793,7 +793,7 @@ cycles_t tm1; hmaster = bcp->uvhub_master; @@ -2526,7 +2489,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ if (!bcp->baudisabled) { stat->s_bau_disabled++; tm1 = get_cycles(); -@@ -787,7 +787,7 @@ +@@ -806,7 +806,7 @@ } } } @@ -2535,7 +2498,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ } static void count_max_concurr(int stat, struct bau_control *bcp, -@@ -850,7 +850,7 @@ +@@ -869,7 +869,7 @@ */ static void uv1_throttle(struct bau_control *hmaster, struct ptc_stats *stat) { @@ -2544,7 +2507,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ atomic_t *v; v = &hmaster->active_descriptor_count; -@@ -983,7 +983,7 @@ +@@ -1002,7 +1002,7 @@ struct bau_control *hmaster; hmaster = bcp->uvhub_master; @@ -2553,7 +2516,7 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ if (bcp->baudisabled && (get_cycles() >= bcp->set_bau_on_time)) { stat->s_bau_reenabled++; for_each_present_cpu(tcpu) { -@@ -995,10 +995,10 @@ +@@ -1014,10 +1014,10 @@ tbcp->period_giveups = 0; } } @@ -2566,10 +2529,10 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ return -1; } -@@ -1916,9 +1916,9 @@ +@@ -1940,9 +1940,9 @@ bcp->cong_reps = congested_reps; - bcp->disabled_period = sec_2_cycles(disabled_period); - bcp->giveup_limit = giveup_limit; + bcp->disabled_period = sec_2_cycles(disabled_period); + bcp->giveup_limit = giveup_limit; - spin_lock_init(&bcp->queue_lock); - spin_lock_init(&bcp->uvhub_lock); - spin_lock_init(&bcp->disable_lock); @@ -2579,9 +2542,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/tlb_uv.c linux-4.8.15/arch/x86/ } } -diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/uv_time.c linux-4.8.15/arch/x86/platform/uv/uv_time.c ---- linux-4.8.15.orig/arch/x86/platform/uv/uv_time.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/arch/x86/platform/uv/uv_time.c 2017-01-01 17:07:13.575268756 +0100 +diff -Nur linux-4.9.6.orig/arch/x86/platform/uv/uv_time.c linux-4.9.6/arch/x86/platform/uv/uv_time.c +--- linux-4.9.6.orig/arch/x86/platform/uv/uv_time.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/arch/x86/platform/uv/uv_time.c 2017-01-28 13:59:09.903655111 +0100 @@ -57,7 +57,7 @@ /* There is one of these allocated per node */ @@ -2662,9 +2625,9 @@ diff -Nur linux-4.8.15.orig/arch/x86/platform/uv/uv_time.c linux-4.8.15/arch/x86 } /* -diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c ---- linux-4.8.15.orig/block/blk-core.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-core.c 2017-01-01 17:07:13.619271599 +0100 +diff -Nur linux-4.9.6.orig/block/blk-core.c linux-4.9.6/block/blk-core.c +--- linux-4.9.6.orig/block/blk-core.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/blk-core.c 2017-01-28 13:59:09.903655111 +0100 @@ -125,6 +125,9 @@ INIT_LIST_HEAD(&rq->queuelist); @@ -2711,7 +2674,7 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c /* * Init percpu_ref in atomic mode so that it's faster to shutdown. -@@ -3171,7 +3174,7 @@ +@@ -3177,7 +3180,7 @@ blk_run_queue_async(q); else __blk_run_queue(q); @@ -2720,7 +2683,7 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c } static void flush_plug_callbacks(struct blk_plug *plug, bool from_schedule) -@@ -3219,7 +3222,6 @@ +@@ -3225,7 +3228,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) { struct request_queue *q; @@ -2728,7 +2691,7 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c struct request *rq; LIST_HEAD(list); unsigned int depth; -@@ -3239,11 +3241,6 @@ +@@ -3245,11 +3247,6 @@ q = NULL; depth = 0; @@ -2740,7 +2703,7 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c while (!list_empty(&list)) { rq = list_entry_rq(list.next); list_del_init(&rq->queuelist); -@@ -3256,7 +3253,7 @@ +@@ -3262,7 +3259,7 @@ queue_unplugged(q, depth, from_schedule); q = rq->q; depth = 0; @@ -2749,7 +2712,7 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c } /* -@@ -3283,8 +3280,6 @@ +@@ -3289,8 +3286,6 @@ */ if (q) queue_unplugged(q, depth, from_schedule); @@ -2758,9 +2721,9 @@ diff -Nur linux-4.8.15.orig/block/blk-core.c linux-4.8.15/block/blk-core.c } void blk_finish_plug(struct blk_plug *plug) -diff -Nur linux-4.8.15.orig/block/blk-ioc.c linux-4.8.15/block/blk-ioc.c ---- linux-4.8.15.orig/block/blk-ioc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-ioc.c 2017-01-01 17:07:13.619271599 +0100 +diff -Nur linux-4.9.6.orig/block/blk-ioc.c linux-4.9.6/block/blk-ioc.c +--- linux-4.9.6.orig/block/blk-ioc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/blk-ioc.c 2017-01-28 13:59:09.903655111 +0100 @@ -7,6 +7,7 @@ #include <linux/bio.h> #include <linux/blkdev.h> @@ -2787,10 +2750,10 @@ diff -Nur linux-4.8.15.orig/block/blk-ioc.c linux-4.8.15/block/blk-ioc.c goto retry; } } -diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c ---- linux-4.8.15.orig/block/blk-mq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-mq.c 2017-01-01 17:07:13.623271855 +0100 -@@ -92,7 +92,7 @@ +diff -Nur linux-4.9.6.orig/block/blk-mq.c linux-4.9.6/block/blk-mq.c +--- linux-4.9.6.orig/block/blk-mq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/blk-mq.c 2017-01-28 13:59:09.903655111 +0100 +@@ -72,7 +72,7 @@ static void blk_mq_freeze_queue_wait(struct request_queue *q) { @@ -2799,7 +2762,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c } /* -@@ -130,7 +130,7 @@ +@@ -110,7 +110,7 @@ WARN_ON_ONCE(freeze_depth < 0); if (!freeze_depth) { percpu_ref_reinit(&q->q_usage_counter); @@ -2808,7 +2771,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c } } EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue); -@@ -149,7 +149,7 @@ +@@ -129,7 +129,7 @@ * dying, we need to ensure that processes currently waiting on * the queue are notified as well. */ @@ -2817,7 +2780,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c } bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx) -@@ -197,6 +197,9 @@ +@@ -177,6 +177,9 @@ rq->resid_len = 0; rq->sense = NULL; @@ -2827,7 +2790,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c INIT_LIST_HEAD(&rq->timeout_list); rq->timeout = 0; -@@ -379,6 +382,17 @@ +@@ -345,6 +348,17 @@ } EXPORT_SYMBOL(blk_mq_end_request); @@ -2845,7 +2808,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c static void __blk_mq_complete_request_remote(void *data) { struct request *rq = data; -@@ -386,6 +400,8 @@ +@@ -352,6 +366,8 @@ rq->q->softirq_done_fn(rq); } @@ -2854,7 +2817,7 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c static void blk_mq_ipi_complete_request(struct request *rq) { struct blk_mq_ctx *ctx = rq->mq_ctx; -@@ -397,19 +413,23 @@ +@@ -363,19 +379,23 @@ return; } @@ -2880,10 +2843,10 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c } static void __blk_mq_complete_request(struct request *rq) -@@ -938,14 +958,14 @@ +@@ -915,14 +935,14 @@ return; - if (!async) { + if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) { - int cpu = get_cpu(); + int cpu = get_cpu_light(); if (cpumask_test_cpu(cpu, hctx->cpumask)) { @@ -2897,74 +2860,11 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.c linux-4.8.15/block/blk-mq.c + put_cpu_light(); } - kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx), -@@ -1667,7 +1687,7 @@ - { - struct blk_mq_hw_ctx *hctx = data; - -- if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) -+ if (action == CPU_POST_DEAD) - return blk_mq_hctx_cpu_offline(hctx, cpu); - - /* -diff -Nur linux-4.8.15.orig/block/blk-mq-cpu.c linux-4.8.15/block/blk-mq-cpu.c ---- linux-4.8.15.orig/block/blk-mq-cpu.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-mq-cpu.c 2017-01-01 17:07:13.623271855 +0100 -@@ -16,7 +16,7 @@ - #include "blk-mq.h" - - static LIST_HEAD(blk_mq_cpu_notify_list); --static DEFINE_RAW_SPINLOCK(blk_mq_cpu_notify_lock); -+static DEFINE_SPINLOCK(blk_mq_cpu_notify_lock); - - static int blk_mq_main_cpu_notify(struct notifier_block *self, - unsigned long action, void *hcpu) -@@ -25,7 +25,10 @@ - struct blk_mq_cpu_notifier *notify; - int ret = NOTIFY_OK; - -- raw_spin_lock(&blk_mq_cpu_notify_lock); -+ if (action != CPU_POST_DEAD) -+ return NOTIFY_OK; -+ -+ spin_lock(&blk_mq_cpu_notify_lock); - - list_for_each_entry(notify, &blk_mq_cpu_notify_list, list) { - ret = notify->notify(notify->data, action, cpu); -@@ -33,7 +36,7 @@ - break; - } - -- raw_spin_unlock(&blk_mq_cpu_notify_lock); -+ spin_unlock(&blk_mq_cpu_notify_lock); - return ret; - } - -@@ -41,16 +44,16 @@ - { - BUG_ON(!notifier->notify); - -- raw_spin_lock(&blk_mq_cpu_notify_lock); -+ spin_lock(&blk_mq_cpu_notify_lock); - list_add_tail(¬ifier->list, &blk_mq_cpu_notify_list); -- raw_spin_unlock(&blk_mq_cpu_notify_lock); -+ spin_unlock(&blk_mq_cpu_notify_lock); - } - - void blk_mq_unregister_cpu_notifier(struct blk_mq_cpu_notifier *notifier) - { -- raw_spin_lock(&blk_mq_cpu_notify_lock); -+ spin_lock(&blk_mq_cpu_notify_lock); - list_del(¬ifier->list); -- raw_spin_unlock(&blk_mq_cpu_notify_lock); -+ spin_unlock(&blk_mq_cpu_notify_lock); - } - - void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, -diff -Nur linux-4.8.15.orig/block/blk-mq.h linux-4.8.15/block/blk-mq.h ---- linux-4.8.15.orig/block/blk-mq.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-mq.h 2017-01-01 17:07:13.627272112 +0100 -@@ -86,12 +86,12 @@ + kblockd_schedule_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->run_work); +diff -Nur linux-4.9.6.orig/block/blk-mq.h linux-4.9.6/block/blk-mq.h +--- linux-4.9.6.orig/block/blk-mq.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/blk-mq.h 2017-01-28 13:59:09.903655111 +0100 +@@ -72,12 +72,12 @@ */ static inline struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q) { @@ -2979,9 +2879,9 @@ diff -Nur linux-4.8.15.orig/block/blk-mq.h linux-4.8.15/block/blk-mq.h } struct blk_mq_alloc_data { -diff -Nur linux-4.8.15.orig/block/blk-softirq.c linux-4.8.15/block/blk-softirq.c ---- linux-4.8.15.orig/block/blk-softirq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/blk-softirq.c 2017-01-01 17:07:13.627272112 +0100 +diff -Nur linux-4.9.6.orig/block/blk-softirq.c linux-4.9.6/block/blk-softirq.c +--- linux-4.9.6.orig/block/blk-softirq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/blk-softirq.c 2017-01-28 13:59:09.903655111 +0100 @@ -51,6 +51,7 @@ raise_softirq_irqoff(BLOCK_SOFTIRQ); @@ -2990,15 +2890,15 @@ diff -Nur linux-4.8.15.orig/block/blk-softirq.c linux-4.8.15/block/blk-softirq.c } /* -@@ -93,6 +94,7 @@ - this_cpu_ptr(&blk_cpu_done)); - raise_softirq_irqoff(BLOCK_SOFTIRQ); - local_irq_enable(); -+ preempt_check_resched_rt(); - } +@@ -89,6 +90,7 @@ + this_cpu_ptr(&blk_cpu_done)); + raise_softirq_irqoff(BLOCK_SOFTIRQ); + local_irq_enable(); ++ preempt_check_resched_rt(); - return NOTIFY_OK; -@@ -150,6 +152,7 @@ + return 0; + } +@@ -141,6 +143,7 @@ goto do_local; local_irq_restore(flags); @@ -3006,9 +2906,9 @@ diff -Nur linux-4.8.15.orig/block/blk-softirq.c linux-4.8.15/block/blk-softirq.c } /** -diff -Nur linux-4.8.15.orig/block/bounce.c linux-4.8.15/block/bounce.c ---- linux-4.8.15.orig/block/bounce.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/block/bounce.c 2017-01-01 17:07:13.627272112 +0100 +diff -Nur linux-4.9.6.orig/block/bounce.c linux-4.9.6/block/bounce.c +--- linux-4.9.6.orig/block/bounce.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/block/bounce.c 2017-01-28 13:59:09.903655111 +0100 @@ -55,11 +55,11 @@ unsigned long flags; unsigned char *vto; @@ -3023,9 +2923,9 @@ diff -Nur linux-4.8.15.orig/block/bounce.c linux-4.8.15/block/bounce.c } #else /* CONFIG_HIGHMEM */ -diff -Nur linux-4.8.15.orig/crypto/algapi.c linux-4.8.15/crypto/algapi.c ---- linux-4.8.15.orig/crypto/algapi.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/crypto/algapi.c 2017-01-01 17:07:13.671274944 +0100 +diff -Nur linux-4.9.6.orig/crypto/algapi.c linux-4.9.6/crypto/algapi.c +--- linux-4.9.6.orig/crypto/algapi.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/crypto/algapi.c 2017-01-28 13:59:09.903655111 +0100 @@ -718,13 +718,13 @@ int crypto_register_notifier(struct notifier_block *nb) @@ -3042,9 +2942,9 @@ diff -Nur linux-4.8.15.orig/crypto/algapi.c linux-4.8.15/crypto/algapi.c } EXPORT_SYMBOL_GPL(crypto_unregister_notifier); -diff -Nur linux-4.8.15.orig/crypto/api.c linux-4.8.15/crypto/api.c ---- linux-4.8.15.orig/crypto/api.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/crypto/api.c 2017-01-01 17:07:13.671274944 +0100 +diff -Nur linux-4.9.6.orig/crypto/api.c linux-4.9.6/crypto/api.c +--- linux-4.9.6.orig/crypto/api.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/crypto/api.c 2017-01-28 13:59:09.903655111 +0100 @@ -31,7 +31,7 @@ DECLARE_RWSEM(crypto_alg_sem); EXPORT_SYMBOL_GPL(crypto_alg_sem); @@ -3067,9 +2967,9 @@ diff -Nur linux-4.8.15.orig/crypto/api.c linux-4.8.15/crypto/api.c } return ok; -diff -Nur linux-4.8.15.orig/crypto/internal.h linux-4.8.15/crypto/internal.h ---- linux-4.8.15.orig/crypto/internal.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/crypto/internal.h 2017-01-01 17:07:13.675275210 +0100 +diff -Nur linux-4.9.6.orig/crypto/internal.h linux-4.9.6/crypto/internal.h +--- linux-4.9.6.orig/crypto/internal.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/crypto/internal.h 2017-01-28 13:59:09.903655111 +0100 @@ -47,7 +47,7 @@ extern struct list_head crypto_alg_list; @@ -3088,77 +2988,9 @@ diff -Nur linux-4.8.15.orig/crypto/internal.h linux-4.8.15/crypto/internal.h } #endif /* _CRYPTO_INTERNAL_H */ -diff -Nur linux-4.8.15.orig/Documentation/hwlat_detector.txt linux-4.8.15/Documentation/hwlat_detector.txt ---- linux-4.8.15.orig/Documentation/hwlat_detector.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/Documentation/hwlat_detector.txt 2017-01-01 17:07:11.319123458 +0100 -@@ -0,0 +1,64 @@ -+Introduction: -+------------- -+ -+The module hwlat_detector is a special purpose kernel module that is used to -+detect large system latencies induced by the behavior of certain underlying -+hardware or firmware, independent of Linux itself. The code was developed -+originally to detect SMIs (System Management Interrupts) on x86 systems, -+however there is nothing x86 specific about this patchset. It was -+originally written for use by the "RT" patch since the Real Time -+kernel is highly latency sensitive. -+ -+SMIs are usually not serviced by the Linux kernel, which typically does not -+even know that they are occuring. SMIs are instead are set up by BIOS code -+and are serviced by BIOS code, usually for "critical" events such as -+management of thermal sensors and fans. Sometimes though, SMIs are used for -+other tasks and those tasks can spend an inordinate amount of time in the -+handler (sometimes measured in milliseconds). Obviously this is a problem if -+you are trying to keep event service latencies down in the microsecond range. -+ -+The hardware latency detector works by hogging all of the cpus for configurable -+amounts of time (by calling stop_machine()), polling the CPU Time Stamp Counter -+for some period, then looking for gaps in the TSC data. Any gap indicates a -+time when the polling was interrupted and since the machine is stopped and -+interrupts turned off the only thing that could do that would be an SMI. -+ -+Note that the SMI detector should *NEVER* be used in a production environment. -+It is intended to be run manually to determine if the hardware platform has a -+problem with long system firmware service routines. -+ -+Usage: -+------ -+ -+Loading the module hwlat_detector passing the parameter "enabled=1" (or by -+setting the "enable" entry in "hwlat_detector" debugfs toggled on) is the only -+step required to start the hwlat_detector. It is possible to redefine the -+threshold in microseconds (us) above which latency spikes will be taken -+into account (parameter "threshold="). -+ -+Example: -+ -+ # modprobe hwlat_detector enabled=1 threshold=100 -+ -+After the module is loaded, it creates a directory named "hwlat_detector" under -+the debugfs mountpoint, "/debug/hwlat_detector" for this text. It is necessary -+to have debugfs mounted, which might be on /sys/debug on your system. -+ -+The /debug/hwlat_detector interface contains the following files: -+ -+count - number of latency spikes observed since last reset -+enable - a global enable/disable toggle (0/1), resets count -+max - maximum hardware latency actually observed (usecs) -+sample - a pipe from which to read current raw sample data -+ in the format <timestamp> <latency observed usecs> -+ (can be opened O_NONBLOCK for a single sample) -+threshold - minimum latency value to be considered (usecs) -+width - time period to sample with CPUs held (usecs) -+ must be less than the total window size (enforced) -+window - total period of sampling, width being inside (usecs) -+ -+By default we will set width to 500,000 and window to 1,000,000, meaning that -+we will sample every 1,000,000 usecs (1s) for 500,000 usecs (0.5s). If we -+observe any latencies that exceed the threshold (initially 100 usecs), -+then we write to a global sample ring buffer of 8K samples, which is -+consumed by reading from the "sample" (pipe) debugfs file interface. -diff -Nur linux-4.8.15.orig/Documentation/sysrq.txt linux-4.8.15/Documentation/sysrq.txt ---- linux-4.8.15.orig/Documentation/sysrq.txt 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/Documentation/sysrq.txt 2017-01-01 17:07:11.331124221 +0100 +diff -Nur linux-4.9.6.orig/Documentation/sysrq.txt linux-4.9.6/Documentation/sysrq.txt +--- linux-4.9.6.orig/Documentation/sysrq.txt 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/Documentation/sysrq.txt 2017-01-28 13:59:09.887654498 +0100 @@ -59,10 +59,17 @@ On other - If you know of the key combos for other architectures, please let me know so I can add them to this section. @@ -3179,9 +3011,9 @@ diff -Nur linux-4.8.15.orig/Documentation/sysrq.txt linux-4.8.15/Documentation/s * What are the 'command' keys? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'b' - Will immediately reboot the system without syncing or unmounting -diff -Nur linux-4.8.15.orig/Documentation/trace/histograms.txt linux-4.8.15/Documentation/trace/histograms.txt ---- linux-4.8.15.orig/Documentation/trace/histograms.txt 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/Documentation/trace/histograms.txt 2017-01-01 17:07:11.399128611 +0100 +diff -Nur linux-4.9.6.orig/Documentation/trace/histograms.txt linux-4.9.6/Documentation/trace/histograms.txt +--- linux-4.9.6.orig/Documentation/trace/histograms.txt 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/Documentation/trace/histograms.txt 2017-01-28 13:59:09.887654498 +0100 @@ -0,0 +1,186 @@ + Using the Linux Kernel Latency Histograms + @@ -3369,9 +3201,9 @@ diff -Nur linux-4.8.15.orig/Documentation/trace/histograms.txt linux-4.8.15/Docu +is provided. + +These data are also reset when the wakeup histogram is reset. -diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/acglobal.h linux-4.8.15/drivers/acpi/acpica/acglobal.h ---- linux-4.8.15.orig/drivers/acpi/acpica/acglobal.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/acpi/acpica/acglobal.h 2017-01-01 17:07:13.707277269 +0100 +diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/acglobal.h linux-4.9.6/drivers/acpi/acpica/acglobal.h +--- linux-4.9.6.orig/drivers/acpi/acpica/acglobal.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/acpi/acpica/acglobal.h 2017-01-28 13:59:09.903655111 +0100 @@ -116,7 +116,7 @@ * interrupt level */ @@ -3381,9 +3213,9 @@ diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/acglobal.h linux-4.8.15/drivers/ ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock); /* Mutex for _OSI support */ -diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/hwregs.c linux-4.8.15/drivers/acpi/acpica/hwregs.c ---- linux-4.8.15.orig/drivers/acpi/acpica/hwregs.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/acpi/acpica/hwregs.c 2017-01-01 17:07:13.719278046 +0100 +diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwregs.c linux-4.9.6/drivers/acpi/acpica/hwregs.c +--- linux-4.9.6.orig/drivers/acpi/acpica/hwregs.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/acpi/acpica/hwregs.c 2017-01-28 13:59:09.903655111 +0100 @@ -363,14 +363,14 @@ ACPI_BITMASK_ALL_FIXED_STATUS, ACPI_FORMAT_UINT64(acpi_gbl_xpm1a_status.address))); @@ -3401,9 +3233,9 @@ diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/hwregs.c linux-4.8.15/drivers/ac if (ACPI_FAILURE(status)) { goto exit; -diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/hwxface.c linux-4.8.15/drivers/acpi/acpica/hwxface.c ---- linux-4.8.15.orig/drivers/acpi/acpica/hwxface.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/acpi/acpica/hwxface.c 2017-01-01 17:07:13.719278046 +0100 +diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/hwxface.c linux-4.9.6/drivers/acpi/acpica/hwxface.c +--- linux-4.9.6.orig/drivers/acpi/acpica/hwxface.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/acpi/acpica/hwxface.c 2017-01-28 13:59:09.903655111 +0100 @@ -373,7 +373,7 @@ return_ACPI_STATUS(AE_BAD_PARAMETER); } @@ -3422,9 +3254,9 @@ diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/hwxface.c linux-4.8.15/drivers/a return_ACPI_STATUS(status); } -diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/utmutex.c linux-4.8.15/drivers/acpi/acpica/utmutex.c ---- linux-4.8.15.orig/drivers/acpi/acpica/utmutex.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/acpi/acpica/utmutex.c 2017-01-01 17:07:13.727278551 +0100 +diff -Nur linux-4.9.6.orig/drivers/acpi/acpica/utmutex.c linux-4.9.6/drivers/acpi/acpica/utmutex.c +--- linux-4.9.6.orig/drivers/acpi/acpica/utmutex.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/acpi/acpica/utmutex.c 2017-01-28 13:59:09.903655111 +0100 @@ -88,7 +88,7 @@ return_ACPI_STATUS (status); } @@ -3443,9 +3275,9 @@ diff -Nur linux-4.8.15.orig/drivers/acpi/acpica/utmutex.c linux-4.8.15/drivers/a acpi_os_delete_lock(acpi_gbl_reference_count_lock); /* Delete the reader/writer lock */ -diff -Nur linux-4.8.15.orig/drivers/ata/libata-sff.c linux-4.8.15/drivers/ata/libata-sff.c ---- linux-4.8.15.orig/drivers/ata/libata-sff.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ata/libata-sff.c 2017-01-01 17:07:13.759280614 +0100 +diff -Nur linux-4.9.6.orig/drivers/ata/libata-sff.c linux-4.9.6/drivers/ata/libata-sff.c +--- linux-4.9.6.orig/drivers/ata/libata-sff.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ata/libata-sff.c 2017-01-28 13:59:09.907655265 +0100 @@ -678,9 +678,9 @@ unsigned long flags; unsigned int consumed; @@ -3494,9 +3326,9 @@ diff -Nur linux-4.8.15.orig/drivers/ata/libata-sff.c linux-4.8.15/drivers/ata/li } else { buf = page_address(page); consumed = ap->ops->sff_data_xfer(dev, buf + offset, -diff -Nur linux-4.8.15.orig/drivers/block/zram/zcomp.c linux-4.8.15/drivers/block/zram/zcomp.c ---- linux-4.8.15.orig/drivers/block/zram/zcomp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/block/zram/zcomp.c 2017-01-01 17:07:13.815284222 +0100 +diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.c linux-4.9.6/drivers/block/zram/zcomp.c +--- linux-4.9.6.orig/drivers/block/zram/zcomp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/block/zram/zcomp.c 2017-01-28 13:59:09.907655265 +0100 @@ -118,12 +118,19 @@ struct zcomp_strm *zcomp_stream_get(struct zcomp *comp) @@ -3527,9 +3359,9 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zcomp.c linux-4.8.15/drivers/bloc *per_cpu_ptr(comp->stream, cpu) = zstrm; break; case CPU_DEAD: -diff -Nur linux-4.8.15.orig/drivers/block/zram/zcomp.h linux-4.8.15/drivers/block/zram/zcomp.h ---- linux-4.8.15.orig/drivers/block/zram/zcomp.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/block/zram/zcomp.h 2017-01-01 17:07:13.823284735 +0100 +diff -Nur linux-4.9.6.orig/drivers/block/zram/zcomp.h linux-4.9.6/drivers/block/zram/zcomp.h +--- linux-4.9.6.orig/drivers/block/zram/zcomp.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/block/zram/zcomp.h 2017-01-28 13:59:09.907655265 +0100 @@ -14,6 +14,7 @@ /* compression/decompression buffer */ void *buffer; @@ -3538,10 +3370,10 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zcomp.h linux-4.8.15/drivers/bloc }; /* dynamic per-device compression frontend */ -diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/block/zram/zram_drv.c ---- linux-4.8.15.orig/drivers/block/zram/zram_drv.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/block/zram/zram_drv.c 2017-01-01 17:07:13.831285255 +0100 -@@ -519,6 +519,8 @@ +diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.c linux-4.9.6/drivers/block/zram/zram_drv.c +--- linux-4.9.6.orig/drivers/block/zram/zram_drv.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/block/zram/zram_drv.c 2017-01-28 13:59:09.907655265 +0100 +@@ -528,6 +528,8 @@ goto out_error; } @@ -3550,7 +3382,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b return meta; out_error: -@@ -566,28 +568,28 @@ +@@ -575,28 +577,28 @@ struct zram_meta *meta = zram->meta; unsigned long handle; unsigned int size; @@ -3585,7 +3417,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b /* Should NEVER happen. Return bio error if it does. */ if (unlikely(ret)) { -@@ -607,14 +609,14 @@ +@@ -616,14 +618,14 @@ struct zram_meta *meta = zram->meta; page = bvec->bv_page; @@ -3603,7 +3435,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b if (is_partial_io(bvec)) /* Use a temporary buffer to decompress the page */ -@@ -691,10 +693,10 @@ +@@ -700,10 +702,10 @@ if (user_mem) kunmap_atomic(user_mem); /* Free memory associated with this sector now. */ @@ -3616,7 +3448,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b atomic64_inc(&zram->stats.zero_pages); ret = 0; -@@ -785,12 +787,12 @@ +@@ -794,12 +796,12 @@ * Free memory associated with this sector * before overwriting unused sectors. */ @@ -3631,7 +3463,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b /* Update stats */ atomic64_add(clen, &zram->stats.compr_data_size); -@@ -833,9 +835,9 @@ +@@ -842,9 +844,9 @@ } while (n >= PAGE_SIZE) { @@ -3643,7 +3475,7 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b atomic64_inc(&zram->stats.notify_free); index++; n -= PAGE_SIZE; -@@ -964,9 +966,9 @@ +@@ -973,9 +975,9 @@ zram = bdev->bd_disk->private_data; meta = zram->meta; @@ -3655,9 +3487,9 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.c linux-4.8.15/drivers/b atomic64_inc(&zram->stats.notify_free); } -diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.h linux-4.8.15/drivers/block/zram/zram_drv.h ---- linux-4.8.15.orig/drivers/block/zram/zram_drv.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/block/zram/zram_drv.h 2017-01-01 17:07:13.831285255 +0100 +diff -Nur linux-4.9.6.orig/drivers/block/zram/zram_drv.h linux-4.9.6/drivers/block/zram/zram_drv.h +--- linux-4.9.6.orig/drivers/block/zram/zram_drv.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/block/zram/zram_drv.h 2017-01-28 13:59:09.907655265 +0100 @@ -73,6 +73,9 @@ struct zram_table_entry { unsigned long handle; @@ -3711,9 +3543,9 @@ diff -Nur linux-4.8.15.orig/drivers/block/zram/zram_drv.h linux-4.8.15/drivers/b +#endif /* CONFIG_PREEMPT_RT_BASE */ + #endif -diff -Nur linux-4.8.15.orig/drivers/char/random.c linux-4.8.15/drivers/char/random.c ---- linux-4.8.15.orig/drivers/char/random.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/char/random.c 2017-01-01 17:07:13.863287315 +0100 +diff -Nur linux-4.9.6.orig/drivers/char/random.c linux-4.9.6/drivers/char/random.c +--- linux-4.9.6.orig/drivers/char/random.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/char/random.c 2017-01-28 13:59:09.907655265 +0100 @@ -1028,8 +1028,6 @@ } sample; long delta, delta2, delta3; @@ -3765,9 +3597,9 @@ diff -Nur linux-4.8.15.orig/drivers/char/random.c linux-4.8.15/drivers/char/rand fast_mix(fast_pool); add_interrupt_bench(cycles); -diff -Nur linux-4.8.15.orig/drivers/clocksource/tcb_clksrc.c linux-4.8.15/drivers/clocksource/tcb_clksrc.c ---- linux-4.8.15.orig/drivers/clocksource/tcb_clksrc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/clocksource/tcb_clksrc.c 2017-01-01 17:07:13.903289890 +0100 +diff -Nur linux-4.9.6.orig/drivers/clocksource/tcb_clksrc.c linux-4.9.6/drivers/clocksource/tcb_clksrc.c +--- linux-4.9.6.orig/drivers/clocksource/tcb_clksrc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/clocksource/tcb_clksrc.c 2017-01-28 13:59:09.907655265 +0100 @@ -23,8 +23,7 @@ * this 32 bit free-running counter. the second channel is not used. * @@ -3925,9 +3757,9 @@ diff -Nur linux-4.8.15.orig/drivers/clocksource/tcb_clksrc.c linux-4.8.15/driver if (ret) goto err_unregister_clksrc; -diff -Nur linux-4.8.15.orig/drivers/clocksource/timer-atmel-pit.c linux-4.8.15/drivers/clocksource/timer-atmel-pit.c ---- linux-4.8.15.orig/drivers/clocksource/timer-atmel-pit.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/clocksource/timer-atmel-pit.c 2017-01-01 17:07:13.911290405 +0100 +diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-pit.c linux-4.9.6/drivers/clocksource/timer-atmel-pit.c +--- linux-4.9.6.orig/drivers/clocksource/timer-atmel-pit.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/clocksource/timer-atmel-pit.c 2017-01-28 13:59:09.907655265 +0100 @@ -46,6 +46,7 @@ u32 cycle; u32 cnt; @@ -3966,7 +3798,7 @@ diff -Nur linux-4.8.15.orig/drivers/clocksource/timer-atmel-pit.c linux-4.8.15/d /* update clocksource counter */ data->cnt += data->cycle * PIT_PICNT(pit_read(data->base, AT91_PIT_PIVR)); -@@ -211,15 +226,6 @@ +@@ -230,15 +245,6 @@ return ret; } @@ -3982,9 +3814,9 @@ diff -Nur linux-4.8.15.orig/drivers/clocksource/timer-atmel-pit.c linux-4.8.15/d /* Set up and register clockevents */ data->clkevt.name = "pit"; data->clkevt.features = CLOCK_EVT_FEAT_PERIODIC; -diff -Nur linux-4.8.15.orig/drivers/clocksource/timer-atmel-st.c linux-4.8.15/drivers/clocksource/timer-atmel-st.c ---- linux-4.8.15.orig/drivers/clocksource/timer-atmel-st.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/clocksource/timer-atmel-st.c 2017-01-01 17:07:13.911290405 +0100 +diff -Nur linux-4.9.6.orig/drivers/clocksource/timer-atmel-st.c linux-4.9.6/drivers/clocksource/timer-atmel-st.c +--- linux-4.9.6.orig/drivers/clocksource/timer-atmel-st.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/clocksource/timer-atmel-st.c 2017-01-28 13:59:09.907655265 +0100 @@ -115,18 +115,29 @@ last_crtr = read_CRTR(); } @@ -4065,9 +3897,9 @@ diff -Nur linux-4.8.15.orig/drivers/clocksource/timer-atmel-st.c linux-4.8.15/dr sclk = of_clk_get(node, 0); if (IS_ERR(sclk)) { pr_err("Unable to get slow clock\n"); -diff -Nur linux-4.8.15.orig/drivers/connector/cn_proc.c linux-4.8.15/drivers/connector/cn_proc.c ---- linux-4.8.15.orig/drivers/connector/cn_proc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/connector/cn_proc.c 2017-01-01 17:07:13.951292981 +0100 +diff -Nur linux-4.9.6.orig/drivers/connector/cn_proc.c linux-4.9.6/drivers/connector/cn_proc.c +--- linux-4.9.6.orig/drivers/connector/cn_proc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/connector/cn_proc.c 2017-01-28 13:59:09.907655265 +0100 @@ -32,6 +32,7 @@ #include <linux/pid_namespace.h> @@ -4098,9 +3930,9 @@ diff -Nur linux-4.8.15.orig/drivers/connector/cn_proc.c linux-4.8.15/drivers/con } void proc_fork_connector(struct task_struct *task) -diff -Nur linux-4.8.15.orig/drivers/cpufreq/Kconfig.x86 linux-4.8.15/drivers/cpufreq/Kconfig.x86 ---- linux-4.8.15.orig/drivers/cpufreq/Kconfig.x86 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/cpufreq/Kconfig.x86 2017-01-01 17:07:13.951292981 +0100 +diff -Nur linux-4.9.6.orig/drivers/cpufreq/Kconfig.x86 linux-4.9.6/drivers/cpufreq/Kconfig.x86 +--- linux-4.9.6.orig/drivers/cpufreq/Kconfig.x86 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/cpufreq/Kconfig.x86 2017-01-28 13:59:09.907655265 +0100 @@ -124,7 +124,7 @@ config X86_POWERNOW_K8 @@ -4110,10 +3942,10 @@ diff -Nur linux-4.8.15.orig/drivers/cpufreq/Kconfig.x86 linux-4.8.15/drivers/cpu help This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors. Support for K10 and newer processors is now in acpi-cpufreq. -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.8.15/drivers/gpu/drm/i915/i915_gem_execbuffer.c ---- linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-01-01 17:07:13.983295041 +0100 -@@ -1302,7 +1302,9 @@ +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.9.6/drivers/gpu/drm/i915/i915_gem_execbuffer.c +--- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/i915/i915_gem_execbuffer.c 2017-01-28 13:59:09.907655265 +0100 +@@ -1537,7 +1537,9 @@ if (ret) return ret; @@ -4123,9 +3955,9 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_execbuffer.c linux-4.8 i915_gem_execbuffer_move_to_active(vmas, params->request); -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.8.15/drivers/gpu/drm/i915/i915_gem_shrinker.c ---- linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-01-01 17:07:13.987295307 +0100 +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.9.6/drivers/gpu/drm/i915/i915_gem_shrinker.c +--- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/i915/i915_gem_shrinker.c 2017-01-28 13:59:09.907655265 +0100 @@ -40,7 +40,7 @@ if (!mutex_is_locked(mutex)) return false; @@ -4135,9 +3967,9 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_gem_shrinker.c linux-4.8.1 return mutex->owner == task; #else /* Since UP may be pre-empted, we cannot assume that we own the lock */ -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.8.15/drivers/gpu/drm/i915/i915_irq.c ---- linux-4.8.15.orig/drivers/gpu/drm/i915/i915_irq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/i915/i915_irq.c 2017-01-01 17:07:14.007296588 +0100 +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.9.6/drivers/gpu/drm/i915/i915_irq.c +--- linux-4.9.6.orig/drivers/gpu/drm/i915/i915_irq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/i915/i915_irq.c 2017-01-28 13:59:09.907655265 +0100 @@ -812,6 +812,7 @@ spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); @@ -4154,10 +3986,10 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/i915_irq.c linux-4.8.15/drivers spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_display.c linux-4.8.15/drivers/gpu/drm/i915/intel_display.c ---- linux-4.8.15.orig/drivers/gpu/drm/i915/intel_display.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/i915/intel_display.c 2017-01-01 17:07:14.079301234 +0100 -@@ -11670,7 +11670,7 @@ +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_display.c linux-4.9.6/drivers/gpu/drm/i915/intel_display.c +--- linux-4.9.6.orig/drivers/gpu/drm/i915/intel_display.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/i915/intel_display.c 2017-01-28 13:59:09.911655420 +0100 +@@ -12131,7 +12131,7 @@ struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_flip_work *work; @@ -4166,18 +3998,18 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_display.c linux-4.8.15/dr if (crtc == NULL) return; -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.8.15/drivers/gpu/drm/i915/intel_sprite.c ---- linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/i915/intel_sprite.c 2017-01-01 17:07:14.091301999 +0100 -@@ -38,6 +38,7 @@ +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.9.6/drivers/gpu/drm/i915/intel_sprite.c +--- linux-4.9.6.orig/drivers/gpu/drm/i915/intel_sprite.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/i915/intel_sprite.c 2017-01-28 13:59:09.911655420 +0100 +@@ -35,6 +35,7 @@ + #include <drm/drm_rect.h> + #include <drm/drm_atomic.h> + #include <drm/drm_plane_helper.h> ++#include <linux/locallock.h> #include "intel_drv.h" + #include "intel_frontbuffer.h" #include <drm/i915_drm.h> - #include "i915_drv.h" -+#include <linux/locallock.h> - - static bool - format_is_yuv(uint32_t format) -@@ -64,6 +65,8 @@ +@@ -65,6 +66,8 @@ 1000 * adjusted_mode->crtc_htotal); } @@ -4186,7 +4018,7 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.8.15/dri /** * intel_pipe_update_start() - start update of a set of display registers * @crtc: the crtc of which the registers are going to be updated -@@ -94,7 +97,7 @@ +@@ -95,7 +98,7 @@ min = vblank_start - intel_usecs_to_scanlines(adjusted_mode, 100); max = vblank_start - 1; @@ -4195,7 +4027,7 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.8.15/dri if (min <= 0 || max <= 0) return; -@@ -124,11 +127,11 @@ +@@ -125,11 +128,11 @@ break; } @@ -4209,7 +4041,7 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.8.15/dri } finish_wait(wq, &wait); -@@ -180,7 +183,7 @@ +@@ -181,7 +184,7 @@ crtc->base.state->event = NULL; } @@ -4218,9 +4050,9 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/i915/intel_sprite.c linux-4.8.15/dri if (crtc->debug.start_vbl_count && crtc->debug.start_vbl_count != end_vbl_count) { -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.8.15/drivers/gpu/drm/msm/msm_gem_shrinker.c ---- linux-4.8.15.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-01-01 17:07:14.095302264 +0100 +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.9.6/drivers/gpu/drm/msm/msm_gem_shrinker.c +--- linux-4.9.6.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/msm/msm_gem_shrinker.c 2017-01-28 13:59:09.911655420 +0100 @@ -23,7 +23,7 @@ if (!mutex_is_locked(mutex)) return false; @@ -4230,10 +4062,10 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/msm/msm_gem_shrinker.c linux-4.8.15/ return mutex->owner == task; #else /* Since UP may be pre-empted, we cannot assume that we own the lock */ -diff -Nur linux-4.8.15.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.8.15/drivers/gpu/drm/radeon/radeon_display.c ---- linux-4.8.15.orig/drivers/gpu/drm/radeon/radeon_display.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/gpu/drm/radeon/radeon_display.c 2017-01-01 17:07:14.135304831 +0100 -@@ -1869,6 +1869,7 @@ +diff -Nur linux-4.9.6.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.9.6/drivers/gpu/drm/radeon/radeon_display.c +--- linux-4.9.6.orig/drivers/gpu/drm/radeon/radeon_display.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/gpu/drm/radeon/radeon_display.c 2017-01-28 13:59:09.911655420 +0100 +@@ -1845,6 +1845,7 @@ struct radeon_device *rdev = dev->dev_private; /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ @@ -4241,7 +4073,7 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.8.15 /* Get optional system timestamp before query. */ if (stime) -@@ -1961,6 +1962,7 @@ +@@ -1937,6 +1938,7 @@ *etime = ktime_get(); /* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */ @@ -4249,9 +4081,9 @@ diff -Nur linux-4.8.15.orig/drivers/gpu/drm/radeon/radeon_display.c linux-4.8.15 /* Decode into vertical and horizontal scanout position. */ *vpos = position & 0x1fff; -diff -Nur linux-4.8.15.orig/drivers/hv/vmbus_drv.c linux-4.8.15/drivers/hv/vmbus_drv.c ---- linux-4.8.15.orig/drivers/hv/vmbus_drv.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/hv/vmbus_drv.c 2017-01-01 17:07:14.187308183 +0100 +diff -Nur linux-4.9.6.orig/drivers/hv/vmbus_drv.c linux-4.9.6/drivers/hv/vmbus_drv.c +--- linux-4.9.6.orig/drivers/hv/vmbus_drv.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/hv/vmbus_drv.c 2017-01-28 13:59:09.911655420 +0100 @@ -761,6 +761,8 @@ void *page_addr; struct hv_message *msg; @@ -4270,9 +4102,9 @@ diff -Nur linux-4.8.15.orig/drivers/hv/vmbus_drv.c linux-4.8.15/drivers/hv/vmbus } -diff -Nur linux-4.8.15.orig/drivers/ide/alim15x3.c linux-4.8.15/drivers/ide/alim15x3.c ---- linux-4.8.15.orig/drivers/ide/alim15x3.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/alim15x3.c 2017-01-01 17:07:14.227310759 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/alim15x3.c linux-4.9.6/drivers/ide/alim15x3.c +--- linux-4.9.6.orig/drivers/ide/alim15x3.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/alim15x3.c 2017-01-28 13:59:09.911655420 +0100 @@ -234,7 +234,7 @@ isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); @@ -4291,9 +4123,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/alim15x3.c linux-4.8.15/drivers/ide/alim return 0; } -diff -Nur linux-4.8.15.orig/drivers/ide/hpt366.c linux-4.8.15/drivers/ide/hpt366.c ---- linux-4.8.15.orig/drivers/ide/hpt366.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/hpt366.c 2017-01-01 17:07:14.243311792 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/hpt366.c linux-4.9.6/drivers/ide/hpt366.c +--- linux-4.9.6.orig/drivers/ide/hpt366.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/hpt366.c 2017-01-28 13:59:09.911655420 +0100 @@ -1236,7 +1236,7 @@ dma_old = inb(base + 2); @@ -4312,9 +4144,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/hpt366.c linux-4.8.15/drivers/ide/hpt366 printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name, base, base + 7); -diff -Nur linux-4.8.15.orig/drivers/ide/ide-io.c linux-4.8.15/drivers/ide/ide-io.c ---- linux-4.8.15.orig/drivers/ide/ide-io.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/ide-io.c 2017-01-01 17:07:14.243311792 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/ide-io.c linux-4.9.6/drivers/ide/ide-io.c +--- linux-4.9.6.orig/drivers/ide/ide-io.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/ide-io.c 2017-01-28 13:59:09.911655420 +0100 @@ -659,7 +659,7 @@ /* disable_irq_nosync ?? */ disable_irq(hwif->irq); @@ -4324,9 +4156,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/ide-io.c linux-4.8.15/drivers/ide/ide-io if (hwif->polling) { startstop = handler(drive); } else if (drive_is_ready(drive)) { -diff -Nur linux-4.8.15.orig/drivers/ide/ide-iops.c linux-4.8.15/drivers/ide/ide-iops.c ---- linux-4.8.15.orig/drivers/ide/ide-iops.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/ide-iops.c 2017-01-01 17:07:14.247312048 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/ide-iops.c linux-4.9.6/drivers/ide/ide-iops.c +--- linux-4.9.6.orig/drivers/ide/ide-iops.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/ide-iops.c 2017-01-28 13:59:09.911655420 +0100 @@ -129,12 +129,12 @@ if ((stat & ATA_BUSY) == 0) break; @@ -4342,9 +4174,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/ide-iops.c linux-4.8.15/drivers/ide/ide- } /* * Allow status to settle, then read it again. -diff -Nur linux-4.8.15.orig/drivers/ide/ide-io-std.c linux-4.8.15/drivers/ide/ide-io-std.c ---- linux-4.8.15.orig/drivers/ide/ide-io-std.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/ide-io-std.c 2017-01-01 17:07:14.243311792 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/ide-io-std.c linux-4.9.6/drivers/ide/ide-io-std.c +--- linux-4.9.6.orig/drivers/ide/ide-io-std.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/ide-io-std.c 2017-01-28 13:59:09.911655420 +0100 @@ -175,7 +175,7 @@ unsigned long uninitialized_var(flags); @@ -4381,9 +4213,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/ide-io-std.c linux-4.8.15/drivers/ide/id if (((len + 1) & 3) < 2) return; -diff -Nur linux-4.8.15.orig/drivers/ide/ide-probe.c linux-4.8.15/drivers/ide/ide-probe.c ---- linux-4.8.15.orig/drivers/ide/ide-probe.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/ide-probe.c 2017-01-01 17:07:14.247312048 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/ide-probe.c linux-4.9.6/drivers/ide/ide-probe.c +--- linux-4.9.6.orig/drivers/ide/ide-probe.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/ide-probe.c 2017-01-28 13:59:09.911655420 +0100 @@ -196,10 +196,10 @@ int bswap = 1; @@ -4397,9 +4229,9 @@ diff -Nur linux-4.8.15.orig/drivers/ide/ide-probe.c linux-4.8.15/drivers/ide/ide drive->dev_flags |= IDE_DFLAG_ID_READ; #ifdef DEBUG -diff -Nur linux-4.8.15.orig/drivers/ide/ide-taskfile.c linux-4.8.15/drivers/ide/ide-taskfile.c ---- linux-4.8.15.orig/drivers/ide/ide-taskfile.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/ide/ide-taskfile.c 2017-01-01 17:07:14.255312569 +0100 +diff -Nur linux-4.9.6.orig/drivers/ide/ide-taskfile.c linux-4.9.6/drivers/ide/ide-taskfile.c +--- linux-4.9.6.orig/drivers/ide/ide-taskfile.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/ide/ide-taskfile.c 2017-01-28 13:59:09.911655420 +0100 @@ -250,7 +250,7 @@ page_is_high = PageHighMem(page); @@ -4427,10 +4259,10 @@ diff -Nur linux-4.8.15.orig/drivers/ide/ide-taskfile.c linux-4.8.15/drivers/ide/ ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE); -diff -Nur linux-4.8.15.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux-4.8.15/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ---- linux-4.8.15.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-01-01 17:07:14.299315394 +0100 -@@ -899,7 +899,7 @@ +diff -Nur linux-4.9.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux-4.9.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +--- linux-4.9.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2017-01-28 13:59:09.911655420 +0100 +@@ -902,7 +902,7 @@ ipoib_dbg_mcast(priv, "restarting multicast task\n"); @@ -4439,7 +4271,7 @@ diff -Nur linux-4.8.15.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux netif_addr_lock(dev); spin_lock(&priv->lock); -@@ -981,7 +981,7 @@ +@@ -984,7 +984,7 @@ spin_unlock(&priv->lock); netif_addr_unlock(dev); @@ -4448,9 +4280,9 @@ diff -Nur linux-4.8.15.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c linux /* * make sure the in-flight joins have finished before we attempt -diff -Nur linux-4.8.15.orig/drivers/input/gameport/gameport.c linux-4.8.15/drivers/input/gameport/gameport.c ---- linux-4.8.15.orig/drivers/input/gameport/gameport.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/input/gameport/gameport.c 2017-01-01 17:07:14.343318229 +0100 +diff -Nur linux-4.9.6.orig/drivers/input/gameport/gameport.c linux-4.9.6/drivers/input/gameport/gameport.c +--- linux-4.9.6.orig/drivers/input/gameport/gameport.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/input/gameport/gameport.c 2017-01-28 13:59:09.915655573 +0100 @@ -91,13 +91,13 @@ tx = ~0; @@ -4496,10 +4328,10 @@ diff -Nur linux-4.8.15.orig/drivers/input/gameport/gameport.c linux-4.8.15/drive udelay(i * 10); if (t2 - t1 < tx) tx = t2 - t1; } -diff -Nur linux-4.8.15.orig/drivers/iommu/amd_iommu.c linux-4.8.15/drivers/iommu/amd_iommu.c ---- linux-4.8.15.orig/drivers/iommu/amd_iommu.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/iommu/amd_iommu.c 2017-01-01 17:07:14.403322093 +0100 -@@ -1835,10 +1835,10 @@ +diff -Nur linux-4.9.6.orig/drivers/iommu/amd_iommu.c linux-4.9.6/drivers/iommu/amd_iommu.c +--- linux-4.9.6.orig/drivers/iommu/amd_iommu.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/iommu/amd_iommu.c 2017-01-28 13:59:09.915655573 +0100 +@@ -1923,10 +1923,10 @@ int ret; /* @@ -4513,7 +4345,7 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/amd_iommu.c linux-4.8.15/drivers/iommu /* lock domain */ spin_lock(&domain->lock); -@@ -2006,10 +2006,10 @@ +@@ -2094,10 +2094,10 @@ struct protection_domain *domain; /* @@ -4527,9 +4359,9 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/amd_iommu.c linux-4.8.15/drivers/iommu if (WARN_ON(!dev_data->domain)) return; -diff -Nur linux-4.8.15.orig/drivers/iommu/intel-iommu.c linux-4.8.15/drivers/iommu/intel-iommu.c ---- linux-4.8.15.orig/drivers/iommu/intel-iommu.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/iommu/intel-iommu.c 2017-01-01 17:07:14.443324672 +0100 +diff -Nur linux-4.9.6.orig/drivers/iommu/intel-iommu.c linux-4.9.6/drivers/iommu/intel-iommu.c +--- linux-4.9.6.orig/drivers/iommu/intel-iommu.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/iommu/intel-iommu.c 2017-01-28 13:59:09.915655573 +0100 @@ -479,7 +479,7 @@ struct deferred_flush_table *tables; }; @@ -4539,7 +4371,7 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/intel-iommu.c linux-4.8.15/drivers/iom /* bitmap for indexing intel_iommus */ static int g_num_of_iommus; -@@ -3649,10 +3649,8 @@ +@@ -3715,10 +3715,8 @@ struct intel_iommu *iommu; struct deferred_flush_entry *entry; struct deferred_flush_data *flush_data; @@ -4551,7 +4383,7 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/intel-iommu.c linux-4.8.15/drivers/iom /* Flush all CPUs' entries to avoid deferring too much. If * this becomes a bottleneck, can just flush us, and rely on -@@ -3685,8 +3683,6 @@ +@@ -3751,8 +3749,6 @@ } flush_data->size++; spin_unlock_irqrestore(&flush_data->lock, flags); @@ -4560,9 +4392,9 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/intel-iommu.c linux-4.8.15/drivers/iom } static void intel_unmap(struct device *dev, dma_addr_t dev_addr, size_t size) -diff -Nur linux-4.8.15.orig/drivers/iommu/iova.c linux-4.8.15/drivers/iommu/iova.c ---- linux-4.8.15.orig/drivers/iommu/iova.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/iommu/iova.c 2017-01-01 17:07:14.455325452 +0100 +diff -Nur linux-4.9.6.orig/drivers/iommu/iova.c linux-4.9.6/drivers/iommu/iova.c +--- linux-4.9.6.orig/drivers/iommu/iova.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/iommu/iova.c 2017-01-28 13:59:09.915655573 +0100 @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/smp.h> @@ -4616,9 +4448,9 @@ diff -Nur linux-4.8.15.orig/drivers/iommu/iova.c linux-4.8.15/drivers/iommu/iova return iova_pfn; } -diff -Nur linux-4.8.15.orig/drivers/leds/trigger/Kconfig linux-4.8.15/drivers/leds/trigger/Kconfig ---- linux-4.8.15.orig/drivers/leds/trigger/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/leds/trigger/Kconfig 2017-01-01 17:07:14.495328021 +0100 +diff -Nur linux-4.9.6.orig/drivers/leds/trigger/Kconfig linux-4.9.6/drivers/leds/trigger/Kconfig +--- linux-4.9.6.orig/drivers/leds/trigger/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/leds/trigger/Kconfig 2017-01-28 13:59:09.915655573 +0100 @@ -69,7 +69,7 @@ config LEDS_TRIGGER_CPU @@ -4628,9 +4460,9 @@ diff -Nur linux-4.8.15.orig/drivers/leds/trigger/Kconfig linux-4.8.15/drivers/le help This allows LEDs to be controlled by active CPUs. This shows the active CPUs across an array of LEDs so you can see which -diff -Nur linux-4.8.15.orig/drivers/md/bcache/Kconfig linux-4.8.15/drivers/md/bcache/Kconfig ---- linux-4.8.15.orig/drivers/md/bcache/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/md/bcache/Kconfig 2017-01-01 17:07:14.511329049 +0100 +diff -Nur linux-4.9.6.orig/drivers/md/bcache/Kconfig linux-4.9.6/drivers/md/bcache/Kconfig +--- linux-4.9.6.orig/drivers/md/bcache/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/md/bcache/Kconfig 2017-01-28 13:59:09.915655573 +0100 @@ -1,6 +1,7 @@ config BCACHE @@ -4639,21 +4471,21 @@ diff -Nur linux-4.8.15.orig/drivers/md/bcache/Kconfig linux-4.8.15/drivers/md/bc ---help--- Allows a block device to be used as cache for other devices; uses a btree for indexing and the layout is optimized for SSDs. -diff -Nur linux-4.8.15.orig/drivers/md/dm-rq.c linux-4.8.15/drivers/md/dm-rq.c ---- linux-4.8.15.orig/drivers/md/dm-rq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/md/dm-rq.c 2017-01-01 17:07:14.515329315 +0100 -@@ -811,7 +811,7 @@ +diff -Nur linux-4.9.6.orig/drivers/md/dm-rq.c linux-4.9.6/drivers/md/dm-rq.c +--- linux-4.9.6.orig/drivers/md/dm-rq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/md/dm-rq.c 2017-01-28 13:59:09.915655573 +0100 +@@ -838,7 +838,7 @@ /* Establish tio->ti before queuing work (map_tio_request) */ tio->ti = ti; - queue_kthread_work(&md->kworker, &tio->work); + kthread_queue_work(&md->kworker, &tio->work); - BUG_ON(!irqs_disabled()); + BUG_ON_NONRT(!irqs_disabled()); } } -diff -Nur linux-4.8.15.orig/drivers/md/raid5.c linux-4.8.15/drivers/md/raid5.c ---- linux-4.8.15.orig/drivers/md/raid5.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/md/raid5.c 2017-01-01 17:07:14.555331893 +0100 +diff -Nur linux-4.9.6.orig/drivers/md/raid5.c linux-4.9.6/drivers/md/raid5.c +--- linux-4.9.6.orig/drivers/md/raid5.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/md/raid5.c 2017-01-28 13:59:09.915655573 +0100 @@ -1928,8 +1928,9 @@ struct raid5_percpu *percpu; unsigned long cpu; @@ -4675,17 +4507,25 @@ diff -Nur linux-4.8.15.orig/drivers/md/raid5.c linux-4.8.15/drivers/md/raid5.c } static struct stripe_head *alloc_stripe(struct kmem_cache *sc, gfp_t gfp, -@@ -6438,6 +6440,7 @@ - __func__, cpu); - break; - } -+ spin_lock_init(&per_cpu_ptr(conf->percpu, cpu)->lock); +@@ -6391,6 +6393,7 @@ + __func__, cpu); + return -ENOMEM; } - put_online_cpus(); ++ spin_lock_init(&per_cpu_ptr(conf->percpu, cpu)->lock); + return 0; + } -diff -Nur linux-4.8.15.orig/drivers/md/raid5.h linux-4.8.15/drivers/md/raid5.h ---- linux-4.8.15.orig/drivers/md/raid5.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/md/raid5.h 2017-01-01 17:07:14.571332922 +0100 +@@ -6401,7 +6404,6 @@ + conf->percpu = alloc_percpu(struct raid5_percpu); + if (!conf->percpu) + return -ENOMEM; +- + err = cpuhp_state_add_instance(CPUHP_MD_RAID5_PREPARE, &conf->node); + if (!err) { + conf->scribble_disks = max(conf->raid_disks, +diff -Nur linux-4.9.6.orig/drivers/md/raid5.h linux-4.9.6/drivers/md/raid5.h +--- linux-4.9.6.orig/drivers/md/raid5.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/md/raid5.h 2017-01-28 13:59:09.915655573 +0100 @@ -504,6 +504,7 @@ int recovery_disabled; /* per cpu variables */ @@ -4694,1253 +4534,9 @@ diff -Nur linux-4.8.15.orig/drivers/md/raid5.h linux-4.8.15/drivers/md/raid5.h struct page *spare_page; /* Used when checking P/Q in raid6 */ struct flex_array *scribble; /* space for constructing buffer * lists and performing address -diff -Nur linux-4.8.15.orig/drivers/misc/hwlat_detector.c linux-4.8.15/drivers/misc/hwlat_detector.c ---- linux-4.8.15.orig/drivers/misc/hwlat_detector.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/drivers/misc/hwlat_detector.c 2017-01-01 17:07:14.579333432 +0100 -@@ -0,0 +1,1240 @@ -+/* -+ * hwlat_detector.c - A simple Hardware Latency detector. -+ * -+ * Use this module to detect large system latencies induced by the behavior of -+ * certain underlying system hardware or firmware, independent of Linux itself. -+ * The code was developed originally to detect the presence of SMIs on Intel -+ * and AMD systems, although there is no dependency upon x86 herein. -+ * -+ * The classical example usage of this module is in detecting the presence of -+ * SMIs or System Management Interrupts on Intel and AMD systems. An SMI is a -+ * somewhat special form of hardware interrupt spawned from earlier CPU debug -+ * modes in which the (BIOS/EFI/etc.) firmware arranges for the South Bridge -+ * LPC (or other device) to generate a special interrupt under certain -+ * circumstances, for example, upon expiration of a special SMI timer device, -+ * due to certain external thermal readings, on certain I/O address accesses, -+ * and other situations. An SMI hits a special CPU pin, triggers a special -+ * SMI mode (complete with special memory map), and the OS is unaware. -+ * -+ * Although certain hardware-inducing latencies are necessary (for example, -+ * a modern system often requires an SMI handler for correct thermal control -+ * and remote management) they can wreak havoc upon any OS-level performance -+ * guarantees toward low-latency, especially when the OS is not even made -+ * aware of the presence of these interrupts. For this reason, we need a -+ * somewhat brute force mechanism to detect these interrupts. In this case, -+ * we do it by hogging all of the CPU(s) for configurable timer intervals, -+ * sampling the built-in CPU timer, looking for discontiguous readings. -+ * -+ * WARNING: This implementation necessarily introduces latencies. Therefore, -+ * you should NEVER use this module in a production environment -+ * requiring any kind of low-latency performance guarantee(s). -+ * -+ * Copyright (C) 2008-2009 Jon Masters, Red Hat, Inc. <jcm@redhat.com> -+ * -+ * Includes useful feedback from Clark Williams <clark@redhat.com> -+ * -+ * This file is licensed under the terms of the GNU General Public -+ * License version 2. This program is licensed "as is" without any -+ * warranty of any kind, whether express or implied. -+ */ -+ -+#include <linux/module.h> -+#include <linux/init.h> -+#include <linux/ring_buffer.h> -+#include <linux/time.h> -+#include <linux/hrtimer.h> -+#include <linux/kthread.h> -+#include <linux/debugfs.h> -+#include <linux/seq_file.h> -+#include <linux/uaccess.h> -+#include <linux/version.h> -+#include <linux/delay.h> -+#include <linux/slab.h> -+#include <linux/trace_clock.h> -+ -+#define BUF_SIZE_DEFAULT 262144UL /* 8K*(sizeof(entry)) */ -+#define BUF_FLAGS (RB_FL_OVERWRITE) /* no block on full */ -+#define U64STR_SIZE 22 /* 20 digits max */ -+ -+#define VERSION "1.0.0" -+#define BANNER "hwlat_detector: " -+#define DRVNAME "hwlat_detector" -+#define DEFAULT_SAMPLE_WINDOW 1000000 /* 1s */ -+#define DEFAULT_SAMPLE_WIDTH 500000 /* 0.5s */ -+#define DEFAULT_LAT_THRESHOLD 10 /* 10us */ -+ -+/* Module metadata */ -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Jon Masters <jcm@redhat.com>"); -+MODULE_DESCRIPTION("A simple hardware latency detector"); -+MODULE_VERSION(VERSION); -+ -+/* Module parameters */ -+ -+static int debug; -+static int enabled; -+static int threshold; -+ -+module_param(debug, int, 0); /* enable debug */ -+module_param(enabled, int, 0); /* enable detector */ -+module_param(threshold, int, 0); /* latency threshold */ -+ -+/* Buffering and sampling */ -+ -+static struct ring_buffer *ring_buffer; /* sample buffer */ -+static DEFINE_MUTEX(ring_buffer_mutex); /* lock changes */ -+static unsigned long buf_size = BUF_SIZE_DEFAULT; -+static struct task_struct *kthread; /* sampling thread */ -+ -+/* DebugFS filesystem entries */ -+ -+static struct dentry *debug_dir; /* debugfs directory */ -+static struct dentry *debug_max; /* maximum TSC delta */ -+static struct dentry *debug_count; /* total detect count */ -+static struct dentry *debug_sample_width; /* sample width us */ -+static struct dentry *debug_sample_window; /* sample window us */ -+static struct dentry *debug_sample; /* raw samples us */ -+static struct dentry *debug_threshold; /* threshold us */ -+static struct dentry *debug_enable; /* enable/disable */ -+ -+/* Individual samples and global state */ -+ -+struct sample; /* latency sample */ -+struct data; /* Global state */ -+ -+/* Sampling functions */ -+static int __buffer_add_sample(struct sample *sample); -+static struct sample *buffer_get_sample(struct sample *sample); -+ -+/* Threading and state */ -+static int kthread_fn(void *unused); -+static int start_kthread(void); -+static int stop_kthread(void); -+static void __reset_stats(void); -+static int init_stats(void); -+ -+/* Debugfs interface */ -+static ssize_t simple_data_read(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos, const u64 *entry); -+static ssize_t simple_data_write(struct file *filp, const char __user *ubuf, -+ size_t cnt, loff_t *ppos, u64 *entry); -+static int debug_sample_fopen(struct inode *inode, struct file *filp); -+static ssize_t debug_sample_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos); -+static int debug_sample_release(struct inode *inode, struct file *filp); -+static int debug_enable_fopen(struct inode *inode, struct file *filp); -+static ssize_t debug_enable_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos); -+static ssize_t debug_enable_fwrite(struct file *file, -+ const char __user *user_buffer, -+ size_t user_size, loff_t *offset); -+ -+/* Initialization functions */ -+static int init_debugfs(void); -+static void free_debugfs(void); -+static int detector_init(void); -+static void detector_exit(void); -+ -+/* Individual latency samples are stored here when detected and packed into -+ * the ring_buffer circular buffer, where they are overwritten when -+ * more than buf_size/sizeof(sample) samples are received. */ -+struct sample { -+ u64 seqnum; /* unique sequence */ -+ u64 duration; /* ktime delta */ -+ u64 outer_duration; /* ktime delta (outer loop) */ -+ struct timespec timestamp; /* wall time */ -+ unsigned long lost; -+}; -+ -+/* keep the global state somewhere. */ -+static struct data { -+ -+ struct mutex lock; /* protect changes */ -+ -+ u64 count; /* total since reset */ -+ u64 max_sample; /* max hardware latency */ -+ u64 threshold; /* sample threshold level */ -+ -+ u64 sample_window; /* total sampling window (on+off) */ -+ u64 sample_width; /* active sampling portion of window */ -+ -+ atomic_t sample_open; /* whether the sample file is open */ -+ -+ wait_queue_head_t wq; /* waitqeue for new sample values */ -+ -+} data; -+ -+/** -+ * __buffer_add_sample - add a new latency sample recording to the ring buffer -+ * @sample: The new latency sample value -+ * -+ * This receives a new latency sample and records it in a global ring buffer. -+ * No additional locking is used in this case. -+ */ -+static int __buffer_add_sample(struct sample *sample) -+{ -+ return ring_buffer_write(ring_buffer, -+ sizeof(struct sample), sample); -+} -+ -+/** -+ * buffer_get_sample - remove a hardware latency sample from the ring buffer -+ * @sample: Pre-allocated storage for the sample -+ * -+ * This retrieves a hardware latency sample from the global circular buffer -+ */ -+static struct sample *buffer_get_sample(struct sample *sample) -+{ -+ struct ring_buffer_event *e = NULL; -+ struct sample *s = NULL; -+ unsigned int cpu = 0; -+ -+ if (!sample) -+ return NULL; -+ -+ mutex_lock(&ring_buffer_mutex); -+ for_each_online_cpu(cpu) { -+ e = ring_buffer_consume(ring_buffer, cpu, NULL, &sample->lost); -+ if (e) -+ break; -+ } -+ -+ if (e) { -+ s = ring_buffer_event_data(e); -+ memcpy(sample, s, sizeof(struct sample)); -+ } else -+ sample = NULL; -+ mutex_unlock(&ring_buffer_mutex); -+ -+ return sample; -+} -+ -+#ifndef CONFIG_TRACING -+#define time_type ktime_t -+#define time_get() ktime_get() -+#define time_to_us(x) ktime_to_us(x) -+#define time_sub(a, b) ktime_sub(a, b) -+#define init_time(a, b) (a).tv64 = b -+#define time_u64(a) ((a).tv64) -+#else -+#define time_type u64 -+#define time_get() trace_clock_local() -+#define time_to_us(x) div_u64(x, 1000) -+#define time_sub(a, b) ((a) - (b)) -+#define init_time(a, b) (a = b) -+#define time_u64(a) a -+#endif -+/** -+ * get_sample - sample the CPU TSC and look for likely hardware latencies -+ * -+ * Used to repeatedly capture the CPU TSC (or similar), looking for potential -+ * hardware-induced latency. Called with interrupts disabled and with -+ * data.lock held. -+ */ -+static int get_sample(void) -+{ -+ time_type start, t1, t2, last_t2; -+ s64 diff, total = 0; -+ u64 sample = 0; -+ u64 outer_sample = 0; -+ int ret = -1; -+ -+ init_time(last_t2, 0); -+ start = time_get(); /* start timestamp */ -+ -+ do { -+ -+ t1 = time_get(); /* we'll look for a discontinuity */ -+ t2 = time_get(); -+ -+ if (time_u64(last_t2)) { -+ /* Check the delta from outer loop (t2 to next t1) */ -+ diff = time_to_us(time_sub(t1, last_t2)); -+ /* This shouldn't happen */ -+ if (diff < 0) { -+ pr_err(BANNER "time running backwards\n"); -+ goto out; -+ } -+ if (diff > outer_sample) -+ outer_sample = diff; -+ } -+ last_t2 = t2; -+ -+ total = time_to_us(time_sub(t2, start)); /* sample width */ -+ -+ /* This checks the inner loop (t1 to t2) */ -+ diff = time_to_us(time_sub(t2, t1)); /* current diff */ -+ -+ /* This shouldn't happen */ -+ if (diff < 0) { -+ pr_err(BANNER "time running backwards\n"); -+ goto out; -+ } -+ -+ if (diff > sample) -+ sample = diff; /* only want highest value */ -+ -+ } while (total <= data.sample_width); -+ -+ ret = 0; -+ -+ /* If we exceed the threshold value, we have found a hardware latency */ -+ if (sample > data.threshold || outer_sample > data.threshold) { -+ struct sample s; -+ -+ ret = 1; -+ -+ data.count++; -+ s.seqnum = data.count; -+ s.duration = sample; -+ s.outer_duration = outer_sample; -+ s.timestamp = CURRENT_TIME; -+ __buffer_add_sample(&s); -+ -+ /* Keep a running maximum ever recorded hardware latency */ -+ if (sample > data.max_sample) -+ data.max_sample = sample; -+ } -+ -+out: -+ return ret; -+} -+ -+/* -+ * kthread_fn - The CPU time sampling/hardware latency detection kernel thread -+ * @unused: A required part of the kthread API. -+ * -+ * Used to periodically sample the CPU TSC via a call to get_sample. We -+ * disable interrupts, which does (intentionally) introduce latency since we -+ * need to ensure nothing else might be running (and thus pre-empting). -+ * Obviously this should never be used in production environments. -+ * -+ * Currently this runs on which ever CPU it was scheduled on, but most -+ * real-worald hardware latency situations occur across several CPUs, -+ * but we might later generalize this if we find there are any actualy -+ * systems with alternate SMI delivery or other hardware latencies. -+ */ -+static int kthread_fn(void *unused) -+{ -+ int ret; -+ u64 interval; -+ -+ while (!kthread_should_stop()) { -+ -+ mutex_lock(&data.lock); -+ -+ local_irq_disable(); -+ ret = get_sample(); -+ local_irq_enable(); -+ -+ if (ret > 0) -+ wake_up(&data.wq); /* wake up reader(s) */ -+ -+ interval = data.sample_window - data.sample_width; -+ do_div(interval, USEC_PER_MSEC); /* modifies interval value */ -+ -+ mutex_unlock(&data.lock); -+ -+ if (msleep_interruptible(interval)) -+ break; -+ } -+ -+ return 0; -+} -+ -+/** -+ * start_kthread - Kick off the hardware latency sampling/detector kthread -+ * -+ * This starts a kernel thread that will sit and sample the CPU timestamp -+ * counter (TSC or similar) and look for potential hardware latencies. -+ */ -+static int start_kthread(void) -+{ -+ kthread = kthread_run(kthread_fn, NULL, -+ DRVNAME); -+ if (IS_ERR(kthread)) { -+ pr_err(BANNER "could not start sampling thread\n"); -+ enabled = 0; -+ return -ENOMEM; -+ } -+ -+ return 0; -+} -+ -+/** -+ * stop_kthread - Inform the hardware latency samping/detector kthread to stop -+ * -+ * This kicks the running hardware latency sampling/detector kernel thread and -+ * tells it to stop sampling now. Use this on unload and at system shutdown. -+ */ -+static int stop_kthread(void) -+{ -+ int ret; -+ -+ ret = kthread_stop(kthread); -+ -+ return ret; -+} -+ -+/** -+ * __reset_stats - Reset statistics for the hardware latency detector -+ * -+ * We use data to store various statistics and global state. We call this -+ * function in order to reset those when "enable" is toggled on or off, and -+ * also at initialization. Should be called with data.lock held. -+ */ -+static void __reset_stats(void) -+{ -+ data.count = 0; -+ data.max_sample = 0; -+ ring_buffer_reset(ring_buffer); /* flush out old sample entries */ -+} -+ -+/** -+ * init_stats - Setup global state statistics for the hardware latency detector -+ * -+ * We use data to store various statistics and global state. We also use -+ * a global ring buffer (ring_buffer) to keep raw samples of detected hardware -+ * induced system latencies. This function initializes these structures and -+ * allocates the global ring buffer also. -+ */ -+static int init_stats(void) -+{ -+ int ret = -ENOMEM; -+ -+ mutex_init(&data.lock); -+ init_waitqueue_head(&data.wq); -+ atomic_set(&data.sample_open, 0); -+ -+ ring_buffer = ring_buffer_alloc(buf_size, BUF_FLAGS); -+ -+ if (WARN(!ring_buffer, KERN_ERR BANNER -+ "failed to allocate ring buffer!\n")) -+ goto out; -+ -+ __reset_stats(); -+ data.threshold = threshold ?: DEFAULT_LAT_THRESHOLD; /* threshold us */ -+ data.sample_window = DEFAULT_SAMPLE_WINDOW; /* window us */ -+ data.sample_width = DEFAULT_SAMPLE_WIDTH; /* width us */ -+ -+ ret = 0; -+ -+out: -+ return ret; -+ -+} -+ -+/* -+ * simple_data_read - Wrapper read function for global state debugfs entries -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * @entry: The entry to read from -+ * -+ * This function provides a generic read implementation for the global state -+ * "data" structure debugfs filesystem entries. It would be nice to use -+ * simple_attr_read directly, but we need to make sure that the data.lock -+ * is held during the actual read. -+ */ -+static ssize_t simple_data_read(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos, const u64 *entry) -+{ -+ char buf[U64STR_SIZE]; -+ u64 val = 0; -+ int len = 0; -+ -+ memset(buf, 0, sizeof(buf)); -+ -+ if (!entry) -+ return -EFAULT; -+ -+ mutex_lock(&data.lock); -+ val = *entry; -+ mutex_unlock(&data.lock); -+ -+ len = snprintf(buf, sizeof(buf), "%llu\n", (unsigned long long)val); -+ -+ return simple_read_from_buffer(ubuf, cnt, ppos, buf, len); -+ -+} -+ -+/* -+ * simple_data_write - Wrapper write function for global state debugfs entries -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to write value from -+ * @cnt: The maximum number of bytes to write -+ * @ppos: The current "file" position -+ * @entry: The entry to write to -+ * -+ * This function provides a generic write implementation for the global state -+ * "data" structure debugfs filesystem entries. It would be nice to use -+ * simple_attr_write directly, but we need to make sure that the data.lock -+ * is held during the actual write. -+ */ -+static ssize_t simple_data_write(struct file *filp, const char __user *ubuf, -+ size_t cnt, loff_t *ppos, u64 *entry) -+{ -+ char buf[U64STR_SIZE]; -+ int csize = min(cnt, sizeof(buf)); -+ u64 val = 0; -+ int err = 0; -+ -+ memset(buf, '\0', sizeof(buf)); -+ if (copy_from_user(buf, ubuf, csize)) -+ return -EFAULT; -+ -+ buf[U64STR_SIZE-1] = '\0'; /* just in case */ -+ err = kstrtoull(buf, 10, &val); -+ if (err) -+ return -EINVAL; -+ -+ mutex_lock(&data.lock); -+ *entry = val; -+ mutex_unlock(&data.lock); -+ -+ return csize; -+} -+ -+/** -+ * debug_count_fopen - Open function for "count" debugfs entry -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "count" debugfs -+ * interface to the hardware latency detector. -+ */ -+static int debug_count_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_count_fread - Read function for "count" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "count" debugfs -+ * interface to the hardware latency detector. Can be used to read the -+ * number of latency readings exceeding the configured threshold since -+ * the detector was last reset (e.g. by writing a zero into "count"). -+ */ -+static ssize_t debug_count_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ return simple_data_read(filp, ubuf, cnt, ppos, &data.count); -+} -+ -+/** -+ * debug_count_fwrite - Write function for "count" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "count" debugfs -+ * interface to the hardware latency detector. Can be used to write a -+ * desired value, especially to zero the total count. -+ */ -+static ssize_t debug_count_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ return simple_data_write(filp, ubuf, cnt, ppos, &data.count); -+} -+ -+/** -+ * debug_enable_fopen - Dummy open function for "enable" debugfs interface -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "enable" debugfs -+ * interface to the hardware latency detector. -+ */ -+static int debug_enable_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_enable_fread - Read function for "enable" debugfs interface -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "enable" debugfs -+ * interface to the hardware latency detector. Can be used to determine -+ * whether the detector is currently enabled ("0\n" or "1\n" returned). -+ */ -+static ssize_t debug_enable_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ char buf[4]; -+ -+ if ((cnt < sizeof(buf)) || (*ppos)) -+ return 0; -+ -+ buf[0] = enabled ? '1' : '0'; -+ buf[1] = '\n'; -+ buf[2] = '\0'; -+ if (copy_to_user(ubuf, buf, strlen(buf))) -+ return -EFAULT; -+ return *ppos = strlen(buf); -+} -+ -+/** -+ * debug_enable_fwrite - Write function for "enable" debugfs interface -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "enable" debugfs -+ * interface to the hardware latency detector. Can be used to enable or -+ * disable the detector, which will have the side-effect of possibly -+ * also resetting the global stats and kicking off the measuring -+ * kthread (on an enable) or the converse (upon a disable). -+ */ -+static ssize_t debug_enable_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ char buf[4]; -+ int csize = min(cnt, sizeof(buf)); -+ long val = 0; -+ int err = 0; -+ -+ memset(buf, '\0', sizeof(buf)); -+ if (copy_from_user(buf, ubuf, csize)) -+ return -EFAULT; -+ -+ buf[sizeof(buf)-1] = '\0'; /* just in case */ -+ err = kstrtoul(buf, 10, &val); -+ if (err) -+ return -EINVAL; -+ -+ if (val) { -+ if (enabled) -+ goto unlock; -+ enabled = 1; -+ __reset_stats(); -+ if (start_kthread()) -+ return -EFAULT; -+ } else { -+ if (!enabled) -+ goto unlock; -+ enabled = 0; -+ err = stop_kthread(); -+ if (err) { -+ pr_err(BANNER "cannot stop kthread\n"); -+ return -EFAULT; -+ } -+ wake_up(&data.wq); /* reader(s) should return */ -+ } -+unlock: -+ return csize; -+} -+ -+/** -+ * debug_max_fopen - Open function for "max" debugfs entry -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "max" debugfs -+ * interface to the hardware latency detector. -+ */ -+static int debug_max_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_max_fread - Read function for "max" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "max" debugfs -+ * interface to the hardware latency detector. Can be used to determine -+ * the maximum latency value observed since it was last reset. -+ */ -+static ssize_t debug_max_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ return simple_data_read(filp, ubuf, cnt, ppos, &data.max_sample); -+} -+ -+/** -+ * debug_max_fwrite - Write function for "max" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "max" debugfs -+ * interface to the hardware latency detector. Can be used to reset the -+ * maximum or set it to some other desired value - if, then, subsequent -+ * measurements exceed this value, the maximum will be updated. -+ */ -+static ssize_t debug_max_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ return simple_data_write(filp, ubuf, cnt, ppos, &data.max_sample); -+} -+ -+ -+/** -+ * debug_sample_fopen - An open function for "sample" debugfs interface -+ * @inode: The in-kernel inode representation of this debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function handles opening the "sample" file within the hardware -+ * latency detector debugfs directory interface. This file is used to read -+ * raw samples from the global ring_buffer and allows the user to see a -+ * running latency history. Can be opened blocking or non-blocking, -+ * affecting whether it behaves as a buffer read pipe, or does not. -+ * Implements simple locking to prevent multiple simultaneous use. -+ */ -+static int debug_sample_fopen(struct inode *inode, struct file *filp) -+{ -+ if (!atomic_add_unless(&data.sample_open, 1, 1)) -+ return -EBUSY; -+ else -+ return 0; -+} -+ -+/** -+ * debug_sample_fread - A read function for "sample" debugfs interface -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that will contain the samples read -+ * @cnt: The maximum bytes to read from the debugfs "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function handles reading from the "sample" file within the hardware -+ * latency detector debugfs directory interface. This file is used to read -+ * raw samples from the global ring_buffer and allows the user to see a -+ * running latency history. By default this will block pending a new -+ * value written into the sample buffer, unless there are already a -+ * number of value(s) waiting in the buffer, or the sample file was -+ * previously opened in a non-blocking mode of operation. -+ */ -+static ssize_t debug_sample_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ int len = 0; -+ char buf[64]; -+ struct sample *sample = NULL; -+ -+ if (!enabled) -+ return 0; -+ -+ sample = kzalloc(sizeof(struct sample), GFP_KERNEL); -+ if (!sample) -+ return -ENOMEM; -+ -+ while (!buffer_get_sample(sample)) { -+ -+ DEFINE_WAIT(wait); -+ -+ if (filp->f_flags & O_NONBLOCK) { -+ len = -EAGAIN; -+ goto out; -+ } -+ -+ prepare_to_wait(&data.wq, &wait, TASK_INTERRUPTIBLE); -+ schedule(); -+ finish_wait(&data.wq, &wait); -+ -+ if (signal_pending(current)) { -+ len = -EINTR; -+ goto out; -+ } -+ -+ if (!enabled) { /* enable was toggled */ -+ len = 0; -+ goto out; -+ } -+ } -+ -+ len = snprintf(buf, sizeof(buf), "%010lu.%010lu\t%llu\t%llu\n", -+ sample->timestamp.tv_sec, -+ sample->timestamp.tv_nsec, -+ sample->duration, -+ sample->outer_duration); -+ -+ -+ /* handling partial reads is more trouble than it's worth */ -+ if (len > cnt) -+ goto out; -+ -+ if (copy_to_user(ubuf, buf, len)) -+ len = -EFAULT; -+ -+out: -+ kfree(sample); -+ return len; -+} -+ -+/** -+ * debug_sample_release - Release function for "sample" debugfs interface -+ * @inode: The in-kernel inode represenation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function completes the close of the debugfs interface "sample" file. -+ * Frees the sample_open "lock" so that other users may open the interface. -+ */ -+static int debug_sample_release(struct inode *inode, struct file *filp) -+{ -+ atomic_dec(&data.sample_open); -+ -+ return 0; -+} -+ -+/** -+ * debug_threshold_fopen - Open function for "threshold" debugfs entry -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "threshold" debugfs -+ * interface to the hardware latency detector. -+ */ -+static int debug_threshold_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_threshold_fread - Read function for "threshold" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "threshold" debugfs -+ * interface to the hardware latency detector. It can be used to determine -+ * the current threshold level at which a latency will be recorded in the -+ * global ring buffer, typically on the order of 10us. -+ */ -+static ssize_t debug_threshold_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ return simple_data_read(filp, ubuf, cnt, ppos, &data.threshold); -+} -+ -+/** -+ * debug_threshold_fwrite - Write function for "threshold" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "threshold" debugfs -+ * interface to the hardware latency detector. It can be used to configure -+ * the threshold level at which any subsequently detected latencies will -+ * be recorded into the global ring buffer. -+ */ -+static ssize_t debug_threshold_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ int ret; -+ -+ ret = simple_data_write(filp, ubuf, cnt, ppos, &data.threshold); -+ -+ if (enabled) -+ wake_up_process(kthread); -+ -+ return ret; -+} -+ -+/** -+ * debug_width_fopen - Open function for "width" debugfs entry -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "width" debugfs -+ * interface to the hardware latency detector. -+ */ -+static int debug_width_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_width_fread - Read function for "width" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "width" debugfs -+ * interface to the hardware latency detector. It can be used to determine -+ * for how many us of the total window us we will actively sample for any -+ * hardware-induced latecy periods. Obviously, it is not possible to -+ * sample constantly and have the system respond to a sample reader, or, -+ * worse, without having the system appear to have gone out to lunch. -+ */ -+static ssize_t debug_width_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ return simple_data_read(filp, ubuf, cnt, ppos, &data.sample_width); -+} -+ -+/** -+ * debug_width_fwrite - Write function for "width" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "width" debugfs -+ * interface to the hardware latency detector. It can be used to configure -+ * for how many us of the total window us we will actively sample for any -+ * hardware-induced latency periods. Obviously, it is not possible to -+ * sample constantly and have the system respond to a sample reader, or, -+ * worse, without having the system appear to have gone out to lunch. It -+ * is enforced that width is less that the total window size. -+ */ -+static ssize_t debug_width_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ char buf[U64STR_SIZE]; -+ int csize = min(cnt, sizeof(buf)); -+ u64 val = 0; -+ int err = 0; -+ -+ memset(buf, '\0', sizeof(buf)); -+ if (copy_from_user(buf, ubuf, csize)) -+ return -EFAULT; -+ -+ buf[U64STR_SIZE-1] = '\0'; /* just in case */ -+ err = kstrtoull(buf, 10, &val); -+ if (err) -+ return -EINVAL; -+ -+ mutex_lock(&data.lock); -+ if (val < data.sample_window) -+ data.sample_width = val; -+ else { -+ mutex_unlock(&data.lock); -+ return -EINVAL; -+ } -+ mutex_unlock(&data.lock); -+ -+ if (enabled) -+ wake_up_process(kthread); -+ -+ return csize; -+} -+ -+/** -+ * debug_window_fopen - Open function for "window" debugfs entry -+ * @inode: The in-kernel inode representation of the debugfs "file" -+ * @filp: The active open file structure for the debugfs "file" -+ * -+ * This function provides an open implementation for the "window" debugfs -+ * interface to the hardware latency detector. The window is the total time -+ * in us that will be considered one sample period. Conceptually, windows -+ * occur back-to-back and contain a sample width period during which -+ * actual sampling occurs. -+ */ -+static int debug_window_fopen(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+/** -+ * debug_window_fread - Read function for "window" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The userspace provided buffer to read value into -+ * @cnt: The maximum number of bytes to read -+ * @ppos: The current "file" position -+ * -+ * This function provides a read implementation for the "window" debugfs -+ * interface to the hardware latency detector. The window is the total time -+ * in us that will be considered one sample period. Conceptually, windows -+ * occur back-to-back and contain a sample width period during which -+ * actual sampling occurs. Can be used to read the total window size. -+ */ -+static ssize_t debug_window_fread(struct file *filp, char __user *ubuf, -+ size_t cnt, loff_t *ppos) -+{ -+ return simple_data_read(filp, ubuf, cnt, ppos, &data.sample_window); -+} -+ -+/** -+ * debug_window_fwrite - Write function for "window" debugfs entry -+ * @filp: The active open file structure for the debugfs "file" -+ * @ubuf: The user buffer that contains the value to write -+ * @cnt: The maximum number of bytes to write to "file" -+ * @ppos: The current position in the debugfs "file" -+ * -+ * This function provides a write implementation for the "window" debufds -+ * interface to the hardware latency detetector. The window is the total time -+ * in us that will be considered one sample period. Conceptually, windows -+ * occur back-to-back and contain a sample width period during which -+ * actual sampling occurs. Can be used to write a new total window size. It -+ * is enfoced that any value written must be greater than the sample width -+ * size, or an error results. -+ */ -+static ssize_t debug_window_fwrite(struct file *filp, -+ const char __user *ubuf, -+ size_t cnt, -+ loff_t *ppos) -+{ -+ char buf[U64STR_SIZE]; -+ int csize = min(cnt, sizeof(buf)); -+ u64 val = 0; -+ int err = 0; -+ -+ memset(buf, '\0', sizeof(buf)); -+ if (copy_from_user(buf, ubuf, csize)) -+ return -EFAULT; -+ -+ buf[U64STR_SIZE-1] = '\0'; /* just in case */ -+ err = kstrtoull(buf, 10, &val); -+ if (err) -+ return -EINVAL; -+ -+ mutex_lock(&data.lock); -+ if (data.sample_width < val) -+ data.sample_window = val; -+ else { -+ mutex_unlock(&data.lock); -+ return -EINVAL; -+ } -+ mutex_unlock(&data.lock); -+ -+ return csize; -+} -+ -+/* -+ * Function pointers for the "count" debugfs file operations -+ */ -+static const struct file_operations count_fops = { -+ .open = debug_count_fopen, -+ .read = debug_count_fread, -+ .write = debug_count_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "enable" debugfs file operations -+ */ -+static const struct file_operations enable_fops = { -+ .open = debug_enable_fopen, -+ .read = debug_enable_fread, -+ .write = debug_enable_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "max" debugfs file operations -+ */ -+static const struct file_operations max_fops = { -+ .open = debug_max_fopen, -+ .read = debug_max_fread, -+ .write = debug_max_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "sample" debugfs file operations -+ */ -+static const struct file_operations sample_fops = { -+ .open = debug_sample_fopen, -+ .read = debug_sample_fread, -+ .release = debug_sample_release, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "threshold" debugfs file operations -+ */ -+static const struct file_operations threshold_fops = { -+ .open = debug_threshold_fopen, -+ .read = debug_threshold_fread, -+ .write = debug_threshold_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "width" debugfs file operations -+ */ -+static const struct file_operations width_fops = { -+ .open = debug_width_fopen, -+ .read = debug_width_fread, -+ .write = debug_width_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/* -+ * Function pointers for the "window" debugfs file operations -+ */ -+static const struct file_operations window_fops = { -+ .open = debug_window_fopen, -+ .read = debug_window_fread, -+ .write = debug_window_fwrite, -+ .owner = THIS_MODULE, -+}; -+ -+/** -+ * init_debugfs - A function to initialize the debugfs interface files -+ * -+ * This function creates entries in debugfs for "hwlat_detector", including -+ * files to read values from the detector, current samples, and the -+ * maximum sample that has been captured since the hardware latency -+ * dectector was started. -+ */ -+static int init_debugfs(void) -+{ -+ int ret = -ENOMEM; -+ -+ debug_dir = debugfs_create_dir(DRVNAME, NULL); -+ if (!debug_dir) -+ goto err_debug_dir; -+ -+ debug_sample = debugfs_create_file("sample", 0444, -+ debug_dir, NULL, -+ &sample_fops); -+ if (!debug_sample) -+ goto err_sample; -+ -+ debug_count = debugfs_create_file("count", 0444, -+ debug_dir, NULL, -+ &count_fops); -+ if (!debug_count) -+ goto err_count; -+ -+ debug_max = debugfs_create_file("max", 0444, -+ debug_dir, NULL, -+ &max_fops); -+ if (!debug_max) -+ goto err_max; -+ -+ debug_sample_window = debugfs_create_file("window", 0644, -+ debug_dir, NULL, -+ &window_fops); -+ if (!debug_sample_window) -+ goto err_window; -+ -+ debug_sample_width = debugfs_create_file("width", 0644, -+ debug_dir, NULL, -+ &width_fops); -+ if (!debug_sample_width) -+ goto err_width; -+ -+ debug_threshold = debugfs_create_file("threshold", 0644, -+ debug_dir, NULL, -+ &threshold_fops); -+ if (!debug_threshold) -+ goto err_threshold; -+ -+ debug_enable = debugfs_create_file("enable", 0644, -+ debug_dir, &enabled, -+ &enable_fops); -+ if (!debug_enable) -+ goto err_enable; -+ -+ else { -+ ret = 0; -+ goto out; -+ } -+ -+err_enable: -+ debugfs_remove(debug_threshold); -+err_threshold: -+ debugfs_remove(debug_sample_width); -+err_width: -+ debugfs_remove(debug_sample_window); -+err_window: -+ debugfs_remove(debug_max); -+err_max: -+ debugfs_remove(debug_count); -+err_count: -+ debugfs_remove(debug_sample); -+err_sample: -+ debugfs_remove(debug_dir); -+err_debug_dir: -+out: -+ return ret; -+} -+ -+/** -+ * free_debugfs - A function to cleanup the debugfs file interface -+ */ -+static void free_debugfs(void) -+{ -+ /* could also use a debugfs_remove_recursive */ -+ debugfs_remove(debug_enable); -+ debugfs_remove(debug_threshold); -+ debugfs_remove(debug_sample_width); -+ debugfs_remove(debug_sample_window); -+ debugfs_remove(debug_max); -+ debugfs_remove(debug_count); -+ debugfs_remove(debug_sample); -+ debugfs_remove(debug_dir); -+} -+ -+/** -+ * detector_init - Standard module initialization code -+ */ -+static int detector_init(void) -+{ -+ int ret = -ENOMEM; -+ -+ pr_info(BANNER "version %s\n", VERSION); -+ -+ ret = init_stats(); -+ if (ret) -+ goto out; -+ -+ ret = init_debugfs(); -+ if (ret) -+ goto err_stats; -+ -+ if (enabled) -+ ret = start_kthread(); -+ -+ goto out; -+ -+err_stats: -+ ring_buffer_free(ring_buffer); -+out: -+ return ret; -+ -+} -+ -+/** -+ * detector_exit - Standard module cleanup code -+ */ -+static void detector_exit(void) -+{ -+ int err; -+ -+ if (enabled) { -+ enabled = 0; -+ err = stop_kthread(); -+ if (err) -+ pr_err(BANNER "cannot stop kthread\n"); -+ } -+ -+ free_debugfs(); -+ ring_buffer_free(ring_buffer); /* free up the ring buffer */ -+ -+} -+ -+module_init(detector_init); -+module_exit(detector_exit); -diff -Nur linux-4.8.15.orig/drivers/misc/Kconfig linux-4.8.15/drivers/misc/Kconfig ---- linux-4.8.15.orig/drivers/misc/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/misc/Kconfig 2017-01-01 17:07:14.579333432 +0100 +diff -Nur linux-4.9.6.orig/drivers/misc/Kconfig linux-4.9.6/drivers/misc/Kconfig +--- linux-4.9.6.orig/drivers/misc/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/misc/Kconfig 2017-01-28 13:59:09.915655573 +0100 @@ -54,6 +54,7 @@ config ATMEL_TCLIB bool "Atmel AT32/AT91 Timer/Counter Library" @@ -5975,56 +4571,9 @@ diff -Nur linux-4.8.15.orig/drivers/misc/Kconfig linux-4.8.15/drivers/misc/Kconf config DUMMY_IRQ tristate "Dummy IRQ handler" default n -@@ -114,6 +123,35 @@ - for information on the specific driver level and support statement - for your IBM server. - -+config HWLAT_DETECTOR -+ tristate "Testing module to detect hardware-induced latencies" -+ depends on DEBUG_FS -+ depends on RING_BUFFER -+ default m -+ ---help--- -+ A simple hardware latency detector. Use this module to detect -+ large latencies introduced by the behavior of the underlying -+ system firmware external to Linux. We do this using periodic -+ use of stop_machine to grab all available CPUs and measure -+ for unexplainable gaps in the CPU timestamp counter(s). By -+ default, the module is not enabled until the "enable" file -+ within the "hwlat_detector" debugfs directory is toggled. -+ -+ This module is often used to detect SMI (System Management -+ Interrupts) on x86 systems, though is not x86 specific. To -+ this end, we default to using a sample window of 1 second, -+ during which we will sample for 0.5 seconds. If an SMI or -+ similar event occurs during that time, it is recorded -+ into an 8K samples global ring buffer until retreived. -+ -+ WARNING: This software should never be enabled (it can be built -+ but should not be turned on after it is loaded) in a production -+ environment where high latencies are a concern since the -+ sampling mechanism actually introduces latencies for -+ regular tasks while the CPU(s) are being held. -+ -+ If unsure, say N -+ - config PHANTOM - tristate "Sensable PHANToM (PCI)" - depends on PCI -diff -Nur linux-4.8.15.orig/drivers/misc/Makefile linux-4.8.15/drivers/misc/Makefile ---- linux-4.8.15.orig/drivers/misc/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/misc/Makefile 2017-01-01 17:07:14.579333432 +0100 -@@ -38,6 +38,7 @@ - obj-$(CONFIG_HMC6352) += hmc6352.o - obj-y += eeprom/ - obj-y += cb710/ -+obj-$(CONFIG_HWLAT_DETECTOR) += hwlat_detector.o - obj-$(CONFIG_SPEAR13XX_PCIE_GADGET) += spear13xx_pcie_gadget.o - obj-$(CONFIG_VMWARE_BALLOON) += vmw_balloon.o - obj-$(CONFIG_ARM_CHARLCD) += arm-charlcd.o -diff -Nur linux-4.8.15.orig/drivers/mmc/host/mmci.c linux-4.8.15/drivers/mmc/host/mmci.c ---- linux-4.8.15.orig/drivers/mmc/host/mmci.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/mmc/host/mmci.c 2017-01-01 17:07:14.591334201 +0100 +diff -Nur linux-4.9.6.orig/drivers/mmc/host/mmci.c linux-4.9.6/drivers/mmc/host/mmci.c +--- linux-4.9.6.orig/drivers/mmc/host/mmci.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/mmc/host/mmci.c 2017-01-28 13:59:09.915655573 +0100 @@ -1147,15 +1147,12 @@ struct sg_mapping_iter *sg_miter = &host->sg_miter; struct variant_data *variant = host->variant; @@ -6050,9 +4599,9 @@ diff -Nur linux-4.8.15.orig/drivers/mmc/host/mmci.c linux-4.8.15/drivers/mmc/hos /* * If we have less than the fifo 'half-full' threshold to transfer, * trigger a PIO interrupt as soon as any data is available. -diff -Nur linux-4.8.15.orig/drivers/net/ethernet/3com/3c59x.c linux-4.8.15/drivers/net/ethernet/3com/3c59x.c ---- linux-4.8.15.orig/drivers/net/ethernet/3com/3c59x.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/net/ethernet/3com/3c59x.c 2017-01-01 17:07:14.611335500 +0100 +diff -Nur linux-4.9.6.orig/drivers/net/ethernet/3com/3c59x.c linux-4.9.6/drivers/net/ethernet/3com/3c59x.c +--- linux-4.9.6.orig/drivers/net/ethernet/3com/3c59x.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/net/ethernet/3com/3c59x.c 2017-01-28 13:59:09.919655726 +0100 @@ -842,9 +842,9 @@ { struct vortex_private *vp = netdev_priv(dev); @@ -6080,9 +4629,9 @@ diff -Nur linux-4.8.15.orig/drivers/net/ethernet/3com/3c59x.c linux-4.8.15/drive } } -diff -Nur linux-4.8.15.orig/drivers/net/ethernet/realtek/8139too.c linux-4.8.15/drivers/net/ethernet/realtek/8139too.c ---- linux-4.8.15.orig/drivers/net/ethernet/realtek/8139too.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/net/ethernet/realtek/8139too.c 2017-01-01 17:07:14.639337303 +0100 +diff -Nur linux-4.9.6.orig/drivers/net/ethernet/realtek/8139too.c linux-4.9.6/drivers/net/ethernet/realtek/8139too.c +--- linux-4.9.6.orig/drivers/net/ethernet/realtek/8139too.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/net/ethernet/realtek/8139too.c 2017-01-28 13:59:09.919655726 +0100 @@ -2233,7 +2233,7 @@ struct rtl8139_private *tp = netdev_priv(dev); const int irq = tp->pci_dev->irq; @@ -6092,9 +4641,9 @@ diff -Nur linux-4.8.15.orig/drivers/net/ethernet/realtek/8139too.c linux-4.8.15/ rtl8139_interrupt(irq, dev); enable_irq(irq); } -diff -Nur linux-4.8.15.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c linux-4.8.15/drivers/net/wireless/intersil/orinoco/orinoco_usb.c ---- linux-4.8.15.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-01-01 17:07:14.687340389 +0100 +diff -Nur linux-4.9.6.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c linux-4.9.6/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +--- linux-4.9.6.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/net/wireless/intersil/orinoco/orinoco_usb.c 2017-01-28 13:59:09.919655726 +0100 @@ -697,7 +697,7 @@ while (!ctx->done.done && msecs--) udelay(1000); @@ -6104,9 +4653,9 @@ diff -Nur linux-4.8.15.orig/drivers/net/wireless/intersil/orinoco/orinoco_usb.c ctx->done.done); } break; -diff -Nur linux-4.8.15.orig/drivers/pci/access.c linux-4.8.15/drivers/pci/access.c ---- linux-4.8.15.orig/drivers/pci/access.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/pci/access.c 2017-01-01 17:07:14.699341161 +0100 +diff -Nur linux-4.9.6.orig/drivers/pci/access.c linux-4.9.6/drivers/pci/access.c +--- linux-4.9.6.orig/drivers/pci/access.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/pci/access.c 2017-01-28 13:59:09.919655726 +0100 @@ -672,7 +672,7 @@ WARN_ON(!dev->block_cfg_access); @@ -6116,9 +4665,9 @@ diff -Nur linux-4.8.15.orig/drivers/pci/access.c linux-4.8.15/drivers/pci/access raw_spin_unlock_irqrestore(&pci_lock, flags); } EXPORT_SYMBOL_GPL(pci_cfg_access_unlock); -diff -Nur linux-4.8.15.orig/drivers/scsi/fcoe/fcoe.c linux-4.8.15/drivers/scsi/fcoe/fcoe.c ---- linux-4.8.15.orig/drivers/scsi/fcoe/fcoe.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/fcoe/fcoe.c 2017-01-01 17:07:14.719342449 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe.c linux-4.9.6/drivers/scsi/fcoe/fcoe.c +--- linux-4.9.6.orig/drivers/scsi/fcoe/fcoe.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/fcoe/fcoe.c 2017-01-28 13:59:09.919655726 +0100 @@ -1455,11 +1455,11 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) { @@ -6173,9 +4722,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/fcoe/fcoe.c linux-4.8.15/drivers/scsi/f kfree_skb(skb); } -diff -Nur linux-4.8.15.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.8.15/drivers/scsi/fcoe/fcoe_ctlr.c ---- linux-4.8.15.orig/drivers/scsi/fcoe/fcoe_ctlr.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/fcoe/fcoe_ctlr.c 2017-01-01 17:07:14.727342965 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.9.6/drivers/scsi/fcoe/fcoe_ctlr.c +--- linux-4.9.6.orig/drivers/scsi/fcoe/fcoe_ctlr.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/fcoe/fcoe_ctlr.c 2017-01-28 13:59:09.919655726 +0100 @@ -834,7 +834,7 @@ INIT_LIST_HEAD(&del_list); @@ -6194,9 +4743,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/fcoe/fcoe_ctlr.c linux-4.8.15/drivers/s list_for_each_entry_safe(fcf, next, &del_list, list) { /* Removes fcf from current list */ -diff -Nur linux-4.8.15.orig/drivers/scsi/libfc/fc_exch.c linux-4.8.15/drivers/scsi/libfc/fc_exch.c ---- linux-4.8.15.orig/drivers/scsi/libfc/fc_exch.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/libfc/fc_exch.c 2017-01-01 17:07:14.747344253 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/libfc/fc_exch.c linux-4.9.6/drivers/scsi/libfc/fc_exch.c +--- linux-4.9.6.orig/drivers/scsi/libfc/fc_exch.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/libfc/fc_exch.c 2017-01-28 13:59:09.919655726 +0100 @@ -814,10 +814,10 @@ } memset(ep, 0, sizeof(*ep)); @@ -6210,9 +4759,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/libfc/fc_exch.c linux-4.8.15/drivers/sc /* peek cache of free slot */ if (pool->left != FC_XID_UNKNOWN) { -diff -Nur linux-4.8.15.orig/drivers/scsi/libsas/sas_ata.c linux-4.8.15/drivers/scsi/libsas/sas_ata.c ---- linux-4.8.15.orig/drivers/scsi/libsas/sas_ata.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/libsas/sas_ata.c 2017-01-01 17:07:14.791347085 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/libsas/sas_ata.c linux-4.9.6/drivers/scsi/libsas/sas_ata.c +--- linux-4.9.6.orig/drivers/scsi/libsas/sas_ata.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/libsas/sas_ata.c 2017-01-28 13:59:09.919655726 +0100 @@ -190,7 +190,7 @@ /* TODO: audit callers to ensure they are ready for qc_issue to * unconditionally re-enable interrupts @@ -6231,9 +4780,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/libsas/sas_ata.c linux-4.8.15/drivers/s return ret; } -diff -Nur linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.8.15/drivers/scsi/qla2xxx/qla_inline.h ---- linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_inline.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/qla2xxx/qla_inline.h 2017-01-01 17:07:14.807348125 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.9.6/drivers/scsi/qla2xxx/qla_inline.h +--- linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_inline.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/qla2xxx/qla_inline.h 2017-01-28 13:59:09.919655726 +0100 @@ -59,12 +59,12 @@ { unsigned long flags; @@ -6249,9 +4798,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_inline.h linux-4.8.15/drive } static inline uint8_t * -diff -Nur linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.8.15/drivers/scsi/qla2xxx/qla_isr.c ---- linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_isr.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/scsi/qla2xxx/qla_isr.c 2017-01-01 17:07:14.831349662 +0100 +diff -Nur linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.9.6/drivers/scsi/qla2xxx/qla_isr.c +--- linux-4.9.6.orig/drivers/scsi/qla2xxx/qla_isr.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/scsi/qla2xxx/qla_isr.c 2017-01-28 13:59:09.919655726 +0100 @@ -3125,7 +3125,11 @@ * kref_put(). */ @@ -6264,9 +4813,9 @@ diff -Nur linux-4.8.15.orig/drivers/scsi/qla2xxx/qla_isr.c linux-4.8.15/drivers/ } /* -diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/drivers/thermal/x86_pkg_temp_thermal.c ---- linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/thermal/x86_pkg_temp_thermal.c 2017-01-01 17:07:14.843350438 +0100 +diff -Nur linux-4.9.6.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.9.6/drivers/thermal/x86_pkg_temp_thermal.c +--- linux-4.9.6.orig/drivers/thermal/x86_pkg_temp_thermal.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/thermal/x86_pkg_temp_thermal.c 2017-01-28 13:59:09.923655879 +0100 @@ -29,6 +29,7 @@ #include <linux/pm.h> #include <linux/thermal.h> @@ -6275,7 +4824,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ #include <asm/cpu_device_id.h> #include <asm/mce.h> -@@ -352,7 +353,7 @@ +@@ -353,7 +354,7 @@ } } @@ -6284,7 +4833,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ { unsigned long flags; int cpu = smp_processor_id(); -@@ -369,7 +370,7 @@ +@@ -370,7 +371,7 @@ pkg_work_scheduled[phy_id]) { disable_pkg_thres_interrupt(); spin_unlock_irqrestore(&pkg_work_lock, flags); @@ -6293,7 +4842,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ } pkg_work_scheduled[phy_id] = 1; spin_unlock_irqrestore(&pkg_work_lock, flags); -@@ -378,9 +379,48 @@ +@@ -379,9 +380,48 @@ schedule_delayed_work_on(cpu, &per_cpu(pkg_temp_thermal_threshold_work, cpu), msecs_to_jiffies(notify_delay_ms)); @@ -6342,7 +4891,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ static int find_siblings_cpu(int cpu) { int i; -@@ -584,6 +624,9 @@ +@@ -585,6 +625,9 @@ if (!x86_match_cpu(pkg_temp_thermal_ids)) return -ENODEV; @@ -6352,7 +4901,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ spin_lock_init(&pkg_work_lock); platform_thermal_package_notify = pkg_temp_thermal_platform_thermal_notify; -@@ -608,7 +651,7 @@ +@@ -609,7 +652,7 @@ kfree(pkg_work_scheduled); platform_thermal_package_notify = NULL; platform_thermal_package_rate_control = NULL; @@ -6361,7 +4910,7 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ return -ENODEV; } -@@ -633,6 +676,7 @@ +@@ -634,6 +677,7 @@ mutex_unlock(&phy_dev_list_mutex); platform_thermal_package_notify = NULL; platform_thermal_package_rate_control = NULL; @@ -6369,9 +4918,9 @@ diff -Nur linux-4.8.15.orig/drivers/thermal/x86_pkg_temp_thermal.c linux-4.8.15/ for_each_online_cpu(i) cancel_delayed_work_sync( &per_cpu(pkg_temp_thermal_threshold_work, i)); -diff -Nur linux-4.8.15.orig/drivers/tty/serial/8250/8250_core.c linux-4.8.15/drivers/tty/serial/8250/8250_core.c ---- linux-4.8.15.orig/drivers/tty/serial/8250/8250_core.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/tty/serial/8250/8250_core.c 2017-01-01 17:07:14.859351469 +0100 +diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_core.c linux-4.9.6/drivers/tty/serial/8250/8250_core.c +--- linux-4.9.6.orig/drivers/tty/serial/8250/8250_core.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/tty/serial/8250/8250_core.c 2017-01-28 13:59:09.923655879 +0100 @@ -58,7 +58,16 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ @@ -6390,9 +4939,9 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/8250/8250_core.c linux-4.8.15/dri #include <asm/serial.h> /* -diff -Nur linux-4.8.15.orig/drivers/tty/serial/8250/8250_port.c linux-4.8.15/drivers/tty/serial/8250/8250_port.c ---- linux-4.8.15.orig/drivers/tty/serial/8250/8250_port.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/tty/serial/8250/8250_port.c 2017-01-01 17:07:14.895353784 +0100 +diff -Nur linux-4.9.6.orig/drivers/tty/serial/8250/8250_port.c linux-4.9.6/drivers/tty/serial/8250/8250_port.c +--- linux-4.9.6.orig/drivers/tty/serial/8250/8250_port.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/tty/serial/8250/8250_port.c 2017-01-28 13:59:09.923655879 +0100 @@ -35,6 +35,7 @@ #include <linux/nmi.h> #include <linux/mutex.h> @@ -6401,7 +4950,7 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/8250/8250_port.c linux-4.8.15/dri #include <linux/uaccess.h> #include <linux/pm_runtime.h> #include <linux/timer.h> -@@ -3109,9 +3110,9 @@ +@@ -3144,9 +3145,9 @@ serial8250_rpm_get(up); @@ -6413,10 +4962,10 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/8250/8250_port.c linux-4.8.15/dri locked = spin_trylock_irqsave(&port->lock, flags); else spin_lock_irqsave(&port->lock, flags); -diff -Nur linux-4.8.15.orig/drivers/tty/serial/amba-pl011.c linux-4.8.15/drivers/tty/serial/amba-pl011.c ---- linux-4.8.15.orig/drivers/tty/serial/amba-pl011.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/tty/serial/amba-pl011.c 2017-01-01 17:07:15.011361259 +0100 -@@ -2167,13 +2167,19 @@ +diff -Nur linux-4.9.6.orig/drivers/tty/serial/amba-pl011.c linux-4.9.6/drivers/tty/serial/amba-pl011.c +--- linux-4.9.6.orig/drivers/tty/serial/amba-pl011.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/tty/serial/amba-pl011.c 2017-01-28 13:59:09.923655879 +0100 +@@ -2194,13 +2194,19 @@ clk_enable(uap->clk); @@ -6439,7 +4988,7 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/amba-pl011.c linux-4.8.15/drivers /* * First save the CR then disable the interrupts -@@ -2197,8 +2203,7 @@ +@@ -2224,8 +2230,7 @@ pl011_write(old_cr, uap, REG_CR); if (locked) @@ -6449,9 +4998,9 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/amba-pl011.c linux-4.8.15/drivers clk_disable(uap->clk); } -diff -Nur linux-4.8.15.orig/drivers/tty/serial/omap-serial.c linux-4.8.15/drivers/tty/serial/omap-serial.c ---- linux-4.8.15.orig/drivers/tty/serial/omap-serial.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/tty/serial/omap-serial.c 2017-01-01 17:07:15.019361774 +0100 +diff -Nur linux-4.9.6.orig/drivers/tty/serial/omap-serial.c linux-4.9.6/drivers/tty/serial/omap-serial.c +--- linux-4.9.6.orig/drivers/tty/serial/omap-serial.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/tty/serial/omap-serial.c 2017-01-28 13:59:09.923655879 +0100 @@ -1257,13 +1257,10 @@ pm_runtime_get_sync(up->dev); @@ -6479,22 +5028,10 @@ diff -Nur linux-4.8.15.orig/drivers/tty/serial/omap-serial.c linux-4.8.15/driver } static int __init -diff -Nur linux-4.8.15.orig/drivers/tty/serial/sc16is7xx.c linux-4.8.15/drivers/tty/serial/sc16is7xx.c ---- linux-4.8.15.orig/drivers/tty/serial/sc16is7xx.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/tty/serial/sc16is7xx.c 2017-01-01 17:07:15.027362288 +0100 -@@ -1240,7 +1240,7 @@ - - /* Setup interrupt */ - ret = devm_request_irq(dev, irq, sc16is7xx_irq, -- IRQF_ONESHOT | flags, dev_name(dev), s); -+ flags, dev_name(dev), s); - if (!ret) - return 0; - -diff -Nur linux-4.8.15.orig/drivers/usb/core/hcd.c linux-4.8.15/drivers/usb/core/hcd.c ---- linux-4.8.15.orig/drivers/usb/core/hcd.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/usb/core/hcd.c 2017-01-01 17:07:15.051363831 +0100 -@@ -1760,9 +1760,9 @@ +diff -Nur linux-4.9.6.orig/drivers/usb/core/hcd.c linux-4.9.6/drivers/usb/core/hcd.c +--- linux-4.9.6.orig/drivers/usb/core/hcd.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/usb/core/hcd.c 2017-01-28 13:59:09.923655879 +0100 +@@ -1761,9 +1761,9 @@ * and no one may trigger the above deadlock situation when * running complete() in tasklet. */ @@ -6506,10 +5043,10 @@ diff -Nur linux-4.8.15.orig/drivers/usb/core/hcd.c linux-4.8.15/drivers/usb/core usb_anchor_resume_wakeups(anchor); atomic_dec(&urb->use_count); -diff -Nur linux-4.8.15.orig/drivers/usb/gadget/function/f_fs.c linux-4.8.15/drivers/usb/gadget/function/f_fs.c ---- linux-4.8.15.orig/drivers/usb/gadget/function/f_fs.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/usb/gadget/function/f_fs.c 2017-01-01 17:07:15.079365638 +0100 -@@ -1590,7 +1590,7 @@ +diff -Nur linux-4.9.6.orig/drivers/usb/gadget/function/f_fs.c linux-4.9.6/drivers/usb/gadget/function/f_fs.c +--- linux-4.9.6.orig/drivers/usb/gadget/function/f_fs.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/usb/gadget/function/f_fs.c 2017-01-28 13:59:09.923655879 +0100 +@@ -1593,7 +1593,7 @@ pr_info("%s(): freeing\n", __func__); ffs_data_clear(ffs); BUG_ON(waitqueue_active(&ffs->ev.waitq) || @@ -6518,9 +5055,9 @@ diff -Nur linux-4.8.15.orig/drivers/usb/gadget/function/f_fs.c linux-4.8.15/driv kfree(ffs->dev_name); kfree(ffs); } -diff -Nur linux-4.8.15.orig/drivers/usb/gadget/legacy/inode.c linux-4.8.15/drivers/usb/gadget/legacy/inode.c ---- linux-4.8.15.orig/drivers/usb/gadget/legacy/inode.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/drivers/usb/gadget/legacy/inode.c 2017-01-01 17:07:15.107367440 +0100 +diff -Nur linux-4.9.6.orig/drivers/usb/gadget/legacy/inode.c linux-4.9.6/drivers/usb/gadget/legacy/inode.c +--- linux-4.9.6.orig/drivers/usb/gadget/legacy/inode.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/drivers/usb/gadget/legacy/inode.c 2017-01-28 13:59:09.923655879 +0100 @@ -346,7 +346,7 @@ spin_unlock_irq (&epdata->dev->lock); @@ -6539,9 +5076,9 @@ diff -Nur linux-4.8.15.orig/drivers/usb/gadget/legacy/inode.c linux-4.8.15/drive if (epdata->status == -ECONNRESET) epdata->status = -EINTR; } else { -diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c ---- linux-4.8.15.orig/fs/aio.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/aio.c 2017-01-01 17:07:15.119368222 +0100 +diff -Nur linux-4.9.6.orig/fs/aio.c linux-4.9.6/fs/aio.c +--- linux-4.9.6.orig/fs/aio.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/aio.c 2017-01-28 13:59:09.923655879 +0100 @@ -40,6 +40,7 @@ #include <linux/ramfs.h> #include <linux/percpu-refcount.h> @@ -6567,7 +5104,7 @@ diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c aio_mnt = kern_mount(&aio_fs); if (IS_ERR(aio_mnt)) panic("Failed to create aio fs mount."); -@@ -578,9 +580,9 @@ +@@ -581,9 +583,9 @@ return cancel(&kiocb->common); } @@ -6579,7 +5116,7 @@ diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c pr_debug("freeing %p\n", ctx); -@@ -599,8 +601,8 @@ +@@ -602,8 +604,8 @@ if (ctx->rq_wait && atomic_dec_and_test(&ctx->rq_wait->count)) complete(&ctx->rq_wait->comp); @@ -6590,7 +5127,7 @@ diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c } /* -@@ -608,9 +610,9 @@ +@@ -611,9 +613,9 @@ * and ctx->users has dropped to 0, so we know no more kiocbs can be submitted - * now it's safe to cancel any that need to be. */ @@ -6602,7 +5139,7 @@ diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c struct aio_kiocb *req; spin_lock_irq(&ctx->ctx_lock); -@@ -629,6 +631,14 @@ +@@ -632,6 +634,14 @@ percpu_ref_put(&ctx->reqs); } @@ -6617,10 +5154,10 @@ diff -Nur linux-4.8.15.orig/fs/aio.c linux-4.8.15/fs/aio.c static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) { unsigned i, new_nr; -diff -Nur linux-4.8.15.orig/fs/autofs4/autofs_i.h linux-4.8.15/fs/autofs4/autofs_i.h ---- linux-4.8.15.orig/fs/autofs4/autofs_i.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/autofs4/autofs_i.h 2017-01-01 17:07:15.127368729 +0100 -@@ -30,6 +30,7 @@ +diff -Nur linux-4.9.6.orig/fs/autofs4/autofs_i.h linux-4.9.6/fs/autofs4/autofs_i.h +--- linux-4.9.6.orig/fs/autofs4/autofs_i.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/autofs4/autofs_i.h 2017-01-28 13:59:09.923655879 +0100 +@@ -31,6 +31,7 @@ #include <linux/sched.h> #include <linux/mount.h> #include <linux/namei.h> @@ -6628,9 +5165,9 @@ diff -Nur linux-4.8.15.orig/fs/autofs4/autofs_i.h linux-4.8.15/fs/autofs4/autofs #include <asm/current.h> #include <linux/uaccess.h> -diff -Nur linux-4.8.15.orig/fs/autofs4/expire.c linux-4.8.15/fs/autofs4/expire.c ---- linux-4.8.15.orig/fs/autofs4/expire.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/autofs4/expire.c 2017-01-01 17:07:15.143369757 +0100 +diff -Nur linux-4.9.6.orig/fs/autofs4/expire.c linux-4.9.6/fs/autofs4/expire.c +--- linux-4.9.6.orig/fs/autofs4/expire.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/autofs4/expire.c 2017-01-28 13:59:09.923655879 +0100 @@ -148,7 +148,7 @@ parent = p->d_parent; if (!spin_trylock(&parent->d_lock)) { @@ -6640,9 +5177,9 @@ diff -Nur linux-4.8.15.orig/fs/autofs4/expire.c linux-4.8.15/fs/autofs4/expire.c goto relock; } spin_unlock(&p->d_lock); -diff -Nur linux-4.8.15.orig/fs/buffer.c linux-4.8.15/fs/buffer.c ---- linux-4.8.15.orig/fs/buffer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/buffer.c 2017-01-01 17:07:15.163371048 +0100 +diff -Nur linux-4.9.6.orig/fs/buffer.c linux-4.9.6/fs/buffer.c +--- linux-4.9.6.orig/fs/buffer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/buffer.c 2017-01-28 13:59:09.927656033 +0100 @@ -301,8 +301,7 @@ * decide that the page is now completely done. */ @@ -6702,7 +5239,7 @@ diff -Nur linux-4.8.15.orig/fs/buffer.c linux-4.8.15/fs/buffer.c } EXPORT_SYMBOL(end_buffer_async_write); -@@ -3384,6 +3376,7 @@ +@@ -3383,6 +3375,7 @@ struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags); if (ret) { INIT_LIST_HEAD(&ret->b_assoc_buffers); @@ -6710,9 +5247,9 @@ diff -Nur linux-4.8.15.orig/fs/buffer.c linux-4.8.15/fs/buffer.c preempt_disable(); __this_cpu_inc(bh_accounting.nr); recalc_bh_state(); -diff -Nur linux-4.8.15.orig/fs/cifs/readdir.c linux-4.8.15/fs/cifs/readdir.c ---- linux-4.8.15.orig/fs/cifs/readdir.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/cifs/readdir.c 2017-01-01 17:07:15.175371817 +0100 +diff -Nur linux-4.9.6.orig/fs/cifs/readdir.c linux-4.9.6/fs/cifs/readdir.c +--- linux-4.9.6.orig/fs/cifs/readdir.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/cifs/readdir.c 2017-01-28 13:59:09.927656033 +0100 @@ -80,7 +80,7 @@ struct inode *inode; struct super_block *sb = parent->d_sb; @@ -6722,9 +5259,9 @@ diff -Nur linux-4.8.15.orig/fs/cifs/readdir.c linux-4.8.15/fs/cifs/readdir.c cifs_dbg(FYI, "%s: for %s\n", __func__, name->name); -diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c ---- linux-4.8.15.orig/fs/dcache.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/dcache.c 2017-01-01 17:07:15.191372851 +0100 +diff -Nur linux-4.9.6.orig/fs/dcache.c linux-4.9.6/fs/dcache.c +--- linux-4.9.6.orig/fs/dcache.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/dcache.c 2017-01-28 13:59:09.927656033 +0100 @@ -19,6 +19,7 @@ #include <linux/mm.h> #include <linux/fs.h> @@ -6764,7 +5301,7 @@ diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c goto repeat; } } -@@ -2321,7 +2333,7 @@ +@@ -2324,7 +2336,7 @@ if (dentry->d_lockref.count == 1) { if (!spin_trylock(&inode->i_lock)) { spin_unlock(&dentry->d_lock); @@ -6773,7 +5310,7 @@ diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c goto again; } dentry->d_flags &= ~DCACHE_CANT_MOUNT; -@@ -2381,21 +2393,24 @@ +@@ -2384,21 +2396,24 @@ static void d_wait_lookup(struct dentry *dentry) { @@ -6809,7 +5346,7 @@ diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c { unsigned int hash = name->hash; struct hlist_bl_head *b = in_lookup_hash(parent, hash); -@@ -2504,7 +2519,7 @@ +@@ -2507,7 +2522,7 @@ hlist_bl_lock(b); dentry->d_flags &= ~DCACHE_PAR_LOOKUP; __hlist_bl_del(&dentry->d_u.d_in_lookup_hash); @@ -6818,7 +5355,7 @@ diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c dentry->d_wait = NULL; hlist_bl_unlock(b); INIT_HLIST_NODE(&dentry->d_u.d_alias); -@@ -3601,6 +3616,11 @@ +@@ -3604,6 +3619,11 @@ void __init vfs_caches_init_early(void) { @@ -6830,9 +5367,9 @@ diff -Nur linux-4.8.15.orig/fs/dcache.c linux-4.8.15/fs/dcache.c dcache_init_early(); inode_init_early(); } -diff -Nur linux-4.8.15.orig/fs/eventpoll.c linux-4.8.15/fs/eventpoll.c ---- linux-4.8.15.orig/fs/eventpoll.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/eventpoll.c 2017-01-01 17:07:15.235375683 +0100 +diff -Nur linux-4.9.6.orig/fs/eventpoll.c linux-4.9.6/fs/eventpoll.c +--- linux-4.9.6.orig/fs/eventpoll.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/eventpoll.c 2017-01-28 13:59:09.927656033 +0100 @@ -510,12 +510,12 @@ */ static void ep_poll_safewake(wait_queue_head_t *wq) @@ -6848,10 +5385,10 @@ diff -Nur linux-4.8.15.orig/fs/eventpoll.c linux-4.8.15/fs/eventpoll.c } static void ep_remove_wait_queue(struct eppoll_entry *pwq) -diff -Nur linux-4.8.15.orig/fs/exec.c linux-4.8.15/fs/exec.c ---- linux-4.8.15.orig/fs/exec.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/exec.c 2017-01-01 17:07:15.275378262 +0100 -@@ -1012,12 +1012,14 @@ +diff -Nur linux-4.9.6.orig/fs/exec.c linux-4.9.6/fs/exec.c +--- linux-4.9.6.orig/fs/exec.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/exec.c 2017-01-28 13:59:09.927656033 +0100 +@@ -1017,12 +1017,14 @@ } } task_lock(tsk); @@ -6866,10 +5403,10 @@ diff -Nur linux-4.8.15.orig/fs/exec.c linux-4.8.15/fs/exec.c task_unlock(tsk); if (old_mm) { up_read(&old_mm->mmap_sem); -diff -Nur linux-4.8.15.orig/fs/fuse/dir.c linux-4.8.15/fs/fuse/dir.c ---- linux-4.8.15.orig/fs/fuse/dir.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/fuse/dir.c 2017-01-01 17:07:15.315380835 +0100 -@@ -1174,7 +1174,7 @@ +diff -Nur linux-4.9.6.orig/fs/fuse/dir.c linux-4.9.6/fs/fuse/dir.c +--- linux-4.9.6.orig/fs/fuse/dir.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/fuse/dir.c 2017-01-28 13:59:09.927656033 +0100 +@@ -1191,7 +1191,7 @@ struct inode *dir = d_inode(parent); struct fuse_conn *fc; struct inode *inode; @@ -6878,9 +5415,9 @@ diff -Nur linux-4.8.15.orig/fs/fuse/dir.c linux-4.8.15/fs/fuse/dir.c if (!o->nodeid) { /* -diff -Nur linux-4.8.15.orig/fs/jbd2/checkpoint.c linux-4.8.15/fs/jbd2/checkpoint.c ---- linux-4.8.15.orig/fs/jbd2/checkpoint.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/jbd2/checkpoint.c 2017-01-01 17:07:15.403386504 +0100 +diff -Nur linux-4.9.6.orig/fs/jbd2/checkpoint.c linux-4.9.6/fs/jbd2/checkpoint.c +--- linux-4.9.6.orig/fs/jbd2/checkpoint.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/jbd2/checkpoint.c 2017-01-28 13:59:09.927656033 +0100 @@ -116,6 +116,8 @@ nblocks = jbd2_space_needed(journal); while (jbd2_log_space_left(journal) < nblocks) { @@ -6890,9 +5427,152 @@ diff -Nur linux-4.8.15.orig/fs/jbd2/checkpoint.c linux-4.8.15/fs/jbd2/checkpoint mutex_lock(&journal->j_checkpoint_mutex); /* -diff -Nur linux-4.8.15.orig/fs/namei.c linux-4.8.15/fs/namei.c ---- linux-4.8.15.orig/fs/namei.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/namei.c 2017-01-01 17:07:15.435388569 +0100 +diff -Nur linux-4.9.6.orig/fs/locks.c linux-4.9.6/fs/locks.c +--- linux-4.9.6.orig/fs/locks.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/locks.c 2017-01-28 13:59:09.927656033 +0100 +@@ -935,7 +935,7 @@ + return -ENOMEM; + } + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + if (request->fl_flags & FL_ACCESS) + goto find_conflict; +@@ -976,7 +976,7 @@ + + out: + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + if (new_fl) + locks_free_lock(new_fl); + locks_dispose_list(&dispose); +@@ -1013,7 +1013,7 @@ + new_fl2 = locks_alloc_lock(); + } + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + /* + * New lock request. Walk all POSIX locks and look for conflicts. If +@@ -1185,7 +1185,7 @@ + } + out: + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + /* + * Free any unused locks. + */ +@@ -1460,7 +1460,7 @@ + return error; + } + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + + time_out_leases(inode, &dispose); +@@ -1512,13 +1512,13 @@ + locks_insert_block(fl, new_fl); + trace_break_lease_block(inode, new_fl); + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + + locks_dispose_list(&dispose); + error = wait_event_interruptible_timeout(new_fl->fl_wait, + !new_fl->fl_next, break_time); + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + trace_break_lease_unblock(inode, new_fl); + locks_delete_block(new_fl); +@@ -1535,7 +1535,7 @@ + } + out: + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + locks_dispose_list(&dispose); + locks_free_lock(new_fl); + return error; +@@ -1609,7 +1609,7 @@ + + ctx = smp_load_acquire(&inode->i_flctx); + if (ctx && !list_empty_careful(&ctx->flc_lease)) { +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + time_out_leases(inode, &dispose); + list_for_each_entry(fl, &ctx->flc_lease, fl_list) { +@@ -1619,7 +1619,7 @@ + break; + } + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + + locks_dispose_list(&dispose); + } +@@ -1694,7 +1694,7 @@ + return -EINVAL; + } + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + time_out_leases(inode, &dispose); + error = check_conflicting_open(dentry, arg, lease->fl_flags); +@@ -1765,7 +1765,7 @@ + lease->fl_lmops->lm_setup(lease, priv); + out: + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + locks_dispose_list(&dispose); + if (is_deleg) + inode_unlock(inode); +@@ -1788,7 +1788,7 @@ + return error; + } + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + list_for_each_entry(fl, &ctx->flc_lease, fl_list) { + if (fl->fl_file == filp && +@@ -1801,7 +1801,7 @@ + if (victim) + error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose); + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + locks_dispose_list(&dispose); + return error; + } +@@ -2532,13 +2532,13 @@ + if (list_empty(&ctx->flc_lease)) + return; + +- percpu_down_read_preempt_disable(&file_rwsem); ++ percpu_down_read(&file_rwsem); + spin_lock(&ctx->flc_lock); + list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list) + if (filp == fl->fl_file) + lease_modify(fl, F_UNLCK, &dispose); + spin_unlock(&ctx->flc_lock); +- percpu_up_read_preempt_enable(&file_rwsem); ++ percpu_up_read(&file_rwsem); + + locks_dispose_list(&dispose); + } +diff -Nur linux-4.9.6.orig/fs/namei.c linux-4.9.6/fs/namei.c +--- linux-4.9.6.orig/fs/namei.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/namei.c 2017-01-28 13:59:09.927656033 +0100 @@ -1629,7 +1629,7 @@ { struct dentry *dentry = ERR_PTR(-ENOENT), *old; @@ -6911,9 +5591,9 @@ diff -Nur linux-4.8.15.orig/fs/namei.c linux-4.8.15/fs/namei.c if (unlikely(IS_DEADDIR(dir_inode))) return -ENOENT; -diff -Nur linux-4.8.15.orig/fs/namespace.c linux-4.8.15/fs/namespace.c ---- linux-4.8.15.orig/fs/namespace.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/namespace.c 2017-01-01 17:07:15.447389339 +0100 +diff -Nur linux-4.9.6.orig/fs/namespace.c linux-4.9.6/fs/namespace.c +--- linux-4.9.6.orig/fs/namespace.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/namespace.c 2017-01-28 13:59:09.931656187 +0100 @@ -14,6 +14,7 @@ #include <linux/mnt_namespace.h> #include <linux/user_namespace.h> @@ -6922,7 +5602,7 @@ diff -Nur linux-4.8.15.orig/fs/namespace.c linux-4.8.15/fs/namespace.c #include <linux/security.h> #include <linux/idr.h> #include <linux/init.h> /* init_rootfs */ -@@ -353,8 +354,11 @@ +@@ -356,8 +357,11 @@ * incremented count after it has set MNT_WRITE_HOLD. */ smp_mb(); @@ -6936,9 +5616,9 @@ diff -Nur linux-4.8.15.orig/fs/namespace.c linux-4.8.15/fs/namespace.c /* * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will * be set to match its requirements. So we must not load that until -diff -Nur linux-4.8.15.orig/fs/nfs/delegation.c linux-4.8.15/fs/nfs/delegation.c ---- linux-4.8.15.orig/fs/nfs/delegation.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/delegation.c 2017-01-01 17:07:15.451389604 +0100 +diff -Nur linux-4.9.6.orig/fs/nfs/delegation.c linux-4.9.6/fs/nfs/delegation.c +--- linux-4.9.6.orig/fs/nfs/delegation.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/delegation.c 2017-01-28 13:59:09.931656187 +0100 @@ -150,11 +150,11 @@ sp = state->owner; /* Block nfs4_proc_unlck */ @@ -6953,9 +5633,9 @@ diff -Nur linux-4.8.15.orig/fs/nfs/delegation.c linux-4.8.15/fs/nfs/delegation.c err = -EAGAIN; mutex_unlock(&sp->so_delegreturn_mutex); put_nfs_open_context(ctx); -diff -Nur linux-4.8.15.orig/fs/nfs/dir.c linux-4.8.15/fs/nfs/dir.c ---- linux-4.8.15.orig/fs/nfs/dir.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/dir.c 2017-01-01 17:07:15.455389855 +0100 +diff -Nur linux-4.9.6.orig/fs/nfs/dir.c linux-4.9.6/fs/nfs/dir.c +--- linux-4.9.6.orig/fs/nfs/dir.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/dir.c 2017-01-28 13:59:09.931656187 +0100 @@ -485,7 +485,7 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) { @@ -6965,7 +5645,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/dir.c linux-4.8.15/fs/nfs/dir.c struct dentry *dentry; struct dentry *alias; struct inode *dir = d_inode(parent); -@@ -1490,7 +1490,7 @@ +@@ -1487,7 +1487,7 @@ struct file *file, unsigned open_flags, umode_t mode, int *opened) { @@ -6974,7 +5654,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/dir.c linux-4.8.15/fs/nfs/dir.c struct nfs_open_context *ctx; struct dentry *res; struct iattr attr = { .ia_valid = ATTR_OPEN }; -@@ -1805,7 +1805,11 @@ +@@ -1802,7 +1802,11 @@ trace_nfs_rmdir_enter(dir, dentry); if (d_really_is_positive(dentry)) { @@ -6986,7 +5666,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/dir.c linux-4.8.15/fs/nfs/dir.c error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); /* Ensure the VFS deletes this inode */ switch (error) { -@@ -1815,7 +1819,11 @@ +@@ -1812,7 +1816,11 @@ case -ENOENT: nfs_dentry_handle_enoent(dentry); } @@ -6998,9 +5678,9 @@ diff -Nur linux-4.8.15.orig/fs/nfs/dir.c linux-4.8.15/fs/nfs/dir.c } else error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name); trace_nfs_rmdir_exit(dir, dentry, error); -diff -Nur linux-4.8.15.orig/fs/nfs/inode.c linux-4.8.15/fs/nfs/inode.c ---- linux-4.8.15.orig/fs/nfs/inode.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/inode.c 2017-01-01 17:07:15.463390369 +0100 +diff -Nur linux-4.9.6.orig/fs/nfs/inode.c linux-4.9.6/fs/nfs/inode.c +--- linux-4.9.6.orig/fs/nfs/inode.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/inode.c 2017-01-28 13:59:09.931656187 +0100 @@ -1957,7 +1957,11 @@ nfsi->nrequests = 0; nfsi->commit_info.ncommit = 0; @@ -7013,10 +5693,10 @@ diff -Nur linux-4.8.15.orig/fs/nfs/inode.c linux-4.8.15/fs/nfs/inode.c nfs4_init_once(nfsi); } -diff -Nur linux-4.8.15.orig/fs/nfs/nfs4_fs.h linux-4.8.15/fs/nfs/nfs4_fs.h ---- linux-4.8.15.orig/fs/nfs/nfs4_fs.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/nfs4_fs.h 2017-01-01 17:07:15.467390636 +0100 -@@ -107,7 +107,7 @@ +diff -Nur linux-4.9.6.orig/fs/nfs/nfs4_fs.h linux-4.9.6/fs/nfs/nfs4_fs.h +--- linux-4.9.6.orig/fs/nfs/nfs4_fs.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/nfs4_fs.h 2017-01-28 13:59:09.931656187 +0100 +@@ -111,7 +111,7 @@ unsigned long so_flags; struct list_head so_states; struct nfs_seqid_counter so_seqid; @@ -7025,10 +5705,10 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4_fs.h linux-4.8.15/fs/nfs/nfs4_fs.h struct mutex so_delegreturn_mutex; }; -diff -Nur linux-4.8.15.orig/fs/nfs/nfs4proc.c linux-4.8.15/fs/nfs/nfs4proc.c ---- linux-4.8.15.orig/fs/nfs/nfs4proc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/nfs4proc.c 2017-01-01 17:07:15.491392171 +0100 -@@ -2525,7 +2525,7 @@ +diff -Nur linux-4.9.6.orig/fs/nfs/nfs4proc.c linux-4.9.6/fs/nfs/nfs4proc.c +--- linux-4.9.6.orig/fs/nfs/nfs4proc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/nfs4proc.c 2017-01-28 13:59:09.931656187 +0100 +@@ -2697,7 +2697,7 @@ unsigned int seq; int ret; @@ -7037,7 +5717,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4proc.c linux-4.8.15/fs/nfs/nfs4proc.c ret = _nfs4_proc_open(opendata); if (ret != 0) -@@ -2561,7 +2561,7 @@ +@@ -2735,7 +2735,7 @@ ctx->state = state; if (d_inode(dentry) == state->inode) { nfs_inode_attach_open_context(ctx); @@ -7046,9 +5726,9 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4proc.c linux-4.8.15/fs/nfs/nfs4proc.c nfs4_schedule_stateid_recovery(server, state); } out: -diff -Nur linux-4.8.15.orig/fs/nfs/nfs4state.c linux-4.8.15/fs/nfs/nfs4state.c ---- linux-4.8.15.orig/fs/nfs/nfs4state.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/nfs4state.c 2017-01-01 17:07:15.527394493 +0100 +diff -Nur linux-4.9.6.orig/fs/nfs/nfs4state.c linux-4.9.6/fs/nfs/nfs4state.c +--- linux-4.9.6.orig/fs/nfs/nfs4state.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/nfs4state.c 2017-01-28 13:59:09.931656187 +0100 @@ -488,7 +488,7 @@ nfs4_init_seqid_counter(&sp->so_seqid); atomic_set(&sp->so_count, 1); @@ -7058,7 +5738,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4state.c linux-4.8.15/fs/nfs/nfs4state.c mutex_init(&sp->so_delegreturn_mutex); return sp; } -@@ -1459,8 +1459,12 @@ +@@ -1497,8 +1497,12 @@ * recovering after a network partition or a reboot from a * server that doesn't support a grace period. */ @@ -7072,7 +5752,7 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4state.c linux-4.8.15/fs/nfs/nfs4state.c restart: list_for_each_entry(state, &sp->so_states, open_states) { if (!test_and_clear_bit(ops->state_flag_bit, &state->flags)) -@@ -1528,14 +1532,20 @@ +@@ -1567,14 +1571,20 @@ spin_lock(&sp->so_lock); goto restart; } @@ -7097,9 +5777,9 @@ diff -Nur linux-4.8.15.orig/fs/nfs/nfs4state.c linux-4.8.15/fs/nfs/nfs4state.c return status; } -diff -Nur linux-4.8.15.orig/fs/nfs/unlink.c linux-4.8.15/fs/nfs/unlink.c ---- linux-4.8.15.orig/fs/nfs/unlink.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/nfs/unlink.c 2017-01-01 17:07:15.531394748 +0100 +diff -Nur linux-4.9.6.orig/fs/nfs/unlink.c linux-4.9.6/fs/nfs/unlink.c +--- linux-4.9.6.orig/fs/nfs/unlink.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/nfs/unlink.c 2017-01-28 13:59:09.931656187 +0100 @@ -12,7 +12,7 @@ #include <linux/sunrpc/clnt.h> #include <linux/nfs_fs.h> @@ -7179,9 +5859,9 @@ diff -Nur linux-4.8.15.orig/fs/nfs/unlink.c linux-4.8.15/fs/nfs/unlink.c status = -EBUSY; spin_lock(&dentry->d_lock); -diff -Nur linux-4.8.15.orig/fs/ntfs/aops.c linux-4.8.15/fs/ntfs/aops.c ---- linux-4.8.15.orig/fs/ntfs/aops.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/ntfs/aops.c 2017-01-01 17:07:15.547395781 +0100 +diff -Nur linux-4.9.6.orig/fs/ntfs/aops.c linux-4.9.6/fs/ntfs/aops.c +--- linux-4.9.6.orig/fs/ntfs/aops.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/ntfs/aops.c 2017-01-28 13:59:09.931656187 +0100 @@ -92,13 +92,13 @@ ofs = 0; if (file_ofs < init_size) @@ -7245,10 +5925,10 @@ diff -Nur linux-4.8.15.orig/fs/ntfs/aops.c linux-4.8.15/fs/ntfs/aops.c } /** -diff -Nur linux-4.8.15.orig/fs/proc/base.c linux-4.8.15/fs/proc/base.c ---- linux-4.8.15.orig/fs/proc/base.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/proc/base.c 2017-01-01 17:07:15.571397336 +0100 -@@ -1819,7 +1819,7 @@ +diff -Nur linux-4.9.6.orig/fs/proc/base.c linux-4.9.6/fs/proc/base.c +--- linux-4.9.6.orig/fs/proc/base.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/proc/base.c 2017-01-28 13:59:09.931656187 +0100 +@@ -1834,7 +1834,7 @@ child = d_hash_and_lookup(dir, &qname); if (!child) { @@ -7257,10 +5937,10 @@ diff -Nur linux-4.8.15.orig/fs/proc/base.c linux-4.8.15/fs/proc/base.c child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) goto end_instantiate; -diff -Nur linux-4.8.15.orig/fs/proc/proc_sysctl.c linux-4.8.15/fs/proc/proc_sysctl.c ---- linux-4.8.15.orig/fs/proc/proc_sysctl.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/proc/proc_sysctl.c 2017-01-01 17:07:15.575397587 +0100 -@@ -627,7 +627,7 @@ +diff -Nur linux-4.9.6.orig/fs/proc/proc_sysctl.c linux-4.9.6/fs/proc/proc_sysctl.c +--- linux-4.9.6.orig/fs/proc/proc_sysctl.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/proc/proc_sysctl.c 2017-01-28 13:59:09.935656342 +0100 +@@ -632,7 +632,7 @@ child = d_lookup(dir, &qname); if (!child) { @@ -7269,9 +5949,9 @@ diff -Nur linux-4.8.15.orig/fs/proc/proc_sysctl.c linux-4.8.15/fs/proc/proc_sysc child = d_alloc_parallel(dir, &qname, &wq); if (IS_ERR(child)) return false; -diff -Nur linux-4.8.15.orig/fs/timerfd.c linux-4.8.15/fs/timerfd.c ---- linux-4.8.15.orig/fs/timerfd.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/fs/timerfd.c 2017-01-01 17:07:15.587398365 +0100 +diff -Nur linux-4.9.6.orig/fs/timerfd.c linux-4.9.6/fs/timerfd.c +--- linux-4.9.6.orig/fs/timerfd.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/fs/timerfd.c 2017-01-28 13:59:09.935656342 +0100 @@ -460,7 +460,10 @@ break; } @@ -7284,10 +5964,10 @@ diff -Nur linux-4.8.15.orig/fs/timerfd.c linux-4.8.15/fs/timerfd.c } /* -diff -Nur linux-4.8.15.orig/include/acpi/platform/aclinux.h linux-4.8.15/include/acpi/platform/aclinux.h ---- linux-4.8.15.orig/include/acpi/platform/aclinux.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/acpi/platform/aclinux.h 2017-01-01 17:07:15.591398616 +0100 -@@ -131,6 +131,7 @@ +diff -Nur linux-4.9.6.orig/include/acpi/platform/aclinux.h linux-4.9.6/include/acpi/platform/aclinux.h +--- linux-4.9.6.orig/include/acpi/platform/aclinux.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/acpi/platform/aclinux.h 2017-01-28 13:59:09.935656342 +0100 +@@ -133,6 +133,7 @@ #define acpi_cache_t struct kmem_cache #define acpi_spinlock spinlock_t * @@ -7295,7 +5975,7 @@ diff -Nur linux-4.8.15.orig/include/acpi/platform/aclinux.h linux-4.8.15/include #define acpi_cpu_flags unsigned long /* Use native linux version of acpi_os_allocate_zeroed */ -@@ -149,6 +150,20 @@ +@@ -151,6 +152,20 @@ #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id #define ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock @@ -7316,9 +5996,9 @@ diff -Nur linux-4.8.15.orig/include/acpi/platform/aclinux.h linux-4.8.15/include /* * OSL interfaces used by debugger/disassembler */ -diff -Nur linux-4.8.15.orig/include/asm-generic/bug.h linux-4.8.15/include/asm-generic/bug.h ---- linux-4.8.15.orig/include/asm-generic/bug.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/asm-generic/bug.h 2017-01-01 17:07:15.591398616 +0100 +diff -Nur linux-4.9.6.orig/include/asm-generic/bug.h linux-4.9.6/include/asm-generic/bug.h +--- linux-4.9.6.orig/include/asm-generic/bug.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/asm-generic/bug.h 2017-01-28 13:59:09.935656342 +0100 @@ -215,6 +215,20 @@ # define WARN_ON_SMP(x) ({0;}) #endif @@ -7340,9 +6020,9 @@ diff -Nur linux-4.8.15.orig/include/asm-generic/bug.h linux-4.8.15/include/asm-g #endif /* __ASSEMBLY__ */ #endif -diff -Nur linux-4.8.15.orig/include/linux/blkdev.h linux-4.8.15/include/linux/blkdev.h ---- linux-4.8.15.orig/include/linux/blkdev.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/blkdev.h 2017-01-01 17:07:15.623400677 +0100 +diff -Nur linux-4.9.6.orig/include/linux/blkdev.h linux-4.9.6/include/linux/blkdev.h +--- linux-4.9.6.orig/include/linux/blkdev.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/blkdev.h 2017-01-28 13:59:09.935656342 +0100 @@ -89,6 +89,7 @@ struct list_head queuelist; union { @@ -7360,20 +6040,21 @@ diff -Nur linux-4.8.15.orig/include/linux/blkdev.h linux-4.8.15/include/linux/bl struct percpu_ref q_usage_counter; struct list_head all_q_node; -diff -Nur linux-4.8.15.orig/include/linux/blk-mq.h linux-4.8.15/include/linux/blk-mq.h ---- linux-4.8.15.orig/include/linux/blk-mq.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/blk-mq.h 2017-01-01 17:07:15.599399127 +0100 -@@ -222,6 +222,7 @@ +diff -Nur linux-4.9.6.orig/include/linux/blk-mq.h linux-4.9.6/include/linux/blk-mq.h +--- linux-4.9.6.orig/include/linux/blk-mq.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/blk-mq.h 2017-01-28 13:59:09.935656342 +0100 +@@ -209,7 +209,7 @@ + return unique_tag & BLK_MQ_UNIQUE_TAG_MASK; + } - struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); - struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); +- +void __blk_mq_complete_request_remote_work(struct work_struct *work); - int blk_mq_request_started(struct request *rq); void blk_mq_start_request(struct request *rq); -diff -Nur linux-4.8.15.orig/include/linux/bottom_half.h linux-4.8.15/include/linux/bottom_half.h ---- linux-4.8.15.orig/include/linux/bottom_half.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/bottom_half.h 2017-01-01 17:07:15.623400677 +0100 + void blk_mq_end_request(struct request *rq, int error); +diff -Nur linux-4.9.6.orig/include/linux/bottom_half.h linux-4.9.6/include/linux/bottom_half.h +--- linux-4.9.6.orig/include/linux/bottom_half.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/bottom_half.h 2017-01-28 13:59:09.935656342 +0100 @@ -3,6 +3,39 @@ #include <linux/preempt.h> @@ -7421,9 +6102,9 @@ diff -Nur linux-4.8.15.orig/include/linux/bottom_half.h linux-4.8.15/include/lin +#endif #endif /* _LINUX_BH_H */ -diff -Nur linux-4.8.15.orig/include/linux/buffer_head.h linux-4.8.15/include/linux/buffer_head.h ---- linux-4.8.15.orig/include/linux/buffer_head.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/buffer_head.h 2017-01-01 17:07:15.623400677 +0100 +diff -Nur linux-4.9.6.orig/include/linux/buffer_head.h linux-4.9.6/include/linux/buffer_head.h +--- linux-4.9.6.orig/include/linux/buffer_head.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/buffer_head.h 2017-01-28 13:59:09.935656342 +0100 @@ -75,8 +75,50 @@ struct address_space *b_assoc_map; /* mapping this buffer is associated with */ @@ -7475,9 +6156,9 @@ diff -Nur linux-4.8.15.orig/include/linux/buffer_head.h linux-4.8.15/include/lin /* * macro tricks to expand the set_buffer_foo(), clear_buffer_foo() * and buffer_foo() functions. -diff -Nur linux-4.8.15.orig/include/linux/cgroup-defs.h linux-4.8.15/include/linux/cgroup-defs.h ---- linux-4.8.15.orig/include/linux/cgroup-defs.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/cgroup-defs.h 2017-01-01 17:07:15.631401192 +0100 +diff -Nur linux-4.9.6.orig/include/linux/cgroup-defs.h linux-4.9.6/include/linux/cgroup-defs.h +--- linux-4.9.6.orig/include/linux/cgroup-defs.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/cgroup-defs.h 2017-01-28 13:59:09.935656342 +0100 @@ -16,6 +16,7 @@ #include <linux/percpu-refcount.h> #include <linux/percpu-rwsem.h> @@ -7494,9 +6175,9 @@ diff -Nur linux-4.8.15.orig/include/linux/cgroup-defs.h linux-4.8.15/include/lin }; /* -diff -Nur linux-4.8.15.orig/include/linux/completion.h linux-4.8.15/include/linux/completion.h ---- linux-4.8.15.orig/include/linux/completion.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/completion.h 2017-01-01 17:07:15.659402994 +0100 +diff -Nur linux-4.9.6.orig/include/linux/completion.h linux-4.9.6/include/linux/completion.h +--- linux-4.9.6.orig/include/linux/completion.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/completion.h 2017-01-28 13:59:09.935656342 +0100 @@ -7,8 +7,7 @@ * Atomic wait-for-completion handler data structures. * See kernel/sched/completion.c for details. @@ -7530,10 +6211,10 @@ diff -Nur linux-4.8.15.orig/include/linux/completion.h linux-4.8.15/include/linu } /** -diff -Nur linux-4.8.15.orig/include/linux/cpu.h linux-4.8.15/include/linux/cpu.h ---- linux-4.8.15.orig/include/linux/cpu.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/cpu.h 2017-01-01 17:07:15.703405827 +0100 -@@ -194,6 +194,8 @@ +diff -Nur linux-4.9.6.orig/include/linux/cpu.h linux-4.9.6/include/linux/cpu.h +--- linux-4.9.6.orig/include/linux/cpu.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/cpu.h 2017-01-28 13:59:09.935656342 +0100 +@@ -182,6 +182,8 @@ extern void put_online_cpus(void); extern void cpu_hotplug_disable(void); extern void cpu_hotplug_enable(void); @@ -7542,7 +6223,7 @@ diff -Nur linux-4.8.15.orig/include/linux/cpu.h linux-4.8.15/include/linux/cpu.h #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) #define __hotcpu_notifier(fn, pri) __cpu_notifier(fn, pri) #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) -@@ -211,6 +213,8 @@ +@@ -199,6 +201,8 @@ #define put_online_cpus() do { } while (0) #define cpu_hotplug_disable() do { } while (0) #define cpu_hotplug_enable() do { } while (0) @@ -7551,9 +6232,9 @@ diff -Nur linux-4.8.15.orig/include/linux/cpu.h linux-4.8.15/include/linux/cpu.h #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) #define __hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) /* These aren't inline functions due to a GCC bug. */ -diff -Nur linux-4.8.15.orig/include/linux/dcache.h linux-4.8.15/include/linux/dcache.h ---- linux-4.8.15.orig/include/linux/dcache.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/dcache.h 2017-01-01 17:07:15.719406860 +0100 +diff -Nur linux-4.9.6.orig/include/linux/dcache.h linux-4.9.6/include/linux/dcache.h +--- linux-4.9.6.orig/include/linux/dcache.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/dcache.h 2017-01-28 13:59:09.935656342 +0100 @@ -11,6 +11,7 @@ #include <linux/rcupdate.h> #include <linux/lockref.h> @@ -7580,9 +6261,9 @@ diff -Nur linux-4.8.15.orig/include/linux/dcache.h linux-4.8.15/include/linux/dc extern struct dentry * d_splice_alias(struct inode *, struct dentry *); extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); extern struct dentry * d_exact_alias(struct dentry *, struct inode *); -diff -Nur linux-4.8.15.orig/include/linux/delay.h linux-4.8.15/include/linux/delay.h ---- linux-4.8.15.orig/include/linux/delay.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/delay.h 2017-01-01 17:07:15.719406860 +0100 +diff -Nur linux-4.9.6.orig/include/linux/delay.h linux-4.9.6/include/linux/delay.h +--- linux-4.9.6.orig/include/linux/delay.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/delay.h 2017-01-28 13:59:09.935656342 +0100 @@ -52,4 +52,10 @@ msleep(seconds * 1000); } @@ -7594,28 +6275,9 @@ diff -Nur linux-4.8.15.orig/include/linux/delay.h linux-4.8.15/include/linux/del +#endif + #endif /* defined(_LINUX_DELAY_H) */ -diff -Nur linux-4.8.15.orig/include/linux/ftrace.h linux-4.8.15/include/linux/ftrace.h ---- linux-4.8.15.orig/include/linux/ftrace.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/ftrace.h 2017-01-01 17:07:15.743408406 +0100 -@@ -714,6 +714,7 @@ - #define CALLER_ADDR5 ((unsigned long)ftrace_return_address(5)) - #define CALLER_ADDR6 ((unsigned long)ftrace_return_address(6)) - -+#ifdef CONFIG_USING_GET_LOCK_PARENT_IP - static inline unsigned long get_lock_parent_ip(void) - { - unsigned long addr = CALLER_ADDR0; -@@ -725,6 +726,7 @@ - return addr; - return CALLER_ADDR2; - } -+#endif - - #ifdef CONFIG_IRQSOFF_TRACER - extern void time_hardirqs_on(unsigned long a0, unsigned long a1); -diff -Nur linux-4.8.15.orig/include/linux/highmem.h linux-4.8.15/include/linux/highmem.h ---- linux-4.8.15.orig/include/linux/highmem.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/highmem.h 2017-01-01 17:07:15.743408406 +0100 +diff -Nur linux-4.9.6.orig/include/linux/highmem.h linux-4.9.6/include/linux/highmem.h +--- linux-4.9.6.orig/include/linux/highmem.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/highmem.h 2017-01-28 13:59:09.935656342 +0100 @@ -7,6 +7,7 @@ #include <linux/mm.h> #include <linux/uaccess.h> @@ -7698,9 +6360,9 @@ diff -Nur linux-4.8.15.orig/include/linux/highmem.h linux-4.8.15/include/linux/h #endif } -diff -Nur linux-4.8.15.orig/include/linux/hrtimer.h linux-4.8.15/include/linux/hrtimer.h ---- linux-4.8.15.orig/include/linux/hrtimer.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/hrtimer.h 2017-01-01 17:07:15.751408919 +0100 +diff -Nur linux-4.9.6.orig/include/linux/hrtimer.h linux-4.9.6/include/linux/hrtimer.h +--- linux-4.9.6.orig/include/linux/hrtimer.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/hrtimer.h 2017-01-28 13:59:09.935656342 +0100 @@ -87,6 +87,9 @@ * @function: timer expiry callback function * @base: pointer to the timer base (per cpu and per clock) @@ -7792,9 +6454,9 @@ diff -Nur linux-4.8.15.orig/include/linux/hrtimer.h linux-4.8.15/include/linux/h { return timer->base->cpu_base->running == timer; } -diff -Nur linux-4.8.15.orig/include/linux/idr.h linux-4.8.15/include/linux/idr.h ---- linux-4.8.15.orig/include/linux/idr.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/idr.h 2017-01-01 17:07:15.751408919 +0100 +diff -Nur linux-4.9.6.orig/include/linux/idr.h linux-4.9.6/include/linux/idr.h +--- linux-4.9.6.orig/include/linux/idr.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/idr.h 2017-01-28 13:59:09.935656342 +0100 @@ -95,10 +95,14 @@ * Each idr_preload() should be matched with an invocation of this * function. See idr_preload() for details. @@ -7810,10 +6472,10 @@ diff -Nur linux-4.8.15.orig/include/linux/idr.h linux-4.8.15/include/linux/idr.h /** * idr_find - return pointer for given id -diff -Nur linux-4.8.15.orig/include/linux/init_task.h linux-4.8.15/include/linux/init_task.h ---- linux-4.8.15.orig/include/linux/init_task.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/init_task.h 2017-01-01 17:07:15.751408919 +0100 -@@ -148,6 +148,12 @@ +diff -Nur linux-4.9.6.orig/include/linux/init_task.h linux-4.9.6/include/linux/init_task.h +--- linux-4.9.6.orig/include/linux/init_task.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/init_task.h 2017-01-28 13:59:09.935656342 +0100 +@@ -150,6 +150,12 @@ # define INIT_PERF_EVENTS(tsk) #endif @@ -7826,7 +6488,7 @@ diff -Nur linux-4.8.15.orig/include/linux/init_task.h linux-4.8.15/include/linux #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN # define INIT_VTIME(tsk) \ .vtime_seqcount = SEQCNT_ZERO(tsk.vtime_seqcount), \ -@@ -239,6 +245,7 @@ +@@ -250,6 +256,7 @@ .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ .timer_slack_ns = 50000, /* 50 usec default slack */ \ @@ -7834,9 +6496,9 @@ diff -Nur linux-4.8.15.orig/include/linux/init_task.h linux-4.8.15/include/linux .pids = { \ [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ -diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux/interrupt.h ---- linux-4.8.15.orig/include/linux/interrupt.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/interrupt.h 2017-01-01 17:07:15.759409443 +0100 +diff -Nur linux-4.9.6.orig/include/linux/interrupt.h linux-4.9.6/include/linux/interrupt.h +--- linux-4.9.6.orig/include/linux/interrupt.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/interrupt.h 2017-01-28 13:59:09.935656342 +0100 @@ -14,6 +14,7 @@ #include <linux/hrtimer.h> #include <linux/kref.h> @@ -7890,7 +6552,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); void (*release)(struct kref *ref); }; -@@ -398,9 +406,13 @@ +@@ -406,9 +414,13 @@ bool state); #ifdef CONFIG_IRQ_FORCED_THREADING @@ -7905,7 +6567,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux #endif #ifndef __ARCH_SET_SOFTIRQ_PENDING -@@ -457,9 +469,10 @@ +@@ -465,9 +477,10 @@ void (*action)(struct softirq_action *); }; @@ -7917,7 +6579,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux #ifdef __ARCH_HAS_DO_SOFTIRQ void do_softirq_own_stack(void); #else -@@ -468,13 +481,25 @@ +@@ -476,13 +489,25 @@ __do_softirq(); } #endif @@ -7943,7 +6605,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux DECLARE_PER_CPU(struct task_struct *, ksoftirqd); -@@ -496,8 +521,9 @@ +@@ -504,8 +529,9 @@ to be executed on some cpu at least once after this. * If the tasklet is already scheduled, but its execution is still not started, it will be executed only once. @@ -7955,7 +6617,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux * Tasklet is strictly serialized wrt itself, but not wrt another tasklets. If client needs some intertask synchronization, he makes it with spinlocks. -@@ -522,27 +548,36 @@ +@@ -530,27 +556,36 @@ enum { TASKLET_STATE_SCHED, /* Tasklet is scheduled for execution */ @@ -7998,7 +6660,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux #define tasklet_unlock_wait(t) do { } while (0) #define tasklet_unlock(t) do { } while (0) #endif -@@ -591,12 +626,7 @@ +@@ -599,12 +634,7 @@ smp_mb(); } @@ -8012,7 +6674,7 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux extern void tasklet_kill(struct tasklet_struct *t); extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); extern void tasklet_init(struct tasklet_struct *t, -@@ -627,6 +657,12 @@ +@@ -635,6 +665,12 @@ tasklet_kill(&ttimer->tasklet); } @@ -8025,10 +6687,10 @@ diff -Nur linux-4.8.15.orig/include/linux/interrupt.h linux-4.8.15/include/linux /* * Autoprobing for irqs: * -diff -Nur linux-4.8.15.orig/include/linux/irqdesc.h linux-4.8.15/include/linux/irqdesc.h ---- linux-4.8.15.orig/include/linux/irqdesc.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/irqdesc.h 2017-01-01 17:07:15.771410216 +0100 -@@ -64,6 +64,7 @@ +diff -Nur linux-4.9.6.orig/include/linux/irqdesc.h linux-4.9.6/include/linux/irqdesc.h +--- linux-4.9.6.orig/include/linux/irqdesc.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/irqdesc.h 2017-01-28 13:59:09.935656342 +0100 +@@ -66,6 +66,7 @@ unsigned int irqs_unhandled; atomic_t threads_handled; int threads_handled_last; @@ -8036,9 +6698,9 @@ diff -Nur linux-4.8.15.orig/include/linux/irqdesc.h linux-4.8.15/include/linux/i raw_spinlock_t lock; struct cpumask *percpu_enabled; const struct cpumask *percpu_affinity; -diff -Nur linux-4.8.15.orig/include/linux/irqflags.h linux-4.8.15/include/linux/irqflags.h ---- linux-4.8.15.orig/include/linux/irqflags.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/irqflags.h 2017-01-01 17:07:15.771410216 +0100 +diff -Nur linux-4.9.6.orig/include/linux/irqflags.h linux-4.9.6/include/linux/irqflags.h +--- linux-4.9.6.orig/include/linux/irqflags.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/irqflags.h 2017-01-28 13:59:09.935656342 +0100 @@ -25,8 +25,6 @@ # define trace_softirqs_enabled(p) ((p)->softirqs_enabled) # define trace_hardirq_enter() do { current->hardirq_context++; } while (0) @@ -8089,9 +6751,9 @@ diff -Nur linux-4.8.15.orig/include/linux/irqflags.h linux-4.8.15/include/linux/ +#endif + #endif -diff -Nur linux-4.8.15.orig/include/linux/irq.h linux-4.8.15/include/linux/irq.h ---- linux-4.8.15.orig/include/linux/irq.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/irq.h 2017-01-01 17:07:15.767409952 +0100 +diff -Nur linux-4.9.6.orig/include/linux/irq.h linux-4.9.6/include/linux/irq.h +--- linux-4.9.6.orig/include/linux/irq.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/irq.h 2017-01-28 13:59:09.935656342 +0100 @@ -72,6 +72,7 @@ * IRQ_IS_POLLED - Always polled by another interrupt. Exclude * it from the spurious interrupt detection @@ -8116,9 +6778,9 @@ diff -Nur linux-4.8.15.orig/include/linux/irq.h linux-4.8.15/include/linux/irq.h #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) -diff -Nur linux-4.8.15.orig/include/linux/irq_work.h linux-4.8.15/include/linux/irq_work.h ---- linux-4.8.15.orig/include/linux/irq_work.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/irq_work.h 2017-01-01 17:07:15.767409952 +0100 +diff -Nur linux-4.9.6.orig/include/linux/irq_work.h linux-4.9.6/include/linux/irq_work.h +--- linux-4.9.6.orig/include/linux/irq_work.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/irq_work.h 2017-01-28 13:59:09.935656342 +0100 @@ -16,6 +16,7 @@ #define IRQ_WORK_BUSY 2UL #define IRQ_WORK_FLAGS 3UL @@ -8138,9 +6800,9 @@ diff -Nur linux-4.8.15.orig/include/linux/irq_work.h linux-4.8.15/include/linux/ +#endif + #endif /* _LINUX_IRQ_WORK_H */ -diff -Nur linux-4.8.15.orig/include/linux/jbd2.h linux-4.8.15/include/linux/jbd2.h ---- linux-4.8.15.orig/include/linux/jbd2.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/jbd2.h 2017-01-01 17:07:15.775410464 +0100 +diff -Nur linux-4.9.6.orig/include/linux/jbd2.h linux-4.9.6/include/linux/jbd2.h +--- linux-4.9.6.orig/include/linux/jbd2.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/jbd2.h 2017-01-28 13:59:09.939656496 +0100 @@ -347,32 +347,56 @@ static inline void jbd_lock_bh_state(struct buffer_head *bh) @@ -8198,9 +6860,9 @@ diff -Nur linux-4.8.15.orig/include/linux/jbd2.h linux-4.8.15/include/linux/jbd2 } #define J_ASSERT(assert) BUG_ON(!(assert)) -diff -Nur linux-4.8.15.orig/include/linux/kdb.h linux-4.8.15/include/linux/kdb.h ---- linux-4.8.15.orig/include/linux/kdb.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/kdb.h 2017-01-01 17:07:15.775410464 +0100 +diff -Nur linux-4.9.6.orig/include/linux/kdb.h linux-4.9.6/include/linux/kdb.h +--- linux-4.9.6.orig/include/linux/kdb.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/kdb.h 2017-01-28 13:59:09.939656496 +0100 @@ -167,6 +167,7 @@ extern __printf(1, 2) int kdb_printf(const char *, ...); typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...); @@ -8217,9 +6879,9 @@ diff -Nur linux-4.8.15.orig/include/linux/kdb.h linux-4.8.15/include/linux/kdb.h static inline void kdb_init(int level) {} static inline int kdb_register(char *cmd, kdb_func_t func, char *usage, char *help, short minlen) { return 0; } -diff -Nur linux-4.8.15.orig/include/linux/kernel.h linux-4.8.15/include/linux/kernel.h ---- linux-4.8.15.orig/include/linux/kernel.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/kernel.h 2017-01-01 17:07:15.775410464 +0100 +diff -Nur linux-4.9.6.orig/include/linux/kernel.h linux-4.9.6/include/linux/kernel.h +--- linux-4.9.6.orig/include/linux/kernel.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/kernel.h 2017-01-28 13:59:09.939656496 +0100 @@ -194,6 +194,9 @@ */ # define might_sleep() \ @@ -8238,7 +6900,7 @@ diff -Nur linux-4.8.15.orig/include/linux/kernel.h linux-4.8.15/include/linux/ke # define sched_annotate_sleep() do { } while (0) #endif -@@ -491,6 +495,7 @@ +@@ -488,6 +492,7 @@ SYSTEM_HALT, SYSTEM_POWER_OFF, SYSTEM_RESTART, @@ -8246,64 +6908,9 @@ diff -Nur linux-4.8.15.orig/include/linux/kernel.h linux-4.8.15/include/linux/ke } system_state; #define TAINT_PROPRIETARY_MODULE 0 -diff -Nur linux-4.8.15.orig/include/linux/lglock.h linux-4.8.15/include/linux/lglock.h ---- linux-4.8.15.orig/include/linux/lglock.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/lglock.h 2017-01-01 17:07:15.779410723 +0100 -@@ -34,13 +34,30 @@ - #endif - - struct lglock { -+#ifdef CONFIG_PREEMPT_RT_FULL -+ struct rt_mutex __percpu *lock; -+#else - arch_spinlock_t __percpu *lock; -+#endif - #ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lock_class_key lock_key; - struct lockdep_map lock_dep_map; - #endif - }; - -+#ifdef CONFIG_PREEMPT_RT_FULL -+# define DEFINE_LGLOCK(name) \ -+ static DEFINE_PER_CPU(struct rt_mutex, name ## _lock) \ -+ = __RT_MUTEX_INITIALIZER( name ## _lock); \ -+ struct lglock name = { .lock = &name ## _lock } -+ -+# define DEFINE_STATIC_LGLOCK(name) \ -+ static DEFINE_PER_CPU(struct rt_mutex, name ## _lock) \ -+ = __RT_MUTEX_INITIALIZER( name ## _lock); \ -+ static struct lglock name = { .lock = &name ## _lock } -+ -+#else -+ - #define DEFINE_LGLOCK(name) \ - static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ - = __ARCH_SPIN_LOCK_UNLOCKED; \ -@@ -50,6 +67,7 @@ - static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ - = __ARCH_SPIN_LOCK_UNLOCKED; \ - static struct lglock name = { .lock = &name ## _lock } -+#endif - - void lg_lock_init(struct lglock *lg, char *name); - -@@ -64,6 +82,12 @@ - void lg_global_lock(struct lglock *lg); - void lg_global_unlock(struct lglock *lg); - -+#ifndef CONFIG_PREEMPT_RT_FULL -+#define lg_global_trylock_relax(name) lg_global_lock(name) -+#else -+void lg_global_trylock_relax(struct lglock *lg); -+#endif -+ - #else - /* When !CONFIG_SMP, map lglock to spinlock */ - #define lglock spinlock -diff -Nur linux-4.8.15.orig/include/linux/list_bl.h linux-4.8.15/include/linux/list_bl.h ---- linux-4.8.15.orig/include/linux/list_bl.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/list_bl.h 2017-01-01 17:07:15.779410723 +0100 +diff -Nur linux-4.9.6.orig/include/linux/list_bl.h linux-4.9.6/include/linux/list_bl.h +--- linux-4.9.6.orig/include/linux/list_bl.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/list_bl.h 2017-01-28 13:59:09.939656496 +0100 @@ -2,6 +2,7 @@ #define _LINUX_LIST_BL_H @@ -8366,9 +6973,9 @@ diff -Nur linux-4.8.15.orig/include/linux/list_bl.h linux-4.8.15/include/linux/l } static inline bool hlist_bl_is_locked(struct hlist_bl_head *b) -diff -Nur linux-4.8.15.orig/include/linux/locallock.h linux-4.8.15/include/linux/locallock.h ---- linux-4.8.15.orig/include/linux/locallock.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/locallock.h 2017-01-01 17:07:15.779410723 +0100 +diff -Nur linux-4.9.6.orig/include/linux/locallock.h linux-4.9.6/include/linux/locallock.h +--- linux-4.9.6.orig/include/linux/locallock.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/locallock.h 2017-01-28 13:59:09.939656496 +0100 @@ -0,0 +1,278 @@ +#ifndef _LINUX_LOCALLOCK_H +#define _LINUX_LOCALLOCK_H @@ -8648,9 +7255,9 @@ diff -Nur linux-4.8.15.orig/include/linux/locallock.h linux-4.8.15/include/linux +#endif + +#endif -diff -Nur linux-4.8.15.orig/include/linux/mm_types.h linux-4.8.15/include/linux/mm_types.h ---- linux-4.8.15.orig/include/linux/mm_types.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/mm_types.h 2017-01-01 17:07:15.791411498 +0100 +diff -Nur linux-4.9.6.orig/include/linux/mm_types.h linux-4.9.6/include/linux/mm_types.h +--- linux-4.9.6.orig/include/linux/mm_types.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/mm_types.h 2017-01-28 13:59:09.939656496 +0100 @@ -11,6 +11,7 @@ #include <linux/completion.h> #include <linux/cpumask.h> @@ -8659,7 +7266,7 @@ diff -Nur linux-4.8.15.orig/include/linux/mm_types.h linux-4.8.15/include/linux/ #include <linux/page-flags-layout.h> #include <linux/workqueue.h> #include <asm/page.h> -@@ -508,6 +509,9 @@ +@@ -509,6 +510,9 @@ bool tlb_flush_pending; #endif struct uprobes_state uprobes_state; @@ -8669,9 +7276,9 @@ diff -Nur linux-4.8.15.orig/include/linux/mm_types.h linux-4.8.15/include/linux/ #ifdef CONFIG_X86_INTEL_MPX /* address of the bounds directory */ void __user *bd_addr; -diff -Nur linux-4.8.15.orig/include/linux/mutex.h linux-4.8.15/include/linux/mutex.h ---- linux-4.8.15.orig/include/linux/mutex.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/mutex.h 2017-01-01 17:07:15.791411498 +0100 +diff -Nur linux-4.9.6.orig/include/linux/mutex.h linux-4.9.6/include/linux/mutex.h +--- linux-4.9.6.orig/include/linux/mutex.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/mutex.h 2017-01-28 13:59:09.939656496 +0100 @@ -19,6 +19,17 @@ #include <asm/processor.h> #include <linux/osq_lock.h> @@ -8713,9 +7320,9 @@ diff -Nur linux-4.8.15.orig/include/linux/mutex.h linux-4.8.15/include/linux/mut extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); #endif /* __LINUX_MUTEX_H */ -diff -Nur linux-4.8.15.orig/include/linux/mutex_rt.h linux-4.8.15/include/linux/mutex_rt.h ---- linux-4.8.15.orig/include/linux/mutex_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/mutex_rt.h 2017-01-01 17:07:15.791411498 +0100 +diff -Nur linux-4.9.6.orig/include/linux/mutex_rt.h linux-4.9.6/include/linux/mutex_rt.h +--- linux-4.9.6.orig/include/linux/mutex_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/mutex_rt.h 2017-01-28 13:59:09.939656496 +0100 @@ -0,0 +1,84 @@ +#ifndef __LINUX_MUTEX_RT_H +#define __LINUX_MUTEX_RT_H @@ -8801,10 +7408,10 @@ diff -Nur linux-4.8.15.orig/include/linux/mutex_rt.h linux-4.8.15/include/linux/ +} while (0) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/netdevice.h linux-4.8.15/include/linux/netdevice.h ---- linux-4.8.15.orig/include/linux/netdevice.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/netdevice.h 2017-01-01 17:07:15.807412535 +0100 -@@ -395,7 +395,19 @@ +diff -Nur linux-4.9.6.orig/include/linux/netdevice.h linux-4.9.6/include/linux/netdevice.h +--- linux-4.9.6.orig/include/linux/netdevice.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/netdevice.h 2017-01-28 13:59:09.939656496 +0100 +@@ -396,7 +396,19 @@ typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb); void __napi_schedule(struct napi_struct *n); @@ -8824,7 +7431,7 @@ diff -Nur linux-4.8.15.orig/include/linux/netdevice.h linux-4.8.15/include/linux static inline bool napi_disable_pending(struct napi_struct *n) { -@@ -2446,14 +2458,53 @@ +@@ -2461,14 +2473,53 @@ void synchronize_net(void); int init_dummy_netdev(struct net_device *dev); @@ -8879,7 +7486,7 @@ diff -Nur linux-4.8.15.orig/include/linux/netdevice.h linux-4.8.15/include/linux struct net_device *dev_get_by_index(struct net *net, int ifindex); struct net_device *__dev_get_by_index(struct net *net, int ifindex); struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); -@@ -2831,6 +2882,7 @@ +@@ -2851,6 +2902,7 @@ unsigned int dropped; struct sk_buff_head input_pkt_queue; struct napi_struct backlog; @@ -8887,9 +7494,9 @@ diff -Nur linux-4.8.15.orig/include/linux/netdevice.h linux-4.8.15/include/linux }; -diff -Nur linux-4.8.15.orig/include/linux/netfilter/x_tables.h linux-4.8.15/include/linux/netfilter/x_tables.h ---- linux-4.8.15.orig/include/linux/netfilter/x_tables.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/netfilter/x_tables.h 2017-01-01 17:07:15.815413044 +0100 +diff -Nur linux-4.9.6.orig/include/linux/netfilter/x_tables.h linux-4.9.6/include/linux/netfilter/x_tables.h +--- linux-4.9.6.orig/include/linux/netfilter/x_tables.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/netfilter/x_tables.h 2017-01-28 13:59:09.939656496 +0100 @@ -4,6 +4,7 @@ #include <linux/netdevice.h> @@ -8925,9 +7532,9 @@ diff -Nur linux-4.8.15.orig/include/linux/netfilter/x_tables.h linux-4.8.15/incl } /* -diff -Nur linux-4.8.15.orig/include/linux/nfs_fs.h linux-4.8.15/include/linux/nfs_fs.h ---- linux-4.8.15.orig/include/linux/nfs_fs.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/nfs_fs.h 2017-01-01 17:07:15.815413044 +0100 +diff -Nur linux-4.9.6.orig/include/linux/nfs_fs.h linux-4.9.6/include/linux/nfs_fs.h +--- linux-4.9.6.orig/include/linux/nfs_fs.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/nfs_fs.h 2017-01-28 13:59:09.939656496 +0100 @@ -165,7 +165,11 @@ /* Readers: in-flight sillydelete RPC calls */ @@ -8940,10 +7547,10 @@ diff -Nur linux-4.8.15.orig/include/linux/nfs_fs.h linux-4.8.15/include/linux/nf #if IS_ENABLED(CONFIG_NFS_V4) struct nfs4_cached_acl *nfs4_acl; -diff -Nur linux-4.8.15.orig/include/linux/nfs_xdr.h linux-4.8.15/include/linux/nfs_xdr.h ---- linux-4.8.15.orig/include/linux/nfs_xdr.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/nfs_xdr.h 2017-01-01 17:07:15.831414081 +0100 -@@ -1484,7 +1484,7 @@ +diff -Nur linux-4.9.6.orig/include/linux/nfs_xdr.h linux-4.9.6/include/linux/nfs_xdr.h +--- linux-4.9.6.orig/include/linux/nfs_xdr.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/nfs_xdr.h 2017-01-28 13:59:09.939656496 +0100 +@@ -1490,7 +1490,7 @@ struct nfs_removeargs args; struct nfs_removeres res; struct dentry *dentry; @@ -8952,9 +7559,9 @@ diff -Nur linux-4.8.15.orig/include/linux/nfs_xdr.h linux-4.8.15/include/linux/n struct rpc_cred *cred; struct nfs_fattr dir_attr; long timeout; -diff -Nur linux-4.8.15.orig/include/linux/notifier.h linux-4.8.15/include/linux/notifier.h ---- linux-4.8.15.orig/include/linux/notifier.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/notifier.h 2017-01-01 17:07:15.831414081 +0100 +diff -Nur linux-4.9.6.orig/include/linux/notifier.h linux-4.9.6/include/linux/notifier.h +--- linux-4.9.6.orig/include/linux/notifier.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/notifier.h 2017-01-28 13:59:09.939656496 +0100 @@ -6,7 +6,7 @@ * * Alan Cox <Alan.Cox@linux.org> @@ -9034,9 +7641,9 @@ diff -Nur linux-4.8.15.orig/include/linux/notifier.h linux-4.8.15/include/linux/ /* CPU notfiers are defined in include/linux/cpu.h. */ /* netdevice notifiers are defined in include/linux/netdevice.h */ -diff -Nur linux-4.8.15.orig/include/linux/percpu.h linux-4.8.15/include/linux/percpu.h ---- linux-4.8.15.orig/include/linux/percpu.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/percpu.h 2017-01-01 17:07:15.843414849 +0100 +diff -Nur linux-4.9.6.orig/include/linux/percpu.h linux-4.9.6/include/linux/percpu.h +--- linux-4.9.6.orig/include/linux/percpu.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/percpu.h 2017-01-28 13:59:09.939656496 +0100 @@ -18,6 +18,35 @@ #define PERCPU_MODULE_RESERVE 0 #endif @@ -9073,9 +7680,93 @@ diff -Nur linux-4.8.15.orig/include/linux/percpu.h linux-4.8.15/include/linux/pe /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) -diff -Nur linux-4.8.15.orig/include/linux/pid.h linux-4.8.15/include/linux/pid.h ---- linux-4.8.15.orig/include/linux/pid.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/pid.h 2017-01-01 17:07:15.843414849 +0100 +diff -Nur linux-4.9.6.orig/include/linux/percpu-rwsem.h linux-4.9.6/include/linux/percpu-rwsem.h +--- linux-4.9.6.orig/include/linux/percpu-rwsem.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/percpu-rwsem.h 2017-01-28 13:59:09.939656496 +0100 +@@ -4,7 +4,7 @@ + #include <linux/atomic.h> + #include <linux/rwsem.h> + #include <linux/percpu.h> +-#include <linux/wait.h> ++#include <linux/swait.h> + #include <linux/rcu_sync.h> + #include <linux/lockdep.h> + +@@ -12,7 +12,7 @@ + struct rcu_sync rss; + unsigned int __percpu *read_count; + struct rw_semaphore rw_sem; +- wait_queue_head_t writer; ++ struct swait_queue_head writer; + int readers_block; + }; + +@@ -22,13 +22,13 @@ + .rss = __RCU_SYNC_INITIALIZER(name.rss, RCU_SCHED_SYNC), \ + .read_count = &__percpu_rwsem_rc_##name, \ + .rw_sem = __RWSEM_INITIALIZER(name.rw_sem), \ +- .writer = __WAIT_QUEUE_HEAD_INITIALIZER(name.writer), \ ++ .writer = __SWAIT_QUEUE_HEAD_INITIALIZER(name.writer), \ + } + + extern int __percpu_down_read(struct percpu_rw_semaphore *, int); + extern void __percpu_up_read(struct percpu_rw_semaphore *); + +-static inline void percpu_down_read_preempt_disable(struct percpu_rw_semaphore *sem) ++static inline void percpu_down_read(struct percpu_rw_semaphore *sem) + { + might_sleep(); + +@@ -46,16 +46,10 @@ + __this_cpu_inc(*sem->read_count); + if (unlikely(!rcu_sync_is_idle(&sem->rss))) + __percpu_down_read(sem, false); /* Unconditional memory barrier */ +- barrier(); + /* +- * The barrier() prevents the compiler from ++ * The preempt_enable() prevents the compiler from + * bleeding the critical section out. + */ +-} +- +-static inline void percpu_down_read(struct percpu_rw_semaphore *sem) +-{ +- percpu_down_read_preempt_disable(sem); + preempt_enable(); + } + +@@ -82,13 +76,9 @@ + return ret; + } + +-static inline void percpu_up_read_preempt_enable(struct percpu_rw_semaphore *sem) ++static inline void percpu_up_read(struct percpu_rw_semaphore *sem) + { +- /* +- * The barrier() prevents the compiler from +- * bleeding the critical section out. +- */ +- barrier(); ++ preempt_disable(); + /* + * Same as in percpu_down_read(). + */ +@@ -101,12 +91,6 @@ + rwsem_release(&sem->rw_sem.dep_map, 1, _RET_IP_); + } + +-static inline void percpu_up_read(struct percpu_rw_semaphore *sem) +-{ +- preempt_disable(); +- percpu_up_read_preempt_enable(sem); +-} +- + extern void percpu_down_write(struct percpu_rw_semaphore *); + extern void percpu_up_write(struct percpu_rw_semaphore *); + +diff -Nur linux-4.9.6.orig/include/linux/pid.h linux-4.9.6/include/linux/pid.h +--- linux-4.9.6.orig/include/linux/pid.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/pid.h 2017-01-28 13:59:09.939656496 +0100 @@ -2,6 +2,7 @@ #define _LINUX_PID_H @@ -9084,9 +7775,9 @@ diff -Nur linux-4.8.15.orig/include/linux/pid.h linux-4.8.15/include/linux/pid.h enum pid_type { -diff -Nur linux-4.8.15.orig/include/linux/preempt.h linux-4.8.15/include/linux/preempt.h ---- linux-4.8.15.orig/include/linux/preempt.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/preempt.h 2017-01-01 17:07:15.851415364 +0100 +diff -Nur linux-4.9.6.orig/include/linux/preempt.h linux-4.9.6/include/linux/preempt.h +--- linux-4.9.6.orig/include/linux/preempt.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/preempt.h 2017-01-28 13:59:09.939656496 +0100 @@ -50,7 +50,11 @@ #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) #define NMI_OFFSET (1UL << NMI_SHIFT) @@ -9240,10 +7931,10 @@ diff -Nur linux-4.8.15.orig/include/linux/preempt.h linux-4.8.15/include/linux/p #ifdef CONFIG_PREEMPT_NOTIFIERS struct preempt_notifier; -diff -Nur linux-4.8.15.orig/include/linux/printk.h linux-4.8.15/include/linux/printk.h ---- linux-4.8.15.orig/include/linux/printk.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/printk.h 2017-01-01 17:07:15.855415618 +0100 -@@ -125,9 +125,11 @@ +diff -Nur linux-4.9.6.orig/include/linux/printk.h linux-4.9.6/include/linux/printk.h +--- linux-4.9.6.orig/include/linux/printk.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/printk.h 2017-01-28 13:59:09.939656496 +0100 +@@ -126,9 +126,11 @@ #ifdef CONFIG_EARLY_PRINTK extern asmlinkage __printf(1, 2) void early_printk(const char *fmt, ...); @@ -9255,9 +7946,9 @@ diff -Nur linux-4.8.15.orig/include/linux/printk.h linux-4.8.15/include/linux/pr #endif #ifdef CONFIG_PRINTK_NMI -diff -Nur linux-4.8.15.orig/include/linux/radix-tree.h linux-4.8.15/include/linux/radix-tree.h ---- linux-4.8.15.orig/include/linux/radix-tree.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/radix-tree.h 2017-01-01 17:07:15.859415876 +0100 +diff -Nur linux-4.9.6.orig/include/linux/radix-tree.h linux-4.9.6/include/linux/radix-tree.h +--- linux-4.9.6.orig/include/linux/radix-tree.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/radix-tree.h 2017-01-28 13:59:09.939656496 +0100 @@ -289,9 +289,19 @@ unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root, void ***results, unsigned long *indices, @@ -9287,21 +7978,21 @@ diff -Nur linux-4.8.15.orig/include/linux/radix-tree.h linux-4.8.15/include/linu } /** -diff -Nur linux-4.8.15.orig/include/linux/random.h linux-4.8.15/include/linux/random.h ---- linux-4.8.15.orig/include/linux/random.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/random.h 2017-01-01 17:07:15.859415876 +0100 -@@ -20,7 +20,7 @@ - extern void add_device_randomness(const void *, unsigned int); +diff -Nur linux-4.9.6.orig/include/linux/random.h linux-4.9.6/include/linux/random.h +--- linux-4.9.6.orig/include/linux/random.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/random.h 2017-01-28 13:59:09.943656649 +0100 +@@ -31,7 +31,7 @@ + extern void add_input_randomness(unsigned int type, unsigned int code, - unsigned int value); --extern void add_interrupt_randomness(int irq, int irq_flags); -+extern void add_interrupt_randomness(int irq, int irq_flags, __u64 ip); + unsigned int value) __latent_entropy; +-extern void add_interrupt_randomness(int irq, int irq_flags) __latent_entropy; ++extern void add_interrupt_randomness(int irq, int irq_flags, __u64 ip) __latent_entropy; extern void get_random_bytes(void *buf, int nbytes); extern int add_random_ready_callback(struct random_ready_callback *rdy); -diff -Nur linux-4.8.15.orig/include/linux/rbtree_augmented.h linux-4.8.15/include/linux/rbtree_augmented.h ---- linux-4.8.15.orig/include/linux/rbtree_augmented.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rbtree_augmented.h 2017-01-01 17:07:15.859415876 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rbtree_augmented.h linux-4.9.6/include/linux/rbtree_augmented.h +--- linux-4.9.6.orig/include/linux/rbtree_augmented.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rbtree_augmented.h 2017-01-28 13:59:09.943656649 +0100 @@ -26,6 +26,7 @@ #include <linux/compiler.h> @@ -9310,9 +8001,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rbtree_augmented.h linux-4.8.15/includ /* * Please note - only struct rb_augment_callbacks and the prototypes for -diff -Nur linux-4.8.15.orig/include/linux/rbtree.h linux-4.8.15/include/linux/rbtree.h ---- linux-4.8.15.orig/include/linux/rbtree.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rbtree.h 2017-01-01 17:07:15.859415876 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rbtree.h linux-4.9.6/include/linux/rbtree.h +--- linux-4.9.6.orig/include/linux/rbtree.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rbtree.h 2017-01-28 13:59:09.943656649 +0100 @@ -31,7 +31,7 @@ #include <linux/kernel.h> @@ -9322,9 +8013,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rbtree.h linux-4.8.15/include/linux/rb struct rb_node { unsigned long __rb_parent_color; -diff -Nur linux-4.8.15.orig/include/linux/rcu_assign_pointer.h linux-4.8.15/include/linux/rcu_assign_pointer.h ---- linux-4.8.15.orig/include/linux/rcu_assign_pointer.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/rcu_assign_pointer.h 2017-01-01 17:07:15.859415876 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rcu_assign_pointer.h linux-4.9.6/include/linux/rcu_assign_pointer.h +--- linux-4.9.6.orig/include/linux/rcu_assign_pointer.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/rcu_assign_pointer.h 2017-01-28 13:59:09.943656649 +0100 @@ -0,0 +1,54 @@ +#ifndef __LINUX_RCU_ASSIGN_POINTER_H__ +#define __LINUX_RCU_ASSIGN_POINTER_H__ @@ -9380,9 +8071,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rcu_assign_pointer.h linux-4.8.15/incl +}) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/rcupdate.h ---- linux-4.8.15.orig/include/linux/rcupdate.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rcupdate.h 2017-01-01 17:07:15.867416395 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rcupdate.h linux-4.9.6/include/linux/rcupdate.h +--- linux-4.9.6.orig/include/linux/rcupdate.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rcupdate.h 2017-01-28 13:59:09.943656649 +0100 @@ -46,6 +46,7 @@ #include <linux/compiler.h> #include <linux/ktime.h> @@ -9430,7 +8121,7 @@ diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/ #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ /* Internal to kernel */ -@@ -500,7 +512,14 @@ +@@ -505,7 +517,14 @@ int debug_lockdep_rcu_enabled(void); int rcu_read_lock_held(void); @@ -9445,7 +8136,7 @@ diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/ /** * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? -@@ -621,54 +640,6 @@ +@@ -626,54 +645,6 @@ }) /** @@ -9500,7 +8191,7 @@ diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/ * rcu_access_pointer() - fetch RCU pointer with no dereferencing * @p: The pointer to read * -@@ -946,10 +917,14 @@ +@@ -951,10 +922,14 @@ static inline void rcu_read_lock_bh(void) { local_bh_disable(); @@ -9515,7 +8206,7 @@ diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/ } /* -@@ -959,10 +934,14 @@ +@@ -964,10 +939,14 @@ */ static inline void rcu_read_unlock_bh(void) { @@ -9530,9 +8221,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rcupdate.h linux-4.8.15/include/linux/ local_bh_enable(); } -diff -Nur linux-4.8.15.orig/include/linux/rcutree.h linux-4.8.15/include/linux/rcutree.h ---- linux-4.8.15.orig/include/linux/rcutree.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rcutree.h 2017-01-01 17:07:15.867416395 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rcutree.h linux-4.9.6/include/linux/rcutree.h +--- linux-4.9.6.orig/include/linux/rcutree.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rcutree.h 2017-01-28 13:59:09.943656649 +0100 @@ -44,7 +44,11 @@ rcu_note_context_switch(); } @@ -9592,9 +8283,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rcutree.h linux-4.8.15/include/linux/r void rcu_all_qs(void); /* RCUtree hotplug events */ -diff -Nur linux-4.8.15.orig/include/linux/rtmutex.h linux-4.8.15/include/linux/rtmutex.h ---- linux-4.8.15.orig/include/linux/rtmutex.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rtmutex.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rtmutex.h linux-4.9.6/include/linux/rtmutex.h +--- linux-4.9.6.orig/include/linux/rtmutex.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rtmutex.h 2017-01-28 13:59:09.943656649 +0100 @@ -13,11 +13,15 @@ #define __LINUX_RT_MUTEX_H @@ -9669,9 +8360,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rtmutex.h linux-4.8.15/include/linux/r extern int rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout); -diff -Nur linux-4.8.15.orig/include/linux/rwlock_rt.h linux-4.8.15/include/linux/rwlock_rt.h ---- linux-4.8.15.orig/include/linux/rwlock_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/rwlock_rt.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rwlock_rt.h linux-4.9.6/include/linux/rwlock_rt.h +--- linux-4.9.6.orig/include/linux/rwlock_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/rwlock_rt.h 2017-01-28 13:59:09.943656649 +0100 @@ -0,0 +1,99 @@ +#ifndef __LINUX_RWLOCK_RT_H +#define __LINUX_RWLOCK_RT_H @@ -9772,9 +8463,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rwlock_rt.h linux-4.8.15/include/linux + } while (0) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/rwlock_types.h linux-4.8.15/include/linux/rwlock_types.h ---- linux-4.8.15.orig/include/linux/rwlock_types.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rwlock_types.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rwlock_types.h linux-4.9.6/include/linux/rwlock_types.h +--- linux-4.9.6.orig/include/linux/rwlock_types.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rwlock_types.h 2017-01-28 13:59:09.943656649 +0100 @@ -1,6 +1,10 @@ #ifndef __LINUX_RWLOCK_TYPES_H #define __LINUX_RWLOCK_TYPES_H @@ -9786,9 +8477,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rwlock_types.h linux-4.8.15/include/li /* * include/linux/rwlock_types.h - generic rwlock type definitions * and initializers -diff -Nur linux-4.8.15.orig/include/linux/rwlock_types_rt.h linux-4.8.15/include/linux/rwlock_types_rt.h ---- linux-4.8.15.orig/include/linux/rwlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/rwlock_types_rt.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rwlock_types_rt.h linux-4.9.6/include/linux/rwlock_types_rt.h +--- linux-4.9.6.orig/include/linux/rwlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/rwlock_types_rt.h 2017-01-28 13:59:09.943656649 +0100 @@ -0,0 +1,33 @@ +#ifndef __LINUX_RWLOCK_TYPES_RT_H +#define __LINUX_RWLOCK_TYPES_RT_H @@ -9823,9 +8514,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rwlock_types_rt.h linux-4.8.15/include + rwlock_t name = __RW_LOCK_UNLOCKED(name) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/rwsem.h linux-4.8.15/include/linux/rwsem.h ---- linux-4.8.15.orig/include/linux/rwsem.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/rwsem.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rwsem.h linux-4.9.6/include/linux/rwsem.h +--- linux-4.9.6.orig/include/linux/rwsem.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/rwsem.h 2017-01-28 13:59:09.943656649 +0100 @@ -19,6 +19,10 @@ #include <linux/osq_lock.h> #endif @@ -9844,9 +8535,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rwsem.h linux-4.8.15/include/linux/rws +#endif /* !PREEMPT_RT_FULL */ + #endif /* _LINUX_RWSEM_H */ -diff -Nur linux-4.8.15.orig/include/linux/rwsem_rt.h linux-4.8.15/include/linux/rwsem_rt.h ---- linux-4.8.15.orig/include/linux/rwsem_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/rwsem_rt.h 2017-01-01 17:07:15.875416916 +0100 +diff -Nur linux-4.9.6.orig/include/linux/rwsem_rt.h linux-4.9.6/include/linux/rwsem_rt.h +--- linux-4.9.6.orig/include/linux/rwsem_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/rwsem_rt.h 2017-01-28 13:59:09.943656649 +0100 @@ -0,0 +1,167 @@ +#ifndef _LINUX_RWSEM_RT_H +#define _LINUX_RWSEM_RT_H @@ -10015,9 +8706,9 @@ diff -Nur linux-4.8.15.orig/include/linux/rwsem_rt.h linux-4.8.15/include/linux/ +} +#endif +#endif -diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sched.h ---- linux-4.8.15.orig/include/linux/sched.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/sched.h 2017-01-01 17:07:15.887417685 +0100 +diff -Nur linux-4.9.6.orig/include/linux/sched.h linux-4.9.6/include/linux/sched.h +--- linux-4.9.6.orig/include/linux/sched.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/sched.h 2017-01-28 13:59:09.943656649 +0100 @@ -26,6 +26,7 @@ #include <linux/nodemask.h> #include <linux/mm_types.h> @@ -10049,7 +8740,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch /* Task command name length */ #define TASK_COMM_LEN 16 -@@ -1009,8 +1012,18 @@ +@@ -1013,8 +1016,18 @@ struct wake_q_head name = { WAKE_Q_TAIL, &name.first } extern void wake_q_add(struct wake_q_head *head, @@ -10070,15 +8761,15 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch /* * sched-domains (multiprocessor balancing) declarations: -@@ -1459,6 +1472,7 @@ - - struct task_struct { +@@ -1481,6 +1494,7 @@ + struct thread_info thread_info; + #endif volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ -+ volatile long saved_state; /* saved state for "spinlock sleepers" */ ++ volatile long saved_state; /* saved state for "spinlock sleepers" */ void *stack; atomic_t usage; unsigned int flags; /* per process flags, defined below */ -@@ -1495,6 +1509,12 @@ +@@ -1520,6 +1534,12 @@ #endif unsigned int policy; @@ -10091,7 +8782,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch int nr_cpus_allowed; cpumask_t cpus_allowed; -@@ -1629,6 +1649,9 @@ +@@ -1654,6 +1674,9 @@ struct task_cputime cputime_expires; struct list_head cpu_timers[3]; @@ -10100,8 +8791,8 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch +#endif /* process credentials */ - const struct cred __rcu *real_cred; /* objective and real subjective task -@@ -1659,10 +1682,15 @@ + const struct cred __rcu *ptracer_cred; /* Tracer's credentials at attach */ +@@ -1685,10 +1708,15 @@ /* signal handlers */ struct signal_struct *signal; struct sighand_struct *sighand; @@ -10117,7 +8808,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch unsigned long sas_ss_sp; size_t sas_ss_size; -@@ -1891,6 +1919,12 @@ +@@ -1917,6 +1945,12 @@ /* bitmask and counter of trace recursion */ unsigned long trace_recursion; #endif /* CONFIG_TRACING */ @@ -10130,7 +8821,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch #ifdef CONFIG_KCOV /* Coverage collection mode enabled for this task (0 if disabled). */ enum kcov_mode kcov_mode; -@@ -1916,9 +1950,23 @@ +@@ -1942,9 +1976,23 @@ unsigned int sequential_io; unsigned int sequential_io_avg; #endif @@ -10154,8 +8845,8 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch int pagefault_disabled; #ifdef CONFIG_MMU struct task_struct *oom_reaper_list; -@@ -1939,14 +1987,6 @@ - # define arch_task_struct_size (sizeof(struct task_struct)) +@@ -1984,14 +2032,6 @@ + } #endif -/* Future-safe accessor for struct task_struct's cpus_allowed. */ @@ -10169,7 +8860,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch #define TNF_MIGRATED 0x01 #define TNF_NO_GROUP 0x02 #define TNF_SHARED 0x04 -@@ -2162,6 +2202,15 @@ +@@ -2207,6 +2247,15 @@ extern void free_task(struct task_struct *tsk); #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) @@ -10185,7 +8876,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch extern void __put_task_struct(struct task_struct *t); static inline void put_task_struct(struct task_struct *t) -@@ -2169,6 +2218,7 @@ +@@ -2214,6 +2263,7 @@ if (atomic_dec_and_test(&t->usage)) __put_task_struct(t); } @@ -10193,7 +8884,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch struct task_struct *task_rcu_dereference(struct task_struct **ptask); struct task_struct *try_get_task_struct(struct task_struct **ptask); -@@ -2210,6 +2260,7 @@ +@@ -2255,6 +2305,7 @@ /* * Per process flags */ @@ -10201,7 +8892,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch #define PF_EXITING 0x00000004 /* getting shut down */ #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ -@@ -2378,6 +2429,10 @@ +@@ -2423,6 +2474,10 @@ extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask); @@ -10212,7 +8903,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch #else static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) -@@ -2390,6 +2445,9 @@ +@@ -2435,6 +2490,9 @@ return -EINVAL; return 0; } @@ -10222,7 +8913,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch #endif #ifdef CONFIG_NO_HZ_COMMON -@@ -2624,6 +2682,7 @@ +@@ -2673,6 +2731,7 @@ extern int wake_up_state(struct task_struct *tsk, unsigned int state); extern int wake_up_process(struct task_struct *tsk); @@ -10230,7 +8921,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch extern void wake_up_new_task(struct task_struct *tsk); #ifdef CONFIG_SMP extern void kick_process(struct task_struct *tsk); -@@ -2832,6 +2891,17 @@ +@@ -2881,6 +2940,17 @@ __mmdrop(mm); } @@ -10245,10 +8936,10 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch +# define mmdrop_delayed(mm) mmdrop(mm) +#endif + - static inline bool mmget_not_zero(struct mm_struct *mm) + static inline void mmdrop_async_fn(struct work_struct *work) { - return atomic_inc_not_zero(&mm->mm_users); -@@ -3168,6 +3238,43 @@ + struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work); +@@ -3273,6 +3343,43 @@ return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } @@ -10292,7 +8983,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch static inline int restart_syscall(void) { set_tsk_thread_flag(current, TIF_SIGPENDING); -@@ -3199,6 +3306,51 @@ +@@ -3304,6 +3411,51 @@ return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); } @@ -10344,7 +9035,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch /* * cond_resched() and cond_resched_lock(): latency reduction via * explicit rescheduling in places that are safe. The return -@@ -3220,12 +3372,16 @@ +@@ -3329,12 +3481,16 @@ __cond_resched_lock(lock); \ }) @@ -10361,7 +9052,7 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch static inline void cond_resched_rcu(void) { -@@ -3387,6 +3543,31 @@ +@@ -3509,6 +3665,31 @@ #endif /* CONFIG_SMP */ @@ -10393,9 +9084,9 @@ diff -Nur linux-4.8.15.orig/include/linux/sched.h linux-4.8.15/include/linux/sch extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); extern long sched_getaffinity(pid_t pid, struct cpumask *mask); -diff -Nur linux-4.8.15.orig/include/linux/seqlock.h linux-4.8.15/include/linux/seqlock.h ---- linux-4.8.15.orig/include/linux/seqlock.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/seqlock.h 2017-01-01 17:07:15.899418461 +0100 +diff -Nur linux-4.9.6.orig/include/linux/seqlock.h linux-4.9.6/include/linux/seqlock.h +--- linux-4.9.6.orig/include/linux/seqlock.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/seqlock.h 2017-01-28 13:59:09.943656649 +0100 @@ -220,20 +220,30 @@ return __read_seqcount_retry(s, start); } @@ -10534,9 +9225,9 @@ diff -Nur linux-4.8.15.orig/include/linux/seqlock.h linux-4.8.15/include/linux/s spin_unlock_irqrestore(&sl->lock, flags); } -diff -Nur linux-4.8.15.orig/include/linux/signal.h linux-4.8.15/include/linux/signal.h ---- linux-4.8.15.orig/include/linux/signal.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/signal.h 2017-01-01 17:07:15.899418461 +0100 +diff -Nur linux-4.9.6.orig/include/linux/signal.h linux-4.9.6/include/linux/signal.h +--- linux-4.9.6.orig/include/linux/signal.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/signal.h 2017-01-28 13:59:09.947656802 +0100 @@ -233,6 +233,7 @@ } @@ -10545,9 +9236,9 @@ diff -Nur linux-4.8.15.orig/include/linux/signal.h linux-4.8.15/include/linux/si /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ static inline int valid_signal(unsigned long sig) -diff -Nur linux-4.8.15.orig/include/linux/skbuff.h linux-4.8.15/include/linux/skbuff.h ---- linux-4.8.15.orig/include/linux/skbuff.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/skbuff.h 2017-01-01 17:07:15.915419486 +0100 +diff -Nur linux-4.9.6.orig/include/linux/skbuff.h linux-4.9.6/include/linux/skbuff.h +--- linux-4.9.6.orig/include/linux/skbuff.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/skbuff.h 2017-01-28 13:59:09.947656802 +0100 @@ -284,6 +284,7 @@ __u32 qlen; @@ -10556,7 +9247,7 @@ diff -Nur linux-4.8.15.orig/include/linux/skbuff.h linux-4.8.15/include/linux/sk }; struct sk_buff; -@@ -1565,6 +1566,12 @@ +@@ -1573,6 +1574,12 @@ __skb_queue_head_init(list); } @@ -10569,9 +9260,9 @@ diff -Nur linux-4.8.15.orig/include/linux/skbuff.h linux-4.8.15/include/linux/sk static inline void skb_queue_head_init_class(struct sk_buff_head *list, struct lock_class_key *class) { -diff -Nur linux-4.8.15.orig/include/linux/smp.h linux-4.8.15/include/linux/smp.h ---- linux-4.8.15.orig/include/linux/smp.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/smp.h 2017-01-01 17:07:15.915419486 +0100 +diff -Nur linux-4.9.6.orig/include/linux/smp.h linux-4.9.6/include/linux/smp.h +--- linux-4.9.6.orig/include/linux/smp.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/smp.h 2017-01-28 13:59:09.947656802 +0100 @@ -185,6 +185,9 @@ #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) #define put_cpu() preempt_enable() @@ -10582,9 +9273,9 @@ diff -Nur linux-4.8.15.orig/include/linux/smp.h linux-4.8.15/include/linux/smp.h /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: -diff -Nur linux-4.8.15.orig/include/linux/spinlock_api_smp.h linux-4.8.15/include/linux/spinlock_api_smp.h ---- linux-4.8.15.orig/include/linux/spinlock_api_smp.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_api_smp.h 2017-01-01 17:07:15.919419743 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock_api_smp.h linux-4.9.6/include/linux/spinlock_api_smp.h +--- linux-4.9.6.orig/include/linux/spinlock_api_smp.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_api_smp.h 2017-01-28 13:59:09.947656802 +0100 @@ -189,6 +189,8 @@ return 0; } @@ -10595,9 +9286,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_api_smp.h linux-4.8.15/includ +#endif #endif /* __LINUX_SPINLOCK_API_SMP_H */ -diff -Nur linux-4.8.15.orig/include/linux/spinlock.h linux-4.8.15/include/linux/spinlock.h ---- linux-4.8.15.orig/include/linux/spinlock.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock.h 2017-01-01 17:07:15.919419743 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock.h linux-4.9.6/include/linux/spinlock.h +--- linux-4.9.6.orig/include/linux/spinlock.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock.h 2017-01-28 13:59:09.947656802 +0100 @@ -271,7 +271,11 @@ #define raw_spin_can_lock(lock) (!raw_spin_is_locked(lock)) @@ -10642,10 +9333,10 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock.h linux-4.8.15/include/linux/ +#endif /* !PREEMPT_RT_FULL */ + #endif /* __LINUX_SPINLOCK_H */ -diff -Nur linux-4.8.15.orig/include/linux/spinlock_rt.h linux-4.8.15/include/linux/spinlock_rt.h ---- linux-4.8.15.orig/include/linux/spinlock_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_rt.h 2017-01-01 17:07:15.923420007 +0100 -@@ -0,0 +1,165 @@ +diff -Nur linux-4.9.6.orig/include/linux/spinlock_rt.h linux-4.9.6/include/linux/spinlock_rt.h +--- linux-4.9.6.orig/include/linux/spinlock_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_rt.h 2017-01-28 13:59:09.947656802 +0100 +@@ -0,0 +1,164 @@ +#ifndef __LINUX_SPINLOCK_RT_H +#define __LINUX_SPINLOCK_RT_H + @@ -10688,7 +9379,6 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_rt.h linux-4.8.15/include/lin +extern void __lockfunc __rt_spin_lock__no_mg(struct rt_mutex *lock); +extern void __lockfunc __rt_spin_lock(struct rt_mutex *lock); +extern void __lockfunc __rt_spin_unlock(struct rt_mutex *lock); -+extern int __lockfunc __rt_spin_trylock(struct rt_mutex *lock); + +#define spin_lock(lock) rt_spin_lock(lock) + @@ -10811,9 +9501,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_rt.h linux-4.8.15/include/lin + atomic_dec_and_spin_lock(atomic, lock) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/spinlock_types.h linux-4.8.15/include/linux/spinlock_types.h ---- linux-4.8.15.orig/include/linux/spinlock_types.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_types.h 2017-01-01 17:07:15.923420007 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock_types.h linux-4.9.6/include/linux/spinlock_types.h +--- linux-4.9.6.orig/include/linux/spinlock_types.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_types.h 2017-01-28 13:59:09.947656802 +0100 @@ -9,80 +9,15 @@ * Released under the General Public License (GPL). */ @@ -10902,9 +9592,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_types.h linux-4.8.15/include/ -#include <linux/rwlock_types.h> - #endif /* __LINUX_SPINLOCK_TYPES_H */ -diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_nort.h linux-4.8.15/include/linux/spinlock_types_nort.h ---- linux-4.8.15.orig/include/linux/spinlock_types_nort.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_types_nort.h 2017-01-01 17:07:15.923420007 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_nort.h linux-4.9.6/include/linux/spinlock_types_nort.h +--- linux-4.9.6.orig/include/linux/spinlock_types_nort.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_types_nort.h 2017-01-28 13:59:09.947656802 +0100 @@ -0,0 +1,33 @@ +#ifndef __LINUX_SPINLOCK_TYPES_NORT_H +#define __LINUX_SPINLOCK_TYPES_NORT_H @@ -10939,9 +9629,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_nort.h linux-4.8.15/inc +#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_raw.h linux-4.8.15/include/linux/spinlock_types_raw.h ---- linux-4.8.15.orig/include/linux/spinlock_types_raw.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_types_raw.h 2017-01-01 17:07:15.923420007 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_raw.h linux-4.9.6/include/linux/spinlock_types_raw.h +--- linux-4.9.6.orig/include/linux/spinlock_types_raw.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_types_raw.h 2017-01-28 13:59:09.947656802 +0100 @@ -0,0 +1,56 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RAW_H +#define __LINUX_SPINLOCK_TYPES_RAW_H @@ -10999,9 +9689,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_raw.h linux-4.8.15/incl +#define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_rt.h linux-4.8.15/include/linux/spinlock_types_rt.h ---- linux-4.8.15.orig/include/linux/spinlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/spinlock_types_rt.h 2017-01-01 17:07:15.923420007 +0100 +diff -Nur linux-4.9.6.orig/include/linux/spinlock_types_rt.h linux-4.9.6/include/linux/spinlock_types_rt.h +--- linux-4.9.6.orig/include/linux/spinlock_types_rt.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/spinlock_types_rt.h 2017-01-28 13:59:09.947656802 +0100 @@ -0,0 +1,48 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RT_H +#define __LINUX_SPINLOCK_TYPES_RT_H @@ -11051,9 +9741,9 @@ diff -Nur linux-4.8.15.orig/include/linux/spinlock_types_rt.h linux-4.8.15/inclu + spinlock_t name = __SPIN_LOCK_UNLOCKED(name) + +#endif -diff -Nur linux-4.8.15.orig/include/linux/srcu.h linux-4.8.15/include/linux/srcu.h ---- linux-4.8.15.orig/include/linux/srcu.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/srcu.h 2017-01-01 17:07:15.923420007 +0100 +diff -Nur linux-4.9.6.orig/include/linux/srcu.h linux-4.9.6/include/linux/srcu.h +--- linux-4.9.6.orig/include/linux/srcu.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/srcu.h 2017-01-28 13:59:09.947656802 +0100 @@ -84,10 +84,10 @@ void process_srcu(struct work_struct *work); @@ -11076,9 +9766,9 @@ diff -Nur linux-4.8.15.orig/include/linux/srcu.h linux-4.8.15/include/linux/srcu #define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */) #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static) -diff -Nur linux-4.8.15.orig/include/linux/suspend.h linux-4.8.15/include/linux/suspend.h ---- linux-4.8.15.orig/include/linux/suspend.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/suspend.h 2017-01-01 17:07:15.927420258 +0100 +diff -Nur linux-4.9.6.orig/include/linux/suspend.h linux-4.9.6/include/linux/suspend.h +--- linux-4.9.6.orig/include/linux/suspend.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/suspend.h 2017-01-28 13:59:09.947656802 +0100 @@ -193,6 +193,12 @@ void (*end)(void); }; @@ -11092,9 +9782,9 @@ diff -Nur linux-4.8.15.orig/include/linux/suspend.h linux-4.8.15/include/linux/s #ifdef CONFIG_SUSPEND /** * suspend_set_ops - set platform dependent suspend operations -diff -Nur linux-4.8.15.orig/include/linux/swait.h linux-4.8.15/include/linux/swait.h ---- linux-4.8.15.orig/include/linux/swait.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/swait.h 2017-01-01 17:07:15.931420510 +0100 +diff -Nur linux-4.9.6.orig/include/linux/swait.h linux-4.9.6/include/linux/swait.h +--- linux-4.9.6.orig/include/linux/swait.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/swait.h 2017-01-28 13:59:09.947656802 +0100 @@ -87,6 +87,7 @@ extern void swake_up(struct swait_queue_head *q); extern void swake_up_all(struct swait_queue_head *q); @@ -11103,9 +9793,9 @@ diff -Nur linux-4.8.15.orig/include/linux/swait.h linux-4.8.15/include/linux/swa extern void __prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait); extern void prepare_to_swait(struct swait_queue_head *q, struct swait_queue *wait, int state); -diff -Nur linux-4.8.15.orig/include/linux/swap.h linux-4.8.15/include/linux/swap.h ---- linux-4.8.15.orig/include/linux/swap.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/swap.h 2017-01-01 17:07:15.931420510 +0100 +diff -Nur linux-4.9.6.orig/include/linux/swap.h linux-4.9.6/include/linux/swap.h +--- linux-4.9.6.orig/include/linux/swap.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/swap.h 2017-01-28 13:59:09.947656802 +0100 @@ -11,6 +11,7 @@ #include <linux/fs.h> #include <linux/atomic.h> @@ -11114,7 +9804,7 @@ diff -Nur linux-4.8.15.orig/include/linux/swap.h linux-4.8.15/include/linux/swap #include <asm/page.h> struct notifier_block; -@@ -243,7 +244,8 @@ +@@ -247,7 +248,8 @@ void *workingset_eviction(struct address_space *mapping, struct page *page); bool workingset_refault(void *shadow); void workingset_activation(struct page *page); @@ -11124,7 +9814,7 @@ diff -Nur linux-4.8.15.orig/include/linux/swap.h linux-4.8.15/include/linux/swap static inline unsigned int workingset_node_pages(struct radix_tree_node *node) { -@@ -288,6 +290,7 @@ +@@ -292,6 +294,7 @@ /* linux/mm/swap.c */ @@ -11132,9 +9822,9 @@ diff -Nur linux-4.8.15.orig/include/linux/swap.h linux-4.8.15/include/linux/swap extern void lru_cache_add(struct page *); extern void lru_cache_add_anon(struct page *page); extern void lru_cache_add_file(struct page *page); -diff -Nur linux-4.8.15.orig/include/linux/swork.h linux-4.8.15/include/linux/swork.h ---- linux-4.8.15.orig/include/linux/swork.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/linux/swork.h 2017-01-01 17:07:15.931420510 +0100 +diff -Nur linux-4.9.6.orig/include/linux/swork.h linux-4.9.6/include/linux/swork.h +--- linux-4.9.6.orig/include/linux/swork.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/linux/swork.h 2017-01-28 13:59:09.947656802 +0100 @@ -0,0 +1,24 @@ +#ifndef _LINUX_SWORK_H +#define _LINUX_SWORK_H @@ -11160,10 +9850,10 @@ diff -Nur linux-4.8.15.orig/include/linux/swork.h linux-4.8.15/include/linux/swo +void swork_put(void); + +#endif /* _LINUX_SWORK_H */ -diff -Nur linux-4.8.15.orig/include/linux/thread_info.h linux-4.8.15/include/linux/thread_info.h ---- linux-4.8.15.orig/include/linux/thread_info.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/thread_info.h 2017-01-01 17:07:15.931420510 +0100 -@@ -103,7 +103,17 @@ +diff -Nur linux-4.9.6.orig/include/linux/thread_info.h linux-4.9.6/include/linux/thread_info.h +--- linux-4.9.6.orig/include/linux/thread_info.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/thread_info.h 2017-01-28 13:59:09.947656802 +0100 +@@ -107,7 +107,17 @@ #define test_thread_flag(flag) \ test_ti_thread_flag(current_thread_info(), flag) @@ -11182,9 +9872,9 @@ diff -Nur linux-4.8.15.orig/include/linux/thread_info.h linux-4.8.15/include/lin #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES static inline int arch_within_stack_frames(const void * const stack, -diff -Nur linux-4.8.15.orig/include/linux/timer.h linux-4.8.15/include/linux/timer.h ---- linux-4.8.15.orig/include/linux/timer.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/timer.h 2017-01-01 17:07:15.935420777 +0100 +diff -Nur linux-4.9.6.orig/include/linux/timer.h linux-4.9.6/include/linux/timer.h +--- linux-4.9.6.orig/include/linux/timer.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/timer.h 2017-01-28 13:59:09.947656802 +0100 @@ -241,7 +241,7 @@ extern int try_to_del_timer_sync(struct timer_list *timer); @@ -11194,9 +9884,9 @@ diff -Nur linux-4.8.15.orig/include/linux/timer.h linux-4.8.15/include/linux/tim extern int del_timer_sync(struct timer_list *timer); #else # define del_timer_sync(t) del_timer(t) -diff -Nur linux-4.8.15.orig/include/linux/trace_events.h linux-4.8.15/include/linux/trace_events.h ---- linux-4.8.15.orig/include/linux/trace_events.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/trace_events.h 2017-01-01 17:07:15.935420777 +0100 +diff -Nur linux-4.9.6.orig/include/linux/trace_events.h linux-4.9.6/include/linux/trace_events.h +--- linux-4.9.6.orig/include/linux/trace_events.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/trace_events.h 2017-01-28 13:59:09.947656802 +0100 @@ -56,6 +56,9 @@ unsigned char flags; unsigned char preempt_count; @@ -11207,9 +9897,9 @@ diff -Nur linux-4.8.15.orig/include/linux/trace_events.h linux-4.8.15/include/li }; #define TRACE_EVENT_TYPE_MAX \ -diff -Nur linux-4.8.15.orig/include/linux/uaccess.h linux-4.8.15/include/linux/uaccess.h ---- linux-4.8.15.orig/include/linux/uaccess.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/uaccess.h 2017-01-01 17:07:15.935420777 +0100 +diff -Nur linux-4.9.6.orig/include/linux/uaccess.h linux-4.9.6/include/linux/uaccess.h +--- linux-4.9.6.orig/include/linux/uaccess.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/uaccess.h 2017-01-28 13:59:09.947656802 +0100 @@ -24,6 +24,7 @@ */ static inline void pagefault_disable(void) @@ -11226,9 +9916,9 @@ diff -Nur linux-4.8.15.orig/include/linux/uaccess.h linux-4.8.15/include/linux/u } /* -diff -Nur linux-4.8.15.orig/include/linux/uprobes.h linux-4.8.15/include/linux/uprobes.h ---- linux-4.8.15.orig/include/linux/uprobes.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/uprobes.h 2017-01-01 17:07:15.939421032 +0100 +diff -Nur linux-4.9.6.orig/include/linux/uprobes.h linux-4.9.6/include/linux/uprobes.h +--- linux-4.9.6.orig/include/linux/uprobes.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/uprobes.h 2017-01-28 13:59:09.947656802 +0100 @@ -27,6 +27,7 @@ #include <linux/errno.h> #include <linux/rbtree.h> @@ -11237,9 +9927,9 @@ diff -Nur linux-4.8.15.orig/include/linux/uprobes.h linux-4.8.15/include/linux/u struct vm_area_struct; struct mm_struct; -diff -Nur linux-4.8.15.orig/include/linux/vmstat.h linux-4.8.15/include/linux/vmstat.h ---- linux-4.8.15.orig/include/linux/vmstat.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/vmstat.h 2017-01-01 17:07:15.951421804 +0100 +diff -Nur linux-4.9.6.orig/include/linux/vmstat.h linux-4.9.6/include/linux/vmstat.h +--- linux-4.9.6.orig/include/linux/vmstat.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/vmstat.h 2017-01-28 13:59:09.947656802 +0100 @@ -33,7 +33,9 @@ */ static inline void __count_vm_event(enum vm_event_item item) @@ -11260,9 +9950,9 @@ diff -Nur linux-4.8.15.orig/include/linux/vmstat.h linux-4.8.15/include/linux/vm } static inline void count_vm_events(enum vm_event_item item, long delta) -diff -Nur linux-4.8.15.orig/include/linux/wait.h linux-4.8.15/include/linux/wait.h ---- linux-4.8.15.orig/include/linux/wait.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/linux/wait.h 2017-01-01 17:07:15.955422055 +0100 +diff -Nur linux-4.9.6.orig/include/linux/wait.h linux-4.9.6/include/linux/wait.h +--- linux-4.9.6.orig/include/linux/wait.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/linux/wait.h 2017-01-28 13:59:09.947656802 +0100 @@ -8,6 +8,7 @@ #include <linux/spinlock.h> #include <asm/current.h> @@ -11271,9 +9961,9 @@ diff -Nur linux-4.8.15.orig/include/linux/wait.h linux-4.8.15/include/linux/wait typedef struct __wait_queue wait_queue_t; typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); -diff -Nur linux-4.8.15.orig/include/net/dst.h linux-4.8.15/include/net/dst.h ---- linux-4.8.15.orig/include/net/dst.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/net/dst.h 2017-01-01 17:07:15.963422578 +0100 +diff -Nur linux-4.9.6.orig/include/net/dst.h linux-4.9.6/include/net/dst.h +--- linux-4.9.6.orig/include/net/dst.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/net/dst.h 2017-01-28 13:59:09.947656802 +0100 @@ -446,7 +446,7 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, struct sk_buff *skb) @@ -11283,9 +9973,9 @@ diff -Nur linux-4.8.15.orig/include/net/dst.h linux-4.8.15/include/net/dst.h if (dst->pending_confirm) { unsigned long now = jiffies; -diff -Nur linux-4.8.15.orig/include/net/gen_stats.h linux-4.8.15/include/net/gen_stats.h ---- linux-4.8.15.orig/include/net/gen_stats.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/net/gen_stats.h 2017-01-01 17:07:15.963422578 +0100 +diff -Nur linux-4.9.6.orig/include/net/gen_stats.h linux-4.9.6/include/net/gen_stats.h +--- linux-4.9.6.orig/include/net/gen_stats.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/net/gen_stats.h 2017-01-28 13:59:09.947656802 +0100 @@ -5,6 +5,7 @@ #include <linux/socket.h> #include <linux/rtnetlink.h> @@ -11325,9 +10015,9 @@ diff -Nur linux-4.8.15.orig/include/net/gen_stats.h linux-4.8.15/include/net/gen bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, const struct gnet_stats_rate_est64 *rate_est); #endif -diff -Nur linux-4.8.15.orig/include/net/neighbour.h linux-4.8.15/include/net/neighbour.h ---- linux-4.8.15.orig/include/net/neighbour.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/net/neighbour.h 2017-01-01 17:07:15.971423099 +0100 +diff -Nur linux-4.9.6.orig/include/net/neighbour.h linux-4.9.6/include/net/neighbour.h +--- linux-4.9.6.orig/include/net/neighbour.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/net/neighbour.h 2017-01-28 13:59:09.947656802 +0100 @@ -446,7 +446,7 @@ } #endif @@ -11346,10 +10036,10 @@ diff -Nur linux-4.8.15.orig/include/net/neighbour.h linux-4.8.15/include/net/nei const struct net_device *dev) { unsigned int seq; -diff -Nur linux-4.8.15.orig/include/net/netns/ipv4.h linux-4.8.15/include/net/netns/ipv4.h ---- linux-4.8.15.orig/include/net/netns/ipv4.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/net/netns/ipv4.h 2017-01-01 17:07:15.975423350 +0100 -@@ -70,6 +70,7 @@ +diff -Nur linux-4.9.6.orig/include/net/netns/ipv4.h linux-4.9.6/include/net/netns/ipv4.h +--- linux-4.9.6.orig/include/net/netns/ipv4.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/net/netns/ipv4.h 2017-01-28 13:59:09.947656802 +0100 +@@ -69,6 +69,7 @@ int sysctl_icmp_echo_ignore_all; int sysctl_icmp_echo_ignore_broadcasts; @@ -11357,9 +10047,9 @@ diff -Nur linux-4.8.15.orig/include/net/netns/ipv4.h linux-4.8.15/include/net/ne int sysctl_icmp_ignore_bogus_error_responses; int sysctl_icmp_ratelimit; int sysctl_icmp_ratemask; -diff -Nur linux-4.8.15.orig/include/net/net_seq_lock.h linux-4.8.15/include/net/net_seq_lock.h ---- linux-4.8.15.orig/include/net/net_seq_lock.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/net/net_seq_lock.h 2017-01-01 17:07:15.971423099 +0100 +diff -Nur linux-4.9.6.orig/include/net/net_seq_lock.h linux-4.9.6/include/net/net_seq_lock.h +--- linux-4.9.6.orig/include/net/net_seq_lock.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/net/net_seq_lock.h 2017-01-28 13:59:09.947656802 +0100 @@ -0,0 +1,15 @@ +#ifndef __NET_NET_SEQ_LOCK_H__ +#define __NET_NET_SEQ_LOCK_H__ @@ -11376,9 +10066,9 @@ diff -Nur linux-4.8.15.orig/include/net/net_seq_lock.h linux-4.8.15/include/net/ +#endif + +#endif -diff -Nur linux-4.8.15.orig/include/net/sch_generic.h linux-4.8.15/include/net/sch_generic.h ---- linux-4.8.15.orig/include/net/sch_generic.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/include/net/sch_generic.h 2017-01-01 17:07:15.987424124 +0100 +diff -Nur linux-4.9.6.orig/include/net/sch_generic.h linux-4.9.6/include/net/sch_generic.h +--- linux-4.9.6.orig/include/net/sch_generic.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/include/net/sch_generic.h 2017-01-28 13:59:09.951656955 +0100 @@ -10,6 +10,7 @@ #include <linux/dynamic_queue_limits.h> #include <net/gen_stats.h> @@ -11387,16 +10077,16 @@ diff -Nur linux-4.8.15.orig/include/net/sch_generic.h linux-4.8.15/include/net/s struct Qdisc_ops; struct qdisc_walker; -@@ -78,7 +79,7 @@ +@@ -86,7 +87,7 @@ struct sk_buff *gso_skb ____cacheline_aligned_in_smp; - struct sk_buff_head q; + struct qdisc_skb_head q; struct gnet_stats_basic_packed bstats; - seqcount_t running; + net_seqlock_t running; struct gnet_stats_queue qstats; unsigned long state; struct Qdisc *next_sched; -@@ -90,13 +91,22 @@ +@@ -98,13 +99,22 @@ spinlock_t busylock ____cacheline_aligned_in_smp; }; @@ -11420,7 +10110,7 @@ diff -Nur linux-4.8.15.orig/include/net/sch_generic.h linux-4.8.15/include/net/s if (qdisc_is_running(qdisc)) return false; /* Variant of write_seqcount_begin() telling lockdep a trylock -@@ -105,11 +115,16 @@ +@@ -113,11 +123,16 @@ raw_write_seqcount_begin(&qdisc->running); seqcount_acquire(&qdisc->running.dep_map, 0, 1, _RET_IP_); return true; @@ -11437,7 +10127,7 @@ diff -Nur linux-4.8.15.orig/include/net/sch_generic.h linux-4.8.15/include/net/s } static inline bool qdisc_may_bulk(const struct Qdisc *qdisc) -@@ -300,7 +315,7 @@ +@@ -308,7 +323,7 @@ return qdisc_lock(root); } @@ -11446,9 +10136,9 @@ diff -Nur linux-4.8.15.orig/include/net/sch_generic.h linux-4.8.15/include/net/s { struct Qdisc *root = qdisc_root_sleeping(qdisc); -diff -Nur linux-4.8.15.orig/include/trace/events/hist.h linux-4.8.15/include/trace/events/hist.h ---- linux-4.8.15.orig/include/trace/events/hist.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/trace/events/hist.h 2017-01-01 17:07:15.987424124 +0100 +diff -Nur linux-4.9.6.orig/include/trace/events/hist.h linux-4.9.6/include/trace/events/hist.h +--- linux-4.9.6.orig/include/trace/events/hist.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/trace/events/hist.h 2017-01-28 13:59:09.951656955 +0100 @@ -0,0 +1,73 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hist @@ -11523,9 +10213,9 @@ diff -Nur linux-4.8.15.orig/include/trace/events/hist.h linux-4.8.15/include/tra + +/* This part must be outside protection */ +#include <trace/define_trace.h> -diff -Nur linux-4.8.15.orig/include/trace/events/latency_hist.h linux-4.8.15/include/trace/events/latency_hist.h ---- linux-4.8.15.orig/include/trace/events/latency_hist.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/include/trace/events/latency_hist.h 2017-01-01 17:07:15.987424124 +0100 +diff -Nur linux-4.9.6.orig/include/trace/events/latency_hist.h linux-4.9.6/include/trace/events/latency_hist.h +--- linux-4.9.6.orig/include/trace/events/latency_hist.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/include/trace/events/latency_hist.h 2017-01-28 13:59:09.951656955 +0100 @@ -0,0 +1,29 @@ +#ifndef _LATENCY_HIST_H +#define _LATENCY_HIST_H @@ -11556,10 +10246,10 @@ diff -Nur linux-4.8.15.orig/include/trace/events/latency_hist.h linux-4.8.15/inc +} + +#endif /* _LATENCY_HIST_H */ -diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig ---- linux-4.8.15.orig/init/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/init/Kconfig 2017-01-01 17:07:15.987424124 +0100 -@@ -496,7 +496,7 @@ +diff -Nur linux-4.9.6.orig/init/Kconfig linux-4.9.6/init/Kconfig +--- linux-4.9.6.orig/init/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/init/Kconfig 2017-01-28 13:59:09.951656955 +0100 +@@ -506,7 +506,7 @@ config RCU_EXPERT bool "Make expert-level adjustments to RCU configuration" @@ -11568,7 +10258,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig help This option needs to be enabled if you wish to make expert-level adjustments to RCU configuration. By default, -@@ -613,7 +613,7 @@ +@@ -623,7 +623,7 @@ config RCU_FAST_NO_HZ bool "Accelerate last non-dyntick-idle CPU's grace periods" @@ -11577,7 +10267,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig default n help This option permits CPUs to enter dynticks-idle state even if -@@ -640,7 +640,7 @@ +@@ -650,7 +650,7 @@ config RCU_BOOST bool "Enable RCU priority boosting" depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT @@ -11586,7 +10276,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig help This option boosts the priority of preempted RCU readers that block the current preemptible RCU grace period for too long. -@@ -771,19 +771,6 @@ +@@ -781,19 +781,6 @@ endchoice @@ -11606,7 +10296,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig endmenu # "RCU Subsystem" config BUILD_BIN2C -@@ -1054,6 +1041,7 @@ +@@ -1064,6 +1051,7 @@ config RT_GROUP_SCHED bool "Group scheduling for SCHED_RR/FIFO" depends on CGROUP_SCHED @@ -11614,7 +10304,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig default n help This feature lets you explicitly allocate real CPU bandwidth -@@ -1761,6 +1749,7 @@ +@@ -1772,6 +1760,7 @@ config SLAB bool "SLAB" @@ -11622,7 +10312,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig select HAVE_HARDENED_USERCOPY_ALLOCATOR help The regular slab allocator that is established and known to work -@@ -1781,6 +1770,7 @@ +@@ -1792,6 +1781,7 @@ config SLOB depends on EXPERT bool "SLOB (Simple Allocator)" @@ -11630,7 +10320,7 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig help SLOB replaces the stock allocator with a drastically simpler allocator. SLOB is generally more space efficient but -@@ -1799,7 +1789,7 @@ +@@ -1810,7 +1800,7 @@ config SLUB_CPU_PARTIAL default y @@ -11639,9 +10329,9 @@ diff -Nur linux-4.8.15.orig/init/Kconfig linux-4.8.15/init/Kconfig bool "SLUB per cpu partial cache" help Per cpu partial caches accellerate objects allocation and freeing -diff -Nur linux-4.8.15.orig/init/main.c linux-4.8.15/init/main.c ---- linux-4.8.15.orig/init/main.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/init/main.c 2017-01-01 17:07:15.991424381 +0100 +diff -Nur linux-4.9.6.orig/init/main.c linux-4.9.6/init/main.c +--- linux-4.9.6.orig/init/main.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/init/main.c 2017-01-28 13:59:09.951656955 +0100 @@ -507,6 +507,7 @@ setup_command_line(command_line); setup_nr_cpu_ids(); @@ -11650,220 +10340,18 @@ diff -Nur linux-4.8.15.orig/init/main.c linux-4.8.15/init/main.c boot_cpu_state_init(); smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ -diff -Nur linux-4.8.15.orig/init/Makefile linux-4.8.15/init/Makefile ---- linux-4.8.15.orig/init/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/init/Makefile 2017-01-01 17:07:15.991424381 +0100 -@@ -33,4 +33,4 @@ +diff -Nur linux-4.9.6.orig/init/Makefile linux-4.9.6/init/Makefile +--- linux-4.9.6.orig/init/Makefile 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/init/Makefile 2017-01-28 13:59:09.951656955 +0100 +@@ -35,4 +35,4 @@ include/generated/compile.h: FORCE @$($(quiet)chk_compile.h) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ - "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)" + "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CONFIG_PREEMPT_RT_FULL)" "$(CC) $(KBUILD_CFLAGS)" -diff -Nur linux-4.8.15.orig/ipc/msg.c linux-4.8.15/ipc/msg.c ---- linux-4.8.15.orig/ipc/msg.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/ipc/msg.c 2017-01-01 17:07:15.991424381 +0100 -@@ -183,20 +183,14 @@ - } - } - --static void expunge_all(struct msg_queue *msq, int res) -+static void expunge_all(struct msg_queue *msq, int res, -+ struct wake_q_head *wake_q) - { - struct msg_receiver *msr, *t; - - list_for_each_entry_safe(msr, t, &msq->q_receivers, r_list) { -- msr->r_msg = NULL; /* initialize expunge ordering */ -- wake_up_process(msr->r_tsk); -- /* -- * Ensure that the wakeup is visible before setting r_msg as -- * the receiving end depends on it: either spinning on a nil, -- * or dealing with -EAGAIN cases. See lockless receive part 1 -- * and 2 in do_msgrcv(). -- */ -- smp_wmb(); /* barrier (B) */ -+ -+ wake_q_add(wake_q, msr->r_tsk); - msr->r_msg = ERR_PTR(res); - } - } -@@ -213,11 +207,13 @@ - { - struct msg_msg *msg, *t; - struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm); -+ WAKE_Q(wake_q); - -- expunge_all(msq, -EIDRM); -+ expunge_all(msq, -EIDRM, &wake_q); - ss_wakeup(&msq->q_senders, 1); - msg_rmid(ns, msq); - ipc_unlock_object(&msq->q_perm); -+ wake_up_q(&wake_q); - rcu_read_unlock(); - - list_for_each_entry_safe(msg, t, &msq->q_messages, m_list) { -@@ -342,6 +338,7 @@ - struct kern_ipc_perm *ipcp; - struct msqid64_ds uninitialized_var(msqid64); - struct msg_queue *msq; -+ WAKE_Q(wake_q); - int err; - - if (cmd == IPC_SET) { -@@ -389,7 +386,7 @@ - /* sleeping receivers might be excluded by - * stricter permissions. - */ -- expunge_all(msq, -EAGAIN); -+ expunge_all(msq, -EAGAIN, &wake_q); - /* sleeping senders might be able to send - * due to a larger queue size. - */ -@@ -402,6 +399,7 @@ - - out_unlock0: - ipc_unlock_object(&msq->q_perm); -+ wake_up_q(&wake_q); - out_unlock1: - rcu_read_unlock(); - out_up: -@@ -566,7 +564,8 @@ - return 0; - } - --static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) -+static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg, -+ struct wake_q_head *wake_q) - { - struct msg_receiver *msr, *t; - -@@ -577,27 +576,13 @@ - - list_del(&msr->r_list); - if (msr->r_maxsize < msg->m_ts) { -- /* initialize pipelined send ordering */ -- msr->r_msg = NULL; -- wake_up_process(msr->r_tsk); -- /* barrier (B) see barrier comment below */ -- smp_wmb(); -+ wake_q_add(wake_q, msr->r_tsk); - msr->r_msg = ERR_PTR(-E2BIG); - } else { -- msr->r_msg = NULL; - msq->q_lrpid = task_pid_vnr(msr->r_tsk); - msq->q_rtime = get_seconds(); -- wake_up_process(msr->r_tsk); -- /* -- * Ensure that the wakeup is visible before -- * setting r_msg, as the receiving can otherwise -- * exit - once r_msg is set, the receiver can -- * continue. See lockless receive part 1 and 2 -- * in do_msgrcv(). Barrier (B). -- */ -- smp_wmb(); -+ wake_q_add(wake_q, msr->r_tsk); - msr->r_msg = msg; -- - return 1; - } - } -@@ -613,6 +598,7 @@ - struct msg_msg *msg; - int err; - struct ipc_namespace *ns; -+ WAKE_Q(wake_q); - - ns = current->nsproxy->ipc_ns; - -@@ -698,7 +684,7 @@ - msq->q_lspid = task_tgid_vnr(current); - msq->q_stime = get_seconds(); - -- if (!pipelined_send(msq, msg)) { -+ if (!pipelined_send(msq, msg, &wake_q)) { - /* no one is waiting for this message, enqueue it */ - list_add_tail(&msg->m_list, &msq->q_messages); - msq->q_cbytes += msgsz; -@@ -712,6 +698,7 @@ - - out_unlock0: - ipc_unlock_object(&msq->q_perm); -+ wake_up_q(&wake_q); - out_unlock1: - rcu_read_unlock(); - if (msg != NULL) -@@ -932,57 +919,25 @@ - rcu_read_lock(); - - /* Lockless receive, part 2: -- * Wait until pipelined_send or expunge_all are outside of -- * wake_up_process(). There is a race with exit(), see -- * ipc/mqueue.c for the details. The correct serialization -- * ensures that a receiver cannot continue without the wakeup -- * being visibible _before_ setting r_msg: -+ * The work in pipelined_send() and expunge_all(): -+ * - Set pointer to message -+ * - Queue the receiver task for later wakeup -+ * - Wake up the process after the lock is dropped. - * -- * CPU 0 CPU 1 -- * <loop receiver> -- * smp_rmb(); (A) <-- pair -. <waker thread> -- * <load ->r_msg> | msr->r_msg = NULL; -- * | wake_up_process(); -- * <continue> `------> smp_wmb(); (B) -- * msr->r_msg = msg; -- * -- * Where (A) orders the message value read and where (B) orders -- * the write to the r_msg -- done in both pipelined_send and -- * expunge_all. -+ * Should the process wake up before this wakeup (due to a -+ * signal) it will either see the message and continue … - */ -- for (;;) { -- /* -- * Pairs with writer barrier in pipelined_send -- * or expunge_all. -- */ -- smp_rmb(); /* barrier (A) */ -- msg = (struct msg_msg *)msr_d.r_msg; -- if (msg) -- break; - -- /* -- * The cpu_relax() call is a compiler barrier -- * which forces everything in this loop to be -- * re-loaded. -- */ -- cpu_relax(); -- } -- -- /* Lockless receive, part 3: -- * If there is a message or an error then accept it without -- * locking. -- */ -+ msg = (struct msg_msg *)msr_d.r_msg; - if (msg != ERR_PTR(-EAGAIN)) - goto out_unlock1; - -- /* Lockless receive, part 3: -- * Acquire the queue spinlock. -- */ -+ /* -+ * … or see -EAGAIN, acquire the lock to check the message -+ * again. -+ */ - ipc_lock_object(&msq->q_perm); - -- /* Lockless receive, part 4: -- * Repeat test after acquiring the spinlock. -- */ - msg = (struct msg_msg *)msr_d.r_msg; - if (msg != ERR_PTR(-EAGAIN)) - goto out_unlock0; -diff -Nur linux-4.8.15.orig/ipc/sem.c linux-4.8.15/ipc/sem.c ---- linux-4.8.15.orig/ipc/sem.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/ipc/sem.c 2017-01-01 17:07:15.991424381 +0100 +diff -Nur linux-4.9.6.orig/ipc/sem.c linux-4.9.6/ipc/sem.c +--- linux-4.9.6.orig/ipc/sem.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/ipc/sem.c 2017-01-28 13:59:09.951656955 +0100 @@ -712,6 +712,13 @@ static void wake_up_sem_queue_prepare(struct list_head *pt, struct sem_queue *q, int error) @@ -11902,10 +10390,10 @@ diff -Nur linux-4.8.15.orig/ipc/sem.c linux-4.8.15/ipc/sem.c } static void unlink_queue(struct sem_array *sma, struct sem_queue *q) -diff -Nur linux-4.8.15.orig/kernel/cgroup.c linux-4.8.15/kernel/cgroup.c ---- linux-4.8.15.orig/kernel/cgroup.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/cgroup.c 2017-01-01 17:07:15.999424895 +0100 -@@ -5027,10 +5027,10 @@ +diff -Nur linux-4.9.6.orig/kernel/cgroup.c linux-4.9.6/kernel/cgroup.c +--- linux-4.9.6.orig/kernel/cgroup.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/cgroup.c 2017-01-28 13:59:09.951656955 +0100 +@@ -5040,10 +5040,10 @@ queue_work(cgroup_destroy_wq, &css->destroy_work); } @@ -11918,7 +10406,7 @@ diff -Nur linux-4.8.15.orig/kernel/cgroup.c linux-4.8.15/kernel/cgroup.c struct cgroup_subsys *ss = css->ss; struct cgroup *cgrp = css->cgroup; -@@ -5071,8 +5071,8 @@ +@@ -5086,8 +5086,8 @@ struct cgroup_subsys_state *css = container_of(ref, struct cgroup_subsys_state, refcnt); @@ -11929,7 +10417,7 @@ diff -Nur linux-4.8.15.orig/kernel/cgroup.c linux-4.8.15/kernel/cgroup.c } static void init_and_link_css(struct cgroup_subsys_state *css, -@@ -5716,6 +5716,7 @@ +@@ -5742,6 +5742,7 @@ */ cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1); BUG_ON(!cgroup_destroy_wq); @@ -11937,20 +10425,10 @@ diff -Nur linux-4.8.15.orig/kernel/cgroup.c linux-4.8.15/kernel/cgroup.c /* * Used to destroy pidlists and separate to serve as flush domain. -diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c ---- linux-4.8.15.orig/kernel/cpu.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/cpu.c 2017-01-01 17:07:15.999424895 +0100 -@@ -152,8 +152,8 @@ - #endif - } cpu_hotplug = { - .active_writer = NULL, -- .wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq), - .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock), -+ .wq = __WAIT_QUEUE_HEAD_INITIALIZER(cpu_hotplug.wq), - #ifdef CONFIG_DEBUG_LOCK_ALLOC - .dep_map = {.name = "cpu_hotplug.lock" }, - #endif -@@ -166,6 +166,289 @@ +diff -Nur linux-4.9.6.orig/kernel/cpu.c linux-4.9.6/kernel/cpu.c +--- linux-4.9.6.orig/kernel/cpu.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/cpu.c 2017-01-28 13:59:09.951656955 +0100 +@@ -239,6 +239,289 @@ #define cpuhp_lock_acquire() lock_map_acquire(&cpu_hotplug.dep_map) #define cpuhp_lock_release() lock_map_release(&cpu_hotplug.dep_map) @@ -12240,7 +10718,7 @@ diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c void get_online_cpus(void) { -@@ -710,10 +993,14 @@ +@@ -789,10 +1072,14 @@ struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); int err; @@ -12255,7 +10733,7 @@ diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c /* * Prevent irq alloc/free while the dying cpu reorganizes the * interrupt affinities. -@@ -799,6 +1086,9 @@ +@@ -877,6 +1164,9 @@ struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu); int prev_state, ret = 0; bool hasdied = false; @@ -12265,7 +10743,7 @@ diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c if (num_online_cpus() == 1) return -EBUSY; -@@ -806,7 +1096,34 @@ +@@ -884,7 +1174,34 @@ if (!cpu_present(cpu)) return -EINVAL; @@ -12300,7 +10778,7 @@ diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c cpuhp_tasks_frozen = tasks_frozen; -@@ -845,10 +1162,15 @@ +@@ -923,10 +1240,15 @@ hasdied = prev_state != st->state && st->state == CPUHP_OFFLINE; out: @@ -12316,9 +10794,9 @@ diff -Nur linux-4.8.15.orig/kernel/cpu.c linux-4.8.15/kernel/cpu.c return ret; } -diff -Nur linux-4.8.15.orig/kernel/debug/kdb/kdb_io.c linux-4.8.15/kernel/debug/kdb/kdb_io.c ---- linux-4.8.15.orig/kernel/debug/kdb/kdb_io.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/debug/kdb/kdb_io.c 2017-01-01 17:07:16.003425149 +0100 +diff -Nur linux-4.9.6.orig/kernel/debug/kdb/kdb_io.c linux-4.9.6/kernel/debug/kdb/kdb_io.c +--- linux-4.9.6.orig/kernel/debug/kdb/kdb_io.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/debug/kdb/kdb_io.c 2017-01-28 13:59:09.951656955 +0100 @@ -554,7 +554,6 @@ int linecount; int colcount; @@ -12356,10 +10834,10 @@ diff -Nur linux-4.8.15.orig/kernel/debug/kdb/kdb_io.c linux-4.8.15/kernel/debug/ return r; } -diff -Nur linux-4.8.15.orig/kernel/events/core.c linux-4.8.15/kernel/events/core.c ---- linux-4.8.15.orig/kernel/events/core.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/events/core.c 2017-01-01 17:07:16.007425407 +0100 -@@ -1042,6 +1042,7 @@ +diff -Nur linux-4.9.6.orig/kernel/events/core.c linux-4.9.6/kernel/events/core.c +--- linux-4.9.6.orig/kernel/events/core.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/events/core.c 2017-01-28 13:59:09.955657109 +0100 +@@ -1050,6 +1050,7 @@ raw_spin_lock_init(&cpuctx->hrtimer_lock); hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); timer->function = perf_mux_hrtimer_handler; @@ -12367,7 +10845,7 @@ diff -Nur linux-4.8.15.orig/kernel/events/core.c linux-4.8.15/kernel/events/core } static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx) -@@ -8217,6 +8218,7 @@ +@@ -8335,6 +8336,7 @@ hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hwc->hrtimer.function = perf_swevent_hrtimer; @@ -12375,9 +10853,9 @@ diff -Nur linux-4.8.15.orig/kernel/events/core.c linux-4.8.15/kernel/events/core /* * Since hrtimers have a fixed rate, we can do a static freq->period -diff -Nur linux-4.8.15.orig/kernel/exit.c linux-4.8.15/kernel/exit.c ---- linux-4.8.15.orig/kernel/exit.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/exit.c 2017-01-01 17:07:16.011425679 +0100 +diff -Nur linux-4.9.6.orig/kernel/exit.c linux-4.9.6/kernel/exit.c +--- linux-4.9.6.orig/kernel/exit.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/exit.c 2017-01-28 13:59:09.955657109 +0100 @@ -143,7 +143,7 @@ * Do this under ->siglock, we can race with another thread * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. @@ -12387,10 +10865,18 @@ diff -Nur linux-4.8.15.orig/kernel/exit.c linux-4.8.15/kernel/exit.c tsk->sighand = NULL; spin_unlock(&sighand->siglock); -diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c ---- linux-4.8.15.orig/kernel/fork.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/fork.c 2017-01-01 17:07:16.011425679 +0100 -@@ -251,7 +251,9 @@ +diff -Nur linux-4.9.6.orig/kernel/fork.c linux-4.9.6/kernel/fork.c +--- linux-4.9.6.orig/kernel/fork.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/fork.c 2017-01-28 13:59:09.955657109 +0100 +@@ -76,6 +76,7 @@ + #include <linux/compiler.h> + #include <linux/sysctl.h> + #include <linux/kcov.h> ++#include <linux/kprobes.h> + + #include <asm/pgtable.h> + #include <asm/pgalloc.h> +@@ -376,13 +377,24 @@ if (atomic_dec_and_test(&sig->sigcnt)) free_signal_struct(sig); } @@ -12401,7 +10887,22 @@ diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c void __put_task_struct(struct task_struct *tsk) { WARN_ON(!tsk->exit_state); -@@ -268,7 +270,18 @@ + WARN_ON(atomic_read(&tsk->usage)); + WARN_ON(tsk == current); + ++ /* ++ * Remove function-return probe instances associated with this ++ * task and put them back on the free list. ++ */ ++ kprobe_flush_task(tsk); ++ ++ /* Task is done with its stack. */ ++ put_task_stack(tsk); ++ + cgroup_free(tsk); + task_numa_free(tsk); + security_task_free(tsk); +@@ -393,7 +405,18 @@ if (!profile_handoff_task(tsk)) free_task(tsk); } @@ -12420,7 +10921,7 @@ diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c void __init __weak arch_task_cache_init(void) { } -@@ -702,6 +715,19 @@ +@@ -852,6 +875,19 @@ } EXPORT_SYMBOL_GPL(__mmdrop); @@ -12440,7 +10941,7 @@ diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c static inline void __mmput(struct mm_struct *mm) { VM_BUG_ON(atomic_read(&mm->mm_users)); -@@ -1274,6 +1300,9 @@ +@@ -1426,6 +1462,9 @@ */ static void posix_cpu_timers_init(struct task_struct *tsk) { @@ -12450,7 +10951,7 @@ diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c tsk->cputime_expires.prof_exp = 0; tsk->cputime_expires.virt_exp = 0; tsk->cputime_expires.sched_exp = 0; -@@ -1399,6 +1428,7 @@ +@@ -1552,6 +1591,7 @@ spin_lock_init(&p->alloc_lock); init_sigpending(&p->pending); @@ -12458,10 +10959,10 @@ diff -Nur linux-4.8.15.orig/kernel/fork.c linux-4.8.15/kernel/fork.c p->utime = p->stime = p->gtime = 0; p->utimescaled = p->stimescaled = 0; -diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c ---- linux-4.8.15.orig/kernel/futex.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/futex.c 2017-01-01 17:07:16.015425924 +0100 -@@ -895,7 +895,9 @@ +diff -Nur linux-4.9.6.orig/kernel/futex.c linux-4.9.6/kernel/futex.c +--- linux-4.9.6.orig/kernel/futex.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/futex.c 2017-01-28 13:59:09.955657109 +0100 +@@ -904,7 +904,9 @@ * task still owns the PI-state: */ if (head->next != next) { @@ -12471,7 +10972,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c continue; } -@@ -1290,6 +1292,7 @@ +@@ -1299,6 +1301,7 @@ struct futex_pi_state *pi_state = this->pi_state; u32 uninitialized_var(curval), newval; WAKE_Q(wake_q); @@ -12479,7 +10980,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c bool deboost; int ret = 0; -@@ -1356,7 +1359,8 @@ +@@ -1365,7 +1368,8 @@ raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); @@ -12489,7 +10990,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c /* * First unlock HB so the waiter does not spin on it once he got woken -@@ -1364,8 +1368,9 @@ +@@ -1373,8 +1377,9 @@ * deboost first (and lose our higher priority), then the task might get * scheduled away before the wake up can take place. */ @@ -12500,7 +11001,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c if (deboost) rt_mutex_adjust_prio(current); -@@ -1915,6 +1920,16 @@ +@@ -1924,6 +1929,16 @@ requeue_pi_wake_futex(this, &key2, hb2); drop_count++; continue; @@ -12517,7 +11018,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c } else if (ret) { /* * rt_mutex_start_proxy_lock() detected a -@@ -2805,7 +2820,7 @@ +@@ -2814,7 +2829,7 @@ struct hrtimer_sleeper timeout, *to = NULL; struct rt_mutex_waiter rt_waiter; struct rt_mutex *pi_mutex = NULL; @@ -12526,7 +11027,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; -@@ -2830,10 +2845,7 @@ +@@ -2839,10 +2854,7 @@ * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ @@ -12538,7 +11039,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) -@@ -2864,20 +2876,55 @@ +@@ -2873,20 +2885,55 @@ /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); @@ -12605,7 +11106,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { -@@ -2886,14 +2933,15 @@ +@@ -2895,14 +2942,15 @@ * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { @@ -12623,7 +11124,7 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c } } else { /* -@@ -2906,7 +2954,8 @@ +@@ -2915,7 +2963,8 @@ ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter); debug_rt_mutex_free_waiter(&rt_waiter); @@ -12633,9 +11134,9 @@ diff -Nur linux-4.8.15.orig/kernel/futex.c linux-4.8.15/kernel/futex.c /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. -diff -Nur linux-4.8.15.orig/kernel/irq/handle.c linux-4.8.15/kernel/irq/handle.c ---- linux-4.8.15.orig/kernel/irq/handle.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/irq/handle.c 2017-01-01 17:07:16.015425924 +0100 +diff -Nur linux-4.9.6.orig/kernel/irq/handle.c linux-4.9.6/kernel/irq/handle.c +--- linux-4.9.6.orig/kernel/irq/handle.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/irq/handle.c 2017-01-28 13:59:09.955657109 +0100 @@ -181,10 +181,16 @@ { irqreturn_t retval; @@ -12654,9 +11155,9 @@ diff -Nur linux-4.8.15.orig/kernel/irq/handle.c linux-4.8.15/kernel/irq/handle.c if (!noirqdebug) note_interrupt(desc, retval); -diff -Nur linux-4.8.15.orig/kernel/irq/manage.c linux-4.8.15/kernel/irq/manage.c ---- linux-4.8.15.orig/kernel/irq/manage.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/irq/manage.c 2017-01-01 17:07:16.015425924 +0100 +diff -Nur linux-4.9.6.orig/kernel/irq/manage.c linux-4.9.6/kernel/irq/manage.c +--- linux-4.9.6.orig/kernel/irq/manage.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/irq/manage.c 2017-01-28 13:59:09.955657109 +0100 @@ -22,6 +22,7 @@ #include "internals.h" @@ -12796,9 +11297,9 @@ diff -Nur linux-4.8.15.orig/kernel/irq/manage.c linux-4.8.15/kernel/irq/manage.c * interrupt controller has per-cpu registers. */ int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which, -diff -Nur linux-4.8.15.orig/kernel/irq/settings.h linux-4.8.15/kernel/irq/settings.h ---- linux-4.8.15.orig/kernel/irq/settings.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/irq/settings.h 2017-01-01 17:07:16.015425924 +0100 +diff -Nur linux-4.9.6.orig/kernel/irq/settings.h linux-4.9.6/kernel/irq/settings.h +--- linux-4.9.6.orig/kernel/irq/settings.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/irq/settings.h 2017-01-28 13:59:09.955657109 +0100 @@ -16,6 +16,7 @@ _IRQ_PER_CPU_DEVID = IRQ_PER_CPU_DEVID, _IRQ_IS_POLLED = IRQ_IS_POLLED, @@ -12832,9 +11333,9 @@ diff -Nur linux-4.8.15.orig/kernel/irq/settings.h linux-4.8.15/kernel/irq/settin static inline bool irq_settings_is_per_cpu(struct irq_desc *desc) { return desc->status_use_accessors & _IRQ_PER_CPU; -diff -Nur linux-4.8.15.orig/kernel/irq/spurious.c linux-4.8.15/kernel/irq/spurious.c ---- linux-4.8.15.orig/kernel/irq/spurious.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/irq/spurious.c 2017-01-01 17:07:16.015425924 +0100 +diff -Nur linux-4.9.6.orig/kernel/irq/spurious.c linux-4.9.6/kernel/irq/spurious.c +--- linux-4.9.6.orig/kernel/irq/spurious.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/irq/spurious.c 2017-01-28 13:59:09.955657109 +0100 @@ -442,6 +442,10 @@ static int __init irqfixup_setup(char *str) @@ -12857,9 +11358,9 @@ diff -Nur linux-4.8.15.orig/kernel/irq/spurious.c linux-4.8.15/kernel/irq/spurio irqfixup = 2; printk(KERN_WARNING "Misrouted IRQ fixup and polling support " "enabled\n"); -diff -Nur linux-4.8.15.orig/kernel/irq_work.c linux-4.8.15/kernel/irq_work.c ---- linux-4.8.15.orig/kernel/irq_work.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/irq_work.c 2017-01-01 17:07:16.019426176 +0100 +diff -Nur linux-4.9.6.orig/kernel/irq_work.c linux-4.9.6/kernel/irq_work.c +--- linux-4.9.6.orig/kernel/irq_work.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/irq_work.c 2017-01-28 13:59:09.955657109 +0100 @@ -17,6 +17,7 @@ #include <linux/cpu.h> #include <linux/notifier.h> @@ -12981,9 +11482,9 @@ diff -Nur linux-4.8.15.orig/kernel/irq_work.c linux-4.8.15/kernel/irq_work.c /* * Synchronize against the irq_work @entry, ensures the entry is not -diff -Nur linux-4.8.15.orig/kernel/Kconfig.locks linux-4.8.15/kernel/Kconfig.locks ---- linux-4.8.15.orig/kernel/Kconfig.locks 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/Kconfig.locks 2017-01-01 17:07:15.995424645 +0100 +diff -Nur linux-4.9.6.orig/kernel/Kconfig.locks linux-4.9.6/kernel/Kconfig.locks +--- linux-4.9.6.orig/kernel/Kconfig.locks 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/Kconfig.locks 2017-01-28 13:59:09.951656955 +0100 @@ -225,11 +225,11 @@ config MUTEX_SPIN_ON_OWNER @@ -12998,9 +11499,9 @@ diff -Nur linux-4.8.15.orig/kernel/Kconfig.locks linux-4.8.15/kernel/Kconfig.loc config LOCK_SPIN_ON_OWNER def_bool y -diff -Nur linux-4.8.15.orig/kernel/Kconfig.preempt linux-4.8.15/kernel/Kconfig.preempt ---- linux-4.8.15.orig/kernel/Kconfig.preempt 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/Kconfig.preempt 2017-01-01 17:07:15.995424645 +0100 +diff -Nur linux-4.9.6.orig/kernel/Kconfig.preempt linux-4.9.6/kernel/Kconfig.preempt +--- linux-4.9.6.orig/kernel/Kconfig.preempt 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/Kconfig.preempt 2017-01-28 13:59:09.951656955 +0100 @@ -1,3 +1,16 @@ +config PREEMPT + bool @@ -13053,9 +11554,9 @@ diff -Nur linux-4.8.15.orig/kernel/Kconfig.preempt linux-4.8.15/kernel/Kconfig.p endchoice config PREEMPT_COUNT -diff -Nur linux-4.8.15.orig/kernel/ksysfs.c linux-4.8.15/kernel/ksysfs.c ---- linux-4.8.15.orig/kernel/ksysfs.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/ksysfs.c 2017-01-01 17:07:16.019426176 +0100 +diff -Nur linux-4.9.6.orig/kernel/ksysfs.c linux-4.9.6/kernel/ksysfs.c +--- linux-4.9.6.orig/kernel/ksysfs.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/ksysfs.c 2017-01-28 13:59:09.955657109 +0100 @@ -136,6 +136,15 @@ #endif /* CONFIG_KEXEC_CORE */ @@ -13082,181 +11583,10 @@ diff -Nur linux-4.8.15.orig/kernel/ksysfs.c linux-4.8.15/kernel/ksysfs.c NULL }; -diff -Nur linux-4.8.15.orig/kernel/locking/lglock.c linux-4.8.15/kernel/locking/lglock.c ---- linux-4.8.15.orig/kernel/locking/lglock.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/lglock.c 2017-01-01 17:07:16.019426176 +0100 -@@ -4,6 +4,15 @@ - #include <linux/cpu.h> - #include <linux/string.h> - -+#ifndef CONFIG_PREEMPT_RT_FULL -+# define lg_lock_ptr arch_spinlock_t -+# define lg_do_lock(l) arch_spin_lock(l) -+# define lg_do_unlock(l) arch_spin_unlock(l) -+#else -+# define lg_lock_ptr struct rt_mutex -+# define lg_do_lock(l) __rt_spin_lock__no_mg(l) -+# define lg_do_unlock(l) __rt_spin_unlock(l) -+#endif - /* - * Note there is no uninit, so lglocks cannot be defined in - * modules (but it's fine to use them from there) -@@ -12,51 +21,60 @@ - - void lg_lock_init(struct lglock *lg, char *name) - { -+#ifdef CONFIG_PREEMPT_RT_FULL -+ int i; -+ -+ for_each_possible_cpu(i) { -+ struct rt_mutex *lock = per_cpu_ptr(lg->lock, i); -+ -+ rt_mutex_init(lock); -+ } -+#endif - LOCKDEP_INIT_MAP(&lg->lock_dep_map, name, &lg->lock_key, 0); - } - EXPORT_SYMBOL(lg_lock_init); - - void lg_local_lock(struct lglock *lg) - { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - -- preempt_disable(); -+ migrate_disable(); - lock_acquire_shared(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); - lock = this_cpu_ptr(lg->lock); -- arch_spin_lock(lock); -+ lg_do_lock(lock); - } - EXPORT_SYMBOL(lg_local_lock); - - void lg_local_unlock(struct lglock *lg) - { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - - lock_release(&lg->lock_dep_map, 1, _RET_IP_); - lock = this_cpu_ptr(lg->lock); -- arch_spin_unlock(lock); -- preempt_enable(); -+ lg_do_unlock(lock); -+ migrate_enable(); - } - EXPORT_SYMBOL(lg_local_unlock); - - void lg_local_lock_cpu(struct lglock *lg, int cpu) - { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - -- preempt_disable(); -+ preempt_disable_nort(); - lock_acquire_shared(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); - lock = per_cpu_ptr(lg->lock, cpu); -- arch_spin_lock(lock); -+ lg_do_lock(lock); - } - EXPORT_SYMBOL(lg_local_lock_cpu); - - void lg_local_unlock_cpu(struct lglock *lg, int cpu) - { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - - lock_release(&lg->lock_dep_map, 1, _RET_IP_); - lock = per_cpu_ptr(lg->lock, cpu); -- arch_spin_unlock(lock); -- preempt_enable(); -+ lg_do_unlock(lock); -+ preempt_enable_nort(); - } - EXPORT_SYMBOL(lg_local_unlock_cpu); - -@@ -68,30 +86,30 @@ - if (cpu2 < cpu1) - swap(cpu1, cpu2); - -- preempt_disable(); -+ preempt_disable_nort(); - lock_acquire_shared(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); -- arch_spin_lock(per_cpu_ptr(lg->lock, cpu1)); -- arch_spin_lock(per_cpu_ptr(lg->lock, cpu2)); -+ lg_do_lock(per_cpu_ptr(lg->lock, cpu1)); -+ lg_do_lock(per_cpu_ptr(lg->lock, cpu2)); - } - - void lg_double_unlock(struct lglock *lg, int cpu1, int cpu2) - { - lock_release(&lg->lock_dep_map, 1, _RET_IP_); -- arch_spin_unlock(per_cpu_ptr(lg->lock, cpu1)); -- arch_spin_unlock(per_cpu_ptr(lg->lock, cpu2)); -- preempt_enable(); -+ lg_do_unlock(per_cpu_ptr(lg->lock, cpu1)); -+ lg_do_unlock(per_cpu_ptr(lg->lock, cpu2)); -+ preempt_enable_nort(); - } - - void lg_global_lock(struct lglock *lg) - { - int i; - -- preempt_disable(); -+ preempt_disable_nort(); - lock_acquire_exclusive(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); - for_each_possible_cpu(i) { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - lock = per_cpu_ptr(lg->lock, i); -- arch_spin_lock(lock); -+ lg_do_lock(lock); - } - } - EXPORT_SYMBOL(lg_global_lock); -@@ -102,10 +120,35 @@ - - lock_release(&lg->lock_dep_map, 1, _RET_IP_); - for_each_possible_cpu(i) { -- arch_spinlock_t *lock; -+ lg_lock_ptr *lock; - lock = per_cpu_ptr(lg->lock, i); -- arch_spin_unlock(lock); -+ lg_do_unlock(lock); - } -- preempt_enable(); -+ preempt_enable_nort(); - } - EXPORT_SYMBOL(lg_global_unlock); -+ -+#ifdef CONFIG_PREEMPT_RT_FULL -+/* -+ * HACK: If you use this, you get to keep the pieces. -+ * Used in queue_stop_cpus_work() when stop machinery -+ * is called from inactive CPU, so we can't schedule. -+ */ -+# define lg_do_trylock_relax(l) \ -+ do { \ -+ while (!__rt_spin_trylock(l)) \ -+ cpu_relax(); \ -+ } while (0) -+ -+void lg_global_trylock_relax(struct lglock *lg) -+{ -+ int i; -+ -+ lock_acquire_exclusive(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); -+ for_each_possible_cpu(i) { -+ lg_lock_ptr *lock; -+ lock = per_cpu_ptr(lg->lock, i); -+ lg_do_trylock_relax(lock); -+ } -+} -+#endif -diff -Nur linux-4.8.15.orig/kernel/locking/lockdep.c linux-4.8.15/kernel/locking/lockdep.c ---- linux-4.8.15.orig/kernel/locking/lockdep.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/lockdep.c 2017-01-01 17:07:16.019426176 +0100 -@@ -3686,6 +3686,7 @@ +diff -Nur linux-4.9.6.orig/kernel/locking/lockdep.c linux-4.9.6/kernel/locking/lockdep.c +--- linux-4.9.6.orig/kernel/locking/lockdep.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/lockdep.c 2017-01-28 13:59:09.955657109 +0100 +@@ -3689,6 +3689,7 @@ } } @@ -13264,7 +11594,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/lockdep.c linux-4.8.15/kernel/locking /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -3700,6 +3701,7 @@ +@@ -3703,6 +3704,7 @@ DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } @@ -13272,9 +11602,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/lockdep.c linux-4.8.15/kernel/locking if (!debug_locks) print_irqtrace_events(current); -diff -Nur linux-4.8.15.orig/kernel/locking/locktorture.c linux-4.8.15/kernel/locking/locktorture.c ---- linux-4.8.15.orig/kernel/locking/locktorture.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/locktorture.c 2017-01-01 17:07:16.019426176 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/locktorture.c linux-4.9.6/kernel/locking/locktorture.c +--- linux-4.9.6.orig/kernel/locking/locktorture.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/locktorture.c 2017-01-28 13:59:09.959657263 +0100 @@ -26,7 +26,6 @@ #include <linux/kthread.h> #include <linux/sched/rt.h> @@ -13283,9 +11613,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/locktorture.c linux-4.8.15/kernel/loc #include <linux/mutex.h> #include <linux/rwsem.h> #include <linux/smp.h> -diff -Nur linux-4.8.15.orig/kernel/locking/Makefile linux-4.8.15/kernel/locking/Makefile ---- linux-4.8.15.orig/kernel/locking/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/Makefile 2017-01-01 17:07:16.019426176 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/Makefile linux-4.9.6/kernel/locking/Makefile +--- linux-4.9.6.orig/kernel/locking/Makefile 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/Makefile 2017-01-28 13:59:09.955657109 +0100 @@ -2,7 +2,7 @@ # and is generally not a function of system call inputs. KCOV_INSTRUMENT := n @@ -13307,7 +11637,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/Makefile linux-4.8.15/kernel/locking/ obj-$(CONFIG_LOCKDEP) += lockdep.o ifeq ($(CONFIG_PROC_FS),y) obj-$(CONFIG_LOCKDEP) += lockdep_proc.o -@@ -25,7 +29,10 @@ +@@ -24,7 +28,10 @@ obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o @@ -13318,9 +11648,39 @@ diff -Nur linux-4.8.15.orig/kernel/locking/Makefile linux-4.8.15/kernel/locking/ +obj-$(CONFIG_PREEMPT_RT_FULL) += rt.o obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o -diff -Nur linux-4.8.15.orig/kernel/locking/rt.c linux-4.8.15/kernel/locking/rt.c ---- linux-4.8.15.orig/kernel/locking/rt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/kernel/locking/rt.c 2017-01-01 17:07:16.019426176 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/percpu-rwsem.c linux-4.9.6/kernel/locking/percpu-rwsem.c +--- linux-4.9.6.orig/kernel/locking/percpu-rwsem.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/percpu-rwsem.c 2017-01-28 13:59:09.959657263 +0100 +@@ -18,7 +18,7 @@ + /* ->rw_sem represents the whole percpu_rw_semaphore for lockdep */ + rcu_sync_init(&sem->rss, RCU_SCHED_SYNC); + __init_rwsem(&sem->rw_sem, name, rwsem_key); +- init_waitqueue_head(&sem->writer); ++ init_swait_queue_head(&sem->writer); + sem->readers_block = 0; + return 0; + } +@@ -103,7 +103,7 @@ + __this_cpu_dec(*sem->read_count); + + /* Prod writer to recheck readers_active */ +- wake_up(&sem->writer); ++ swake_up(&sem->writer); + } + EXPORT_SYMBOL_GPL(__percpu_up_read); + +@@ -160,7 +160,7 @@ + */ + + /* Wait for all now active readers to complete. */ +- wait_event(sem->writer, readers_active_check(sem)); ++ swait_event(sem->writer, readers_active_check(sem)); + } + EXPORT_SYMBOL_GPL(percpu_down_write); + +diff -Nur linux-4.9.6.orig/kernel/locking/rt.c linux-4.9.6/kernel/locking/rt.c +--- linux-4.9.6.orig/kernel/locking/rt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/kernel/locking/rt.c 2017-01-28 13:59:10.035660185 +0100 @@ -0,0 +1,498 @@ +/* + * kernel/rt.c @@ -13820,9 +12180,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rt.c linux-4.8.15/kernel/locking/rt.c + return 1; +} +EXPORT_SYMBOL(atomic_dec_and_mutex_lock); -diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking/rtmutex.c ---- linux-4.8.15.orig/kernel/locking/rtmutex.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/rtmutex.c 2017-01-01 17:07:16.023426438 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex.c linux-4.9.6/kernel/locking/rtmutex.c +--- linux-4.9.6.orig/kernel/locking/rtmutex.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/rtmutex.c 2017-01-28 13:59:10.035660185 +0100 @@ -7,6 +7,11 @@ * Copyright (C) 2005-2006 Timesys Corp., Thomas Gleixner <tglx@timesys.com> * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt @@ -13977,7 +12337,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /* * The current top waiter stays enqueued. We * don't have to change anything in the lock -@@ -941,6 +983,438 @@ +@@ -941,6 +983,433 @@ return 1; } @@ -14285,11 +12645,6 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking +} +EXPORT_SYMBOL(rt_spin_unlock_wait); + -+int __lockfunc __rt_spin_trylock(struct rt_mutex *lock) -+{ -+ return rt_mutex_trylock(lock); -+} -+ +int __lockfunc rt_spin_trylock__no_mg(spinlock_t *lock) +{ + int ret; @@ -14416,7 +12771,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /* * Task blocks on lock. * -@@ -971,6 +1445,23 @@ +@@ -971,6 +1440,23 @@ return -EDEADLK; raw_spin_lock(&task->pi_lock); @@ -14440,7 +12795,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking __rt_mutex_adjust_prio(task); waiter->task = task; waiter->lock = lock; -@@ -994,7 +1485,7 @@ +@@ -994,7 +1480,7 @@ rt_mutex_enqueue_pi(owner, waiter); __rt_mutex_adjust_prio(owner); @@ -14449,7 +12804,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking chain_walk = 1; } else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) { chain_walk = 1; -@@ -1036,6 +1527,7 @@ +@@ -1036,6 +1522,7 @@ * Called with lock->wait_lock held and interrupts disabled. */ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q, @@ -14457,7 +12812,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking struct rt_mutex *lock) { struct rt_mutex_waiter *waiter; -@@ -1064,7 +1556,10 @@ +@@ -1064,7 +1551,10 @@ raw_spin_unlock(¤t->pi_lock); @@ -14469,7 +12824,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } /* -@@ -1078,7 +1573,7 @@ +@@ -1078,7 +1568,7 @@ { bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock)); struct task_struct *owner = rt_mutex_owner(lock); @@ -14478,7 +12833,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking raw_spin_lock(¤t->pi_lock); rt_mutex_dequeue(lock, waiter); -@@ -1102,7 +1597,8 @@ +@@ -1102,7 +1592,8 @@ __rt_mutex_adjust_prio(owner); /* Store the lock on which owner is blocked or NULL */ @@ -14488,7 +12843,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking raw_spin_unlock(&owner->pi_lock); -@@ -1138,17 +1634,17 @@ +@@ -1138,17 +1629,17 @@ raw_spin_lock_irqsave(&task->pi_lock, flags); waiter = task->pi_blocked_on; @@ -14508,7 +12863,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking rt_mutex_adjust_prio_chain(task, RT_MUTEX_MIN_CHAINWALK, NULL, next_lock, NULL, task); } -@@ -1166,7 +1662,8 @@ +@@ -1166,7 +1657,8 @@ static int __sched __rt_mutex_slowlock(struct rt_mutex *lock, int state, struct hrtimer_sleeper *timeout, @@ -14518,7 +12873,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking { int ret = 0; -@@ -1189,6 +1686,12 @@ +@@ -1189,6 +1681,12 @@ break; } @@ -14531,7 +12886,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking raw_spin_unlock_irq(&lock->wait_lock); debug_rt_mutex_print_deadlock(waiter); -@@ -1223,21 +1726,96 @@ +@@ -1223,21 +1721,96 @@ } } @@ -14632,7 +12987,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /* * Technically we could use raw_spin_[un]lock_irq() here, but this can -@@ -1251,6 +1829,8 @@ +@@ -1251,6 +1824,8 @@ /* Try to acquire the lock again: */ if (try_to_take_rt_mutex(lock, current, NULL)) { @@ -14641,7 +12996,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking raw_spin_unlock_irqrestore(&lock->wait_lock, flags); return 0; } -@@ -1265,13 +1845,23 @@ +@@ -1265,13 +1840,23 @@ if (likely(!ret)) /* sleep on the mutex */ @@ -14667,7 +13022,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } /* -@@ -1331,7 +1921,8 @@ +@@ -1331,7 +1916,8 @@ * Return whether the current task needs to undo a potential priority boosting. */ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, @@ -14677,7 +13032,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking { unsigned long flags; -@@ -1387,7 +1978,7 @@ +@@ -1387,7 +1973,7 @@ * * Queue the next waiter for wakeup once we release the wait_lock. */ @@ -14686,7 +13041,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking raw_spin_unlock_irqrestore(&lock->wait_lock, flags); -@@ -1403,31 +1994,36 @@ +@@ -1403,31 +1989,36 @@ */ static inline int rt_mutex_fastlock(struct rt_mutex *lock, int state, @@ -14727,7 +13082,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } static inline int -@@ -1444,17 +2040,20 @@ +@@ -1444,17 +2035,20 @@ static inline void rt_mutex_fastunlock(struct rt_mutex *lock, bool (*slowfn)(struct rt_mutex *lock, @@ -14750,7 +13105,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /* Undo pi boosting if necessary: */ if (deboost) -@@ -1471,7 +2070,7 @@ +@@ -1471,7 +2065,7 @@ { might_sleep(); @@ -14759,7 +13114,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } EXPORT_SYMBOL_GPL(rt_mutex_lock); -@@ -1488,7 +2087,7 @@ +@@ -1488,7 +2082,7 @@ { might_sleep(); @@ -14768,7 +13123,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); -@@ -1501,11 +2100,30 @@ +@@ -1501,11 +2095,30 @@ might_sleep(); return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, @@ -14800,7 +13155,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking * rt_mutex_timed_lock - lock a rt_mutex interruptible * the timeout structure is provided * by the caller -@@ -1525,6 +2143,7 @@ +@@ -1525,6 +2138,7 @@ return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, RT_MUTEX_MIN_CHAINWALK, @@ -14808,7 +13163,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking rt_mutex_slowlock); } EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); -@@ -1542,7 +2161,11 @@ +@@ -1542,7 +2156,11 @@ */ int __sched rt_mutex_trylock(struct rt_mutex *lock) { @@ -14820,7 +13175,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking return 0; return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); -@@ -1568,13 +2191,14 @@ +@@ -1568,13 +2186,14 @@ * required or not. */ bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock, @@ -14837,7 +13192,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking } /** -@@ -1607,13 +2231,12 @@ +@@ -1607,13 +2226,12 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name) { lock->owner = NULL; @@ -14852,7 +13207,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /** * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a -@@ -1628,7 +2251,7 @@ +@@ -1628,7 +2246,7 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) { @@ -14861,7 +13216,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking debug_rt_mutex_proxy_lock(lock, proxy_owner); rt_mutex_set_owner(lock, proxy_owner); rt_mutex_deadlock_account_lock(lock, proxy_owner); -@@ -1676,6 +2299,35 @@ +@@ -1676,6 +2294,35 @@ return 1; } @@ -14897,7 +13252,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking /* We enforce deadlock detection for futexes */ ret = task_blocks_on_rt_mutex(lock, waiter, task, RT_MUTEX_FULL_CHAINWALK); -@@ -1690,7 +2342,7 @@ +@@ -1690,7 +2337,7 @@ ret = 0; } @@ -14906,7 +13261,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking remove_waiter(lock, waiter); raw_spin_unlock_irq(&lock->wait_lock); -@@ -1746,7 +2398,7 @@ +@@ -1746,7 +2393,7 @@ set_current_state(TASK_INTERRUPTIBLE); /* sleep on the mutex */ @@ -14915,7 +13270,7 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking if (unlikely(ret)) remove_waiter(lock, waiter); -@@ -1761,3 +2413,89 @@ +@@ -1761,3 +2408,89 @@ return ret; } @@ -15005,9 +13360,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex.c linux-4.8.15/kernel/locking +} +EXPORT_SYMBOL(ww_mutex_unlock); +#endif -diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex_common.h linux-4.8.15/kernel/locking/rtmutex_common.h ---- linux-4.8.15.orig/kernel/locking/rtmutex_common.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/rtmutex_common.h 2017-01-01 17:07:16.023426438 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/rtmutex_common.h linux-4.9.6/kernel/locking/rtmutex_common.h +--- linux-4.9.6.orig/kernel/locking/rtmutex_common.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/rtmutex_common.h 2017-01-28 13:59:10.035660185 +0100 @@ -27,6 +27,7 @@ struct rb_node pi_tree_entry; struct task_struct *task; @@ -15051,9 +13406,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/rtmutex_common.h linux-4.8.15/kernel/ +} + #endif -diff -Nur linux-4.8.15.orig/kernel/locking/spinlock.c linux-4.8.15/kernel/locking/spinlock.c ---- linux-4.8.15.orig/kernel/locking/spinlock.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/spinlock.c 2017-01-01 17:07:16.023426438 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/spinlock.c linux-4.9.6/kernel/locking/spinlock.c +--- linux-4.9.6.orig/kernel/locking/spinlock.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/spinlock.c 2017-01-28 13:59:10.035660185 +0100 @@ -124,8 +124,11 @@ * __[spin|read|write]_lock_bh() */ @@ -15084,9 +13439,9 @@ diff -Nur linux-4.8.15.orig/kernel/locking/spinlock.c linux-4.8.15/kernel/lockin #ifdef CONFIG_DEBUG_LOCK_ALLOC void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) -diff -Nur linux-4.8.15.orig/kernel/locking/spinlock_debug.c linux-4.8.15/kernel/locking/spinlock_debug.c ---- linux-4.8.15.orig/kernel/locking/spinlock_debug.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/locking/spinlock_debug.c 2017-01-01 17:07:16.023426438 +0100 +diff -Nur linux-4.9.6.orig/kernel/locking/spinlock_debug.c linux-4.9.6/kernel/locking/spinlock_debug.c +--- linux-4.9.6.orig/kernel/locking/spinlock_debug.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/locking/spinlock_debug.c 2017-01-28 13:59:10.035660185 +0100 @@ -31,6 +31,7 @@ EXPORT_SYMBOL(__raw_spin_lock_init); @@ -15117,27 +13472,10 @@ diff -Nur linux-4.8.15.orig/kernel/locking/spinlock_debug.c linux-4.8.15/kernel/ } + +#endif -diff -Nur linux-4.8.15.orig/kernel/Makefile linux-4.8.15/kernel/Makefile ---- linux-4.8.15.orig/kernel/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/Makefile 2017-01-01 17:07:15.995424645 +0100 -@@ -11,6 +11,13 @@ - notifier.o ksysfs.o cred.o reboot.o \ - async.o range.o smpboot.o - -+# Tracing may do some dangerous __builtin_return_address() operations -+# We know they are dangerous, we don't need gcc telling us that. -+ifdef CONFIG_USING_GET_LOCK_PARENT_IP -+FRAME_CFLAGS := $(call cc-disable-warning,frame-address) -+KBUILD_CFLAGS += $(FRAME_CFLAGS) -+endif -+ - obj-$(CONFIG_MULTIUSER) += groups.o - - ifdef CONFIG_FUNCTION_TRACER -diff -Nur linux-4.8.15.orig/kernel/panic.c linux-4.8.15/kernel/panic.c ---- linux-4.8.15.orig/kernel/panic.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/panic.c 2017-01-01 17:07:16.023426438 +0100 -@@ -449,9 +449,11 @@ +diff -Nur linux-4.9.6.orig/kernel/panic.c linux-4.9.6/kernel/panic.c +--- linux-4.9.6.orig/kernel/panic.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/panic.c 2017-01-28 13:59:10.035660185 +0100 +@@ -482,9 +482,11 @@ static int init_oops_id(void) { @@ -15149,9 +13487,9 @@ diff -Nur linux-4.8.15.orig/kernel/panic.c linux-4.8.15/kernel/panic.c oops_id++; return 0; -diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/hibernate.c ---- linux-4.8.15.orig/kernel/power/hibernate.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/power/hibernate.c 2017-01-01 17:07:16.023426438 +0100 +diff -Nur linux-4.9.6.orig/kernel/power/hibernate.c linux-4.9.6/kernel/power/hibernate.c +--- linux-4.9.6.orig/kernel/power/hibernate.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/power/hibernate.c 2017-01-28 13:59:10.039660339 +0100 @@ -286,6 +286,8 @@ local_irq_disable(); @@ -15161,7 +13499,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h error = syscore_suspend(); if (error) { printk(KERN_ERR "PM: Some system devices failed to power down, " -@@ -315,6 +317,7 @@ +@@ -317,6 +319,7 @@ syscore_resume(); Enable_irqs: @@ -15169,7 +13507,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h local_irq_enable(); Enable_cpus: -@@ -444,6 +447,7 @@ +@@ -446,6 +449,7 @@ goto Enable_cpus; local_irq_disable(); @@ -15177,7 +13515,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h error = syscore_suspend(); if (error) -@@ -477,6 +481,7 @@ +@@ -479,6 +483,7 @@ syscore_resume(); Enable_irqs: @@ -15185,7 +13523,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h local_irq_enable(); Enable_cpus: -@@ -562,6 +567,7 @@ +@@ -564,6 +569,7 @@ goto Enable_cpus; local_irq_disable(); @@ -15193,7 +13531,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h syscore_suspend(); if (pm_wakeup_pending()) { error = -EAGAIN; -@@ -574,6 +580,7 @@ +@@ -576,6 +582,7 @@ Power_up: syscore_resume(); @@ -15201,7 +13539,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h local_irq_enable(); Enable_cpus: -@@ -674,6 +681,10 @@ +@@ -676,6 +683,10 @@ return error; } @@ -15212,7 +13550,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h /** * hibernate - Carry out system hibernation, including saving the image. */ -@@ -687,6 +698,8 @@ +@@ -689,6 +700,8 @@ return -EPERM; } @@ -15221,7 +13559,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h lock_system_sleep(); /* The snapshot device should not be opened while we're running */ if (!atomic_add_unless(&snapshot_device_available, -1, 0)) { -@@ -764,6 +777,7 @@ +@@ -766,6 +779,7 @@ atomic_inc(&snapshot_device_available); Unlock: unlock_system_sleep(); @@ -15229,10 +13567,10 @@ diff -Nur linux-4.8.15.orig/kernel/power/hibernate.c linux-4.8.15/kernel/power/h return error; } -diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/suspend.c ---- linux-4.8.15.orig/kernel/power/suspend.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/power/suspend.c 2017-01-01 17:07:16.023426438 +0100 -@@ -361,6 +361,8 @@ +diff -Nur linux-4.9.6.orig/kernel/power/suspend.c linux-4.9.6/kernel/power/suspend.c +--- linux-4.9.6.orig/kernel/power/suspend.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/power/suspend.c 2017-01-28 13:59:10.039660339 +0100 +@@ -369,6 +369,8 @@ arch_suspend_disable_irqs(); BUG_ON(!irqs_disabled()); @@ -15241,7 +13579,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/sus error = syscore_suspend(); if (!error) { *wakeup = pm_wakeup_pending(); -@@ -377,6 +379,8 @@ +@@ -385,6 +387,8 @@ syscore_resume(); } @@ -15250,7 +13588,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/sus arch_suspend_enable_irqs(); BUG_ON(irqs_disabled()); -@@ -519,6 +523,8 @@ +@@ -527,6 +531,8 @@ return error; } @@ -15259,7 +13597,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/sus /** * pm_suspend - Externally visible function for suspending the system. * @state: System sleep state to enter. -@@ -533,6 +539,8 @@ +@@ -541,6 +547,8 @@ if (state <= PM_SUSPEND_ON || state >= PM_SUSPEND_MAX) return -EINVAL; @@ -15268,7 +13606,7 @@ diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/sus error = enter_state(state); if (error) { suspend_stats.fail++; -@@ -540,6 +548,7 @@ +@@ -548,6 +556,7 @@ } else { suspend_stats.success++; } @@ -15276,9 +13614,9 @@ diff -Nur linux-4.8.15.orig/kernel/power/suspend.c linux-4.8.15/kernel/power/sus return error; } EXPORT_SYMBOL(pm_suspend); -diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/printk.c ---- linux-4.8.15.orig/kernel/printk/printk.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/printk/printk.c 2017-01-01 17:07:16.027426711 +0100 +diff -Nur linux-4.9.6.orig/kernel/printk/printk.c linux-4.9.6/kernel/printk/printk.c +--- linux-4.9.6.orig/kernel/printk/printk.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/printk/printk.c 2017-01-28 13:59:10.039660339 +0100 @@ -351,6 +351,65 @@ */ DEFINE_RAW_SPINLOCK(logbuf_lock); @@ -15345,7 +13683,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr #ifdef CONFIG_PRINTK DECLARE_WAIT_QUEUE_HEAD(log_wait); /* the next printk record to read by syslog(READ) or /proc/kmsg */ -@@ -1340,6 +1399,7 @@ +@@ -1337,6 +1396,7 @@ { char *text; int len = 0; @@ -15353,7 +13691,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr text = kmalloc(LOG_LINE_MAX + PREFIX_MAX, GFP_KERNEL); if (!text) -@@ -1351,6 +1411,14 @@ +@@ -1348,6 +1408,14 @@ u64 seq; u32 idx; enum log_flags prev; @@ -15368,7 +13706,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr /* * Find first record that fits, including all following records, -@@ -1366,6 +1434,14 @@ +@@ -1363,6 +1431,14 @@ prev = msg->flags; idx = log_next(idx); seq++; @@ -15383,7 +13721,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr } /* move first record forward until length fits into the buffer */ -@@ -1379,6 +1455,14 @@ +@@ -1376,6 +1452,14 @@ prev = msg->flags; idx = log_next(idx); seq++; @@ -15398,7 +13736,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr } /* last message fitting into this dump */ -@@ -1419,6 +1503,7 @@ +@@ -1416,6 +1500,7 @@ clear_seq = log_next_seq; clear_idx = log_next_idx; } @@ -15406,7 +13744,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr raw_spin_unlock_irq(&logbuf_lock); kfree(text); -@@ -1572,6 +1657,12 @@ +@@ -1569,6 +1654,12 @@ if (!console_drivers) return; @@ -15419,7 +13757,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr for_each_console(con) { if (exclusive_console && con != exclusive_console) continue; -@@ -1587,6 +1678,7 @@ +@@ -1584,6 +1675,7 @@ else con->write(con, text, len); } @@ -15427,7 +13765,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr } /* -@@ -1750,6 +1842,13 @@ +@@ -1781,6 +1873,13 @@ /* cpu currently holding logbuf_lock in this function */ static unsigned int logbuf_cpu = UINT_MAX; @@ -15441,7 +13779,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr if (level == LOGLEVEL_SCHED) { level = LOGLEVEL_DEFAULT; in_sched = true; -@@ -1894,13 +1993,23 @@ +@@ -1885,13 +1984,23 @@ /* If called from the scheduler, we can not call up(). */ if (!in_sched) { @@ -15466,7 +13804,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr console_unlock(); lockdep_on(); } -@@ -2023,26 +2132,6 @@ +@@ -2014,26 +2123,6 @@ #endif /* CONFIG_PRINTK */ @@ -15493,7 +13831,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr static int __add_preferred_console(char *name, int idx, char *options, char *brl_options) { -@@ -2312,11 +2401,16 @@ +@@ -2303,11 +2392,16 @@ goto out; len = cont_print_text(text, size); @@ -15510,7 +13848,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr return; out: raw_spin_unlock_irqrestore(&logbuf_lock, flags); -@@ -2440,13 +2534,17 @@ +@@ -2431,13 +2525,17 @@ console_idx = log_next(console_idx); console_seq++; console_prev = msg->flags; @@ -15529,7 +13867,7 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr if (do_cond_resched) cond_resched(); } -@@ -2498,6 +2596,11 @@ +@@ -2489,6 +2587,11 @@ { struct console *c; @@ -15541,10 +13879,10 @@ diff -Nur linux-4.8.15.orig/kernel/printk/printk.c linux-4.8.15/kernel/printk/pr /* * console_unblank can no longer be called in interrupt context unless * oops_in_progress is set to 1.. -diff -Nur linux-4.8.15.orig/kernel/ptrace.c linux-4.8.15/kernel/ptrace.c ---- linux-4.8.15.orig/kernel/ptrace.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/ptrace.c 2017-01-01 17:07:16.027426711 +0100 -@@ -128,7 +128,14 @@ +diff -Nur linux-4.9.6.orig/kernel/ptrace.c linux-4.9.6/kernel/ptrace.c +--- linux-4.9.6.orig/kernel/ptrace.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/ptrace.c 2017-01-28 13:59:10.039660339 +0100 +@@ -166,7 +166,14 @@ spin_lock_irq(&task->sighand->siglock); if (task_is_traced(task) && !__fatal_signal_pending(task)) { @@ -15560,9 +13898,9 @@ diff -Nur linux-4.8.15.orig/kernel/ptrace.c linux-4.8.15/kernel/ptrace.c ret = true; } spin_unlock_irq(&task->sighand->siglock); -diff -Nur linux-4.8.15.orig/kernel/rcu/rcutorture.c linux-4.8.15/kernel/rcu/rcutorture.c ---- linux-4.8.15.orig/kernel/rcu/rcutorture.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/rcu/rcutorture.c 2017-01-01 17:07:16.027426711 +0100 +diff -Nur linux-4.9.6.orig/kernel/rcu/rcutorture.c linux-4.9.6/kernel/rcu/rcutorture.c +--- linux-4.9.6.orig/kernel/rcu/rcutorture.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/rcu/rcutorture.c 2017-01-28 13:59:10.039660339 +0100 @@ -404,6 +404,7 @@ .name = "rcu" }; @@ -15584,10 +13922,10 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/rcutorture.c linux-4.8.15/kernel/rcu/rcut /* * Don't even think about trying any of these in real life!!! * The names includes "busted", and they really means it! -diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c ---- linux-4.8.15.orig/kernel/rcu/tree.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/rcu/tree.c 2017-01-01 17:07:16.027426711 +0100 -@@ -56,6 +56,11 @@ +diff -Nur linux-4.9.6.orig/kernel/rcu/tree.c linux-4.9.6/kernel/rcu/tree.c +--- linux-4.9.6.orig/kernel/rcu/tree.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/rcu/tree.c 2017-01-28 13:59:10.039660339 +0100 +@@ -55,6 +55,11 @@ #include <linux/random.h> #include <linux/trace_events.h> #include <linux/suspend.h> @@ -15599,7 +13937,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c #include "tree.h" #include "rcu.h" -@@ -259,6 +264,19 @@ +@@ -260,6 +265,19 @@ this_cpu_ptr(&rcu_sched_data), true); } @@ -15619,7 +13957,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c void rcu_bh_qs(void) { if (__this_cpu_read(rcu_bh_data.cpu_no_qs.s)) { -@@ -268,6 +286,7 @@ +@@ -269,6 +287,7 @@ __this_cpu_write(rcu_bh_data.cpu_no_qs.b.norm, false); } } @@ -15627,7 +13965,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c static DEFINE_PER_CPU(int, rcu_sched_qs_mask); -@@ -448,11 +467,13 @@ +@@ -449,11 +468,13 @@ /* * Return the number of RCU BH batches started thus far for debug & stats. */ @@ -15641,7 +13979,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Return the number of RCU batches completed thus far for debug & stats. -@@ -472,6 +493,7 @@ +@@ -473,6 +494,7 @@ } EXPORT_SYMBOL_GPL(rcu_batches_completed_sched); @@ -15649,7 +13987,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Return the number of RCU BH batches completed thus far for debug & stats. */ -@@ -480,6 +502,7 @@ +@@ -481,6 +503,7 @@ return rcu_bh_state.completed; } EXPORT_SYMBOL_GPL(rcu_batches_completed_bh); @@ -15657,7 +13995,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Return the number of RCU expedited batches completed thus far for -@@ -503,6 +526,7 @@ +@@ -504,6 +527,7 @@ } EXPORT_SYMBOL_GPL(rcu_exp_batches_completed_sched); @@ -15665,7 +14003,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Force a quiescent state. */ -@@ -521,6 +545,13 @@ +@@ -522,6 +546,13 @@ } EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state); @@ -15679,7 +14017,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Force a quiescent state for RCU-sched. */ -@@ -571,9 +602,11 @@ +@@ -572,9 +603,11 @@ case RCU_FLAVOR: rsp = rcu_state_p; break; @@ -15691,12 +14029,12 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c case RCU_SCHED_FLAVOR: rsp = &rcu_sched_state; break; -@@ -3013,18 +3046,17 @@ +@@ -3016,18 +3049,17 @@ /* * Do RCU core processing for the current CPU. */ --static void rcu_process_callbacks(struct softirq_action *unused) -+static void rcu_process_callbacks(void) +-static __latent_entropy void rcu_process_callbacks(struct softirq_action *unused) ++static __latent_entropy void rcu_process_callbacks(void) { struct rcu_state *rsp; @@ -15712,7 +14050,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Schedule RCU callback invocation. If the specified type of RCU * does not support RCU priority boosting, just do a direct call, -@@ -3036,18 +3068,105 @@ +@@ -3039,18 +3071,105 @@ { if (unlikely(!READ_ONCE(rcu_scheduler_fully_active))) return; @@ -15824,7 +14162,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Handle any core-RCU processing required by a call_rcu() invocation. -@@ -3192,6 +3311,7 @@ +@@ -3195,6 +3314,7 @@ } EXPORT_SYMBOL_GPL(call_rcu_sched); @@ -15832,7 +14170,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Queue an RCU callback for invocation after a quicker grace period. */ -@@ -3200,6 +3320,7 @@ +@@ -3203,6 +3323,7 @@ __call_rcu(head, func, &rcu_bh_state, -1, 0); } EXPORT_SYMBOL_GPL(call_rcu_bh); @@ -15840,7 +14178,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * Queue an RCU callback for lazy invocation after a grace period. -@@ -3291,6 +3412,7 @@ +@@ -3294,6 +3415,7 @@ } EXPORT_SYMBOL_GPL(synchronize_sched); @@ -15848,7 +14186,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /** * synchronize_rcu_bh - wait until an rcu_bh grace period has elapsed. * -@@ -3317,6 +3439,7 @@ +@@ -3320,6 +3442,7 @@ wait_rcu_gp(call_rcu_bh); } EXPORT_SYMBOL_GPL(synchronize_rcu_bh); @@ -15856,7 +14194,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /** * get_state_synchronize_rcu - Snapshot current RCU state -@@ -3695,6 +3818,7 @@ +@@ -3698,6 +3821,7 @@ mutex_unlock(&rsp->barrier_mutex); } @@ -15864,7 +14202,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /** * rcu_barrier_bh - Wait until all in-flight call_rcu_bh() callbacks complete. */ -@@ -3703,6 +3827,7 @@ +@@ -3706,6 +3830,7 @@ _rcu_barrier(&rcu_bh_state); } EXPORT_SYMBOL_GPL(rcu_barrier_bh); @@ -15872,7 +14210,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /** * rcu_barrier_sched - Wait for in-flight call_rcu_sched() callbacks. -@@ -4196,12 +4321,13 @@ +@@ -4227,12 +4352,13 @@ rcu_bootup_announce(); rcu_init_geometry(); @@ -15887,10 +14225,10 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.c linux-4.8.15/kernel/rcu/tree.c /* * We don't need protection against CPU-hotplug here because -diff -Nur linux-4.8.15.orig/kernel/rcu/tree.h linux-4.8.15/kernel/rcu/tree.h ---- linux-4.8.15.orig/kernel/rcu/tree.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/rcu/tree.h 2017-01-01 17:07:16.027426711 +0100 -@@ -587,18 +587,18 @@ +diff -Nur linux-4.9.6.orig/kernel/rcu/tree.h linux-4.9.6/kernel/rcu/tree.h +--- linux-4.9.6.orig/kernel/rcu/tree.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/rcu/tree.h 2017-01-28 13:59:10.043660493 +0100 +@@ -588,18 +588,18 @@ */ extern struct rcu_state rcu_sched_state; @@ -15911,7 +14249,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.h linux-4.8.15/kernel/rcu/tree.h #ifndef RCU_TREE_NONCORE -@@ -618,10 +618,9 @@ +@@ -619,10 +619,9 @@ static void __init __rcu_init_preempt(void); static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags); static void rcu_preempt_boost_start_gp(struct rcu_node *rnp); @@ -15923,9 +14261,9 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree.h linux-4.8.15/kernel/rcu/tree.h static int rcu_spawn_one_boost_kthread(struct rcu_state *rsp, struct rcu_node *rnp); #endif /* #ifdef CONFIG_RCU_BOOST */ -diff -Nur linux-4.8.15.orig/kernel/rcu/tree_plugin.h linux-4.8.15/kernel/rcu/tree_plugin.h ---- linux-4.8.15.orig/kernel/rcu/tree_plugin.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/rcu/tree_plugin.h 2017-01-01 17:07:16.031426957 +0100 +diff -Nur linux-4.9.6.orig/kernel/rcu/tree_plugin.h linux-4.9.6/kernel/rcu/tree_plugin.h +--- linux-4.9.6.orig/kernel/rcu/tree_plugin.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/rcu/tree_plugin.h 2017-01-28 13:59:10.043660493 +0100 @@ -24,25 +24,10 @@ * Paul E. McKenney <paulmck@linux.vnet.ibm.com> */ @@ -16196,10 +14534,10 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/tree_plugin.h linux-4.8.15/kernel/rcu/tre /* * Prepare a CPU for idle from an RCU perspective. The first major task -diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c ---- linux-4.8.15.orig/kernel/rcu/update.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/rcu/update.c 2017-01-01 17:07:16.031426957 +0100 -@@ -63,7 +63,7 @@ +diff -Nur linux-4.9.6.orig/kernel/rcu/update.c linux-4.9.6/kernel/rcu/update.c +--- linux-4.9.6.orig/kernel/rcu/update.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/rcu/update.c 2017-01-28 13:59:10.043660493 +0100 +@@ -62,7 +62,7 @@ #ifndef CONFIG_TINY_RCU module_param(rcu_expedited, int, 0); module_param(rcu_normal, int, 0); @@ -16208,7 +14546,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c module_param(rcu_normal_after_boot, int, 0); #endif /* #ifndef CONFIG_TINY_RCU */ -@@ -130,8 +130,7 @@ +@@ -132,8 +132,7 @@ } EXPORT_SYMBOL_GPL(rcu_gp_is_normal); @@ -16218,7 +14556,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c /* * Should normal grace-period primitives be expedited? Intended for -@@ -179,8 +178,7 @@ +@@ -182,8 +181,7 @@ */ void rcu_end_inkernel_boot(void) { @@ -16228,7 +14566,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c if (rcu_normal_after_boot) WRITE_ONCE(rcu_normal, 1); } -@@ -295,6 +293,7 @@ +@@ -298,6 +296,7 @@ } EXPORT_SYMBOL_GPL(rcu_read_lock_held); @@ -16236,7 +14574,7 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c /** * rcu_read_lock_bh_held() - might we be in RCU-bh read-side critical section? * -@@ -321,6 +320,7 @@ +@@ -324,6 +323,7 @@ return in_softirq() || irqs_disabled(); } EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); @@ -16244,47 +14582,9 @@ diff -Nur linux-4.8.15.orig/kernel/rcu/update.c linux-4.8.15/kernel/rcu/update.c #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ -diff -Nur linux-4.8.15.orig/kernel/relay.c linux-4.8.15/kernel/relay.c ---- linux-4.8.15.orig/kernel/relay.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/relay.c 2017-01-01 17:07:16.031426957 +0100 -@@ -336,6 +336,10 @@ - { - struct rchan_buf *buf = (struct rchan_buf *)data; - wake_up_interruptible(&buf->read_wait); -+ /* -+ * Stupid polling for now: -+ */ -+ mod_timer(&buf->timer, jiffies + 1); - } - - /** -@@ -353,6 +357,7 @@ - init_waitqueue_head(&buf->read_wait); - kref_init(&buf->kref); - setup_timer(&buf->timer, wakeup_readers, (unsigned long)buf); -+ mod_timer(&buf->timer, jiffies + 1); - } else - del_timer_sync(&buf->timer); - -@@ -767,15 +772,6 @@ - else - buf->early_bytes += buf->chan->subbuf_size - - buf->padding[old_subbuf]; -- smp_mb(); -- if (waitqueue_active(&buf->read_wait)) -- /* -- * Calling wake_up_interruptible() from here -- * will deadlock if we happen to be logging -- * from the scheduler (trying to re-grab -- * rq->lock), so defer it. -- */ -- mod_timer(&buf->timer, jiffies + 1); - } - - old = buf->data; -diff -Nur linux-4.8.15.orig/kernel/sched/completion.c linux-4.8.15/kernel/sched/completion.c ---- linux-4.8.15.orig/kernel/sched/completion.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/completion.c 2017-01-01 17:07:16.031426957 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/completion.c linux-4.9.6/kernel/sched/completion.c +--- linux-4.9.6.orig/kernel/sched/completion.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/completion.c 2017-01-28 13:59:10.043660493 +0100 @@ -30,10 +30,10 @@ { unsigned long flags; @@ -16375,9 +14675,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/completion.c linux-4.8.15/kernel/sched/ return true; } EXPORT_SYMBOL(completion_done); -diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c ---- linux-4.8.15.orig/kernel/sched/core.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/core.c 2017-01-01 17:07:16.035427212 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/core.c linux-4.9.6/kernel/sched/core.c +--- linux-4.9.6.orig/kernel/sched/core.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/core.c 2017-01-28 13:59:10.043660493 +0100 @@ -129,7 +129,11 @@ * Number of tasks to iterate in a single balance run. * Limited because this is done with IRQs disabled. @@ -16484,7 +14784,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c return cpu; } /* -@@ -1089,6 +1134,11 @@ +@@ -1100,6 +1145,11 @@ lockdep_assert_held(&p->pi_lock); @@ -16496,8 +14796,8 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c queued = task_on_rq_queued(p); running = task_current(rq, p); -@@ -1111,6 +1161,84 @@ - enqueue_task(rq, p, ENQUEUE_RESTORE); +@@ -1122,6 +1172,84 @@ + set_curr_task(rq, p); } +static DEFINE_PER_CPU(struct cpumask, sched_cpumasks); @@ -16581,7 +14881,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /* * Change a given task's CPU affinity. Migrate the thread to a * proper CPU and schedule it away if the CPU it's executing on -@@ -1168,7 +1296,7 @@ +@@ -1179,7 +1307,7 @@ } /* Can the task run on the task's current CPU? If so, we're done */ @@ -16590,7 +14890,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c goto out; dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask); -@@ -1355,6 +1483,18 @@ +@@ -1366,6 +1494,18 @@ return ret; } @@ -16609,7 +14909,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /* * wait_task_inactive - wait for a thread to unschedule. * -@@ -1399,7 +1539,7 @@ +@@ -1410,7 +1550,7 @@ * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -16618,7 +14918,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c return 0; cpu_relax(); } -@@ -1414,7 +1554,8 @@ +@@ -1425,7 +1565,8 @@ running = task_running(rq, p); queued = task_on_rq_queued(p); ncsw = 0; @@ -16628,7 +14928,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c ncsw = p->nvcsw | LONG_MIN; /* sets MSB */ task_rq_unlock(rq, p, &rf); -@@ -1670,10 +1811,6 @@ +@@ -1680,10 +1821,6 @@ { activate_task(rq, p, en_flags); p->on_rq = TASK_ON_RQ_QUEUED; @@ -16639,7 +14939,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c } /* -@@ -2008,8 +2145,27 @@ +@@ -2018,8 +2155,27 @@ */ smp_mb__before_spinlock(); raw_spin_lock_irqsave(&p->pi_lock, flags); @@ -16668,12 +14968,13 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c trace_sched_waking(p); -@@ -2093,53 +2249,6 @@ +@@ -2102,53 +2258,6 @@ } /** - * try_to_wake_up_local - try to wake up a local task with rq lock held - * @p: the thread to be awakened +- * @cookie: context's cookie for pinning - * - * Put @p on the run-queue if it's not already there. The caller must - * ensure that this_rq() is locked, @p is bound to this_rq() and not @@ -16712,8 +15013,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c - ttwu_activate(rq, p, ENQUEUE_WAKEUP); - - ttwu_do_wakeup(rq, p, 0, cookie); -- if (schedstat_enabled()) -- ttwu_stat(p, smp_processor_id(), 0); +- ttwu_stat(p, smp_processor_id(), 0); -out: - raw_spin_unlock(&p->pi_lock); -} @@ -16722,7 +15022,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c * wake_up_process - Wake up a specific process * @p: The process to be woken up. * -@@ -2157,6 +2266,18 @@ +@@ -2166,6 +2275,18 @@ } EXPORT_SYMBOL(wake_up_process); @@ -16741,7 +15041,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c int wake_up_state(struct task_struct *p, unsigned int state) { return try_to_wake_up(p, state, 0); -@@ -2433,6 +2554,9 @@ +@@ -2442,6 +2563,9 @@ p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -16751,7 +15051,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -2761,8 +2885,12 @@ +@@ -2770,21 +2894,16 @@ finish_arch_post_lock_switch(); fire_sched_in_preempt_notifiers(current); @@ -16765,8 +15065,21 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); -@@ -3237,6 +3365,77 @@ - schedstat_inc(this_rq(), sched_count); + +- /* +- * Remove function-return probe instances associated with this +- * task and put them back on the free list. +- */ +- kprobe_flush_task(prev); +- +- /* Task is done with its stack. */ +- put_task_stack(prev); +- + put_task_struct(prev); + } + +@@ -3252,6 +3371,77 @@ + schedstat_inc(this_rq()->sched_count); } +#if defined(CONFIG_PREEMPT_RT_FULL) && defined(CONFIG_SMP) @@ -16843,7 +15156,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /* * Pick up the highest-prio task: */ -@@ -3364,19 +3563,6 @@ +@@ -3368,19 +3558,6 @@ } else { deactivate_task(rq, prev, DEQUEUE_SLEEP); prev->on_rq = 0; @@ -16863,7 +15176,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c } switch_count = &prev->nvcsw; } -@@ -3386,6 +3572,7 @@ +@@ -3390,6 +3567,7 @@ next = pick_next_task(rq, prev, cookie); clear_tsk_need_resched(prev); @@ -16871,7 +15184,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c clear_preempt_need_resched(); rq->clock_skip_update = 0; -@@ -3407,9 +3594,20 @@ +@@ -3437,9 +3615,20 @@ static inline void sched_submit_work(struct task_struct *tsk) { @@ -16893,7 +15206,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c * If we are going to sleep and we have plugged IO queued, * make sure to submit it to avoid deadlocks. */ -@@ -3417,6 +3615,12 @@ +@@ -3447,6 +3636,12 @@ blk_schedule_flush_plug(tsk); } @@ -16906,7 +15219,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c asmlinkage __visible void __sched schedule(void) { struct task_struct *tsk = current; -@@ -3427,6 +3631,7 @@ +@@ -3457,6 +3652,7 @@ __schedule(false); sched_preempt_enable_no_resched(); } while (need_resched()); @@ -16914,7 +15227,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c } EXPORT_SYMBOL(schedule); -@@ -3490,6 +3695,30 @@ +@@ -3520,6 +3716,30 @@ } while (need_resched()); } @@ -16945,7 +15258,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c #ifdef CONFIG_PREEMPT /* * this is the entry point to schedule() from in-kernel preemption -@@ -3504,7 +3733,8 @@ +@@ -3534,7 +3754,8 @@ */ if (likely(!preemptible())) return; @@ -16955,7 +15268,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); -@@ -3531,6 +3761,9 @@ +@@ -3561,6 +3782,9 @@ if (likely(!preemptible())) return; @@ -16965,7 +15278,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c do { /* * Because the function tracer can trace preempt_count_sub() -@@ -3553,7 +3786,16 @@ +@@ -3583,7 +3807,16 @@ * an infinite recursion. */ prev_ctx = exception_enter(); @@ -16982,7 +15295,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c exception_exit(prev_ctx); preempt_latency_stop(1); -@@ -4901,6 +5143,7 @@ +@@ -4939,6 +5172,7 @@ } EXPORT_SYMBOL(__cond_resched_lock); @@ -16990,7 +15303,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c int __sched __cond_resched_softirq(void) { BUG_ON(!in_softirq()); -@@ -4914,6 +5157,7 @@ +@@ -4952,6 +5186,7 @@ return 0; } EXPORT_SYMBOL(__cond_resched_softirq); @@ -16998,7 +15311,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /** * yield - yield the current processor to other threads. -@@ -5283,7 +5527,9 @@ +@@ -5315,7 +5550,9 @@ /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); @@ -17009,7 +15322,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /* * The idle tasks have their own, simple scheduling class: */ -@@ -5426,6 +5672,8 @@ +@@ -5458,6 +5695,8 @@ #endif /* CONFIG_NUMA_BALANCING */ #ifdef CONFIG_HOTPLUG_CPU @@ -17018,7 +15331,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c /* * Ensures that the idle task is using init_mm right before its cpu goes * offline. -@@ -5440,7 +5688,12 @@ +@@ -5472,7 +5711,12 @@ switch_mm_irqs_off(mm, &init_mm, current); finish_arch_post_lock_switch(); } @@ -17032,7 +15345,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c } /* -@@ -7315,6 +7568,10 @@ +@@ -7418,6 +7662,10 @@ update_max_interval(); nohz_balance_exit_idle(cpu); hrtick_clear(rq); @@ -17043,7 +15356,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c return 0; } #endif -@@ -7566,7 +7823,7 @@ +@@ -7698,7 +7946,7 @@ #ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { @@ -17052,10 +15365,10 @@ diff -Nur linux-4.8.15.orig/kernel/sched/core.c linux-4.8.15/kernel/sched/core.c return (nested == preempt_offset); } -diff -Nur linux-4.8.15.orig/kernel/sched/deadline.c linux-4.8.15/kernel/sched/deadline.c ---- linux-4.8.15.orig/kernel/sched/deadline.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/deadline.c 2017-01-01 17:07:16.035427212 +0100 -@@ -697,6 +697,7 @@ +diff -Nur linux-4.9.6.orig/kernel/sched/deadline.c linux-4.9.6/kernel/sched/deadline.c +--- linux-4.9.6.orig/kernel/sched/deadline.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/deadline.c 2017-01-28 13:59:10.043660493 +0100 +@@ -687,6 +687,7 @@ hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); timer->function = dl_task_timer; @@ -17063,10 +15376,10 @@ diff -Nur linux-4.8.15.orig/kernel/sched/deadline.c linux-4.8.15/kernel/sched/de } static -diff -Nur linux-4.8.15.orig/kernel/sched/debug.c linux-4.8.15/kernel/sched/debug.c ---- linux-4.8.15.orig/kernel/sched/debug.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/debug.c 2017-01-01 17:07:16.035427212 +0100 -@@ -552,6 +552,9 @@ +diff -Nur linux-4.9.6.orig/kernel/sched/debug.c linux-4.9.6/kernel/sched/debug.c +--- linux-4.9.6.orig/kernel/sched/debug.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/debug.c 2017-01-28 13:59:10.043660493 +0100 +@@ -558,6 +558,9 @@ P(rt_throttled); PN(rt_time); PN(rt_runtime); @@ -17076,7 +15389,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/debug.c linux-4.8.15/kernel/sched/debug #undef PN #undef P -@@ -947,6 +950,10 @@ +@@ -953,6 +956,10 @@ #endif P(policy); P(prio); @@ -17084,13 +15397,13 @@ diff -Nur linux-4.8.15.orig/kernel/sched/debug.c linux-4.8.15/kernel/sched/debug + P(migrate_disable); +#endif + P(nr_cpus_allowed); + #undef PN_SCHEDSTAT #undef PN #undef __PN - #undef P -diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c ---- linux-4.8.15.orig/kernel/sched/fair.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/fair.c 2017-01-01 17:07:16.039427472 +0100 -@@ -3508,7 +3508,7 @@ +diff -Nur linux-4.9.6.orig/kernel/sched/fair.c linux-4.9.6/kernel/sched/fair.c +--- linux-4.9.6.orig/kernel/sched/fair.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/fair.c 2017-01-28 13:59:10.047660646 +0100 +@@ -3518,7 +3518,7 @@ ideal_runtime = sched_slice(cfs_rq, curr); delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; if (delta_exec > ideal_runtime) { @@ -17099,7 +15412,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c /* * The current task ran long enough, ensure it doesn't get * re-elected due to buddy favours. -@@ -3532,7 +3532,7 @@ +@@ -3542,7 +3542,7 @@ return; if (delta > ideal_runtime) @@ -17108,7 +15421,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c } static void -@@ -3677,7 +3677,7 @@ +@@ -3684,7 +3684,7 @@ * validating it and just reschedule. */ if (queued) { @@ -17117,7 +15430,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c return; } /* -@@ -3859,7 +3859,7 @@ +@@ -3866,7 +3866,7 @@ * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -17126,7 +15439,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c } static __always_inline -@@ -4487,7 +4487,7 @@ +@@ -4494,7 +4494,7 @@ if (delta < 0) { if (rq->curr == p) @@ -17135,7 +15448,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c return; } hrtick_start(rq, delta); -@@ -5676,7 +5676,7 @@ +@@ -5905,7 +5905,7 @@ return; preempt: @@ -17144,7 +15457,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c /* * Only set the backward buddy when the current task is still * on the rq. This can happen when a wakeup gets interleaved -@@ -8402,7 +8402,7 @@ +@@ -8631,7 +8631,7 @@ * 'current' within the tree based on its new key value. */ swap(curr->vruntime, se->vruntime); @@ -17153,7 +15466,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c } se->vruntime -= cfs_rq->min_vruntime; -@@ -8426,7 +8426,7 @@ +@@ -8655,7 +8655,7 @@ */ if (rq->curr == p) { if (p->prio > oldprio) @@ -17162,9 +15475,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/fair.c linux-4.8.15/kernel/sched/fair.c } else check_preempt_curr(rq, p, 0); } -diff -Nur linux-4.8.15.orig/kernel/sched/features.h linux-4.8.15/kernel/sched/features.h ---- linux-4.8.15.orig/kernel/sched/features.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/features.h 2017-01-01 17:07:16.039427472 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/features.h linux-4.9.6/kernel/sched/features.h +--- linux-4.9.6.orig/kernel/sched/features.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/features.h 2017-01-28 13:59:10.047660646 +0100 @@ -45,11 +45,19 @@ */ SCHED_FEAT(NONTASK_CAPACITY, true) @@ -17185,9 +15498,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/features.h linux-4.8.15/kernel/sched/fe #ifdef HAVE_RT_PUSH_IPI /* -diff -Nur linux-4.8.15.orig/kernel/sched/Makefile linux-4.8.15/kernel/sched/Makefile ---- linux-4.8.15.orig/kernel/sched/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/Makefile 2017-01-01 17:07:16.031426957 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/Makefile linux-4.9.6/kernel/sched/Makefile +--- linux-4.9.6.orig/kernel/sched/Makefile 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/Makefile 2017-01-28 13:59:10.043660493 +0100 @@ -17,7 +17,7 @@ obj-y += core.o loadavg.o clock.o cputime.o @@ -17197,9 +15510,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/Makefile linux-4.8.15/kernel/sched/Make obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o obj-$(CONFIG_SCHEDSTATS) += stats.o -diff -Nur linux-4.8.15.orig/kernel/sched/rt.c linux-4.8.15/kernel/sched/rt.c ---- linux-4.8.15.orig/kernel/sched/rt.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/rt.c 2017-01-01 17:07:16.039427472 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/rt.c linux-4.9.6/kernel/sched/rt.c +--- linux-4.9.6.orig/kernel/sched/rt.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/rt.c 2017-01-28 13:59:10.047660646 +0100 @@ -47,6 +47,7 @@ hrtimer_init(&rt_b->rt_period_timer, @@ -17216,10 +15529,10 @@ diff -Nur linux-4.8.15.orig/kernel/sched/rt.c linux-4.8.15/kernel/sched/rt.c #endif #endif /* CONFIG_SMP */ /* We start is dequeued state, because no RT tasks are queued */ -diff -Nur linux-4.8.15.orig/kernel/sched/sched.h linux-4.8.15/kernel/sched/sched.h ---- linux-4.8.15.orig/kernel/sched/sched.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/sched.h 2017-01-01 17:07:16.039427472 +0100 -@@ -1138,6 +1138,7 @@ +diff -Nur linux-4.9.6.orig/kernel/sched/sched.h linux-4.9.6/kernel/sched/sched.h +--- linux-4.9.6.orig/kernel/sched/sched.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/sched.h 2017-01-28 13:59:10.047660646 +0100 +@@ -1163,6 +1163,7 @@ #define WF_SYNC 0x01 /* waker goes to sleep after wakeup */ #define WF_FORK 0x02 /* child wakeup after fork */ #define WF_MIGRATED 0x4 /* internal use, task got migrated */ @@ -17227,7 +15540,7 @@ diff -Nur linux-4.8.15.orig/kernel/sched/sched.h linux-4.8.15/kernel/sched/sched /* * To aid in avoiding the subversion of "niceness" due to uneven distribution -@@ -1316,6 +1317,15 @@ +@@ -1346,6 +1347,15 @@ extern void resched_curr(struct rq *rq); extern void resched_cpu(int cpu); @@ -17243,9 +15556,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/sched.h linux-4.8.15/kernel/sched/sched extern struct rt_bandwidth def_rt_bandwidth; extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime); -diff -Nur linux-4.8.15.orig/kernel/sched/swait.c linux-4.8.15/kernel/sched/swait.c ---- linux-4.8.15.orig/kernel/sched/swait.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/sched/swait.c 2017-01-01 17:07:16.039427472 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/swait.c linux-4.9.6/kernel/sched/swait.c +--- linux-4.9.6.orig/kernel/sched/swait.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/sched/swait.c 2017-01-28 13:59:10.047660646 +0100 @@ -1,5 +1,6 @@ #include <linux/sched.h> #include <linux/swait.h> @@ -17287,9 +15600,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/swait.c linux-4.8.15/kernel/sched/swait raw_spin_lock_irq(&q->lock); list_splice_init(&q->task_list, &tmp); while (!list_empty(&tmp)) { -diff -Nur linux-4.8.15.orig/kernel/sched/swork.c linux-4.8.15/kernel/sched/swork.c ---- linux-4.8.15.orig/kernel/sched/swork.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/kernel/sched/swork.c 2017-01-01 17:07:16.039427472 +0100 +diff -Nur linux-4.9.6.orig/kernel/sched/swork.c linux-4.9.6/kernel/sched/swork.c +--- linux-4.9.6.orig/kernel/sched/swork.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/kernel/sched/swork.c 2017-01-28 13:59:10.047660646 +0100 @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner daniel.wagner@bmw-carit.de @@ -17464,9 +15777,9 @@ diff -Nur linux-4.8.15.orig/kernel/sched/swork.c linux-4.8.15/kernel/sched/swork + mutex_unlock(&worker_mutex); +} +EXPORT_SYMBOL_GPL(swork_put); -diff -Nur linux-4.8.15.orig/kernel/signal.c linux-4.8.15/kernel/signal.c ---- linux-4.8.15.orig/kernel/signal.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/signal.c 2017-01-01 17:07:16.043427737 +0100 +diff -Nur linux-4.9.6.orig/kernel/signal.c linux-4.9.6/kernel/signal.c +--- linux-4.9.6.orig/kernel/signal.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/signal.c 2017-01-28 13:59:10.047660646 +0100 @@ -14,6 +14,7 @@ #include <linux/export.h> #include <linux/init.h> @@ -17696,9 +16009,9 @@ diff -Nur linux-4.8.15.orig/kernel/signal.c linux-4.8.15/kernel/signal.c freezable_schedule(); } else { /* -diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c ---- linux-4.8.15.orig/kernel/softirq.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/softirq.c 2017-01-01 17:07:16.043427737 +0100 +diff -Nur linux-4.9.6.orig/kernel/softirq.c linux-4.9.6/kernel/softirq.c +--- linux-4.9.6.orig/kernel/softirq.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/softirq.c 2017-01-28 13:59:10.083662028 +0100 @@ -21,10 +21,12 @@ #include <linux/freezer.h> #include <linux/kthread.h> @@ -17717,12 +16030,12 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c DEFINE_PER_CPU(struct task_struct *, ksoftirqd); +#ifdef CONFIG_PREEMPT_RT_FULL -+#define TIMER_SOFTIRQS ((1 << TIMER_SOFTIRQ) | (1 << HRTIMER_SOFTIRQ)) ++#define TIMER_SOFTIRQS ((1 << TIMER_SOFTIRQ) | (1 << HRTIMER_SOFTIRQ)) +DEFINE_PER_CPU(struct task_struct *, ktimer_softirqd); +#endif const char * const softirq_to_name[NR_SOFTIRQS] = { - "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", + "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "IRQ_POLL", "TASKLET", "SCHED", "HRTIMER", "RCU" }; @@ -17821,7 +16134,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c /* * we cannot loop indefinitely here to avoid userspace starvation, * but we also don't want to introduce a worst case 1/HZ latency -@@ -77,6 +175,79 @@ +@@ -77,6 +175,37 @@ wake_up_process(tsk); } @@ -17856,6 +16169,13 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c + } +} + + /* + * If ksoftirqd is scheduled, we do not want to process pending softirqs + * right now. Let ksoftirqd handle this at its own rate, to get fairness. +@@ -88,6 +217,48 @@ + return tsk && (tsk->state == TASK_RUNNING); + } + +#ifndef CONFIG_PREEMPT_RT_FULL +static inline int ksoftirqd_softirq_pending(void) +{ @@ -17901,7 +16221,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c /* * preempt_count and SOFTIRQ_OFFSET usage: * - preempt_count is changed by SOFTIRQ_OFFSET on entering or leaving -@@ -232,10 +403,8 @@ +@@ -243,10 +414,8 @@ unsigned long end = jiffies + MAX_SOFTIRQ_TIME; unsigned long old_flags = current->flags; int max_restart = MAX_SOFTIRQ_RESTART; @@ -17912,7 +16232,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c /* * Mask out PF_MEMALLOC s current task context is borrowed for the -@@ -254,36 +423,7 @@ +@@ -265,36 +434,7 @@ /* Reset the pending bitmask before enabling irqs */ set_softirq_pending(0); @@ -17950,7 +16270,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c pending = local_softirq_pending(); if (pending) { -@@ -320,6 +460,310 @@ +@@ -331,6 +471,309 @@ } /* @@ -18160,7 +16480,6 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c + wakeup_softirqd(); +} + -+ +void __raise_softirq_irqoff(unsigned int nr) +{ + do_raise_softirq_irqoff(nr); @@ -18261,7 +16580,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c * Enter an interrupt context. */ void irq_enter(void) -@@ -330,9 +774,9 @@ +@@ -341,9 +784,9 @@ * Prevent raise_softirq from needlessly waking up ksoftirqd * here, as softirq will be serviced on return from interrupt. */ @@ -18273,20 +16592,26 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } __irq_enter(); -@@ -340,6 +784,7 @@ +@@ -351,9 +794,13 @@ static inline void invoke_softirq(void) { ++#ifdef CONFIG_PREEMPT_RT_FULL ++ unsigned long flags; ++#endif ++ + if (ksoftirqd_running()) + return; +- +#ifndef CONFIG_PREEMPT_RT_FULL if (!force_irqthreads) { #ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK /* -@@ -359,6 +804,18 @@ +@@ -373,6 +820,17 @@ } else { wakeup_softirqd(); } +#else /* PREEMPT_RT_FULL */ -+ unsigned long flags; + + local_irq_save(flags); + if (__this_cpu_read(ksoftirqd) && @@ -18300,7 +16625,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } static inline void tick_irq_exit(void) -@@ -395,26 +852,6 @@ +@@ -409,26 +867,6 @@ trace_hardirq_exit(); /* must be last! */ } @@ -18327,7 +16652,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c void raise_softirq(unsigned int nr) { unsigned long flags; -@@ -424,12 +861,6 @@ +@@ -438,12 +876,6 @@ local_irq_restore(flags); } @@ -18340,7 +16665,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c void open_softirq(int nr, void (*action)(struct softirq_action *)) { softirq_vec[nr].action = action; -@@ -446,15 +877,45 @@ +@@ -460,15 +892,45 @@ static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec); static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec); @@ -18390,7 +16715,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c local_irq_restore(flags); } EXPORT_SYMBOL(__tasklet_schedule); -@@ -464,10 +925,7 @@ +@@ -478,10 +940,7 @@ unsigned long flags; local_irq_save(flags); @@ -18402,7 +16727,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c local_irq_restore(flags); } EXPORT_SYMBOL(__tasklet_hi_schedule); -@@ -476,82 +934,122 @@ +@@ -490,82 +949,122 @@ { BUG_ON(!irqs_disabled()); @@ -18413,7 +16738,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } EXPORT_SYMBOL(__tasklet_hi_schedule_first); --static void tasklet_action(struct softirq_action *a) +-static __latent_entropy void tasklet_action(struct softirq_action *a) +void tasklet_enable(struct tasklet_struct *t) { - struct tasklet_struct *list; @@ -18534,7 +16859,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c + __tasklet_action(a, list); +} + - static void tasklet_hi_action(struct softirq_action *a) + static __latent_entropy void tasklet_hi_action(struct softirq_action *a) { struct tasklet_struct *list; @@ -18574,7 +16899,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } void tasklet_init(struct tasklet_struct *t, -@@ -572,7 +1070,7 @@ +@@ -586,7 +1085,7 @@ while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { do { @@ -18583,19 +16908,19 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } while (test_bit(TASKLET_STATE_SCHED, &t->state)); } tasklet_unlock_wait(t); -@@ -646,25 +1144,26 @@ +@@ -660,25 +1159,26 @@ open_softirq(HI_SOFTIRQ, tasklet_hi_action); } -static int ksoftirqd_should_run(unsigned int cpu) --{ ++#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT_FULL) ++void tasklet_unlock_wait(struct tasklet_struct *t) + { - return local_softirq_pending(); -} - -static void run_ksoftirqd(unsigned int cpu) -+#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT_FULL) -+void tasklet_unlock_wait(struct tasklet_struct *t) - { +-{ - local_irq_disable(); - if (local_softirq_pending()) { + while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { @@ -18625,7 +16950,7 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c } #ifdef CONFIG_HOTPLUG_CPU -@@ -746,16 +1245,31 @@ +@@ -745,17 +1245,31 @@ static struct smp_hotplug_thread softirq_threads = { .store = &ksoftirqd, @@ -18648,19 +16973,20 @@ diff -Nur linux-4.8.15.orig/kernel/softirq.c linux-4.8.15/kernel/softirq.c + static __init int spawn_ksoftirqd(void) { - register_cpu_notifier(&cpu_nfb); - + cpuhp_setup_state_nocalls(CPUHP_SOFTIRQ_DEAD, "softirq:dead", NULL, + takeover_tasklets); BUG_ON(smpboot_register_percpu_thread(&softirq_threads)); +- +#ifdef CONFIG_PREEMPT_RT_FULL + BUG_ON(smpboot_register_percpu_thread(&softirq_timer_threads)); +#endif - return 0; } -diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machine.c ---- linux-4.8.15.orig/kernel/stop_machine.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/stop_machine.c 2017-01-01 17:07:16.043427737 +0100 -@@ -37,7 +37,7 @@ + early_initcall(spawn_ksoftirqd); +diff -Nur linux-4.9.6.orig/kernel/stop_machine.c linux-4.9.6/kernel/stop_machine.c +--- linux-4.9.6.orig/kernel/stop_machine.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/stop_machine.c 2017-01-28 13:59:10.087662182 +0100 +@@ -36,7 +36,7 @@ struct cpu_stopper { struct task_struct *thread; @@ -18669,7 +16995,7 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi bool enabled; /* is this stopper enabled? */ struct list_head works; /* list of pending works */ -@@ -83,14 +83,14 @@ +@@ -78,14 +78,14 @@ unsigned long flags; bool enabled; @@ -18686,10 +17012,10 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi return enabled; } -@@ -232,8 +232,8 @@ +@@ -231,8 +231,8 @@ + struct cpu_stopper *stopper2 = per_cpu_ptr(&cpu_stopper, cpu2); int err; - - lg_double_lock(&stop_cpus_lock, cpu1, cpu2); + retry: - spin_lock_irq(&stopper1->lock); - spin_lock_nested(&stopper2->lock, SINGLE_DEPTH_NESTING); + raw_spin_lock_irq(&stopper1->lock); @@ -18697,7 +17023,7 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi err = -ENOENT; if (!stopper1->enabled || !stopper2->enabled) -@@ -243,8 +243,8 @@ +@@ -255,8 +255,8 @@ __cpu_stop_queue_work(stopper1, work1); __cpu_stop_queue_work(stopper2, work2); unlock: @@ -18705,46 +17031,10 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi - spin_unlock_irq(&stopper1->lock); + raw_spin_unlock(&stopper2->lock); + raw_spin_unlock_irq(&stopper1->lock); - lg_double_unlock(&stop_cpus_lock, cpu1, cpu2); - - return err; -@@ -321,18 +321,21 @@ - - static bool queue_stop_cpus_work(const struct cpumask *cpumask, - cpu_stop_fn_t fn, void *arg, -- struct cpu_stop_done *done) -+ struct cpu_stop_done *done, bool inactive) - { - struct cpu_stop_work *work; - unsigned int cpu; - bool queued = false; - /* -- * Disable preemption while queueing to avoid getting -- * preempted by a stopper which might wait for other stoppers -- * to enter @fn which can lead to deadlock. -+ * Make sure that all work is queued on all cpus before -+ * any of the cpus can execute it. - */ -- lg_global_lock(&stop_cpus_lock); -+ if (!inactive) -+ lg_global_lock(&stop_cpus_lock); -+ else -+ lg_global_trylock_relax(&stop_cpus_lock); -+ - for_each_cpu(cpu, cpumask) { - work = &per_cpu(cpu_stopper.stop_work, cpu); - work->fn = fn; -@@ -352,7 +355,7 @@ - struct cpu_stop_done done; - - cpu_stop_init_done(&done, cpumask_weight(cpumask)); -- if (!queue_stop_cpus_work(cpumask, fn, arg, &done)) -+ if (!queue_stop_cpus_work(cpumask, fn, arg, &done, false)) - return -ENOENT; - wait_for_completion(&done.completion); - return done.ret; -@@ -433,9 +436,9 @@ + if (unlikely(err == -EDEADLK)) { + while (stop_cpus_in_progress) +@@ -448,9 +448,9 @@ unsigned long flags; int run; @@ -18756,7 +17046,7 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi return run; } -@@ -446,13 +449,13 @@ +@@ -461,13 +461,13 @@ repeat: work = NULL; @@ -18772,24 +17062,16 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi if (work) { cpu_stop_fn_t fn = work->fn; -@@ -460,6 +463,16 @@ +@@ -475,6 +475,8 @@ struct cpu_stop_done *done = work->done; int ret; -+ /* -+ * Wait until the stopper finished scheduling on all -+ * cpus -+ */ -+ lg_global_lock(&stop_cpus_lock); -+ /* -+ * Let other cpu threads continue as well -+ */ -+ lg_global_unlock(&stop_cpus_lock); ++ /* XXX */ + /* cpu stop callbacks must not sleep, make in_atomic() == T */ preempt_count_inc(); ret = fn(arg); -@@ -526,10 +539,12 @@ +@@ -541,7 +543,7 @@ for_each_possible_cpu(cpu) { struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu); @@ -18798,23 +17080,9 @@ diff -Nur linux-4.8.15.orig/kernel/stop_machine.c linux-4.8.15/kernel/stop_machi INIT_LIST_HEAD(&stopper->works); } -+ lg_lock_init(&stop_cpus_lock, "stop_cpus_lock"); -+ - BUG_ON(smpboot_register_percpu_thread(&cpu_stop_threads)); - stop_machine_unpark(raw_smp_processor_id()); - stop_machine_initialized = true; -@@ -624,7 +639,7 @@ - set_state(&msdata, MULTI_STOP_PREPARE); - cpu_stop_init_done(&done, num_active_cpus()); - queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, -- &done); -+ &done, true); - ret = multi_cpu_stop(&msdata); - - /* Busy wait for completion. */ -diff -Nur linux-4.8.15.orig/kernel/time/hrtimer.c linux-4.8.15/kernel/time/hrtimer.c ---- linux-4.8.15.orig/kernel/time/hrtimer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/hrtimer.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/hrtimer.c linux-4.9.6/kernel/time/hrtimer.c +--- linux-4.9.6.orig/kernel/time/hrtimer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/hrtimer.c 2017-01-28 13:59:10.087662182 +0100 @@ -53,6 +53,7 @@ #include <asm/uaccess.h> @@ -19242,9 +17510,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/hrtimer.c linux-4.8.15/kernel/time/hrtim } /** -diff -Nur linux-4.8.15.orig/kernel/time/itimer.c linux-4.8.15/kernel/time/itimer.c ---- linux-4.8.15.orig/kernel/time/itimer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/itimer.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/itimer.c linux-4.9.6/kernel/time/itimer.c +--- linux-4.9.6.orig/kernel/time/itimer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/itimer.c 2017-01-28 13:59:10.087662182 +0100 @@ -213,6 +213,7 @@ /* We are sharing ->siglock with it_real_fn() */ if (hrtimer_try_to_cancel(timer) < 0) { @@ -19253,9 +17521,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/itimer.c linux-4.8.15/kernel/time/itimer goto again; } expires = timeval_to_ktime(value->it_value); -diff -Nur linux-4.8.15.orig/kernel/time/jiffies.c linux-4.8.15/kernel/time/jiffies.c ---- linux-4.8.15.orig/kernel/time/jiffies.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/jiffies.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/jiffies.c linux-4.9.6/kernel/time/jiffies.c +--- linux-4.9.6.orig/kernel/time/jiffies.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/jiffies.c 2017-01-28 13:59:10.087662182 +0100 @@ -74,7 +74,8 @@ .max_cycles = 10, }; @@ -19278,9 +17546,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/jiffies.c linux-4.8.15/kernel/time/jiffi return ret; } EXPORT_SYMBOL(get_jiffies_64); -diff -Nur linux-4.8.15.orig/kernel/time/ntp.c linux-4.8.15/kernel/time/ntp.c ---- linux-4.8.15.orig/kernel/time/ntp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/ntp.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/ntp.c linux-4.9.6/kernel/time/ntp.c +--- linux-4.9.6.orig/kernel/time/ntp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/ntp.c 2017-01-28 13:59:10.087662182 +0100 @@ -17,6 +17,7 @@ #include <linux/module.h> #include <linux/rtc.h> @@ -19325,9 +17593,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/ntp.c linux-4.8.15/kernel/time/ntp.c #else void ntp_notify_cmos_timer(void) { } -diff -Nur linux-4.8.15.orig/kernel/time/posix-cpu-timers.c linux-4.8.15/kernel/time/posix-cpu-timers.c ---- linux-4.8.15.orig/kernel/time/posix-cpu-timers.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/posix-cpu-timers.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/posix-cpu-timers.c linux-4.9.6/kernel/time/posix-cpu-timers.c +--- linux-4.9.6.orig/kernel/time/posix-cpu-timers.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/posix-cpu-timers.c 2017-01-28 13:59:10.087662182 +0100 @@ -3,6 +3,7 @@ */ @@ -19561,9 +17829,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/posix-cpu-timers.c linux-4.8.15/kernel/t /* * Set one of the process-wide special case CPU timers or RLIMIT_CPU. * The tsk->sighand->siglock must be held by the caller. -diff -Nur linux-4.8.15.orig/kernel/time/posix-timers.c linux-4.8.15/kernel/time/posix-timers.c ---- linux-4.8.15.orig/kernel/time/posix-timers.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/posix-timers.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/posix-timers.c linux-4.9.6/kernel/time/posix-timers.c +--- linux-4.9.6.orig/kernel/time/posix-timers.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/posix-timers.c 2017-01-28 13:59:10.087662182 +0100 @@ -506,6 +506,7 @@ static struct pid *good_sigevent(sigevent_t * event) { @@ -19659,9 +17927,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/posix-timers.c linux-4.8.15/kernel/time/ goto retry_delete; } list_del(&timer->list); -diff -Nur linux-4.8.15.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.8.15/kernel/time/tick-broadcast-hrtimer.c ---- linux-4.8.15.orig/kernel/time/tick-broadcast-hrtimer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/tick-broadcast-hrtimer.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.9.6/kernel/time/tick-broadcast-hrtimer.c +--- linux-4.9.6.orig/kernel/time/tick-broadcast-hrtimer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/tick-broadcast-hrtimer.c 2017-01-28 13:59:10.087662182 +0100 @@ -107,5 +107,6 @@ { hrtimer_init(&bctimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); @@ -19669,9 +17937,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-broadcast-hrtimer.c linux-4.8.15/ke + bctimer.irqsafe = true; clockevents_register_device(&ce_broadcast_hrtimer); } -diff -Nur linux-4.8.15.orig/kernel/time/tick-common.c linux-4.8.15/kernel/time/tick-common.c ---- linux-4.8.15.orig/kernel/time/tick-common.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/tick-common.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/tick-common.c linux-4.9.6/kernel/time/tick-common.c +--- linux-4.9.6.orig/kernel/time/tick-common.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/tick-common.c 2017-01-28 13:59:10.087662182 +0100 @@ -79,13 +79,15 @@ static void tick_periodic(int cpu) { @@ -19702,9 +17970,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-common.c linux-4.8.15/kernel/time/t clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT); -diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/tick-sched.c ---- linux-4.8.15.orig/kernel/time/tick-sched.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/tick-sched.c 2017-01-01 17:07:16.047427991 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/tick-sched.c linux-4.9.6/kernel/time/tick-sched.c +--- linux-4.9.6.orig/kernel/time/tick-sched.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/tick-sched.c 2017-01-28 13:59:10.087662182 +0100 @@ -62,7 +62,8 @@ return; @@ -19747,7 +18015,7 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/ti return period; } -@@ -212,6 +217,7 @@ +@@ -215,6 +220,7 @@ static DEFINE_PER_CPU(struct irq_work, nohz_full_kick_work) = { .func = nohz_full_kick_func, @@ -19755,7 +18023,7 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/ti }; /* -@@ -670,10 +676,10 @@ +@@ -673,10 +679,10 @@ /* Read jiffies and the time when jiffies were updated last */ do { @@ -19768,7 +18036,7 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/ti ts->last_jiffies = basejiff; if (rcu_needs_cpu(basemono, &next_rcu) || -@@ -874,14 +880,7 @@ +@@ -877,14 +883,7 @@ return false; if (unlikely(local_softirq_pending() && cpu_online(cpu))) { @@ -19784,7 +18052,7 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/ti return false; } -@@ -1190,6 +1189,7 @@ +@@ -1193,6 +1192,7 @@ * Emulate tick processing via per-CPU hrtimers: */ hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); @@ -19792,9 +18060,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/tick-sched.c linux-4.8.15/kernel/time/ti ts->sched_timer.function = tick_sched_timer; /* Get the next period (per-CPU) */ -diff -Nur linux-4.8.15.orig/kernel/time/timekeeping.c linux-4.8.15/kernel/time/timekeeping.c ---- linux-4.8.15.orig/kernel/time/timekeeping.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/timekeeping.c 2017-01-01 17:07:16.051428246 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.c linux-4.9.6/kernel/time/timekeeping.c +--- linux-4.9.6.orig/kernel/time/timekeeping.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/timekeeping.c 2017-01-28 13:59:10.087662182 +0100 @@ -2328,8 +2328,10 @@ */ void xtime_update(unsigned long ticks) @@ -19808,9 +18076,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/timekeeping.c linux-4.8.15/kernel/time/t + raw_spin_unlock(&jiffies_lock); update_wall_time(); } -diff -Nur linux-4.8.15.orig/kernel/time/timekeeping.h linux-4.8.15/kernel/time/timekeeping.h ---- linux-4.8.15.orig/kernel/time/timekeeping.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/timekeeping.h 2017-01-01 17:07:16.051428246 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/timekeeping.h linux-4.9.6/kernel/time/timekeeping.h +--- linux-4.9.6.orig/kernel/time/timekeeping.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/timekeeping.h 2017-01-28 13:59:10.087662182 +0100 @@ -19,7 +19,8 @@ extern void do_timer(unsigned long ticks); extern void update_wall_time(void); @@ -19821,9 +18089,9 @@ diff -Nur linux-4.8.15.orig/kernel/time/timekeeping.h linux-4.8.15/kernel/time/t #define CS_NAME_LEN 32 -diff -Nur linux-4.8.15.orig/kernel/time/timer.c linux-4.8.15/kernel/time/timer.c ---- linux-4.8.15.orig/kernel/time/timer.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/time/timer.c 2017-01-01 17:07:16.051428246 +0100 +diff -Nur linux-4.9.6.orig/kernel/time/timer.c linux-4.9.6/kernel/time/timer.c +--- linux-4.9.6.orig/kernel/time/timer.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/time/timer.c 2017-01-28 13:59:10.087662182 +0100 @@ -193,8 +193,11 @@ #endif @@ -20075,10 +18343,10 @@ diff -Nur linux-4.8.15.orig/kernel/time/timer.c linux-4.8.15/kernel/time/timer.c } } -diff -Nur linux-4.8.15.orig/kernel/trace/Kconfig linux-4.8.15/kernel/trace/Kconfig ---- linux-4.8.15.orig/kernel/trace/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/Kconfig 2017-01-01 17:07:16.051428246 +0100 -@@ -187,6 +187,24 @@ +diff -Nur linux-4.9.6.orig/kernel/trace/Kconfig linux-4.9.6/kernel/trace/Kconfig +--- linux-4.9.6.orig/kernel/trace/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/Kconfig 2017-01-28 13:59:10.087662182 +0100 +@@ -182,6 +182,24 @@ enabled. This option and the preempt-off timing option can be used together or separately.) @@ -20103,15 +18371,7 @@ diff -Nur linux-4.8.15.orig/kernel/trace/Kconfig linux-4.8.15/kernel/trace/Kconf config PREEMPT_TRACER bool "Preemption-off Latency Tracer" default n -@@ -197,6 +215,7 @@ - select RING_BUFFER_ALLOW_SWAP - select TRACER_SNAPSHOT - select TRACER_SNAPSHOT_PER_CPU_SWAP -+ select USING_GET_LOCK_PARENT_IP - help - This option measures the time spent in preemption-off critical - sections, with microsecond accuracy. -@@ -211,6 +230,24 @@ +@@ -206,6 +224,24 @@ enabled. This option and the irqs-off timing option can be used together or separately.) @@ -20136,9 +18396,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/Kconfig linux-4.8.15/kernel/trace/Kconf config SCHED_TRACER bool "Scheduling Latency Tracer" select GENERIC_TRACER -@@ -221,6 +258,74 @@ - This tracer tracks the latency of the highest priority task - to be scheduled in, starting from the point it has woken up. +@@ -251,6 +287,74 @@ + file. Every time a latency is greater than tracing_thresh, it will + be recorded into the ring buffer. +config WAKEUP_LATENCY_HIST + bool "Scheduling Latency Histogram" @@ -20211,9 +18471,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/Kconfig linux-4.8.15/kernel/trace/Kconf config ENABLE_DEFAULT_TRACERS bool "Trace process context switches and events" depends on !GENERIC_TRACER -diff -Nur linux-4.8.15.orig/kernel/trace/latency_hist.c linux-4.8.15/kernel/trace/latency_hist.c ---- linux-4.8.15.orig/kernel/trace/latency_hist.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-4.8.15/kernel/trace/latency_hist.c 2017-01-01 17:07:16.051428246 +0100 +diff -Nur linux-4.9.6.orig/kernel/trace/latency_hist.c linux-4.9.6/kernel/trace/latency_hist.c +--- linux-4.9.6.orig/kernel/trace/latency_hist.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-4.9.6/kernel/trace/latency_hist.c 2017-01-28 13:59:10.091662336 +0100 @@ -0,0 +1,1178 @@ +/* + * kernel/trace/latency_hist.c @@ -21393,13 +19653,13 @@ diff -Nur linux-4.8.15.orig/kernel/trace/latency_hist.c linux-4.8.15/kernel/trac +} + +device_initcall(latency_hist_init); -diff -Nur linux-4.8.15.orig/kernel/trace/Makefile linux-4.8.15/kernel/trace/Makefile ---- linux-4.8.15.orig/kernel/trace/Makefile 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/Makefile 2017-01-01 17:07:16.051428246 +0100 -@@ -37,6 +37,10 @@ - obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o +diff -Nur linux-4.9.6.orig/kernel/trace/Makefile linux-4.9.6/kernel/trace/Makefile +--- linux-4.9.6.orig/kernel/trace/Makefile 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/Makefile 2017-01-28 13:59:10.091662336 +0100 +@@ -38,6 +38,10 @@ obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o + obj-$(CONFIG_HWLAT_TRACER) += trace_hwlat.o +obj-$(CONFIG_INTERRUPT_OFF_HIST) += latency_hist.o +obj-$(CONFIG_PREEMPT_OFF_HIST) += latency_hist.o +obj-$(CONFIG_WAKEUP_LATENCY_HIST) += latency_hist.o @@ -21407,9 +19667,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/Makefile linux-4.8.15/kernel/trace/Make obj-$(CONFIG_NOP_TRACER) += trace_nop.o obj-$(CONFIG_STACK_TRACER) += trace_stack.o obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o -diff -Nur linux-4.8.15.orig/kernel/trace/trace.c linux-4.8.15/kernel/trace/trace.c ---- linux-4.8.15.orig/kernel/trace/trace.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/trace.c 2017-01-01 17:07:16.055428503 +0100 +diff -Nur linux-4.9.6.orig/kernel/trace/trace.c linux-4.9.6/kernel/trace/trace.c +--- linux-4.9.6.orig/kernel/trace/trace.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/trace.c 2017-01-28 13:59:10.091662336 +0100 @@ -1897,6 +1897,7 @@ struct task_struct *tsk = current; @@ -21477,9 +19737,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace.c linux-4.8.15/kernel/trace/trace } void -diff -Nur linux-4.8.15.orig/kernel/trace/trace_events.c linux-4.8.15/kernel/trace/trace_events.c ---- linux-4.8.15.orig/kernel/trace/trace_events.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/trace_events.c 2017-01-01 17:07:16.059428767 +0100 +diff -Nur linux-4.9.6.orig/kernel/trace/trace_events.c linux-4.9.6/kernel/trace/trace_events.c +--- linux-4.9.6.orig/kernel/trace/trace_events.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/trace_events.c 2017-01-28 13:59:10.091662336 +0100 @@ -187,6 +187,8 @@ __common_field(unsigned char, flags); __common_field(unsigned char, preempt_count); @@ -21489,10 +19749,10 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace_events.c linux-4.8.15/kernel/trac return ret; } -diff -Nur linux-4.8.15.orig/kernel/trace/trace.h linux-4.8.15/kernel/trace/trace.h ---- linux-4.8.15.orig/kernel/trace/trace.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/trace.h 2017-01-01 17:07:16.055428503 +0100 -@@ -123,6 +123,7 @@ +diff -Nur linux-4.9.6.orig/kernel/trace/trace.h linux-4.9.6/kernel/trace/trace.h +--- linux-4.9.6.orig/kernel/trace/trace.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/trace.h 2017-01-28 13:59:10.091662336 +0100 +@@ -124,6 +124,7 @@ * NEED_RESCHED - reschedule is requested * HARDIRQ - inside an interrupt handler * SOFTIRQ - inside a softirq handler @@ -21500,7 +19760,7 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace.h linux-4.8.15/kernel/trace/trace */ enum trace_flag_type { TRACE_FLAG_IRQS_OFF = 0x01, -@@ -132,6 +133,7 @@ +@@ -133,6 +134,7 @@ TRACE_FLAG_SOFTIRQ = 0x10, TRACE_FLAG_PREEMPT_RESCHED = 0x20, TRACE_FLAG_NMI = 0x40, @@ -21508,9 +19768,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace.h linux-4.8.15/kernel/trace/trace }; #define TRACE_BUF_SIZE 1024 -diff -Nur linux-4.8.15.orig/kernel/trace/trace_irqsoff.c linux-4.8.15/kernel/trace/trace_irqsoff.c ---- linux-4.8.15.orig/kernel/trace/trace_irqsoff.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/trace_irqsoff.c 2017-01-01 17:07:16.059428767 +0100 +diff -Nur linux-4.9.6.orig/kernel/trace/trace_irqsoff.c linux-4.9.6/kernel/trace/trace_irqsoff.c +--- linux-4.9.6.orig/kernel/trace/trace_irqsoff.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/trace_irqsoff.c 2017-01-28 13:59:10.091662336 +0100 @@ -13,6 +13,7 @@ #include <linux/uaccess.h> #include <linux/module.h> @@ -21594,9 +19854,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace_irqsoff.c linux-4.8.15/kernel/tra if (preempt_trace() && !irq_trace()) start_critical_timing(a0, a1); } -diff -Nur linux-4.8.15.orig/kernel/trace/trace_output.c linux-4.8.15/kernel/trace/trace_output.c ---- linux-4.8.15.orig/kernel/trace/trace_output.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/trace/trace_output.c 2017-01-01 17:07:16.059428767 +0100 +diff -Nur linux-4.9.6.orig/kernel/trace/trace_output.c linux-4.9.6/kernel/trace/trace_output.c +--- linux-4.9.6.orig/kernel/trace/trace_output.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/trace/trace_output.c 2017-01-28 13:59:10.091662336 +0100 @@ -386,6 +386,7 @@ { char hardsoft_irq; @@ -21643,9 +19903,9 @@ diff -Nur linux-4.8.15.orig/kernel/trace/trace_output.c linux-4.8.15/kernel/trac return !trace_seq_has_overflowed(s); } -diff -Nur linux-4.8.15.orig/kernel/user.c linux-4.8.15/kernel/user.c ---- linux-4.8.15.orig/kernel/user.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/user.c 2017-01-01 17:07:16.059428767 +0100 +diff -Nur linux-4.9.6.orig/kernel/user.c linux-4.9.6/kernel/user.c +--- linux-4.9.6.orig/kernel/user.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/user.c 2017-01-28 13:59:10.091662336 +0100 @@ -161,11 +161,11 @@ if (!up) return; @@ -21660,9 +19920,9 @@ diff -Nur linux-4.8.15.orig/kernel/user.c linux-4.8.15/kernel/user.c } struct user_struct *alloc_uid(kuid_t uid) -diff -Nur linux-4.8.15.orig/kernel/watchdog.c linux-4.8.15/kernel/watchdog.c ---- linux-4.8.15.orig/kernel/watchdog.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/watchdog.c 2017-01-01 17:07:16.059428767 +0100 +diff -Nur linux-4.9.6.orig/kernel/watchdog.c linux-4.9.6/kernel/watchdog.c +--- linux-4.9.6.orig/kernel/watchdog.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/watchdog.c 2017-01-28 13:59:10.091662336 +0100 @@ -315,6 +315,8 @@ #ifdef CONFIG_HARDLOCKUP_DETECTOR @@ -21672,7 +19932,7 @@ diff -Nur linux-4.8.15.orig/kernel/watchdog.c linux-4.8.15/kernel/watchdog.c static struct perf_event_attr wd_hw_attr = { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_CPU_CYCLES, -@@ -349,6 +351,13 @@ +@@ -348,6 +350,13 @@ /* only print hardlockups once */ if (__this_cpu_read(hard_watchdog_warn) == true) return; @@ -21686,7 +19946,7 @@ diff -Nur linux-4.8.15.orig/kernel/watchdog.c linux-4.8.15/kernel/watchdog.c pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu); print_modules(); -@@ -366,6 +375,7 @@ +@@ -365,6 +374,7 @@ !test_and_set_bit(0, &hardlockup_allcpu_dumped)) trigger_allbutself_cpu_backtrace(); @@ -21694,7 +19954,7 @@ diff -Nur linux-4.8.15.orig/kernel/watchdog.c linux-4.8.15/kernel/watchdog.c if (hardlockup_panic) nmi_panic(regs, "Hard LOCKUP"); -@@ -513,6 +523,7 @@ +@@ -512,6 +522,7 @@ /* kick off the timer for the hardlockup detector */ hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hrtimer->function = watchdog_timer_fn; @@ -21702,9 +19962,9 @@ diff -Nur linux-4.8.15.orig/kernel/watchdog.c linux-4.8.15/kernel/watchdog.c /* Enable the perf event */ watchdog_nmi_enable(cpu); -diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c ---- linux-4.8.15.orig/kernel/workqueue.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/workqueue.c 2017-01-01 17:07:16.063429015 +0100 +diff -Nur linux-4.9.6.orig/kernel/workqueue.c linux-4.9.6/kernel/workqueue.c +--- linux-4.9.6.orig/kernel/workqueue.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/workqueue.c 2017-01-28 13:59:10.095662491 +0100 @@ -48,6 +48,8 @@ #include <linux/nodemask.h> #include <linux/moduleparam.h> @@ -22194,16 +20454,16 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c return flush_work(&dwork->work); } EXPORT_SYMBOL(flush_delayed_work); -@@ -3004,7 +3043,7 @@ +@@ -2987,7 +3026,7 @@ + return false; - set_work_pool_and_clear_pending(&dwork->work, - get_work_pool_id(&dwork->work)); + set_work_pool_and_clear_pending(work, get_work_pool_id(work)); - local_irq_restore(flags); + local_unlock_irqrestore(pendingb_lock, flags); return ret; } - EXPORT_SYMBOL(cancel_delayed_work); -@@ -3233,7 +3272,7 @@ + +@@ -3245,7 +3284,7 @@ * put_unbound_pool - put a worker_pool * @pool: worker_pool to put * @@ -22212,7 +20472,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c * safe manner. get_unbound_pool() calls this function on its failure path * and this function should be able to release pools which went through, * successfully or not, init_worker_pool(). -@@ -3287,8 +3326,8 @@ +@@ -3299,8 +3338,8 @@ del_timer_sync(&pool->idle_timer); del_timer_sync(&pool->mayday_timer); @@ -22223,7 +20483,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c } /** -@@ -3395,14 +3434,14 @@ +@@ -3407,14 +3446,14 @@ put_unbound_pool(pool); mutex_unlock(&wq_pool_mutex); @@ -22240,7 +20500,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c } /** -@@ -4052,7 +4091,7 @@ +@@ -4064,7 +4103,7 @@ * The base ref is never dropped on per-cpu pwqs. Directly * schedule RCU free. */ @@ -22249,7 +20509,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c } else { /* * We're the sole accessor of @wq at this point. Directly -@@ -4145,7 +4184,8 @@ +@@ -4157,7 +4196,8 @@ struct pool_workqueue *pwq; bool ret; @@ -22259,7 +20519,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c if (cpu == WORK_CPU_UNBOUND) cpu = smp_processor_id(); -@@ -4156,7 +4196,8 @@ +@@ -4168,7 +4208,8 @@ pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); ret = !list_empty(&pwq->delayed_works); @@ -22269,7 +20529,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c return ret; } -@@ -4182,15 +4223,15 @@ +@@ -4194,15 +4235,15 @@ if (work_pending(work)) ret |= WORK_BUSY_PENDING; @@ -22289,7 +20549,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c return ret; } -@@ -4379,7 +4420,7 @@ +@@ -4391,7 +4432,7 @@ unsigned long flags; int pi; @@ -22298,7 +20558,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c pr_info("Showing busy workqueues and worker pools:\n"); -@@ -4432,7 +4473,7 @@ +@@ -4444,7 +4485,7 @@ spin_unlock_irqrestore(&pool->lock, flags); } @@ -22307,7 +20567,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c } /* -@@ -4770,16 +4811,16 @@ +@@ -4782,16 +4823,16 @@ * nr_active is monotonically decreasing. It's safe * to peek without lock. */ @@ -22327,7 +20587,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c } out_unlock: mutex_unlock(&wq_pool_mutex); -@@ -4969,7 +5010,8 @@ +@@ -4981,7 +5022,8 @@ const char *delim = ""; int node, written = 0; @@ -22337,7 +20597,7 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c for_each_node(node) { written += scnprintf(buf + written, PAGE_SIZE - written, "%s%d:%d", delim, node, -@@ -4977,7 +5019,8 @@ +@@ -4989,7 +5031,8 @@ delim = " "; } written += scnprintf(buf + written, PAGE_SIZE - written, "\n"); @@ -22347,9 +20607,9 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue.c linux-4.8.15/kernel/workqueue.c return written; } -diff -Nur linux-4.8.15.orig/kernel/workqueue_internal.h linux-4.8.15/kernel/workqueue_internal.h ---- linux-4.8.15.orig/kernel/workqueue_internal.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/kernel/workqueue_internal.h 2017-01-01 17:07:16.063429015 +0100 +diff -Nur linux-4.9.6.orig/kernel/workqueue_internal.h linux-4.9.6/kernel/workqueue_internal.h +--- linux-4.9.6.orig/kernel/workqueue_internal.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/kernel/workqueue_internal.h 2017-01-28 13:59:10.095662491 +0100 @@ -43,6 +43,7 @@ unsigned long last_active; /* L: last active timestamp */ unsigned int flags; /* X: flags */ @@ -22368,9 +20628,9 @@ diff -Nur linux-4.8.15.orig/kernel/workqueue_internal.h linux-4.8.15/kernel/work +void wq_worker_sleeping(struct task_struct *task); #endif /* _KERNEL_WORKQUEUE_INTERNAL_H */ -diff -Nur linux-4.8.15.orig/lib/debugobjects.c linux-4.8.15/lib/debugobjects.c ---- linux-4.8.15.orig/lib/debugobjects.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/debugobjects.c 2017-01-01 17:07:16.063429015 +0100 +diff -Nur linux-4.9.6.orig/lib/debugobjects.c linux-4.9.6/lib/debugobjects.c +--- linux-4.9.6.orig/lib/debugobjects.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/debugobjects.c 2017-01-28 13:59:10.095662491 +0100 @@ -308,7 +308,10 @@ struct debug_obj *obj; unsigned long flags; @@ -22383,9 +20643,9 @@ diff -Nur linux-4.8.15.orig/lib/debugobjects.c linux-4.8.15/lib/debugobjects.c db = get_bucket((unsigned long) addr); -diff -Nur linux-4.8.15.orig/lib/idr.c linux-4.8.15/lib/idr.c ---- linux-4.8.15.orig/lib/idr.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/idr.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/idr.c linux-4.9.6/lib/idr.c +--- linux-4.9.6.orig/lib/idr.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/idr.c 2017-01-28 13:59:10.095662491 +0100 @@ -30,6 +30,7 @@ #include <linux/idr.h> #include <linux/spinlock.h> @@ -22478,9 +20738,9 @@ diff -Nur linux-4.8.15.orig/lib/idr.c linux-4.8.15/lib/idr.c if (!new) break; -diff -Nur linux-4.8.15.orig/lib/irq_poll.c linux-4.8.15/lib/irq_poll.c ---- linux-4.8.15.orig/lib/irq_poll.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/irq_poll.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/irq_poll.c linux-4.9.6/lib/irq_poll.c +--- linux-4.9.6.orig/lib/irq_poll.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/irq_poll.c 2017-01-28 13:59:10.095662491 +0100 @@ -36,6 +36,7 @@ list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll)); __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); @@ -22513,17 +20773,17 @@ diff -Nur linux-4.8.15.orig/lib/irq_poll.c linux-4.8.15/lib/irq_poll.c } /** -@@ -199,6 +203,7 @@ - this_cpu_ptr(&blk_cpu_iopoll)); - __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); - local_irq_enable(); -+ preempt_check_resched_rt(); - } +@@ -195,6 +199,7 @@ + this_cpu_ptr(&blk_cpu_iopoll)); + __raise_softirq_irqoff(IRQ_POLL_SOFTIRQ); + local_irq_enable(); ++ preempt_check_resched_rt(); - return NOTIFY_OK; -diff -Nur linux-4.8.15.orig/lib/Kconfig linux-4.8.15/lib/Kconfig ---- linux-4.8.15.orig/lib/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/Kconfig 2017-01-01 17:07:16.063429015 +0100 + return 0; + } +diff -Nur linux-4.9.6.orig/lib/Kconfig linux-4.9.6/lib/Kconfig +--- linux-4.9.6.orig/lib/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/Kconfig 2017-01-28 13:59:10.095662491 +0100 @@ -400,6 +400,7 @@ config CPUMASK_OFFSTACK @@ -22532,38 +20792,9 @@ diff -Nur linux-4.8.15.orig/lib/Kconfig linux-4.8.15/lib/Kconfig help Use dynamic allocation for cpumask_var_t, instead of putting them on the stack. This is a bit more expensive, but avoids -diff -Nur linux-4.8.15.orig/lib/Kconfig.debug linux-4.8.15/lib/Kconfig.debug ---- linux-4.8.15.orig/lib/Kconfig.debug 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/Kconfig.debug 2017-01-01 17:07:16.063429015 +0100 -@@ -977,6 +977,7 @@ - config DEBUG_PREEMPT - bool "Debug preemptible kernel" - depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT -+ select USING_GET_LOCK_PARENT_IP - default y - help - If you say Y here then the kernel will use a debug variant of the -@@ -1159,8 +1160,17 @@ - - endmenu # lock debugging - -+config USING_GET_LOCK_PARENT_IP -+ bool -+ help -+ Enables the use of the function get_lock_parent_ip() that -+ will use __builtin_return_address(n) with n > 0 causing -+ some gcc warnings. When this is selected, those warnings -+ will be suppressed. -+ - config TRACE_IRQFLAGS - bool -+ select USING_GET_LOCK_PARENT_IP - help - Enables hooks to interrupt enabling and disabling for - either tracing or lock debugging. -diff -Nur linux-4.8.15.orig/lib/locking-selftest.c linux-4.8.15/lib/locking-selftest.c ---- linux-4.8.15.orig/lib/locking-selftest.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/locking-selftest.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/locking-selftest.c linux-4.9.6/lib/locking-selftest.c +--- linux-4.9.6.orig/lib/locking-selftest.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/locking-selftest.c 2017-01-28 13:59:10.095662491 +0100 @@ -590,6 +590,8 @@ #include "locking-selftest-spin-hardirq.h" GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin) @@ -22712,9 +20943,9 @@ diff -Nur linux-4.8.15.orig/lib/locking-selftest.c linux-4.8.15/lib/locking-self ww_tests(); -diff -Nur linux-4.8.15.orig/lib/percpu_ida.c linux-4.8.15/lib/percpu_ida.c ---- linux-4.8.15.orig/lib/percpu_ida.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/percpu_ida.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/percpu_ida.c linux-4.9.6/lib/percpu_ida.c +--- linux-4.9.6.orig/lib/percpu_ida.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/percpu_ida.c 2017-01-28 13:59:10.095662491 +0100 @@ -26,6 +26,9 @@ #include <linux/string.h> #include <linux/spinlock.h> @@ -22803,9 +21034,9 @@ diff -Nur linux-4.8.15.orig/lib/percpu_ida.c linux-4.8.15/lib/percpu_ida.c return err; } EXPORT_SYMBOL_GPL(percpu_ida_for_each_free); -diff -Nur linux-4.8.15.orig/lib/radix-tree.c linux-4.8.15/lib/radix-tree.c ---- linux-4.8.15.orig/lib/radix-tree.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/radix-tree.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/radix-tree.c linux-4.9.6/lib/radix-tree.c +--- linux-4.9.6.orig/lib/radix-tree.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/radix-tree.c 2017-01-28 13:59:10.095662491 +0100 @@ -290,13 +290,14 @@ * succeed in getting a node here (and never reach * kmem_cache_alloc) @@ -22838,9 +21069,9 @@ diff -Nur linux-4.8.15.orig/lib/radix-tree.c linux-4.8.15/lib/radix-tree.c /* * The maximum index which can be stored in a radix tree -diff -Nur linux-4.8.15.orig/lib/scatterlist.c linux-4.8.15/lib/scatterlist.c ---- linux-4.8.15.orig/lib/scatterlist.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/scatterlist.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/scatterlist.c linux-4.9.6/lib/scatterlist.c +--- linux-4.9.6.orig/lib/scatterlist.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/scatterlist.c 2017-01-28 13:59:10.095662491 +0100 @@ -620,7 +620,7 @@ flush_kernel_dcache_page(miter->page); @@ -22868,9 +21099,9 @@ diff -Nur linux-4.8.15.orig/lib/scatterlist.c linux-4.8.15/lib/scatterlist.c return offset; } EXPORT_SYMBOL(sg_copy_buffer); -diff -Nur linux-4.8.15.orig/lib/smp_processor_id.c linux-4.8.15/lib/smp_processor_id.c ---- linux-4.8.15.orig/lib/smp_processor_id.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/lib/smp_processor_id.c 2017-01-01 17:07:16.067429274 +0100 +diff -Nur linux-4.9.6.orig/lib/smp_processor_id.c linux-4.9.6/lib/smp_processor_id.c +--- linux-4.9.6.orig/lib/smp_processor_id.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/lib/smp_processor_id.c 2017-01-28 13:59:10.095662491 +0100 @@ -39,8 +39,9 @@ if (!printk_ratelimit()) goto out_enable; @@ -22883,9 +21114,9 @@ diff -Nur linux-4.8.15.orig/lib/smp_processor_id.c linux-4.8.15/lib/smp_processo print_symbol("caller is %s\n", (long)__builtin_return_address(0)); dump_stack(); -diff -Nur linux-4.8.15.orig/mm/backing-dev.c linux-4.8.15/mm/backing-dev.c ---- linux-4.8.15.orig/mm/backing-dev.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/backing-dev.c 2017-01-01 17:07:16.103431597 +0100 +diff -Nur linux-4.9.6.orig/mm/backing-dev.c linux-4.9.6/mm/backing-dev.c +--- linux-4.9.6.orig/mm/backing-dev.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/backing-dev.c 2017-01-28 13:59:10.095662491 +0100 @@ -457,9 +457,9 @@ { unsigned long flags; @@ -22898,10 +21129,10 @@ diff -Nur linux-4.8.15.orig/mm/backing-dev.c linux-4.8.15/mm/backing-dev.c return; } -diff -Nur linux-4.8.15.orig/mm/compaction.c linux-4.8.15/mm/compaction.c ---- linux-4.8.15.orig/mm/compaction.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/compaction.c 2017-01-01 17:07:16.103431597 +0100 -@@ -1585,10 +1585,12 @@ +diff -Nur linux-4.9.6.orig/mm/compaction.c linux-4.9.6/mm/compaction.c +--- linux-4.9.6.orig/mm/compaction.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/compaction.c 2017-01-28 13:59:10.095662491 +0100 +@@ -1593,10 +1593,12 @@ block_start_pfn(cc->migrate_pfn, cc->order); if (cc->last_migrated_pfn < current_block_start) { @@ -22916,9 +21147,9 @@ diff -Nur linux-4.8.15.orig/mm/compaction.c linux-4.8.15/mm/compaction.c /* No more flushing until we migrate again */ cc->last_migrated_pfn = 0; } -diff -Nur linux-4.8.15.orig/mm/filemap.c linux-4.8.15/mm/filemap.c ---- linux-4.8.15.orig/mm/filemap.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/filemap.c 2017-01-01 17:07:16.103431597 +0100 +diff -Nur linux-4.9.6.orig/mm/filemap.c linux-4.9.6/mm/filemap.c +--- linux-4.9.6.orig/mm/filemap.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/filemap.c 2017-01-28 13:59:10.099662644 +0100 @@ -159,9 +159,12 @@ * node->private_list is protected by * mapping->tree_lock. @@ -22947,9 +21178,9 @@ diff -Nur linux-4.8.15.orig/mm/filemap.c linux-4.8.15/mm/filemap.c } } -diff -Nur linux-4.8.15.orig/mm/highmem.c linux-4.8.15/mm/highmem.c ---- linux-4.8.15.orig/mm/highmem.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/highmem.c 2017-01-01 17:07:16.103431597 +0100 +diff -Nur linux-4.9.6.orig/mm/highmem.c linux-4.9.6/mm/highmem.c +--- linux-4.9.6.orig/mm/highmem.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/highmem.c 2017-01-28 13:59:10.099662644 +0100 @@ -29,10 +29,11 @@ #include <linux/kgdb.h> #include <asm/tlbflush.h> @@ -22974,9 +21205,9 @@ diff -Nur linux-4.8.15.orig/mm/highmem.c linux-4.8.15/mm/highmem.c unsigned int nr_free_highpages (void) { -diff -Nur linux-4.8.15.orig/mm/Kconfig linux-4.8.15/mm/Kconfig ---- linux-4.8.15.orig/mm/Kconfig 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/Kconfig 2017-01-01 17:07:16.103431597 +0100 +diff -Nur linux-4.9.6.orig/mm/Kconfig linux-4.9.6/mm/Kconfig +--- linux-4.9.6.orig/mm/Kconfig 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/Kconfig 2017-01-28 13:59:10.095662491 +0100 @@ -410,7 +410,7 @@ config TRANSPARENT_HUGEPAGE @@ -22986,9 +21217,9 @@ diff -Nur linux-4.8.15.orig/mm/Kconfig linux-4.8.15/mm/Kconfig select COMPACTION select RADIX_TREE_MULTIORDER help -diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c ---- linux-4.8.15.orig/mm/memcontrol.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/memcontrol.c 2017-01-01 17:07:16.107431847 +0100 +diff -Nur linux-4.9.6.orig/mm/memcontrol.c linux-4.9.6/mm/memcontrol.c +--- linux-4.9.6.orig/mm/memcontrol.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/memcontrol.c 2017-01-28 13:59:10.099662644 +0100 @@ -67,6 +67,7 @@ #include <net/sock.h> #include <net/ip.h> @@ -23006,7 +21237,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c /* Whether legacy memory+swap accounting is active */ static bool do_memsw_account(void) { -@@ -1724,6 +1727,7 @@ +@@ -1692,6 +1695,7 @@ #define FLUSHING_CACHED_CHARGE 0 }; static DEFINE_PER_CPU(struct memcg_stock_pcp, memcg_stock); @@ -23014,7 +21245,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c static DEFINE_MUTEX(percpu_charge_mutex); /** -@@ -1746,7 +1750,7 @@ +@@ -1714,7 +1718,7 @@ if (nr_pages > CHARGE_BATCH) return ret; @@ -23023,7 +21254,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c stock = this_cpu_ptr(&memcg_stock); if (memcg == stock->cached && stock->nr_pages >= nr_pages) { -@@ -1754,7 +1758,7 @@ +@@ -1722,7 +1726,7 @@ ret = true; } @@ -23032,7 +21263,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c return ret; } -@@ -1781,13 +1785,13 @@ +@@ -1749,13 +1753,13 @@ struct memcg_stock_pcp *stock; unsigned long flags; @@ -23048,7 +21279,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c } /* -@@ -1799,7 +1803,7 @@ +@@ -1767,7 +1771,7 @@ struct memcg_stock_pcp *stock; unsigned long flags; @@ -23057,7 +21288,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c stock = this_cpu_ptr(&memcg_stock); if (stock->cached != memcg) { /* reset if necessary */ -@@ -1808,7 +1812,7 @@ +@@ -1776,7 +1780,7 @@ } stock->nr_pages += nr_pages; @@ -23066,7 +21297,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c } /* -@@ -1824,7 +1828,7 @@ +@@ -1792,7 +1796,7 @@ return; /* Notify other cpus that system-wide "drain" is running */ get_online_cpus(); @@ -23075,7 +21306,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c for_each_online_cpu(cpu) { struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu); struct mem_cgroup *memcg; -@@ -1841,7 +1845,7 @@ +@@ -1809,7 +1813,7 @@ schedule_work_on(cpu, &stock->work); } } @@ -23084,7 +21315,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c put_online_cpus(); mutex_unlock(&percpu_charge_mutex); } -@@ -4575,12 +4579,12 @@ +@@ -4548,12 +4552,12 @@ ret = 0; @@ -23099,7 +21330,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c out_unlock: unlock_page(page); out: -@@ -5453,10 +5457,10 @@ +@@ -5428,10 +5432,10 @@ commit_charge(page, memcg, lrucare); @@ -23112,7 +21343,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c if (do_memsw_account() && PageSwapCache(page)) { swp_entry_t entry = { .val = page_private(page) }; -@@ -5512,14 +5516,14 @@ +@@ -5487,14 +5491,14 @@ memcg_oom_recover(memcg); } @@ -23129,7 +21360,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c if (!mem_cgroup_is_root(memcg)) css_put_many(&memcg->css, nr_pages); -@@ -5674,10 +5678,10 @@ +@@ -5649,10 +5653,10 @@ commit_charge(newpage, memcg, false); @@ -23142,7 +21373,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c } DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); -@@ -5854,6 +5858,7 @@ +@@ -5832,6 +5836,7 @@ { struct mem_cgroup *memcg, *swap_memcg; unsigned short oldid; @@ -23150,7 +21381,7 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -5894,12 +5899,16 @@ +@@ -5872,12 +5877,16 @@ * important here to have the interrupts disabled because it is the * only synchronisation we have for udpating the per-CPU variables. */ @@ -23167,9 +21398,9 @@ diff -Nur linux-4.8.15.orig/mm/memcontrol.c linux-4.8.15/mm/memcontrol.c } /* -diff -Nur linux-4.8.15.orig/mm/mmu_context.c linux-4.8.15/mm/mmu_context.c ---- linux-4.8.15.orig/mm/mmu_context.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/mmu_context.c 2017-01-01 17:07:16.107431847 +0100 +diff -Nur linux-4.9.6.orig/mm/mmu_context.c linux-4.9.6/mm/mmu_context.c +--- linux-4.9.6.orig/mm/mmu_context.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/mmu_context.c 2017-01-28 13:59:10.099662644 +0100 @@ -23,6 +23,7 @@ struct task_struct *tsk = current; @@ -23186,9 +21417,9 @@ diff -Nur linux-4.8.15.orig/mm/mmu_context.c linux-4.8.15/mm/mmu_context.c task_unlock(tsk); #ifdef finish_arch_post_lock_switch finish_arch_post_lock_switch(); -diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c ---- linux-4.8.15.orig/mm/page_alloc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/page_alloc.c 2017-01-01 17:07:16.111432108 +0100 +diff -Nur linux-4.9.6.orig/mm/page_alloc.c linux-4.9.6/mm/page_alloc.c +--- linux-4.9.6.orig/mm/page_alloc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/page_alloc.c 2017-01-28 13:59:10.099662644 +0100 @@ -61,6 +61,7 @@ #include <linux/page_ext.h> #include <linux/hugetlb.h> @@ -23197,7 +21428,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c #include <linux/page_owner.h> #include <linux/kthread.h> #include <linux/memcontrol.h> -@@ -276,6 +277,18 @@ +@@ -281,6 +282,18 @@ EXPORT_SYMBOL(nr_online_nodes); #endif @@ -23216,7 +21447,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c int page_group_by_mobility_disabled __read_mostly; #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT -@@ -1056,7 +1069,7 @@ +@@ -1072,7 +1085,7 @@ #endif /* CONFIG_DEBUG_VM */ /* @@ -23225,7 +21456,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c * Assumes all pages on list are in same zone, and of same order. * count is the number of pages to free. * -@@ -1067,19 +1080,58 @@ +@@ -1083,19 +1096,58 @@ * pinned" detection logic. */ static void free_pcppages_bulk(struct zone *zone, int count, @@ -23288,7 +21519,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c while (count) { struct page *page; struct list_head *list; -@@ -1095,7 +1147,7 @@ +@@ -1111,7 +1163,7 @@ batch_free++; if (++migratetype == MIGRATE_PCPTYPES) migratetype = 0; @@ -23297,7 +21528,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } while (list_empty(list)); /* This is the only non-empty list. Free them all. */ -@@ -1103,27 +1155,12 @@ +@@ -1119,27 +1171,12 @@ batch_free = count; do { @@ -23326,7 +21557,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } static void free_one_page(struct zone *zone, -@@ -1132,7 +1169,9 @@ +@@ -1148,7 +1185,9 @@ int migratetype) { unsigned long nr_scanned; @@ -23337,7 +21568,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c nr_scanned = node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED); if (nr_scanned) __mod_node_page_state(zone->zone_pgdat, NR_PAGES_SCANNED, -nr_scanned); -@@ -1142,7 +1181,7 @@ +@@ -1158,7 +1197,7 @@ migratetype = get_pfnblock_migratetype(page, pfn); } __free_one_page(page, pfn, zone, order, migratetype); @@ -23346,7 +21577,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } static void __meminit __init_single_page(struct page *page, unsigned long pfn, -@@ -1228,10 +1267,10 @@ +@@ -1244,10 +1283,10 @@ return; migratetype = get_pfnblock_migratetype(page, pfn); @@ -23359,7 +21590,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } static void __init __free_pages_boot_core(struct page *page, unsigned int order) -@@ -2219,16 +2258,18 @@ +@@ -2246,16 +2285,18 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp) { unsigned long flags; @@ -23381,7 +21612,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } #endif -@@ -2244,16 +2285,21 @@ +@@ -2271,16 +2312,21 @@ unsigned long flags; struct per_cpu_pageset *pset; struct per_cpu_pages *pcp; @@ -23407,7 +21638,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } /* -@@ -2339,8 +2385,17 @@ +@@ -2366,8 +2412,17 @@ else cpumask_clear_cpu(cpu, &cpus_with_pcps); } @@ -23425,7 +21656,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } #ifdef CONFIG_HIBERNATION -@@ -2400,7 +2455,7 @@ +@@ -2427,7 +2482,7 @@ migratetype = get_pfnblock_migratetype(page, pfn); set_pcppage_migratetype(page, migratetype); @@ -23434,7 +21665,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c __count_vm_event(PGFREE); /* -@@ -2426,12 +2481,17 @@ +@@ -2453,12 +2508,17 @@ pcp->count++; if (pcp->count >= pcp->high) { unsigned long batch = READ_ONCE(pcp->batch); @@ -23454,7 +21685,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } /* -@@ -2568,7 +2628,7 @@ +@@ -2600,7 +2660,7 @@ struct per_cpu_pages *pcp; struct list_head *list; @@ -23463,7 +21694,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c do { pcp = &this_cpu_ptr(zone->pageset)->pcp; list = &pcp->lists[migratetype]; -@@ -2595,7 +2655,7 @@ +@@ -2627,7 +2687,7 @@ * allocate greater than order-1 page units with __GFP_NOFAIL. */ WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1)); @@ -23472,7 +21703,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c do { page = NULL; -@@ -2607,22 +2667,24 @@ +@@ -2639,22 +2699,24 @@ if (!page) page = __rmqueue(zone, order, migratetype); } while (page && check_new_pages(page, order)); @@ -23501,7 +21732,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c return NULL; } -@@ -6538,7 +6600,9 @@ +@@ -6505,7 +6567,9 @@ int cpu = (unsigned long)hcpu; if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { @@ -23511,7 +21742,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c drain_pages(cpu); /* -@@ -6564,6 +6628,7 @@ +@@ -6531,6 +6595,7 @@ void __init page_alloc_init(void) { hotcpu_notifier(page_alloc_cpu_notify, 0); @@ -23519,7 +21750,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } /* -@@ -7380,7 +7445,7 @@ +@@ -7359,7 +7424,7 @@ struct per_cpu_pageset *pset; /* avoid races with drain_pages() */ @@ -23528,7 +21759,7 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c if (zone->pageset != &boot_pageset) { for_each_online_cpu(cpu) { pset = per_cpu_ptr(zone->pageset, cpu); -@@ -7389,7 +7454,7 @@ +@@ -7368,7 +7433,7 @@ free_percpu(zone->pageset); zone->pageset = &boot_pageset; } @@ -23537,9 +21768,9 @@ diff -Nur linux-4.8.15.orig/mm/page_alloc.c linux-4.8.15/mm/page_alloc.c } #ifdef CONFIG_MEMORY_HOTREMOVE -diff -Nur linux-4.8.15.orig/mm/slab.h linux-4.8.15/mm/slab.h ---- linux-4.8.15.orig/mm/slab.h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/slab.h 2017-01-01 17:07:16.111432108 +0100 +diff -Nur linux-4.9.6.orig/mm/slab.h linux-4.9.6/mm/slab.h +--- linux-4.9.6.orig/mm/slab.h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/slab.h 2017-01-28 13:59:10.099662644 +0100 @@ -426,7 +426,11 @@ * The slab lists for all objects. */ @@ -23552,10 +21783,10 @@ diff -Nur linux-4.8.15.orig/mm/slab.h linux-4.8.15/mm/slab.h #ifdef CONFIG_SLAB struct list_head slabs_partial; /* partial list first, better asm code */ -diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c ---- linux-4.8.15.orig/mm/slub.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/slub.c 2017-01-01 17:07:16.111432108 +0100 -@@ -1145,7 +1145,7 @@ +diff -Nur linux-4.9.6.orig/mm/slub.c linux-4.9.6/mm/slub.c +--- linux-4.9.6.orig/mm/slub.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/slub.c 2017-01-28 13:59:10.099662644 +0100 +@@ -1141,7 +1141,7 @@ unsigned long uninitialized_var(flags); int ret = 0; @@ -23564,7 +21795,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c slab_lock(page); if (s->flags & SLAB_CONSISTENCY_CHECKS) { -@@ -1180,7 +1180,7 @@ +@@ -1176,7 +1176,7 @@ bulk_cnt, cnt); slab_unlock(page); @@ -23573,7 +21804,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c if (!ret) slab_fix(s, "Object at 0x%p not freed", object); return ret; -@@ -1308,6 +1308,12 @@ +@@ -1304,6 +1304,12 @@ #endif /* CONFIG_SLUB_DEBUG */ @@ -23586,7 +21817,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c /* * Hooks for other subsystems that check memory allocations. In a typical * production configuration these hooks all should produce no code at all. -@@ -1527,10 +1533,17 @@ +@@ -1523,10 +1529,17 @@ void *start, *p; int idx, order; bool shuffle; @@ -23604,7 +21835,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c local_irq_enable(); flags |= s->allocflags; -@@ -1605,7 +1618,7 @@ +@@ -1601,7 +1614,7 @@ page->frozen = 1; out: @@ -23613,7 +21844,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c local_irq_disable(); if (!page) return NULL; -@@ -1664,6 +1677,16 @@ +@@ -1660,6 +1673,16 @@ __free_pages(page, order); } @@ -23630,7 +21861,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c #define need_reserve_slab_rcu \ (sizeof(((struct page *)NULL)->lru) < sizeof(struct rcu_head)) -@@ -1695,6 +1718,12 @@ +@@ -1691,6 +1714,12 @@ } call_rcu(head, rcu_free_slab); @@ -23643,7 +21874,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } else __free_slab(s, page); } -@@ -1802,7 +1831,7 @@ +@@ -1798,7 +1827,7 @@ if (!n || !n->nr_partial) return NULL; @@ -23652,7 +21883,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c list_for_each_entry_safe(page, page2, &n->partial, lru) { void *t; -@@ -1827,7 +1856,7 @@ +@@ -1823,7 +1852,7 @@ break; } @@ -23661,7 +21892,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return object; } -@@ -2073,7 +2102,7 @@ +@@ -2069,7 +2098,7 @@ * that acquire_slab() will see a slab page that * is frozen */ @@ -23670,7 +21901,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } } else { m = M_FULL; -@@ -2084,7 +2113,7 @@ +@@ -2080,7 +2109,7 @@ * slabs from diagnostic functions will not see * any frozen slabs. */ @@ -23679,7 +21910,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } } -@@ -2119,7 +2148,7 @@ +@@ -2115,7 +2144,7 @@ goto redo; if (lock) @@ -23688,7 +21919,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c if (m == M_FREE) { stat(s, DEACTIVATE_EMPTY); -@@ -2151,10 +2180,10 @@ +@@ -2147,10 +2176,10 @@ n2 = get_node(s, page_to_nid(page)); if (n != n2) { if (n) @@ -23701,7 +21932,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } do { -@@ -2183,7 +2212,7 @@ +@@ -2179,7 +2208,7 @@ } if (n) @@ -23710,7 +21941,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c while (discard_page) { page = discard_page; -@@ -2222,14 +2251,21 @@ +@@ -2218,14 +2247,21 @@ pobjects = oldpage->pobjects; pages = oldpage->pages; if (drain && pobjects > s->cpu_partial) { @@ -23732,7 +21963,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c oldpage = NULL; pobjects = 0; pages = 0; -@@ -2301,7 +2337,22 @@ +@@ -2297,7 +2333,22 @@ static void flush_all(struct kmem_cache *s) { @@ -23755,7 +21986,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } /* -@@ -2337,10 +2388,10 @@ +@@ -2352,10 +2403,10 @@ unsigned long x = 0; struct page *page; @@ -23768,7 +21999,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return x; } #endif /* CONFIG_SLUB_DEBUG || CONFIG_SYSFS */ -@@ -2478,8 +2529,10 @@ +@@ -2493,8 +2544,10 @@ * already disabled (which is the case for bulk allocation). */ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, @@ -23780,7 +22011,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c void *freelist; struct page *page; -@@ -2539,6 +2592,13 @@ +@@ -2554,6 +2607,13 @@ VM_BUG_ON(!c->page->frozen); c->freelist = get_freepointer(s, freelist); c->tid = next_tid(c->tid); @@ -23794,7 +22025,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return freelist; new_slab: -@@ -2570,7 +2630,7 @@ +@@ -2585,7 +2645,7 @@ deactivate_slab(s, page, get_freepointer(s, freelist)); c->page = NULL; c->freelist = NULL; @@ -23803,7 +22034,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } /* -@@ -2582,6 +2642,7 @@ +@@ -2597,6 +2657,7 @@ { void *p; unsigned long flags; @@ -23811,7 +22042,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c local_irq_save(flags); #ifdef CONFIG_PREEMPT -@@ -2593,8 +2654,9 @@ +@@ -2608,8 +2669,9 @@ c = this_cpu_ptr(s->cpu_slab); #endif @@ -23822,7 +22053,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return p; } -@@ -2780,7 +2842,7 @@ +@@ -2795,7 +2857,7 @@ do { if (unlikely(n)) { @@ -23831,7 +22062,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c n = NULL; } prior = page->freelist; -@@ -2812,7 +2874,7 @@ +@@ -2827,7 +2889,7 @@ * Otherwise the list_lock will synchronize with * other processors updating the list of slabs. */ @@ -23840,7 +22071,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } } -@@ -2854,7 +2916,7 @@ +@@ -2869,7 +2931,7 @@ add_partial(n, page, DEACTIVATE_TO_TAIL); stat(s, FREE_ADD_PARTIAL); } @@ -23849,7 +22080,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return; slab_empty: -@@ -2869,7 +2931,7 @@ +@@ -2884,7 +2946,7 @@ remove_full(s, n, page); } @@ -23858,7 +22089,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c stat(s, FREE_SLAB); discard_slab(s, page); } -@@ -3074,6 +3136,7 @@ +@@ -3089,6 +3151,7 @@ void **p) { struct kmem_cache_cpu *c; @@ -23866,7 +22097,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c int i; /* memcg and kmem_cache debug support */ -@@ -3097,7 +3160,7 @@ +@@ -3112,7 +3175,7 @@ * of re-populating per CPU c->freelist */ p[i] = ___slab_alloc(s, flags, NUMA_NO_NODE, @@ -23875,7 +22106,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c if (unlikely(!p[i])) goto error; -@@ -3109,6 +3172,7 @@ +@@ -3124,6 +3187,7 @@ } c->tid = next_tid(c->tid); local_irq_enable(); @@ -23883,7 +22114,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c /* Clear memory outside IRQ disabled fastpath loop */ if (unlikely(flags & __GFP_ZERO)) { -@@ -3256,7 +3320,7 @@ +@@ -3271,7 +3335,7 @@ init_kmem_cache_node(struct kmem_cache_node *n) { n->nr_partial = 0; @@ -23892,7 +22123,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c INIT_LIST_HEAD(&n->partial); #ifdef CONFIG_SLUB_DEBUG atomic_long_set(&n->nr_slabs, 0); -@@ -3600,6 +3664,10 @@ +@@ -3615,6 +3679,10 @@ const char *text) { #ifdef CONFIG_SLUB_DEBUG @@ -23903,7 +22134,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c void *addr = page_address(page); void *p; unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) * -@@ -3620,6 +3688,7 @@ +@@ -3635,6 +3703,7 @@ slab_unlock(page); kfree(map); #endif @@ -23911,7 +22142,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } /* -@@ -3633,7 +3702,7 @@ +@@ -3648,7 +3717,7 @@ struct page *page, *h; BUG_ON(irqs_disabled()); @@ -23920,7 +22151,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c list_for_each_entry_safe(page, h, &n->partial, lru) { if (!page->inuse) { remove_partial(n, page); -@@ -3643,7 +3712,7 @@ +@@ -3658,7 +3727,7 @@ "Objects remaining in %s on __kmem_cache_shutdown()"); } } @@ -23929,7 +22160,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c list_for_each_entry_safe(page, h, &discard, lru) discard_slab(s, page); -@@ -3901,7 +3970,7 @@ +@@ -3916,7 +3985,7 @@ for (i = 0; i < SHRINK_PROMOTE_MAX; i++) INIT_LIST_HEAD(promote + i); @@ -23938,7 +22169,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c /* * Build lists of slabs to discard or promote. -@@ -3932,7 +4001,7 @@ +@@ -3947,7 +4016,7 @@ for (i = SHRINK_PROMOTE_MAX - 1; i >= 0; i--) list_splice(promote + i, &n->partial); @@ -23947,7 +22178,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c /* Release empty slabs */ list_for_each_entry_safe(page, t, &discard, lru) -@@ -4108,6 +4177,12 @@ +@@ -4123,6 +4192,12 @@ { static __initdata struct kmem_cache boot_kmem_cache, boot_kmem_cache_node; @@ -23960,7 +22191,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c if (debug_guardpage_minorder()) slub_max_order = 0; -@@ -4354,7 +4429,7 @@ +@@ -4331,7 +4406,7 @@ struct page *page; unsigned long flags; @@ -23969,7 +22200,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c list_for_each_entry(page, &n->partial, lru) { validate_slab_slab(s, page, map); -@@ -4376,7 +4451,7 @@ +@@ -4353,7 +4428,7 @@ s->name, count, atomic_long_read(&n->nr_slabs)); out: @@ -23978,7 +22209,7 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c return count; } -@@ -4564,12 +4639,12 @@ +@@ -4541,12 +4616,12 @@ if (!atomic_long_read(&n->nr_slabs)) continue; @@ -23993,9 +22224,9 @@ diff -Nur linux-4.8.15.orig/mm/slub.c linux-4.8.15/mm/slub.c } for (i = 0; i < t.count; i++) { -diff -Nur linux-4.8.15.orig/mm/swap.c linux-4.8.15/mm/swap.c ---- linux-4.8.15.orig/mm/swap.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/swap.c 2017-01-01 17:07:16.111432108 +0100 +diff -Nur linux-4.9.6.orig/mm/swap.c linux-4.9.6/mm/swap.c +--- linux-4.9.6.orig/mm/swap.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/swap.c 2017-01-28 13:59:10.103662798 +0100 @@ -32,6 +32,7 @@ #include <linux/memcontrol.h> #include <linux/gfp.h> @@ -24197,9 +22428,9 @@ diff -Nur linux-4.8.15.orig/mm/swap.c linux-4.8.15/mm/swap.c put_online_cpus(); mutex_unlock(&lock); -diff -Nur linux-4.8.15.orig/mm/truncate.c linux-4.8.15/mm/truncate.c ---- linux-4.8.15.orig/mm/truncate.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/truncate.c 2017-01-01 17:07:16.115432374 +0100 +diff -Nur linux-4.9.6.orig/mm/truncate.c linux-4.9.6/mm/truncate.c +--- linux-4.9.6.orig/mm/truncate.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/truncate.c 2017-01-28 13:59:10.103662798 +0100 @@ -62,9 +62,12 @@ * protected by mapping->tree_lock. */ @@ -24215,9 +22446,9 @@ diff -Nur linux-4.8.15.orig/mm/truncate.c linux-4.8.15/mm/truncate.c __radix_tree_delete_node(&mapping->page_tree, node); unlock: spin_unlock_irq(&mapping->tree_lock); -diff -Nur linux-4.8.15.orig/mm/vmalloc.c linux-4.8.15/mm/vmalloc.c ---- linux-4.8.15.orig/mm/vmalloc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/vmalloc.c 2017-01-01 17:07:16.115432374 +0100 +diff -Nur linux-4.9.6.orig/mm/vmalloc.c linux-4.9.6/mm/vmalloc.c +--- linux-4.9.6.orig/mm/vmalloc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/vmalloc.c 2017-01-28 13:59:10.103662798 +0100 @@ -845,7 +845,7 @@ struct vmap_block *vb; struct vmap_area *va; @@ -24269,9 +22500,9 @@ diff -Nur linux-4.8.15.orig/mm/vmalloc.c linux-4.8.15/mm/vmalloc.c rcu_read_unlock(); /* Allocate new block if nothing was found */ -diff -Nur linux-4.8.15.orig/mm/vmstat.c linux-4.8.15/mm/vmstat.c ---- linux-4.8.15.orig/mm/vmstat.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/vmstat.c 2017-01-01 17:07:16.115432374 +0100 +diff -Nur linux-4.9.6.orig/mm/vmstat.c linux-4.9.6/mm/vmstat.c +--- linux-4.9.6.orig/mm/vmstat.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/vmstat.c 2017-01-28 13:59:10.103662798 +0100 @@ -245,6 +245,7 @@ long x; long t; @@ -24368,9 +22599,9 @@ diff -Nur linux-4.8.15.orig/mm/vmstat.c linux-4.8.15/mm/vmstat.c } void __dec_zone_page_state(struct page *page, enum zone_stat_item item) -diff -Nur linux-4.8.15.orig/mm/workingset.c linux-4.8.15/mm/workingset.c ---- linux-4.8.15.orig/mm/workingset.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/workingset.c 2017-01-01 17:07:16.115432374 +0100 +diff -Nur linux-4.9.6.orig/mm/workingset.c linux-4.9.6/mm/workingset.c +--- linux-4.9.6.orig/mm/workingset.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/workingset.c 2017-01-28 13:59:10.103662798 +0100 @@ -334,7 +334,8 @@ * point where they would still be useful. */ @@ -24438,9 +22669,9 @@ diff -Nur linux-4.8.15.orig/mm/workingset.c linux-4.8.15/mm/workingset.c err: return ret; } -diff -Nur linux-4.8.15.orig/mm/zsmalloc.c linux-4.8.15/mm/zsmalloc.c ---- linux-4.8.15.orig/mm/zsmalloc.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/mm/zsmalloc.c 2017-01-01 17:07:16.115432374 +0100 +diff -Nur linux-4.9.6.orig/mm/zsmalloc.c linux-4.9.6/mm/zsmalloc.c +--- linux-4.9.6.orig/mm/zsmalloc.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/mm/zsmalloc.c 2017-01-28 13:59:10.103662798 +0100 @@ -53,6 +53,7 @@ #include <linux/mount.h> #include <linux/migrate.h> @@ -24618,9 +22849,9 @@ diff -Nur linux-4.8.15.orig/mm/zsmalloc.c linux-4.8.15/mm/zsmalloc.c migrate_read_unlock(zspage); unpin_tag(handle); -diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c ---- linux-4.8.15.orig/net/core/dev.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/dev.c 2017-01-01 17:07:16.119432629 +0100 +diff -Nur linux-4.9.6.orig/net/core/dev.c linux-4.9.6/net/core/dev.c +--- linux-4.9.6.orig/net/core/dev.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/dev.c 2017-01-28 13:59:10.103662798 +0100 @@ -190,6 +190,7 @@ static DEFINE_READ_MOSTLY_HASHTABLE(napi_hash, 8); @@ -24721,7 +22952,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c } /** -@@ -2268,6 +2274,7 @@ +@@ -2263,6 +2269,7 @@ sd->output_queue_tailp = &q->next_sched; raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -24729,7 +22960,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c } void __netif_schedule(struct Qdisc *q) -@@ -2349,6 +2356,7 @@ +@@ -2344,6 +2351,7 @@ __this_cpu_write(softnet_data.completion_queue, skb); raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_restore(flags); @@ -24737,7 +22968,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -3083,7 +3091,11 @@ +@@ -3078,7 +3086,11 @@ * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. */ @@ -24749,7 +22980,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c if (unlikely(contended)) spin_lock(&q->busylock); -@@ -3146,8 +3158,10 @@ +@@ -3141,8 +3153,10 @@ #define skb_update_prio(skb) #endif @@ -24760,7 +22991,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c /** * dev_loopback_xmit - loop back @skb -@@ -3391,8 +3405,7 @@ +@@ -3376,8 +3390,7 @@ int cpu = smp_processor_id(); /* ok because BHs are off */ if (txq->xmit_lock_owner != cpu) { @@ -24770,7 +23001,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c goto recursion_alert; skb = validate_xmit_skb(skb, dev); -@@ -3402,9 +3415,9 @@ +@@ -3387,9 +3400,9 @@ HARD_TX_LOCK(dev, txq, cpu); if (!netif_xmit_stopped(txq)) { @@ -24782,7 +23013,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c if (dev_xmit_complete(rc)) { HARD_TX_UNLOCK(dev, txq); goto out; -@@ -3778,6 +3791,7 @@ +@@ -3763,6 +3776,7 @@ rps_unlock(sd); local_irq_restore(flags); @@ -24790,7 +23021,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -3796,7 +3810,7 @@ +@@ -3781,7 +3795,7 @@ struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -24799,7 +23030,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -3806,13 +3820,13 @@ +@@ -3791,13 +3805,13 @@ ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); @@ -24816,7 +23047,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c } return ret; } -@@ -3846,11 +3860,9 @@ +@@ -3831,11 +3845,9 @@ trace_netif_rx_ni_entry(skb); @@ -24830,31 +23061,32 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c return err; } -@@ -4322,7 +4334,7 @@ +@@ -4314,7 +4326,7 @@ skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) { - if (skb->dev == dev) { + if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->input_pkt_queue); - kfree_skb(skb); + __skb_queue_tail(&sd->tofree_queue, skb); input_queue_head_incr(sd); } } -@@ -4331,10 +4343,13 @@ +@@ -4324,11 +4336,14 @@ skb_queue_walk_safe(&sd->process_queue, skb, tmp) { - if (skb->dev == dev) { + if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->process_queue); - kfree_skb(skb); + __skb_queue_tail(&sd->tofree_queue, skb); input_queue_head_incr(sd); } } -+ + if (!skb_queue_empty(&sd->tofree_queue)) + raise_softirq_irqoff(NET_RX_SOFTIRQ); + local_bh_enable(); ++ } - static int napi_gro_complete(struct sk_buff *skb) -@@ -4797,6 +4812,7 @@ + static void flush_all_backlogs(void) +@@ -4809,6 +4824,7 @@ sd->rps_ipi_list = NULL; local_irq_enable(); @@ -24862,7 +23094,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c /* Send pending IPI's to kick RPS processing on remote cpus. */ while (remsd) { -@@ -4810,6 +4826,7 @@ +@@ -4822,6 +4838,7 @@ } else #endif local_irq_enable(); @@ -24870,7 +23102,28 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -4891,9 +4908,11 @@ +@@ -4851,7 +4868,9 @@ + while (again) { + struct sk_buff *skb; + ++ local_irq_disable(); + while ((skb = __skb_dequeue(&sd->process_queue))) { ++ local_irq_enable(); + rcu_read_lock(); + __netif_receive_skb(skb); + rcu_read_unlock(); +@@ -4859,9 +4878,9 @@ + if (++work >= quota) + return work; + ++ local_irq_disable(); + } + +- local_irq_disable(); + rps_lock(sd); + if (skb_queue_empty(&sd->input_pkt_queue)) { + /* +@@ -4899,9 +4918,11 @@ local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -24882,7 +23135,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c /** * __napi_schedule_irqoff - schedule for receive * @n: entry to schedule -@@ -4905,6 +4924,7 @@ +@@ -4913,6 +4934,7 @@ ____napi_schedule(this_cpu_ptr(&softnet_data), n); } EXPORT_SYMBOL(__napi_schedule_irqoff); @@ -24890,7 +23143,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c void __napi_complete(struct napi_struct *n) { -@@ -5194,13 +5214,21 @@ +@@ -5202,13 +5224,21 @@ struct softnet_data *sd = this_cpu_ptr(&softnet_data); unsigned long time_limit = jiffies + 2; int budget = netdev_budget; @@ -24912,7 +23165,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c for (;;) { struct napi_struct *n; -@@ -5231,7 +5259,7 @@ +@@ -5239,7 +5269,7 @@ list_splice_tail(&repoll, &list); list_splice(&list, &sd->poll_list); if (!list_empty(&sd->poll_list)) @@ -24921,7 +23174,7 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c net_rps_action_and_irq_enable(sd); } -@@ -7989,16 +8017,20 @@ +@@ -8000,16 +8030,20 @@ raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); @@ -24943,9 +23196,9 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c return NOTIFY_OK; } -@@ -8300,8 +8332,9 @@ - for_each_possible_cpu(i) { - struct softnet_data *sd = &per_cpu(softnet_data, i); +@@ -8314,8 +8348,9 @@ + + INIT_WORK(flush, flush_backlog); - skb_queue_head_init(&sd->input_pkt_queue); - skb_queue_head_init(&sd->process_queue); @@ -24955,10 +23208,10 @@ diff -Nur linux-4.8.15.orig/net/core/dev.c linux-4.8.15/net/core/dev.c INIT_LIST_HEAD(&sd->poll_list); sd->output_queue_tailp = &sd->output_queue; #ifdef CONFIG_RPS -diff -Nur linux-4.8.15.orig/net/core/filter.c linux-4.8.15/net/core/filter.c ---- linux-4.8.15.orig/net/core/filter.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/filter.c 2017-01-01 17:07:16.119432629 +0100 -@@ -1592,7 +1592,7 @@ +diff -Nur linux-4.9.6.orig/net/core/filter.c linux-4.9.6/net/core/filter.c +--- linux-4.9.6.orig/net/core/filter.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/filter.c 2017-01-28 13:59:10.103662798 +0100 +@@ -1645,7 +1645,7 @@ { int ret; @@ -24967,7 +23220,7 @@ diff -Nur linux-4.8.15.orig/net/core/filter.c linux-4.8.15/net/core/filter.c net_crit_ratelimited("bpf: recursion limit reached on datapath, buggy bpf program?\n"); kfree_skb(skb); return -ENETDOWN; -@@ -1600,9 +1600,9 @@ +@@ -1653,9 +1653,9 @@ skb->dev = dev; @@ -24979,9 +23232,9 @@ diff -Nur linux-4.8.15.orig/net/core/filter.c linux-4.8.15/net/core/filter.c return ret; } -diff -Nur linux-4.8.15.orig/net/core/gen_estimator.c linux-4.8.15/net/core/gen_estimator.c ---- linux-4.8.15.orig/net/core/gen_estimator.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/gen_estimator.c 2017-01-01 17:07:16.119432629 +0100 +diff -Nur linux-4.9.6.orig/net/core/gen_estimator.c linux-4.9.6/net/core/gen_estimator.c +--- linux-4.9.6.orig/net/core/gen_estimator.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/gen_estimator.c 2017-01-28 13:59:10.103662798 +0100 @@ -84,7 +84,7 @@ struct gnet_stats_basic_packed *bstats; struct gnet_stats_rate_est64 *rate_est; @@ -25009,9 +23262,9 @@ diff -Nur linux-4.8.15.orig/net/core/gen_estimator.c linux-4.8.15/net/core/gen_e { gen_kill_estimator(bstats, rate_est); return gen_new_estimator(bstats, cpu_bstats, rate_est, stats_lock, running, opt); -diff -Nur linux-4.8.15.orig/net/core/gen_stats.c linux-4.8.15/net/core/gen_stats.c ---- linux-4.8.15.orig/net/core/gen_stats.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/gen_stats.c 2017-01-01 17:07:16.119432629 +0100 +diff -Nur linux-4.9.6.orig/net/core/gen_stats.c linux-4.9.6/net/core/gen_stats.c +--- linux-4.9.6.orig/net/core/gen_stats.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/gen_stats.c 2017-01-28 13:59:10.107662951 +0100 @@ -130,7 +130,7 @@ } @@ -25043,9 +23296,9 @@ diff -Nur linux-4.8.15.orig/net/core/gen_stats.c linux-4.8.15/net/core/gen_stats struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b) -diff -Nur linux-4.8.15.orig/net/core/skbuff.c linux-4.8.15/net/core/skbuff.c ---- linux-4.8.15.orig/net/core/skbuff.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/skbuff.c 2017-01-01 17:07:16.123432884 +0100 +diff -Nur linux-4.9.6.orig/net/core/skbuff.c linux-4.9.6/net/core/skbuff.c +--- linux-4.9.6.orig/net/core/skbuff.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/skbuff.c 2017-01-28 13:59:10.107662951 +0100 @@ -64,6 +64,7 @@ #include <linux/errqueue.h> #include <linux/prefetch.h> @@ -25177,10 +23430,10 @@ diff -Nur linux-4.8.15.orig/net/core/skbuff.c linux-4.8.15/net/core/skbuff.c } void __kfree_skb_defer(struct sk_buff *skb) { -diff -Nur linux-4.8.15.orig/net/core/sock.c linux-4.8.15/net/core/sock.c ---- linux-4.8.15.orig/net/core/sock.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/core/sock.c 2017-01-01 17:07:16.123432884 +0100 -@@ -2510,12 +2510,11 @@ +diff -Nur linux-4.9.6.orig/net/core/sock.c linux-4.9.6/net/core/sock.c +--- linux-4.9.6.orig/net/core/sock.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/core/sock.c 2017-01-28 13:59:10.107662951 +0100 +@@ -2488,12 +2488,11 @@ if (sk->sk_lock.owned) __lock_sock(sk); sk->sk_lock.owned = 1; @@ -25194,9 +23447,9 @@ diff -Nur linux-4.8.15.orig/net/core/sock.c linux-4.8.15/net/core/sock.c } EXPORT_SYMBOL(lock_sock_nested); -diff -Nur linux-4.8.15.orig/net/ipv4/icmp.c linux-4.8.15/net/ipv4/icmp.c ---- linux-4.8.15.orig/net/ipv4/icmp.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/ipv4/icmp.c 2017-01-01 17:07:16.123432884 +0100 +diff -Nur linux-4.9.6.orig/net/ipv4/icmp.c linux-4.9.6/net/ipv4/icmp.c +--- linux-4.9.6.orig/net/ipv4/icmp.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/ipv4/icmp.c 2017-01-28 13:59:10.107662951 +0100 @@ -69,6 +69,7 @@ #include <linux/jiffies.h> #include <linux/kernel.h> @@ -25304,9 +23557,9 @@ diff -Nur linux-4.8.15.orig/net/ipv4/icmp.c linux-4.8.15/net/ipv4/icmp.c } /* should there be an ICMP stat for ignored echos? */ return true; -diff -Nur linux-4.8.15.orig/net/ipv4/sysctl_net_ipv4.c linux-4.8.15/net/ipv4/sysctl_net_ipv4.c ---- linux-4.8.15.orig/net/ipv4/sysctl_net_ipv4.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/ipv4/sysctl_net_ipv4.c 2017-01-01 17:07:16.123432884 +0100 +diff -Nur linux-4.9.6.orig/net/ipv4/sysctl_net_ipv4.c linux-4.9.6/net/ipv4/sysctl_net_ipv4.c +--- linux-4.9.6.orig/net/ipv4/sysctl_net_ipv4.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/ipv4/sysctl_net_ipv4.c 2017-01-28 13:59:10.107662951 +0100 @@ -681,6 +681,13 @@ .proc_handler = proc_dointvec }, @@ -25321,9 +23574,9 @@ diff -Nur linux-4.8.15.orig/net/ipv4/sysctl_net_ipv4.c linux-4.8.15/net/ipv4/sys .procname = "icmp_ignore_bogus_error_responses", .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, .maxlen = sizeof(int), -diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c ---- linux-4.8.15.orig/net/ipv4/tcp_ipv4.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/ipv4/tcp_ipv4.c 2017-01-01 17:07:16.127433142 +0100 +diff -Nur linux-4.9.6.orig/net/ipv4/tcp_ipv4.c linux-4.9.6/net/ipv4/tcp_ipv4.c +--- linux-4.9.6.orig/net/ipv4/tcp_ipv4.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/ipv4/tcp_ipv4.c 2017-01-28 13:59:10.107662951 +0100 @@ -62,6 +62,7 @@ #include <linux/init.h> #include <linux/times.h> @@ -25332,7 +23585,7 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c #include <net/net_namespace.h> #include <net/icmp.h> -@@ -565,6 +566,7 @@ +@@ -564,6 +565,7 @@ } EXPORT_SYMBOL(tcp_v4_send_check); @@ -25340,7 +23593,7 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c /* * This routine will send an RST to the other tcp. * -@@ -692,6 +694,8 @@ +@@ -691,6 +693,8 @@ offsetof(struct inet_timewait_sock, tw_bound_dev_if)); arg.tos = ip_hdr(skb)->tos; @@ -25349,7 +23602,7 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c local_bh_disable(); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), skb, &TCP_SKB_CB(skb)->header.h4.opt, -@@ -701,6 +705,7 @@ +@@ -700,6 +704,7 @@ __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); local_bh_enable(); @@ -25357,7 +23610,7 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c #ifdef CONFIG_TCP_MD5SIG out: -@@ -776,6 +781,7 @@ +@@ -775,6 +780,7 @@ if (oif) arg.bound_dev_if = oif; arg.tos = tos; @@ -25365,7 +23618,7 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c local_bh_disable(); ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk), skb, &TCP_SKB_CB(skb)->header.h4.opt, -@@ -784,6 +790,7 @@ +@@ -783,6 +789,7 @@ __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); local_bh_enable(); @@ -25373,10 +23626,10 @@ diff -Nur linux-4.8.15.orig/net/ipv4/tcp_ipv4.c linux-4.8.15/net/ipv4/tcp_ipv4.c } static void tcp_v4_timewait_ack(struct sock *sk, struct sk_buff *skb) -diff -Nur linux-4.8.15.orig/net/mac80211/rx.c linux-4.8.15/net/mac80211/rx.c ---- linux-4.8.15.orig/net/mac80211/rx.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/mac80211/rx.c 2017-01-01 17:07:16.127433142 +0100 -@@ -4070,7 +4070,7 @@ +diff -Nur linux-4.9.6.orig/net/mac80211/rx.c linux-4.9.6/net/mac80211/rx.c +--- linux-4.9.6.orig/net/mac80211/rx.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/mac80211/rx.c 2017-01-28 13:59:10.107662951 +0100 +@@ -4166,7 +4166,7 @@ struct ieee80211_supported_band *sband; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); @@ -25385,14 +23638,15 @@ diff -Nur linux-4.8.15.orig/net/mac80211/rx.c linux-4.8.15/net/mac80211/rx.c if (WARN_ON(status->band >= NUM_NL80211_BANDS)) goto drop; -diff -Nur linux-4.8.15.orig/net/netfilter/core.c linux-4.8.15/net/netfilter/core.c ---- linux-4.8.15.orig/net/netfilter/core.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/netfilter/core.c 2017-01-01 17:07:16.127433142 +0100 -@@ -22,11 +22,17 @@ +diff -Nur linux-4.9.6.orig/net/netfilter/core.c linux-4.9.6/net/netfilter/core.c +--- linux-4.9.6.orig/net/netfilter/core.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/netfilter/core.c 2017-01-28 13:59:10.107662951 +0100 +@@ -22,12 +22,18 @@ #include <linux/proc_fs.h> #include <linux/mutex.h> #include <linux/slab.h> +#include <linux/locallock.h> + #include <linux/rcupdate.h> #include <net/net_namespace.h> #include <net/sock.h> @@ -25406,9 +23660,9 @@ diff -Nur linux-4.8.15.orig/net/netfilter/core.c linux-4.8.15/net/netfilter/core static DEFINE_MUTEX(afinfo_mutex); const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly; -diff -Nur linux-4.8.15.orig/net/packet/af_packet.c linux-4.8.15/net/packet/af_packet.c ---- linux-4.8.15.orig/net/packet/af_packet.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/packet/af_packet.c 2017-01-01 17:07:16.131433400 +0100 +diff -Nur linux-4.9.6.orig/net/packet/af_packet.c linux-4.9.6/net/packet/af_packet.c +--- linux-4.9.6.orig/net/packet/af_packet.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/packet/af_packet.c 2017-01-28 13:59:10.111663104 +0100 @@ -63,6 +63,7 @@ #include <linux/if_packet.h> #include <linux/wireless.h> @@ -25435,9 +23689,9 @@ diff -Nur linux-4.8.15.orig/net/packet/af_packet.c linux-4.8.15/net/packet/af_pa } } prb_close_block(pkc, pbd, po, status); -diff -Nur linux-4.8.15.orig/net/rds/ib_rdma.c linux-4.8.15/net/rds/ib_rdma.c ---- linux-4.8.15.orig/net/rds/ib_rdma.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/rds/ib_rdma.c 2017-01-01 17:07:16.131433400 +0100 +diff -Nur linux-4.9.6.orig/net/rds/ib_rdma.c linux-4.9.6/net/rds/ib_rdma.c +--- linux-4.9.6.orig/net/rds/ib_rdma.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/rds/ib_rdma.c 2017-01-28 13:59:10.111663104 +0100 @@ -34,6 +34,7 @@ #include <linux/slab.h> #include <linux/rculist.h> @@ -25455,9 +23709,9 @@ diff -Nur linux-4.8.15.orig/net/rds/ib_rdma.c linux-4.8.15/net/rds/ib_rdma.c } } -diff -Nur linux-4.8.15.orig/net/rxrpc/security.c linux-4.8.15/net/rxrpc/security.c ---- linux-4.8.15.orig/net/rxrpc/security.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/rxrpc/security.c 2017-01-01 17:07:16.131433400 +0100 +diff -Nur linux-4.9.6.orig/net/rxrpc/security.c linux-4.9.6/net/rxrpc/security.c +--- linux-4.9.6.orig/net/rxrpc/security.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/rxrpc/security.c 2017-01-28 13:59:10.111663104 +0100 @@ -19,9 +19,6 @@ #include <keys/rxrpc-type.h> #include "ar-internal.h" @@ -25468,10 +23722,10 @@ diff -Nur linux-4.8.15.orig/net/rxrpc/security.c linux-4.8.15/net/rxrpc/security static const struct rxrpc_security *rxrpc_security_types[] = { [RXRPC_SECURITY_NONE] = &rxrpc_no_security, #ifdef CONFIG_RXKAD -diff -Nur linux-4.8.15.orig/net/sched/sch_api.c linux-4.8.15/net/sched/sch_api.c ---- linux-4.8.15.orig/net/sched/sch_api.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/sched/sch_api.c 2017-01-01 17:07:16.131433400 +0100 -@@ -975,7 +975,7 @@ +diff -Nur linux-4.9.6.orig/net/sched/sch_api.c linux-4.9.6/net/sched/sch_api.c +--- linux-4.9.6.orig/net/sched/sch_api.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/sched/sch_api.c 2017-01-28 13:59:10.111663104 +0100 +@@ -981,7 +981,7 @@ rcu_assign_pointer(sch->stab, stab); } if (tca[TCA_RATE]) { @@ -25480,11 +23734,11 @@ diff -Nur linux-4.8.15.orig/net/sched/sch_api.c linux-4.8.15/net/sched/sch_api.c err = -EOPNOTSUPP; if (sch->flags & TCQ_F_MQROOT) -diff -Nur linux-4.8.15.orig/net/sched/sch_generic.c linux-4.8.15/net/sched/sch_generic.c ---- linux-4.8.15.orig/net/sched/sch_generic.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/sched/sch_generic.c 2017-01-01 17:07:16.131433400 +0100 -@@ -426,7 +426,11 @@ - .list = LIST_HEAD_INIT(noop_qdisc.list), +diff -Nur linux-4.9.6.orig/net/sched/sch_generic.c linux-4.9.6/net/sched/sch_generic.c +--- linux-4.9.6.orig/net/sched/sch_generic.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/sched/sch_generic.c 2017-01-28 13:59:10.111663104 +0100 +@@ -425,7 +425,11 @@ + .ops = &noop_qdisc_ops, .q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock), .dev_queue = &noop_netdev_queue, +#ifdef CONFIG_PREEMPT_RT_BASE @@ -25495,7 +23749,7 @@ diff -Nur linux-4.8.15.orig/net/sched/sch_generic.c linux-4.8.15/net/sched/sch_g .busylock = __SPIN_LOCK_UNLOCKED(noop_qdisc.busylock), }; EXPORT_SYMBOL(noop_qdisc); -@@ -620,9 +624,17 @@ +@@ -624,9 +628,17 @@ lockdep_set_class(&sch->busylock, dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); @@ -25513,7 +23767,7 @@ diff -Nur linux-4.8.15.orig/net/sched/sch_generic.c linux-4.8.15/net/sched/sch_g sch->ops = ops; sch->enqueue = ops->enqueue; -@@ -917,7 +929,7 @@ +@@ -925,7 +937,7 @@ /* Wait for outstanding qdisc_run calls. */ list_for_each_entry(dev, head, close_list) while (some_qdisc_is_busy(dev)) @@ -25522,9 +23776,9 @@ diff -Nur linux-4.8.15.orig/net/sched/sch_generic.c linux-4.8.15/net/sched/sch_g } void dev_deactivate(struct net_device *dev) -diff -Nur linux-4.8.15.orig/net/sunrpc/svc_xprt.c linux-4.8.15/net/sunrpc/svc_xprt.c ---- linux-4.8.15.orig/net/sunrpc/svc_xprt.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/net/sunrpc/svc_xprt.c 2017-01-01 17:07:16.131433400 +0100 +diff -Nur linux-4.9.6.orig/net/sunrpc/svc_xprt.c linux-4.9.6/net/sunrpc/svc_xprt.c +--- linux-4.9.6.orig/net/sunrpc/svc_xprt.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/net/sunrpc/svc_xprt.c 2017-01-28 13:59:10.111663104 +0100 @@ -396,7 +396,7 @@ goto out; } @@ -25552,9 +23806,9 @@ diff -Nur linux-4.8.15.orig/net/sunrpc/svc_xprt.c linux-4.8.15/net/sunrpc/svc_xp out: trace_svc_xprt_do_enqueue(xprt, rqstp); } -diff -Nur linux-4.8.15.orig/scripts/mkcompile_h linux-4.8.15/scripts/mkcompile_h ---- linux-4.8.15.orig/scripts/mkcompile_h 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/scripts/mkcompile_h 2017-01-01 17:07:16.131433400 +0100 +diff -Nur linux-4.9.6.orig/scripts/mkcompile_h linux-4.9.6/scripts/mkcompile_h +--- linux-4.9.6.orig/scripts/mkcompile_h 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/scripts/mkcompile_h 2017-01-28 13:59:10.111663104 +0100 @@ -4,7 +4,8 @@ ARCH=$2 SMP=$3 @@ -25573,9 +23827,9 @@ diff -Nur linux-4.8.15.orig/scripts/mkcompile_h linux-4.8.15/scripts/mkcompile_h UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" # Truncate to maximum length -diff -Nur linux-4.8.15.orig/sound/core/pcm_native.c linux-4.8.15/sound/core/pcm_native.c ---- linux-4.8.15.orig/sound/core/pcm_native.c 2016-12-15 17:50:48.000000000 +0100 -+++ linux-4.8.15/sound/core/pcm_native.c 2017-01-01 17:07:16.135433664 +0100 +diff -Nur linux-4.9.6.orig/sound/core/pcm_native.c linux-4.9.6/sound/core/pcm_native.c +--- linux-4.9.6.orig/sound/core/pcm_native.c 2017-01-26 08:25:24.000000000 +0100 ++++ linux-4.9.6/sound/core/pcm_native.c 2017-01-28 13:59:10.111663104 +0100 @@ -135,7 +135,7 @@ void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream) { diff --git a/target/linux/patches/4.9.4/sh2.patch b/target/linux/patches/4.9.6/sh2.patch index 9debe80ad..9debe80ad 100644 --- a/target/linux/patches/4.9.4/sh2.patch +++ b/target/linux/patches/4.9.6/sh2.patch diff --git a/target/linux/patches/4.9.4/startup.patch b/target/linux/patches/4.9.6/startup.patch index e54ac19a6..e54ac19a6 100644 --- a/target/linux/patches/4.9.4/startup.patch +++ b/target/linux/patches/4.9.6/startup.patch diff --git a/target/linux/patches/4.9.4/vdso2.patch b/target/linux/patches/4.9.6/vdso2.patch index 35df488a8..35df488a8 100644 --- a/target/linux/patches/4.9.4/vdso2.patch +++ b/target/linux/patches/4.9.6/vdso2.patch |