[linux] 02/02: [rt] Update to 4.9.47-rt37

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sun Sep 10 03:44:11 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch stretch
in repository linux.

commit 53829526e0fe9b47998c60626c6656c81e288d9f
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sat Sep 9 23:56:58 2017 +0100

    [rt] Update to 4.9.47-rt37
---
 debian/changelog                                   |   5 +
 ...tch => 0001-timer-make-the-base-lock-raw.patch} |  39 +-
 ...le-statically-initialized-PER_CPU-locks-.patch} |  63 +-
 ...compilation-error-for-CONFIG_MODULES-and.patch} |  18 +-
 ... 0004-lockdep-Fix-per-cpu-static-objects.patch} |  31 +-
 ...anup-variable-names-for-futex_top_waiter.patch} |  22 +-
 ...Use-smp_store_release-in-mark_wake_futex.patch} |  10 +-
 ...-futex-Remove-rt_mutex_deadlock_account_.patch} |  36 +-
 ...utex-Provide-futex-specific-rt_mutex-API.patch} |  50 +-
 ...patch => 0009-futex-Change-locking-rules.patch} |  47 +-
 ....patch => 0010-futex-Cleanup-refcounting.patch} |  18 +-
 ...work-inconsistent-rt_mutex-futex_q-state.patch} |  19 +-
 ...t_mutex_futex_unlock-out-from-under-hb-l.patch} |  53 +-
 ...-rt_mutex-Introduce-rt_mutex_init_waiter.patch} |  24 +-
 ...ex-Restructure-rt_mutex_finish_proxy_loc.patch} |  27 +-
 ...-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch} |  52 +-
 ...> 0016-futex-Futex_unlock_pi-determinism.patch} |  12 +-
 ...hb-lock-before-enqueueing-on-the-rtmutex.patch} |  33 +-
 ...-Deboost-before-waking-up-the-top-waiter.patch} |  40 +-
 ...x-deadline-Fix-a-PI-crash-for-deadline-t.patch} |  51 +-
 ...ne-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch} |  10 +-
 ...-Clean-up.patch => 0021-rtmutex-Clean-up.patch} |  32 +-
 ...-sched-rtmutex-Refactor-rt_mutex_setprio.patch} |  48 +-
 ...ed-tracing-Update-trace_sched_pi_setprio.patch} |  20 +-
 ...024-rtmutex-Fix-PI-chain-order-integrity.patch} |  24 +-
 ...> 0025-rtmutex-Fix-more-prio-comparisons.patch} |  18 +-
 ...-preempt-count-leak-in-rt_mutex_futex_un.patch} |  10 +-
 ...0027-futex-Avoid-freeing-an-active-timer.patch} |  10 +-
 ...all-and-harmless-looking-inconsistencies.patch} |  15 +-
 ...ify-mark_wake_futex-memory-barrier-usage.patch} |  10 +-
 ... => 0030-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch} |   8 +-
 ...rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch} |  17 +-
 ...91-do-not-disable-enable-clocks-in-a-row.patch} |  20 +-
 ...-clear_tasks_mm_cpumask-call-to-__cpu_di.patch} |  18 +-
 ...x-Handle-non-enqueued-waiters-gracefully.patch} |  13 +-
 ...h.patch => 0035-fs-dcache-include-wait.h.patch} |   8 +-
 ...6-rbtree-include-rcu.h-because-we-use-it.patch} |   8 +-
 ... 0037-fs-dcache-init-in_lookup_hashtable.patch} |  10 +-
 ...on-t-disable-preempt-around-this_cpu_ptr.patch} |  19 +-
 ...on-t-disable-preemption-while-accessing-.patch} |  12 +-
 ...-rid-of-warning-acpi_ioapic_lock-defined.patch} |  12 +-
 ...041-rxrpc-remove-unused-static-variables.patch} |   8 +-
 ...cu-update-make-RCU_EXPEDITE_BOOT-default.patch} |  12 +-
 ...pu-rwsem-use-swait-for-the-wating-writer.patch} |  20 +-
 ...4-pinctrl-qcom-Use-raw-spinlock-variants.patch} |  44 +-
 ...0045-x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch} |  10 +-
 ...FSv4-replace-seqcount_t-with-a-seqlock_t.patch} |  40 +-
 ...7-sparc64-use-generic-rwsem-spinlocks-rt.patch} |   8 +-
 ...kernel-SRCU-provide-a-static-initializer.patch} |  22 +-
 ...block-Shorten-interrupt-disabled-regions.patch} |  16 +-
 ...> 0050-timekeeping-Split-jiffies-seqlock.patch} |  38 +-
 ...ount-for-preempt-off-in-preempt_schedule.patch} |  11 +-
 ... 0052-signal-Revert-ptrace-preempt-magic.patch} |  10 +-
 ...=> 0053-arm-Convert-arm-boot_lock-to-raw.patch} |  96 ++-
 ...rm-kprobe-replace-patch_lock-to-raw-lock.patch} |  12 +-
 ...5-posix-timers-Prevent-broadcast-signals.patch} |  13 +-
 ...ow-rt-tasks-to-cache-one-sigqueue-struct.patch} |  63 +-
 ...rs-random-Reduce-preempt-disabled-region.patch} |  13 +-
 ...-Remove-irq-handler-when-clock-event-is-.patch} |  28 +-
 ...drivers-timer-atmel-pit-fix-double-free_.patch} |  13 +-
 ...TCLIB-Allow-higher-clock-rates-for-clock.patch} |  30 +-
 ...rs-net-Use-disable_irq_nosync-in-8139too.patch} |  11 +-
 ... 0062-suspend-Prevent-might-sleep-splats.patch} |  29 +-
 ...h => 0063-net-flip-lock-dep-thingy.patch.patch} |  10 +-
 ...64-net-sched-Use-msleep-instead-of-yield.patch} |  10 +-
 ...o-not-unmask-io_apic-when-interrupt-is-i.patch} |  13 +-
 ...ke_up_all_locked-in-pci_unblock_user_cfg.patch} |  14 +-
 ... => 0067-latencyhist-disable-jump-labels.patch} |   8 +-
 ...h => 0068-tracing-Add-latency-histograms.patch} |  73 +-
 ...9-latency_hist-Update-sched_wakeup-probe.patch} |  12 +-
 ...y-hist-Consider-new-argument-when-probin.patch} |  14 +-
 ...uidle-version-for-preemptoff_hist-trace-.patch} |  16 +-
 ... => 0072-printk-Add-a-printk-kill-switch.patch} |  47 +-
 ...orce_early_printk-boot-param-to-help-wit.patch} |  13 +-
 ...rt-Provide-PREEMPT_RT_BASE-config-switch.patch} |   8 +-
 ...ble-config-options-which-are-not-RT-comp.patch} |  13 +-
 ...atch => 0076-kconfig-Add-PREEMPT_RT_FULL.patch} |  18 +-
 ...G_ON-WARN_ON-variants-dependend-on-RT-RT.patch} |  11 +-
 ...-amd-Use-WARN_ON_NORT-in-__attach_device.patch} |  12 +-
 ...t-local_irq_-variants-depending-on-RT-RT.patch} |  15 +-
 ...reempt-Provide-preempt_-_-no-rt-variants.patch} |   9 +-
 ... 0081-Intrduce-migrate_disable-cpu_light.patch} |  52 +-
 ...ound-migrate_disable-enable-in-different.patch} |  13 +-
 ...ock.patch => 0083-rt-Add-local-irq-locks.patch} |  14 +-
 ...atch => 0084-locallock-add-local_lock_on.patch} |  12 +-
 ...isable-interrupts-in-ide-code-for-preemp.patch} |  20 +-
 ...Do-not-disable-interrupts-for-PREEMPT-RT.patch} |  61 +-
 ...ellanox-IB-driver-patch-use-_nort-primit.patch} |  14 +-
 ...rt-Do-not-disable-interrupts-on-PREEMPT_.patch} |  16 +-
 ...disable-interrupts-on-RT-in-kernel-users.patch} |  10 +-
 ... 0090-usb-Use-_nort-in-giveback-function.patch} |  10 +-
 ...mm-scatterlist-Do-not-disable-irqs-on-RT.patch} |  14 +-
 ...t-Do-not-protect-workingset_shadow_nodes.patch} |  35 +-
 ...signal-Make-__lock_task_sighand-RT-aware.patch} |  12 +-
 ...gnal-x86-Delay-calling-signals-in-atomic.patch} |  29 +-
 ...86-signal-delay-calling-signals-on-32bit.patch} |   8 +-
 ...ch => 0096-net-wireless-Use-WARN_ON_NORT.patch} |  10 +-
 ...fer_head-Replace-bh_uptodate_lock-for-rt.patch} |  34 +-
 ...Make-state-lock-and-journal-head-lock-rt.patch} |  17 +-
 ...9-list_bl-Make-list-head-locking-RT-safe.patch} |  10 +-
 ...0100-list_bl-fixup-bogus-lockdep-warning.patch} |   8 +-
 ...tch => 0101-genirq-Disable-irqpoll-on-rt.patch} |  11 +-
 ...0102-genirq-Force-interrupt-thread-on-RT.patch} |  18 +-
 ...03-drivers-net-vortex-fix-locking-issues.patch} |  13 +-
 ...-mm-page_alloc-rt-friendly-per-cpu-pages.patch} |  34 +-
 ...-page_alloc-Reduce-lock-sections-further.patch} |  28 +-
 ...=> 0106-mm-swap-Convert-to-percpu-locked.patch} |  37 +-
 ...07-mm-perform-lru_add_drain_all-remotely.patch} |   8 +-
 ...otect-per-cpu-variables-with-preempt-dis.patch} |  42 +-
 ...ze-split-page-table-locks-for-vector-pag.patch} |  11 +-
 ...> 0110-mm-bounce-Use-local_irq_save_nort.patch} |  12 +-
 ...t.patch => 0111-mm-Allow-only-slub-on-RT.patch} |   9 +-
 ...slub.patch => 0112-mm-Enable-SLUB-for-RT.patch} |  94 +-
 ... => 0113-slub-Enable-irqs-for-__GFP_WAIT.patch} |  14 +-
 ...ch => 0114-slub-Disable-SLUB_CPU_PARTIAL.patch} |   8 +-
 ...c-Use-local_lock_on-instead-of-plain-spi.patch} |  10 +-
 ...l-Don-t-call-schedule_work_on-in-preempt.patch} |  14 +-
 ...l-Replace-local_irq_disable-with-local-l.patch} |  19 +-
 ...l-mem_cgroup_migrate-replace-another-loc.patch} |  10 +-
 ...ev-don-t-disable-IRQs-in-wb_congested_pu.patch} |  11 +-
 ...malloc-copy-with-get_cpu_var-and-locking.patch} |  22 +-
 ...patch => 0121-radix-tree-use-local-locks.patch} |  26 +-
 ...et_random_bytes-for-RT_FULL-in-init_oops.patch} |   9 +-
 ... 0123-timers-Prepare-for-full-preemption.patch} |  31 +-
 ...elay-waking-softirqs-from-the-jiffy-tick.patch} |  11 +-
 ...=> 0125-hrtimers-Prepare-full-preemption.patch} |  51 +-
 ... => 0126-hrtimer-enfore-64byte-alignment.patch} |   8 +-
 ...p-hrtimer-callback-changes-for-preempt-r.patch} |  54 +-
 ...deadline-dl_task_timer-has-to-be-irqsafe.patch} |  10 +-
 ...patch => 0129-timer-fd-Prevent-live-lock.patch} |  11 +-
 ...broadcast-Make-broadcast-hrtimer-irqsafe.patch} |   8 +-
 ...timer-check-properly-for-a-running-timer.patch} |  10 +-
 ...six-timers-Thread-posix-cpu-timers-on-rt.patch} |  37 +-
 ...33-sched-Move-task_struct-cleanup-to-RCU.patch} |  22 +-
 ...-the-number-of-task-migrations-per-batch.patch} |  12 +-
 ...h => 0135-sched-Move-mmdrop-to-RCU-on-RT.patch} |  38 +-
 ...-move-stack-kprobe-clean-up-to-__put_tas.patch} |  16 +-
 ...ved_state-for-tasks-blocked-on-sleeping-.patch} |  27 +-
 ...nt-task-state-corruption-by-spurious-lock.patch |  81 ++
 .../all/rt/0139-sched-Remove-TASK_ALL.patch        |  32 +
 ...-account-rcu_preempt_depth-on-RT-in-migh.patch} |  19 +-
 ...T-softirq-semantics-into-account-in-cond.patch} |  17 +-
 ...-the-proper-LOCK_OFFSET-for-cond_resched.patch} |   8 +-
 ...h => 0143-sched-Disable-TTWU_QUEUE-on-RT.patch} |   8 +-
 ...ched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch} |   8 +-
 ...eturn-success-when-only-changing-the-sav.patch} |  12 +-
 ...eue-Only-wake-up-idle-workers-if-not-blo.patch} |  11 +-
 ...e-convert-stop_machine_run-to-PREEMPT_RT.patch} |  11 +-
 ...h => 0148-stop_machine-Use-raw-spinlocks.patch} |  20 +-
 ...0149-hotplug-Lightweight-get-online-cpus.patch} |  22 +-
 ...50-hotplug-sync_unplug-No-n-in-task-name.patch} |  10 +-
 ...ead-hotplug_pcp-on-pin_current_cpu-retry.patch} |  11 +-
 ...grate-disabled-counter-to-tracing-output.patch} |  30 +-
 ...53-hotplug-Use-migrate-disable-on-unplug.patch} |  12 +-
 ...t.patch => 0154-lockdep-Make-it-RT-aware.patch} |  16 +-
 ...155-locking-Disable-spin-on-owner-for-RT.patch} |  11 +-
 ...ent-tasklets-from-going-into-infinite-sp.patch} |  36 +-
 ...k-preemption-after-reenabling-interrupts.patch} |  51 +-
 ...58-softirq-Disable-softirq-stacks-for-RT.patch} |  46 +-
 ...atch => 0159-softirq-Split-softirq-locks.patch} |  70 +-
 ... 0160-kernel-softirq-unlock-with-irqs-on.patch} |   8 +-
 ...te_disable-do-fastpath-in-atomic-irqs-of.patch} |   8 +-
 ...-disabling-of-softirq-processing-in-irq-.patch} |  32 +-
 ...rq-split-timer-softirqs-out-of-ksoftirqd.patch} |  23 +-
 ...softirq-wake-the-timer-softirq-if-needed.patch} |  10 +-
 ...ers-Don-t-wake-ktimersoftd-on-every-tick.patch} |  30 +-
 ...ers-Don-t-wake-ktimersoftd-on-every-tick.patch} |  31 +-
 ...ch => 0167-rtmutex-trylock-is-okay-on-RT.patch} |  10 +-
 ... 0168-gpu-don-t-check-for-the-lock-owner.patch} |  16 +-
 ...9-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch} |  32 +-
 ...le-the-various-new-futex-race-conditions.patch} |  42 +-
 ...bug-on-when-a-requeued-RT-task-times-out.patch} |  18 +-
 ...-lock-unlock-symetry-versus-pi_lock-and-.patch} |  11 +-
 ...c.h.patch => 0173-pid.h-include-atomic.h.patch} |   8 +-
 ...174-arm-include-definition-for-cpumask_t.patch} |   8 +-
 ...torture-Do-NOT-include-rwlock.h-directly.patch} |   9 +-
 ...> 0176-rtmutex-Add-rtmutex_lock_killable.patch} |  24 +-
 ... => 0177-rtmutex-Make-lock_killable-work.patch} |  10 +-
 ...178-spinlock-Split-the-lock-types-header.patch} |  24 +-
 ...patch => 0179-rtmutex-Avoid-include-hell.patch} |   8 +-
 ...0180-rbtree-don-t-include-the-rcu-header.patch} |  30 +-
 ...Add-the-preempt-rt-lock-replacement-APIs.patch} | 201 +++--
 ...x_disable-on-DEBUG-configs-and-the-GPL-s.patch} |  11 +-
 ...king-use-an-exclusive-wait_q-for-sleepers.patch | 146 ++++
 ...ch => 0184-rtmutex-Add-RT-aware-ww-locks.patch} |  32 +-
 ...0185-rtmutex-Provide-rt_mutex_lock_state.patch} |  25 +-
 ... => 0186-rtmutex-Provide-locked-slowpath.patch} |  22 +-
 ...ex-rtmutex-Cure-RT-double-blocking-issue.patch} |  13 +-
 ...-rwsem-rt-Lift-single-reader-restriction.patch} |  31 +-
 ...-ptrace-fix-ptrace-vs-tasklist_lock-race.patch} |  28 +-
 ...-rcu.patch => 0190-rcu-Frob-softirq-test.patch} |  36 +-
 ...> 0191-rcu-Merge-RCU-bh-into-RCU-preempt.patch} |  67 +-
 ...u-Make-ksoftirqd-do-RCU-quiescent-states.patch} |  27 +-
 ...bh_qs-Disable-irq-while-calling-rcu_pree.patch} |   9 +-
 ...ty-serial-omap-Make-the-locking-RT-aware.patch} |  12 +-
 ...serial-pl011-Make-the-locking-work-on-RT.patch} |  14 +-
 ...rt-Improve-the-serial-console-PASS_LIMIT.patch} |  15 +-
 ...-8250-don-t-take-the-trylock-during-oops.patch} |  10 +-
 ....h.patch => 0198-wait.h-include-atomic.h.patch} |  11 +-
 ...k-simple-Simple-work-queue-implemenation.patch} |  20 +-
 ...> 0200-completion-Use-simple-wait-queues.patch} |  76 +-
 ....patch => 0201-fs-aio-simple-simple-work.patch} |  16 +-
 ...t-invoke-the-affinity-callback-via-a-wor.patch} |  27 +-
 ...Move-schedule_work-call-to-helper-thread.patch} |   8 +-
 ...pu-rwsem-Remove-preempt_disable-variants.patch} |  47 +-
 ...atch => 0205-fs-namespace-preemption-fix.patch} |  11 +-
 ...ctivate_mm-by-preempt_-disable-enable-_r.patch} |  15 +-
 ...ck-Turn-off-warning-which-is-bogus-on-RT.patch} |   8 +-
 ...208-fs-ntfs-disable-interrupt-only-on-RT.patch} |  13 +-
 ...d2-pull-your-plug-when-waiting-for-space.patch} |  10 +-
 ...=> 0210-x86-Convert-mce-timer-to-hrtimer.patch} |  30 +-
 ...-x86-mce-use-swait-queue-for-mce-wakeups.patch} |  16 +-
 ...6-stackprotector-Avoid-random-pool-on-rt.patch} |  11 +-
 ...13-x86-Use-generic-rwsem_spinlocks-on-rt.patch} |   9 +-
 ...h => 0214-x86-UV-raw_spinlock-conversion.patch} |  48 +-
 ...-thermal-Defer-thermal-wakups-to-threads.patch} |  20 +-
 ...fs-epoll-Do-not-disable-preemption-on-RT.patch} |  12 +-
 ...nother-preempt-disable-region-which-suck.patch} |  19 +-
 ...ght.patch => 0218-block-mq-use-cpu_light.patch} |  10 +-
 ...9-block-mq-do-not-invoke-preempt_disable.patch} |  14 +-
 ...block-mq-don-t-complete-requests-via-IPI.patch} |  32 +-
 ...aid5-Make-raid5_percpu-handling-RT-aware.patch} |  21 +-
 ...ill.patch => 0222-rt-Introduce-cpu_chill.patch} |  18 +-
 ...-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch} |  18 +-
 ...ait.patch => 0224-block-blk-mq-Use-swait.patch} |  28 +-
 ...0225-block-Use-cpu_chill-for-retry-loops.patch} |  13 +-
 ...fs-dcache-Use-cpu_chill-in-trylock-loops.patch} |  33 +-
 ...7-net-Use-cpu_chill-instead-of-cpu_relax.patch} |  21 +-
 ...che-use-swait_queue-instead-of-waitqueue.patch} |  72 +-
 ...u.patch => 0229-workqueue-Use-normal-rcu.patch} |  58 +-
 ...e-local-irq-lock-instead-of-irq-disable-.patch} |  29 +-
 ...event-workqueue-versus-ata-piix-livelock.patch} |  12 +-
 ...-Distangle-worker-accounting-from-rqlock.patch} |  51 +-
 ...l-lock-instead-of-preempt-enable-disable.patch} |  18 +-
 ...patch => 0234-percpu_ida-Use-local-locks.patch} |  24 +-
 ...patch => 0235-debugobjects-Make-RT-aware.patch} |  10 +-
 ...mp-label-disable-if-stop_machine-is-used.patch} |  10 +-
 ...ch => 0237-seqlock-Prevent-rt-starvation.patch} |  30 +-
 ...ke-svc_xprt_do_enqueue-use-get_cpu_light.patch} |  15 +-
 ... => 0239-net-Use-skbufhead-with-raw-lock.patch} |  36 +-
 ...puhotplug-Drain-input_pkt_queue-lockless.patch} |  12 +-
 ...mit_recursion-to-per-task-variable-on-RT.patch} |  40 +-
 ...a-way-to-delegate-processing-a-softirq-t.patch} |  28 +-
 ...ys-take-qdisc-s-busylock-in-__dev_xmit_s.patch} |  11 +-
 ...net-Qdisc-use-a-seqlock-instead-seqcount.patch} |  59 +-
 ...-the-missing-serialization-in-ip_send_un.patch} |  18 +-
 ...ch => 0246-net-add-a-lock-around-icmp_sk.patch} |  18 +-
 ...api_schedule_irqoff-disable-interrupts-o.patch} |  20 +-
 ...g-sysrq.patch => 0248-net-sysrq-via-icmp.patch} |  41 +-
 ...work-push-most-work-into-softirq-context.patch} |  42 +-
 ...rqwork-Move-irq-safe-work-to-irq-context.patch} |  26 +-
 ...snd_pcm_stream_lock-irqs_disabled-splats.patch} |  17 +-
 ...aware.patch => 0252-printk-Make-rt-aware.patch} |  16 +-
 ...k-Don-t-try-to-print-from-IRQ-NMI-region.patch} |  10 +-
 ...4-printk-Drop-the-logbuf_lock-more-often.patch} |  18 +-
 ... => 0255-powerpc-Use-generic-rwsem-on-RT.patch} |   8 +-
 ...Disable-in-kernel-MPIC-emulation-for-PRE.patch} |   9 +-
 ...device-init.c-adapt-to-completions-using.patch} |  11 +-
 ...at91-tclib-Default-to-tclib-timer-for-RT.patch} |   9 +-
 ...h => 0259-arm-unwind-use-a-raw_spin_lock.patch} |  18 +-
 ...rq-in-translation-section-permission-fau.patch} |  16 +-
 ...date-irq_set_irqchip_state-documentation.patch} |  10 +-
 ...4-downgrade-preempt_disable-d-region-to-.patch} |  15 +-
 ... => 0263-arm64-xen-Make-XEN-depend-on-RT.patch} |   8 +-
 ...> 0264-kgdb-serial-Short-term-workaround.patch} |  29 +-
 ...0265-sysfs-Add-sys-kernel-realtime-entry.patch} |  18 +-
 ...ch => 0266-powerpc-Disable-highmem-on-RT.patch} |   8 +-
 ...patch => 0267-mips-Disable-highmem-on-RT.patch} |   8 +-
 ...tch => 0268-mm-rt-kmap_atomic-scheduling.patch} |  50 +-
 ...269-mm-rt-Fix-generic-kmap_atomic-for-RT.patch} |  12 +-
 ...x86-highmem-Add-a-already-used-pte-check.patch} |  10 +-
 ...h => 0271-arm-highmem-Flush-tlb-on-unmap.patch} |   8 +-
 ....patch => 0272-arm-Enable-highmem-for-rt.patch} |  20 +-
 ...=> 0273-ipc-sem-Rework-semaphore-wakeups.patch} |  16 +-
 ...=> 0274-x86-kvm-Require-const-tsc-for-RT.patch} |  12 +-
 ...apic-mark-LAPIC-timer-handler-as-irqsafe.patch} |  10 +-
 ...re.patch => 0276-scsi-fcoe-Make-RT-aware.patch} |  30 +-
 ...-dont-t-disable-interrupts-in-qc_issue-h.patch} |  13 +-
 ...6-crypto-Reduce-preempt-disabled-regions.patch} |  18 +-
 ...duce-preempt-disabled-regions-more-algos.patch} |  44 +-
 ...-rt-aware.patch => 0280-dm-Make-rt-aware.patch} |  10 +-
 ...ert-acpi_gbl_hardware-lock-back-to-a-raw.patch} |  35 +-
 ...k-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch} |  12 +-
 ....patch => 0283-random-Make-it-work-on-rt.patch} |  35 +-
 ...-random-avoid-preempt_disable-ed-section.patch} |   9 +-
 ...e-hotplug.lock-a-sleeping-spinlock-on-RT.patch} |  10 +-
 ...86-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch} |  29 +-
 ...-Document-why-PREEMPT_RT-uses-a-spinlock.patch} |   8 +-
 ...ix-cpu-down-problem-if-kthread-s-cpu-is-.patch} |  19 +-
 ...lug-restore-original-cpu-mask-oncpu-down.patch} |  16 +-
 ...> 0290-cpu_down-move-migrate_enable-back.patch} |  16 +-
 ...set_cpus_allowed_ptr-in-sync_unplug_thre.patch} |  11 +-
 ...king-Reenable-migration-accross-schedule.patch} |  16 +-
 ...-Use-local_irq_save_nort-in-qla2x00_poll.patch} |   9 +-
 ...-Remove-preemption-disabling-in-netif_rx.patch} |  14 +-
 ...other-local_irq_disable-kmalloc-headache.patch} |  12 +-
 ...tect-users-of-napi_alloc_cache-against-r.patch} |  14 +-
 ...r-Serialize-xt_write_recseq-sections-on-.patch} |  20 +-
 ...net-Add-a-mutex-around-devnet_rename_seq.patch} |  20 +-
 ...to-Convert-crypto-notifier-chain-to-SRCU.patch} |  22 +-
 ...test-Only-do-hardirq-context-test-for-ra.patch} |  13 +-
 ...test-fix-warnings-due-to-missing-PREEMPT.patch} |  29 +-
 ...event-hrtimer-run-in-irq-instead-of-soft.patch} |  12 +-
 ...mark-perf_cpu_context-s-timer-as-irqsafe.patch} |  10 +-
 ...=> 0304-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch} |   9 +-
 ...liminate-softirq-processing-from-rcutree.patch} |  69 +-
 ...=> 0306-rcu-make-RCU_BOOST-default-on-RT.patch} |   8 +-
 ...-rcu_normal_after_boot-by-default-for-RT.patch} |   8 +-
 ...08-sched-Add-support-for-lazy-preemption.patch} | 108 ++-
 ...> 0309-ftrace-Fix-trace-header-alignment.patch} |  12 +-
 ... => 0310-x86-Support-for-lazy-preemption.patch} |  40 +-
 ...0311-arm-Add-support-for-lazy-preemption.patch} |  36 +-
 ...-powerpc-Add-support-for-lazy-preemption.patch} |  44 +-
 ...0313-arch-arm64-Add-lazy-preempt-support.patch} |  36 +-
 ...te-disable-handle-updated-task-mask-mg-di.patch | 125 +++
 ...5-leds-trigger-disable-CPU-trigger-on-RT.patch} |   8 +-
 ...=> 0316-mmci-Remove-bogus-local_irq_save.patch} |  14 +-
 ...eq-drop-K8-s-driver-from-beeing-selected.patch} |   8 +-
 ..._proc-Protect-send_msg-with-a-local-lock.patch} |  14 +-
 ...k-zram-Replace-bit-spinlocks-with-rtmute.patch} |  30 +-
 ...-Don-t-disable-preemption-in-zcomp_strea.patch} |  24 +-
 ...-drop-trace_i915_gem_ring_dispatch-on-rt.patch} |  10 +-
 ...arning-from-i915-when-running-on-PREEMPT.patch} |  11 +-
 ...915-Use-preempt_disable-enable_rt-where-.patch} |  21 +-
 ...-local_lock-unlock_irq-in-intel_pipe_upd.patch} |  18 +-
 ...5-cgroups-use-simple-wait-in-css_release.patch} |  20 +-
 ...revent-scheduling-while-atomic-in-cgroup.patch} |  19 +-
 ...-Convert-callback_lock-to-raw_spinlock_t.patch} |  44 +-
 ...call-to-schedule_delayed_work-to-helper-.patch} |  13 +-
 ...e-bcache.patch => 0329-md-disable-bcache.patch} |  11 +-
 ...0-workqueue-Prevent-deadlock-stall-on-RT.patch} |  33 +-
 .../rt/0331-Add-localversion-for-RT-release.patch  |  18 +
 .../all/rt/0332-Linux-4.9.47-rt37-REBASE.patch     |  17 +
 debian/patches/features/all/rt/localversion.patch  |  14 -
 debian/patches/series-rt                           | 949 +++++++--------------
 335 files changed, 5089 insertions(+), 3582 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 08ecc41..821b0cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1196,6 +1196,11 @@ linux (4.9.47-1) UNRELEASED; urgency=medium
   * workqueue: Fix flag collision
   * Bump ABI to 4
   * [mips*el/loongson-3] Select MIPS_L1_CACHE_SHIFT_6 (deferred from 4.9.30)
+  * [rt] Update to 4.9.47-rt37:
+    - sched: Prevent task state corruption by spurious lock wakeup
+    - sched: Remove TASK_ALL
+    - kernel/locking: use an exclusive wait_q for sleepers
+    - sched/migrate disable: handle updated task-mask mg-dis section
 
   [ Cyril Brulebois ]
   * [arm64,armhf] udeb: Ship usb3503 module in usb-modules, needed for
diff --git a/debian/patches/features/all/rt/timer-make-the-base-lock-raw.patch b/debian/patches/features/all/rt/0001-timer-make-the-base-lock-raw.patch
similarity index 74%
rename from debian/patches/features/all/rt/timer-make-the-base-lock-raw.patch
rename to debian/patches/features/all/rt/0001-timer-make-the-base-lock-raw.patch
index af13f96..2bc85bc 100644
--- a/debian/patches/features/all/rt/timer-make-the-base-lock-raw.patch
+++ b/debian/patches/features/all/rt/0001-timer-make-the-base-lock-raw.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 13 Jul 2016 18:22:23 +0200
-Subject: [PATCH] timer: make the base lock raw
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 001/332] timer: make the base lock raw
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6bb5260e72adf83f9e01ba2e66bc45b54c25eddf
 
 The part where the base lock is held got more predictable / shorter after the
 timer rework. One reason is the lack of re-cascading.
@@ -9,9 +9,11 @@ That means the lock can be made raw and held in IRQ context.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/timer.c |   48 ++++++++++++++++++++++++------------------------
+ kernel/time/timer.c | 48 ++++++++++++++++++++++++------------------------
  1 file changed, 24 insertions(+), 24 deletions(-)
 
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index df445cde8a1e..666465939d59 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
 @@ -193,7 +193,7 @@ EXPORT_SYMBOL(jiffies_64);
@@ -23,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct timer_list	*running_timer;
  	unsigned long		clk;
  	unsigned long		next_expiry;
-@@ -948,10 +948,10 @@ static struct timer_base *lock_timer_bas
+@@ -955,10 +955,10 @@ static struct timer_base *lock_timer_base(struct timer_list *timer,
  
  		if (!(tf & TIMER_MIGRATING)) {
  			base = get_timer_base(tf);
@@ -36,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  		cpu_relax();
  	}
-@@ -1023,9 +1023,9 @@ static inline int
+@@ -1037,9 +1037,9 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
  			/* See the comment in lock_timer_base() */
  			timer->flags |= TIMER_MIGRATING;
  
@@ -47,8 +49,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +			raw_spin_lock(&base->lock);
  			WRITE_ONCE(timer->flags,
  				   (timer->flags & ~TIMER_BASEMASK) | base->cpu);
- 		}
-@@ -1050,7 +1050,7 @@ static inline int
+ 			forward_timer_base(base);
+@@ -1062,7 +1062,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
  	}
  
  out_unlock:
@@ -57,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return ret;
  }
-@@ -1144,16 +1144,16 @@ void add_timer_on(struct timer_list *tim
+@@ -1156,9 +1156,9 @@ void add_timer_on(struct timer_list *timer, int cpu)
  	if (base != new_base) {
  		timer->flags |= TIMER_MIGRATING;
  
@@ -69,6 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		WRITE_ONCE(timer->flags,
  			   (timer->flags & ~TIMER_BASEMASK) | cpu);
  	}
+@@ -1166,7 +1166,7 @@ void add_timer_on(struct timer_list *timer, int cpu)
  
  	debug_activate(timer, timer->expires);
  	internal_add_timer(base, timer);
@@ -77,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(add_timer_on);
  
-@@ -1180,7 +1180,7 @@ int del_timer(struct timer_list *timer)
+@@ -1193,7 +1193,7 @@ int del_timer(struct timer_list *timer)
  	if (timer_pending(timer)) {
  		base = lock_timer_base(timer, &flags);
  		ret = detach_if_pending(timer, base, true);
@@ -86,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	return ret;
-@@ -1208,7 +1208,7 @@ int try_to_del_timer_sync(struct timer_l
+@@ -1221,7 +1221,7 @@ int try_to_del_timer_sync(struct timer_list *timer)
  		timer_stats_timer_clear_start_info(timer);
  		ret = detach_if_pending(timer, base, true);
  	}
@@ -95,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return ret;
  }
-@@ -1340,13 +1340,13 @@ static void expire_timers(struct timer_b
+@@ -1353,13 +1353,13 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head)
  		data = timer->data;
  
  		if (timer->flags & TIMER_IRQSAFE) {
@@ -113,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  	}
  }
-@@ -1515,7 +1515,7 @@ u64 get_next_timer_interrupt(unsigned lo
+@@ -1528,7 +1528,7 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
  	if (cpu_is_offline(smp_processor_id()))
  		return expires;
  
@@ -122,16 +125,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	nextevt = __next_timer_interrupt(base);
  	is_max_delta = (nextevt == base->clk + NEXT_TIMER_MAX_DELTA);
  	base->next_expiry = nextevt;
-@@ -1543,7 +1543,7 @@ u64 get_next_timer_interrupt(unsigned lo
- 		if ((expires - basem) > TICK_NSEC)
+@@ -1562,7 +1562,7 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
  			base->is_idle = true;
+ 		}
  	}
 -	spin_unlock(&base->lock);
 +	raw_spin_unlock(&base->lock);
  
  	return cmp_next_hrtimer_event(basem, expires);
  }
-@@ -1630,7 +1630,7 @@ static inline void __run_timers(struct t
+@@ -1649,7 +1649,7 @@ static inline void __run_timers(struct timer_base *base)
  	if (!time_after_eq(jiffies, base->clk))
  		return;
  
@@ -140,7 +143,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	while (time_after_eq(jiffies, base->clk)) {
  
-@@ -1641,7 +1641,7 @@ static inline void __run_timers(struct t
+@@ -1660,7 +1660,7 @@ static inline void __run_timers(struct timer_base *base)
  			expire_timers(base, heads + levels);
  	}
  	base->running_timer = NULL;
@@ -149,7 +152,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -1836,16 +1836,16 @@ int timers_dead_cpu(unsigned int cpu)
+@@ -1868,16 +1868,16 @@ int timers_dead_cpu(unsigned int cpu)
  		 * The caller is globally serialized and nobody else
  		 * takes two locks at once, deadlock is not possible.
  		 */
@@ -170,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		put_cpu_ptr(&timer_bases);
  	}
  	return 0;
-@@ -1861,7 +1861,7 @@ static void __init init_timer_cpu(int cp
+@@ -1893,7 +1893,7 @@ static void __init init_timer_cpu(int cpu)
  	for (i = 0; i < NR_BASES; i++) {
  		base = per_cpu_ptr(&timer_bases[i], cpu);
  		base->cpu = cpu;
diff --git a/debian/patches/features/all/rt/lockdep-Handle-statically-initialized-PER_CPU-locks-.patch b/debian/patches/features/all/rt/0002-lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
similarity index 78%
rename from debian/patches/features/all/rt/lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
rename to debian/patches/features/all/rt/0002-lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
index 6991a28..e60aeed 100644
--- a/debian/patches/features/all/rt/lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
+++ b/debian/patches/features/all/rt/0002-lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
@@ -1,7 +1,8 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 17 Feb 2017 19:44:39 +0100
-Subject: [PATCH] lockdep: Handle statically initialized PER_CPU locks proper
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 002/332] lockdep: Handle statically initialized PER_CPU locks
+ proper
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=99c3fcedb5b505c3112a0c10d539a847197e9cde
 
 If a PER_CPU struct which contains a spin_lock is statically initialized
 via:
@@ -36,16 +37,18 @@ Cc: stable-rt at vger.kernel.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/module.h   |    1 +
- include/linux/percpu.h   |    1 +
- kernel/locking/lockdep.c |   35 ++++++++++++++++++++++++-----------
- kernel/module.c          |   31 +++++++++++++++++++------------
- mm/percpu.c              |   37 +++++++++++++++++++++++--------------
- 5 files changed, 68 insertions(+), 37 deletions(-)
+ include/linux/module.h   |  1 +
+ include/linux/percpu.h   |  1 +
+ kernel/locking/lockdep.c | 33 +++++++++++++++++++++++----------
+ kernel/module.c          | 31 +++++++++++++++++++------------
+ mm/percpu.c              | 37 +++++++++++++++++++++++--------------
+ 5 files changed, 67 insertions(+), 36 deletions(-)
 
+diff --git a/include/linux/module.h b/include/linux/module.h
+index 0c3207d26ac0..3d3d2188c7d9 100644
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -496,6 +496,7 @@ static inline int module_is_live(struct
+@@ -496,6 +496,7 @@ static inline int module_is_live(struct module *mod)
  struct module *__module_text_address(unsigned long addr);
  struct module *__module_address(unsigned long addr);
  bool is_module_address(unsigned long addr);
@@ -53,9 +56,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  bool is_module_percpu_address(unsigned long addr);
  bool is_module_text_address(unsigned long addr);
  
+diff --git a/include/linux/percpu.h b/include/linux/percpu.h
+index 56939d3f6e53..491b3f5a5f8a 100644
 --- a/include/linux/percpu.h
 +++ b/include/linux/percpu.h
-@@ -110,6 +110,7 @@ extern int __init pcpu_page_first_chunk(
+@@ -110,6 +110,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size,
  #endif
  
  extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align);
@@ -63,9 +68,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  extern bool is_kernel_percpu_address(unsigned long addr);
  
  #if !defined(CONFIG_SMP) || !defined(CONFIG_HAVE_SETUP_PER_CPU_AREA)
+diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
+index 4d7ffc0a0d00..8b95ab1bd429 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -658,6 +658,7 @@ look_up_lock_class(struct lockdep_map *l
+@@ -658,6 +658,7 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass)
  	struct lockdep_subclass_key *key;
  	struct hlist_head *hash_head;
  	struct lock_class *class;
@@ -73,18 +80,17 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (unlikely(subclass >= MAX_LOCKDEP_SUBCLASSES)) {
  		debug_locks_off();
-@@ -671,10 +672,23 @@ look_up_lock_class(struct lockdep_map *l
+@@ -671,10 +672,23 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass)
  
  	/*
  	 * Static locks do not have their class-keys yet - for them the key
 -	 * is the lock object itself:
--	 */
--	if (unlikely(!lock->key))
--		lock->key = (void *)lock;
 +	 * is the lock object itself. If the lock is in the per cpu area,
 +	 * the canonical address of the lock (per cpu offset removed) is
 +	 * used.
-+	 */
+ 	 */
+-	if (unlikely(!lock->key))
+-		lock->key = (void *)lock;
 +	if (unlikely(!lock->key)) {
 +		unsigned long can_addr, addr = (unsigned long)lock;
 +
@@ -101,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * NOTE: the class-key must be unique. For dynamic locks, a static
-@@ -706,7 +720,7 @@ look_up_lock_class(struct lockdep_map *l
+@@ -706,7 +720,7 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass)
  		}
  	}
  
@@ -110,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -724,19 +738,18 @@ register_lock_class(struct lockdep_map *
+@@ -724,19 +738,18 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
  	DEBUG_LOCKS_WARN_ON(!irqs_disabled());
  
  	class = look_up_lock_class(lock, subclass);
@@ -133,7 +139,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		return NULL;
  	}
  
-@@ -3410,7 +3423,7 @@ static int match_held_lock(struct held_l
+@@ -3410,7 +3423,7 @@ static int match_held_lock(struct held_lock *hlock, struct lockdep_map *lock)
  		 * Clearly if the lock hasn't been acquired _ever_, we're not
  		 * holding it either, so report failure.
  		 */
@@ -142,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			return 0;
  
  		/*
-@@ -4159,7 +4172,7 @@ void lockdep_reset_lock(struct lockdep_m
+@@ -4159,7 +4172,7 @@ void lockdep_reset_lock(struct lockdep_map *lock)
  		 * If the class exists we look it up and zap it:
  		 */
  		class = look_up_lock_class(lock, j);
@@ -151,9 +157,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			zap_class(class);
  	}
  	/*
+diff --git a/kernel/module.c b/kernel/module.c
+index 0e54d5bf0097..289616d8ccfd 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -660,16 +660,7 @@ static void percpu_modcopy(struct module
+@@ -660,16 +660,7 @@ static void percpu_modcopy(struct module *mod,
  		memcpy(per_cpu_ptr(mod->percpu, cpu), from, size);
  }
  
@@ -171,7 +179,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct module *mod;
  	unsigned int cpu;
-@@ -683,9 +674,11 @@ bool is_module_percpu_address(unsigned l
+@@ -683,9 +674,11 @@ bool is_module_percpu_address(unsigned long addr)
  			continue;
  		for_each_possible_cpu(cpu) {
  			void *start = per_cpu_ptr(mod->percpu, cpu);
@@ -185,7 +193,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				preempt_enable();
  				return true;
  			}
-@@ -696,6 +689,20 @@ bool is_module_percpu_address(unsigned l
+@@ -696,6 +689,20 @@ bool is_module_percpu_address(unsigned long addr)
  	return false;
  }
  
@@ -206,6 +214,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #else /* ... !CONFIG_SMP */
  
  static inline void __percpu *mod_percpu(struct module *mod)
+diff --git a/mm/percpu.c b/mm/percpu.c
+index f014cebbf405..90349153b49d 100644
 --- a/mm/percpu.c
 +++ b/mm/percpu.c
 @@ -1283,18 +1283,7 @@ void free_percpu(void __percpu *ptr)
@@ -228,7 +238,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  #ifdef CONFIG_SMP
  	const size_t static_size = __per_cpu_end - __per_cpu_start;
-@@ -1303,16 +1292,36 @@ bool is_kernel_percpu_address(unsigned l
+@@ -1303,15 +1292,35 @@ bool is_kernel_percpu_address(unsigned long addr)
  
  	for_each_possible_cpu(cpu) {
  		void *start = per_cpu_ptr(base, cpu);
@@ -247,7 +257,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return false;
  }
  
- /**
++/**
 + * is_kernel_percpu_address - test whether address is from static percpu area
 + * @addr: address to test
 + *
@@ -263,7 +273,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	return __is_kernel_percpu_address(addr, NULL);
 +}
 +
-+/**
+ /**
   * per_cpu_ptr_to_phys - convert translated percpu address to physical address
   * @addr: the address to be converted to physical address
-  *
diff --git a/debian/patches/features/all/rt/lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch b/debian/patches/features/all/rt/0003-lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
similarity index 68%
rename from debian/patches/features/all/rt/lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
rename to debian/patches/features/all/rt/0003-lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
index 3ee2b08..61d3370 100644
--- a/debian/patches/features/all/rt/lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
+++ b/debian/patches/features/all/rt/0003-lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
@@ -1,8 +1,8 @@
 From: Dan Murphy <dmurphy at ti.com>
 Date: Fri, 24 Feb 2017 08:41:49 -0600
-Subject: [PATCH] lockdep: Fix compilation error for !CONFIG_MODULES and
- !CONFIG_SMP
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 003/332] lockdep: Fix compilation error for !CONFIG_MODULES
+ and !CONFIG_SMP
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=baf6fb0254c9e1e18ce06cabcfee1fdb54cda5b0
 
 When CONFIG_MODULES is not set then it fails to compile in lockdep:
 
@@ -22,13 +22,15 @@ Signed-off-by: Dan Murphy <dmurphy at ti.com>
 [bigeasy: merge the two patches from Dan into one, adapt changelog]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/module.h |    5 +++++
- kernel/module.c        |    5 +++++
+ include/linux/module.h | 5 +++++
+ kernel/module.c        | 5 +++++
  2 files changed, 10 insertions(+)
 
+diff --git a/include/linux/module.h b/include/linux/module.h
+index 3d3d2188c7d9..5944baaa3f28 100644
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
-@@ -664,6 +664,11 @@ static inline bool is_module_percpu_addr
+@@ -664,6 +664,11 @@ static inline bool is_module_percpu_address(unsigned long addr)
  	return false;
  }
  
@@ -40,9 +42,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static inline bool is_module_text_address(unsigned long addr)
  {
  	return false;
+diff --git a/kernel/module.c b/kernel/module.c
+index 289616d8ccfd..3483a3743b44 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -734,6 +734,11 @@ bool is_module_percpu_address(unsigned l
+@@ -734,6 +734,11 @@ bool is_module_percpu_address(unsigned long addr)
  	return false;
  }
  
diff --git a/debian/patches/features/all/rt/lockdep-Fix-per-cpu-static-objects.patch b/debian/patches/features/all/rt/0004-lockdep-Fix-per-cpu-static-objects.patch
similarity index 73%
rename from debian/patches/features/all/rt/lockdep-Fix-per-cpu-static-objects.patch
rename to debian/patches/features/all/rt/0004-lockdep-Fix-per-cpu-static-objects.patch
index 369f8d9..8d386c3 100644
--- a/debian/patches/features/all/rt/lockdep-Fix-per-cpu-static-objects.patch
+++ b/debian/patches/features/all/rt/0004-lockdep-Fix-per-cpu-static-objects.patch
@@ -1,8 +1,7 @@
-From 8ce371f9846ef1e8b3cc8f6865766cb5c1f17e40 Mon Sep 17 00:00:00 2001
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Mon, 20 Mar 2017 12:26:55 +0100
-Subject: [PATCH] lockdep: Fix per-cpu static objects
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 004/332] lockdep: Fix per-cpu static objects
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1d86c4f5f195bdfc39dab9d18d5edc58c399ddd7
 
 Since commit 383776fa7527 ("locking/lockdep: Handle statically initialized
 PER_CPU locks properly") we try to collapse per-cpu locks into a single
@@ -36,12 +35,14 @@ Link: http://lkml.kernel.org/r/20170320114108.kbvcsuepem45j5cr@hirez.programming
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/smp.h |   12 ++++++++++++
- kernel/cpu.c        |    6 ++++++
- kernel/module.c     |    6 +++++-
- mm/percpu.c         |    5 ++++-
+ include/linux/smp.h | 12 ++++++++++++
+ kernel/cpu.c        |  6 ++++++
+ kernel/module.c     |  6 +++++-
+ mm/percpu.c         |  5 ++++-
  4 files changed, 27 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/smp.h b/include/linux/smp.h
+index 8e0cb7a0f836..68123c1fe549 100644
 --- a/include/linux/smp.h
 +++ b/include/linux/smp.h
 @@ -120,6 +120,13 @@ extern unsigned int setup_max_cpus;
@@ -58,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #else /* !SMP */
  
  static inline void smp_send_stop(void) { }
-@@ -158,6 +165,11 @@ static inline void smp_init(void) { up_l
+@@ -158,6 +165,11 @@ static inline void smp_init(void) { up_late_init(); }
  static inline void smp_init(void) { }
  #endif
  
@@ -70,9 +71,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #endif /* !SMP */
  
  /*
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 26a4f74bff83..164b86a8b4e2 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -1240,6 +1240,8 @@ core_initcall(cpu_hotplug_pm_sync_init);
+@@ -1242,6 +1242,8 @@ core_initcall(cpu_hotplug_pm_sync_init);
  
  #endif /* CONFIG_PM_SLEEP_SMP */
  
@@ -81,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #endif /* CONFIG_SMP */
  
  /* Boot processor state steps */
-@@ -1924,6 +1926,10 @@ void __init boot_cpu_init(void)
+@@ -1926,6 +1928,10 @@ void __init boot_cpu_init(void)
  	set_cpu_active(cpu, true);
  	set_cpu_present(cpu, true);
  	set_cpu_possible(cpu, true);
@@ -92,9 +95,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
+diff --git a/kernel/module.c b/kernel/module.c
+index 3483a3743b44..f27764fbfa24 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -677,8 +677,12 @@ bool __is_module_percpu_address(unsigned
+@@ -677,8 +677,12 @@ bool __is_module_percpu_address(unsigned long addr, unsigned long *can_addr)
  			void *va = (void *)addr;
  
  			if (va >= start && va < start + mod->percpu_size) {
@@ -108,9 +113,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				preempt_enable();
  				return true;
  			}
+diff --git a/mm/percpu.c b/mm/percpu.c
+index 90349153b49d..4e739fcf91bf 100644
 --- a/mm/percpu.c
 +++ b/mm/percpu.c
-@@ -1295,8 +1295,11 @@ bool __is_kernel_percpu_address(unsigned
+@@ -1295,8 +1295,11 @@ bool __is_kernel_percpu_address(unsigned long addr, unsigned long *can_addr)
  		void *va = (void *)addr;
  
  		if (va >= start && va < start + static_size) {
diff --git a/debian/patches/features/all/rt/0001-futex-Cleanup-variable-names-for-futex_top_waiter.patch b/debian/patches/features/all/rt/0005-futex-Cleanup-variable-names-for-futex_top_waiter.patch
similarity index 77%
rename from debian/patches/features/all/rt/0001-futex-Cleanup-variable-names-for-futex_top_waiter.patch
rename to debian/patches/features/all/rt/0005-futex-Cleanup-variable-names-for-futex_top_waiter.patch
index 487de6e..1fc7a31 100644
--- a/debian/patches/features/all/rt/0001-futex-Cleanup-variable-names-for-futex_top_waiter.patch
+++ b/debian/patches/features/all/rt/0005-futex-Cleanup-variable-names-for-futex_top_waiter.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:48 +0100
-Subject: [PATCH] futex: Cleanup variable names for futex_top_waiter()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 005/332] futex: Cleanup variable names for futex_top_waiter()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b56396d64780b170272107e8310cc8b6b061bcab
 
 Upstream commit 499f5aca2cdd5e958b27e2655e7e7f82524f46b1
 
@@ -21,12 +21,14 @@ Link: http://lkml.kernel.org/r/20170322104151.554710645@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |   30 +++++++++++++++---------------
+ kernel/futex.c | 30 +++++++++++++++---------------
  1 file changed, 15 insertions(+), 15 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 88bad86180ac..bc48b369f3fe 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1120,14 +1120,14 @@ static int attach_to_pi_owner(u32 uval,
+@@ -1121,14 +1121,14 @@ static int attach_to_pi_owner(u32 uval, union futex_key *key,
  static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb,
  			   union futex_key *key, struct futex_pi_state **ps)
  {
@@ -44,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * We are the first waiter - try to look up the owner based on
-@@ -1174,7 +1174,7 @@ static int futex_lock_pi_atomic(u32 __us
+@@ -1175,7 +1175,7 @@ static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb,
  				struct task_struct *task, int set_waiters)
  {
  	u32 uval, newval, vpid = task_pid_vnr(task);
@@ -53,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int ret;
  
  	/*
-@@ -1200,9 +1200,9 @@ static int futex_lock_pi_atomic(u32 __us
+@@ -1201,9 +1201,9 @@ static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb,
  	 * Lookup existing state first. If it exists, try to attach to
  	 * its pi_state.
  	 */
@@ -66,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * No waiter and user TID is 0. We are here because the
-@@ -1292,11 +1292,11 @@ static void mark_wake_futex(struct wake_
+@@ -1293,11 +1293,11 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
  	q->lock_ptr = NULL;
  }
  
@@ -80,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	u32 uninitialized_var(curval), newval;
  	WAKE_Q(wake_q);
  	bool deboost;
-@@ -1317,11 +1317,11 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1318,11 +1318,11 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this,
  
  	/*
  	 * It is possible that the next waiter (the one that brought
@@ -94,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * We pass it to the next owner. The WAITERS bit is always
-@@ -2631,7 +2631,7 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2632,7 +2632,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  	u32 uninitialized_var(curval), uval, vpid = task_pid_vnr(current);
  	union futex_key key = FUTEX_KEY_INIT;
  	struct futex_hash_bucket *hb;
@@ -103,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int ret;
  
  retry:
-@@ -2655,9 +2655,9 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2656,9 +2656,9 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  	 * all and we at least want to know if user space fiddled
  	 * with the futex value instead of blindly unlocking.
  	 */
diff --git a/debian/patches/features/all/rt/0002-futex-Use-smp_store_release-in-mark_wake_futex.patch b/debian/patches/features/all/rt/0006-futex-Use-smp_store_release-in-mark_wake_futex.patch
similarity index 73%
rename from debian/patches/features/all/rt/0002-futex-Use-smp_store_release-in-mark_wake_futex.patch
rename to debian/patches/features/all/rt/0006-futex-Use-smp_store_release-in-mark_wake_futex.patch
index b11b94c..78e3cd7 100644
--- a/debian/patches/features/all/rt/0002-futex-Use-smp_store_release-in-mark_wake_futex.patch
+++ b/debian/patches/features/all/rt/0006-futex-Use-smp_store_release-in-mark_wake_futex.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:49 +0100
-Subject: [PATCH] futex: Use smp_store_release() in mark_wake_futex()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 006/332] futex: Use smp_store_release() in mark_wake_futex()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=790ca46d2e3b54450f824dc2ef8b74084d5e8fad
 
 Upstream commit  1b367ece0d7e696cab1c8501bab282cc6a538b3f
 
@@ -22,12 +22,14 @@ Link: http://lkml.kernel.org/r/20170322104151.604296452@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |    3 +--
+ kernel/futex.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index bc48b369f3fe..5729150be0bd 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1288,8 +1288,7 @@ static void mark_wake_futex(struct wake_
+@@ -1289,8 +1289,7 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
  	 * memory barrier is required here to prevent the following
  	 * store to lock_ptr from getting ahead of the plist_del.
  	 */
diff --git a/debian/patches/features/all/rt/0003-futex-Remove-rt_mutex_deadlock_account_.patch b/debian/patches/features/all/rt/0007-futex-Remove-rt_mutex_deadlock_account_.patch
similarity index 78%
rename from debian/patches/features/all/rt/0003-futex-Remove-rt_mutex_deadlock_account_.patch
rename to debian/patches/features/all/rt/0007-futex-Remove-rt_mutex_deadlock_account_.patch
index b957a33..1cb7992 100644
--- a/debian/patches/features/all/rt/0003-futex-Remove-rt_mutex_deadlock_account_.patch
+++ b/debian/patches/features/all/rt/0007-futex-Remove-rt_mutex_deadlock_account_.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:50 +0100
-Subject: [PATCH] futex: Remove rt_mutex_deadlock_account_*()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 007/332] futex: Remove rt_mutex_deadlock_account_*()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5157a9c0db39bd6c7101cbd9e99b91b63d1c197a
 
 Upstream commit fffa954fb528963c2fb7b0c0084eb77e2be7ab52
 
@@ -20,15 +20,17 @@ Link: http://lkml.kernel.org/r/20170322104151.652692478@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex-debug.c |    9 -------
- kernel/locking/rtmutex-debug.h |    3 --
- kernel/locking/rtmutex.c       |   47 +++++++++++++++--------------------------
- kernel/locking/rtmutex.h       |    2 -
+ kernel/locking/rtmutex-debug.c |  9 --------
+ kernel/locking/rtmutex-debug.h |  3 ---
+ kernel/locking/rtmutex.c       | 47 ++++++++++++++++--------------------------
+ kernel/locking/rtmutex.h       |  2 --
  4 files changed, 18 insertions(+), 43 deletions(-)
 
+diff --git a/kernel/locking/rtmutex-debug.c b/kernel/locking/rtmutex-debug.c
+index 62b6cee8ea7f..0613c4b1d059 100644
 --- a/kernel/locking/rtmutex-debug.c
 +++ b/kernel/locking/rtmutex-debug.c
-@@ -173,12 +173,3 @@ void debug_rt_mutex_init(struct rt_mutex
+@@ -173,12 +173,3 @@ void debug_rt_mutex_init(struct rt_mutex *lock, const char *name)
  	lock->name = name;
  }
  
@@ -41,6 +43,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -{
 -}
 -
+diff --git a/kernel/locking/rtmutex-debug.h b/kernel/locking/rtmutex-debug.h
+index d0519c3432b6..b585af9a1b50 100644
 --- a/kernel/locking/rtmutex-debug.h
 +++ b/kernel/locking/rtmutex-debug.h
 @@ -9,9 +9,6 @@
@@ -53,9 +57,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  extern void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter);
  extern void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter);
  extern void debug_rt_mutex_init(struct rt_mutex *lock, const char *name);
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 2c49d76f96c3..1c57ff103a5b 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -936,8 +936,6 @@ static int try_to_take_rt_mutex(struct r
+@@ -936,8 +936,6 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  	 */
  	rt_mutex_set_owner(lock, task);
  
@@ -64,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 1;
  }
  
-@@ -1340,8 +1338,6 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1340,8 +1338,6 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  
  	debug_rt_mutex_unlock(lock);
  
@@ -73,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/*
  	 * We must be careful here if the fast path is enabled. If we
  	 * have no waiters queued we cannot set owner to NULL here
-@@ -1407,11 +1403,10 @@ rt_mutex_fastlock(struct rt_mutex *lock,
+@@ -1407,11 +1403,10 @@ rt_mutex_fastlock(struct rt_mutex *lock, int state,
  				struct hrtimer_sleeper *timeout,
  				enum rtmutex_chainwalk chwalk))
  {
@@ -88,7 +94,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static inline int
-@@ -1423,21 +1418,19 @@ rt_mutex_timed_fastlock(struct rt_mutex
+@@ -1423,21 +1418,19 @@ rt_mutex_timed_fastlock(struct rt_mutex *lock, int state,
  				      enum rtmutex_chainwalk chwalk))
  {
  	if (chwalk == RT_MUTEX_MIN_CHAINWALK &&
@@ -115,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return slowfn(lock);
  }
  
-@@ -1447,19 +1440,18 @@ rt_mutex_fastunlock(struct rt_mutex *loc
+@@ -1447,19 +1440,18 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
  				   struct wake_q_head *wqh))
  {
  	WAKE_Q(wake_q);
@@ -156,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return rt_mutex_slowunlock(lock, wqh);
  }
  
-@@ -1631,7 +1622,6 @@ void rt_mutex_init_proxy_locked(struct r
+@@ -1631,7 +1622,6 @@ void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
  	__rt_mutex_init(lock, NULL);
  	debug_rt_mutex_proxy_lock(lock, proxy_owner);
  	rt_mutex_set_owner(lock, proxy_owner);
@@ -164,7 +170,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /**
-@@ -1647,7 +1637,6 @@ void rt_mutex_proxy_unlock(struct rt_mut
+@@ -1647,7 +1637,6 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock,
  {
  	debug_rt_mutex_proxy_unlock(lock);
  	rt_mutex_set_owner(lock, NULL);
@@ -172,6 +178,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /**
+diff --git a/kernel/locking/rtmutex.h b/kernel/locking/rtmutex.h
+index c4060584c407..6607802efa8b 100644
 --- a/kernel/locking/rtmutex.h
 +++ b/kernel/locking/rtmutex.h
 @@ -11,8 +11,6 @@
diff --git a/debian/patches/features/all/rt/0004-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch b/debian/patches/features/all/rt/0008-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
similarity index 81%
rename from debian/patches/features/all/rt/0004-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
rename to debian/patches/features/all/rt/0008-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
index d827d78..5249acb 100644
--- a/debian/patches/features/all/rt/0004-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
+++ b/debian/patches/features/all/rt/0008-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:51 +0100
-Subject: [PATCH] futex,rt_mutex: Provide futex specific rt_mutex API
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 008/332] futex,rt_mutex: Provide futex specific rt_mutex API
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d59a4a4090a07ef55cd0c90e3b342dec7a50f55d
 
 Upstream commit 5293c2efda37775346885c7e924d4ef7018ea60b
 
@@ -31,14 +31,16 @@ Link: http://lkml.kernel.org/r/20170322104151.702962446@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c                  |   30 ++++++++++-----------
- kernel/locking/rtmutex.c        |   55 +++++++++++++++++++++++++++++-----------
- kernel/locking/rtmutex_common.h |    9 +++++-
+ kernel/futex.c                  | 30 +++++++++++-----------
+ kernel/locking/rtmutex.c        | 55 ++++++++++++++++++++++++++++++-----------
+ kernel/locking/rtmutex_common.h |  9 +++++--
  3 files changed, 62 insertions(+), 32 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 5729150be0bd..cf07ae476b76 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -914,7 +914,7 @@ void exit_pi_state_list(struct task_stru
+@@ -915,7 +915,7 @@ void exit_pi_state_list(struct task_struct *curr)
  		pi_state->owner = NULL;
  		raw_spin_unlock_irq(&curr->pi_lock);
  
@@ -47,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		spin_unlock(&hb->lock);
  
-@@ -1362,20 +1362,18 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1363,20 +1363,18 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  	pi_state->owner = new_owner;
  	raw_spin_unlock(&new_owner->pi_lock);
  
@@ -76,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -2251,7 +2249,7 @@ static int fixup_owner(u32 __user *uaddr
+@@ -2252,7 +2250,7 @@ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
  		 * task acquired the rt_mutex after we removed ourself from the
  		 * rt_mutex waiters list.
  		 */
@@ -85,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			locked = 1;
  			goto out;
  		}
-@@ -2566,7 +2564,7 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2567,7 +2565,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  	if (!trylock) {
  		ret = rt_mutex_timed_futex_lock(&q.pi_state->pi_mutex, to);
  	} else {
@@ -94,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/* Fixup the trylock return value: */
  		ret = ret ? 0 : -EWOULDBLOCK;
  	}
-@@ -2589,7 +2587,7 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2590,7 +2588,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  	 * it and return the fault to userspace.
  	 */
  	if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current))
@@ -103,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* Unqueue and drop the lock */
  	unqueue_me_pi(&q);
-@@ -2896,7 +2894,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2897,7 +2895,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  			spin_lock(q.lock_ptr);
  			ret = fixup_pi_state_owner(uaddr2, &q, current);
  			if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current)
@@ -112,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			/*
  			 * Drop the reference to the pi state which
  			 * the requeue_pi() code acquired for us.
-@@ -2936,7 +2934,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2937,7 +2935,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		 * userspace.
  		 */
  		if (ret && rt_mutex_owner(pi_mutex) == current)
@@ -121,9 +123,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		/* Unqueue and drop the lock. */
  		unqueue_me_pi(&q);
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 1c57ff103a5b..8412d872455b 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1486,15 +1486,23 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock_interrup
+@@ -1486,15 +1486,23 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible);
  
  /*
   * Futex variant with full deadlock detection.
@@ -151,7 +155,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /**
-@@ -1553,19 +1561,38 @@ void __sched rt_mutex_unlock(struct rt_m
+@@ -1553,19 +1561,38 @@ void __sched rt_mutex_unlock(struct rt_mutex *lock)
  EXPORT_SYMBOL_GPL(rt_mutex_unlock);
  
  /**
@@ -167,7 +171,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -				   struct wake_q_head *wqh)
 +bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
 +				    struct wake_q_head *wake_q)
-+{
+ {
+-	if (likely(rt_mutex_cmpxchg_release(lock, current, NULL)))
+-		return false;
 +	lockdep_assert_held(&lock->wait_lock);
 +
 +	debug_rt_mutex_unlock(lock);
@@ -180,15 +186,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	mark_wakeup_next_waiter(wake_q, lock);
 +	return true; /* deboost and wakeups */
 +}
-+
+ 
+-	return rt_mutex_slowunlock(lock, wqh);
 +void __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
- {
--	if (likely(rt_mutex_cmpxchg_release(lock, current, NULL)))
--		return false;
++{
 +	WAKE_Q(wake_q);
 +	bool deboost;
- 
--	return rt_mutex_slowunlock(lock, wqh);
++
 +	raw_spin_lock_irq(&lock->wait_lock);
 +	deboost = __rt_mutex_futex_unlock(lock, &wake_q);
 +	raw_spin_unlock_irq(&lock->wait_lock);
@@ -200,9 +204,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /**
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index e317e1cbb3eb..2441c2d2e6f3 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -109,9 +109,14 @@ extern int rt_mutex_start_proxy_lock(str
+@@ -109,9 +109,14 @@ extern int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  extern int rt_mutex_finish_proxy_lock(struct rt_mutex *lock,
  				      struct hrtimer_sleeper *to,
  				      struct rt_mutex_waiter *waiter);
diff --git a/debian/patches/features/all/rt/0005-futex-Change-locking-rules.patch b/debian/patches/features/all/rt/0009-futex-Change-locking-rules.patch
similarity index 83%
rename from debian/patches/features/all/rt/0005-futex-Change-locking-rules.patch
rename to debian/patches/features/all/rt/0009-futex-Change-locking-rules.patch
index c750000..49aa489 100644
--- a/debian/patches/features/all/rt/0005-futex-Change-locking-rules.patch
+++ b/debian/patches/features/all/rt/0009-futex-Change-locking-rules.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:52 +0100
-Subject: [PATCH] futex: Change locking rules
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 009/332] futex: Change locking rules
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5ec34a39d28dd16e1ef6d096a4f9ae8bd0f32cb8
 
 Upstream commit 734009e96d1983ad739e5b656e03430b3660c913
 
@@ -33,12 +33,14 @@ Link: http://lkml.kernel.org/r/20170322104151.751993333@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |  165 +++++++++++++++++++++++++++++++++++++++++++++------------
+ kernel/futex.c | 165 +++++++++++++++++++++++++++++++++++++++++++++------------
  1 file changed, 132 insertions(+), 33 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index cf07ae476b76..2d2267efc3cc 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -971,6 +971,39 @@ void exit_pi_state_list(struct task_stru
+@@ -972,6 +972,39 @@ void exit_pi_state_list(struct task_struct *curr)
   *
   * [10] There is no transient state which leaves owner and user space
   *	TID out of sync.
@@ -78,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
   */
  
  /*
-@@ -978,10 +1011,12 @@ void exit_pi_state_list(struct task_stru
+@@ -979,10 +1012,12 @@ void exit_pi_state_list(struct task_struct *curr)
   * the pi_state against the user space value. If correct, attach to
   * it.
   */
@@ -92,7 +94,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * Userspace might have messed up non-PI and PI futexes [3]
-@@ -989,9 +1024,34 @@ static int attach_to_pi_state(u32 uval,
+@@ -990,8 +1025,33 @@ static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state,
  	if (unlikely(!pi_state))
  		return -EINVAL;
  
@@ -105,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	 */
  	WARN_ON(!atomic_read(&pi_state->refcount));
  
- 	/*
++	/*
 +	 * Now that we have a pi_state, we can acquire wait_lock
 +	 * and do the state validation.
 +	 */
@@ -123,11 +125,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	if (uval != uval2)
 +		goto out_eagain;
 +
-+	/*
+ 	/*
  	 * Handle the owner died case:
  	 */
- 	if (uval & FUTEX_OWNER_DIED) {
-@@ -1006,11 +1066,11 @@ static int attach_to_pi_state(u32 uval,
+@@ -1007,11 +1067,11 @@ static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state,
  			 * is not 0. Inconsistent state. [5]
  			 */
  			if (pid)
@@ -141,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  
  		/*
-@@ -1022,14 +1082,14 @@ static int attach_to_pi_state(u32 uval,
+@@ -1023,14 +1083,14 @@ static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state,
  		 * Take a ref on the state and return success. [6]
  		 */
  		if (!pid)
@@ -158,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	/*
-@@ -1038,11 +1098,29 @@ static int attach_to_pi_state(u32 uval,
+@@ -1039,11 +1099,29 @@ static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state,
  	 * user space TID. [9/10]
  	 */
  	if (pid != task_pid_vnr(pi_state->owner))
@@ -190,7 +191,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -1093,6 +1171,9 @@ static int attach_to_pi_owner(u32 uval,
+@@ -1094,6 +1172,9 @@ static int attach_to_pi_owner(u32 uval, union futex_key *key,
  
  	/*
  	 * No existing pi state. First waiter. [2]
@@ -200,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 */
  	pi_state = alloc_pi_state();
  
-@@ -1117,7 +1198,8 @@ static int attach_to_pi_owner(u32 uval,
+@@ -1118,7 +1199,8 @@ static int attach_to_pi_owner(u32 uval, union futex_key *key,
  	return 0;
  }
  
@@ -210,7 +211,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			   union futex_key *key, struct futex_pi_state **ps)
  {
  	struct futex_q *top_waiter = futex_top_waiter(hb, key);
-@@ -1127,7 +1209,7 @@ static int lookup_pi_state(u32 uval, str
+@@ -1128,7 +1210,7 @@ static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb,
  	 * attach to the pi_state when the validation succeeds.
  	 */
  	if (top_waiter)
@@ -219,7 +220,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * We are the first waiter - try to look up the owner based on
-@@ -1146,7 +1228,7 @@ static int lock_pi_update_atomic(u32 __u
+@@ -1147,7 +1229,7 @@ static int lock_pi_update_atomic(u32 __user *uaddr, u32 uval, u32 newval)
  	if (unlikely(cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)))
  		return -EFAULT;
  
@@ -228,7 +229,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return curval != uval ? -EAGAIN : 0;
  }
  
-@@ -1202,7 +1284,7 @@ static int futex_lock_pi_atomic(u32 __us
+@@ -1203,7 +1285,7 @@ static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb,
  	 */
  	top_waiter = futex_top_waiter(hb, key);
  	if (top_waiter)
@@ -237,7 +238,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * No waiter and user TID is 0. We are here because the
-@@ -1334,6 +1416,7 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1335,6 +1417,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  
  	if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)) {
  		ret = -EFAULT;
@@ -245,7 +246,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	} else if (curval != uval) {
  		/*
  		 * If a unconditional UNLOCK_PI operation (user space did not
-@@ -1346,6 +1429,7 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1347,6 +1430,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  		else
  			ret = -EINVAL;
  	}
@@ -253,7 +254,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (ret) {
  		raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
  		return ret;
-@@ -1821,7 +1905,7 @@ static int futex_requeue(u32 __user *uad
+@@ -1822,7 +1906,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
  			 * If that call succeeds then we have pi_state and an
  			 * initial refcount on it.
  			 */
@@ -262,7 +263,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  
  		switch (ret) {
-@@ -2120,10 +2204,13 @@ static int fixup_pi_state_owner(u32 __us
+@@ -2121,10 +2205,13 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
  {
  	u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS;
  	struct futex_pi_state *pi_state = q->pi_state;
@@ -277,7 +278,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* Owner died? */
  	if (!pi_state->owner)
  		newtid |= FUTEX_OWNER_DIED;
-@@ -2139,11 +2226,10 @@ static int fixup_pi_state_owner(u32 __us
+@@ -2140,11 +2227,10 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
  	 * because we can fault here. Imagine swapped out pages or a fork
  	 * that marked all the anonymous memory readonly for cow.
  	 *
@@ -293,7 +294,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 */
  retry:
  	if (get_futex_value_locked(&uval, uaddr))
-@@ -2164,47 +2250,60 @@ static int fixup_pi_state_owner(u32 __us
+@@ -2165,47 +2251,60 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
  	 * itself.
  	 */
  	if (pi_state->owner != NULL) {
diff --git a/debian/patches/features/all/rt/0006-futex-Cleanup-refcounting.patch b/debian/patches/features/all/rt/0010-futex-Cleanup-refcounting.patch
similarity index 74%
rename from debian/patches/features/all/rt/0006-futex-Cleanup-refcounting.patch
rename to debian/patches/features/all/rt/0010-futex-Cleanup-refcounting.patch
index ddd37fa..1acb570 100644
--- a/debian/patches/features/all/rt/0006-futex-Cleanup-refcounting.patch
+++ b/debian/patches/features/all/rt/0010-futex-Cleanup-refcounting.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:53 +0100
-Subject: [PATCH] futex: Cleanup refcounting
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 010/332] futex: Cleanup refcounting
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2d851e381e11296257abd07c56713834dc080c78
 
 Upstream commit bf92cf3a5100f5a0d5f9834787b130159397cb22
 
@@ -21,12 +21,14 @@ Link: http://lkml.kernel.org/r/20170322104151.801778516@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |   13 +++++++++----
+ kernel/futex.c | 13 +++++++++----
  1 file changed, 9 insertions(+), 4 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 2d2267efc3cc..b970b95f0508 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -800,7 +800,7 @@ static int refill_pi_state_cache(void)
+@@ -801,7 +801,7 @@ static int refill_pi_state_cache(void)
  	return 0;
  }
  
@@ -35,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct futex_pi_state *pi_state = current->pi_state_cache;
  
-@@ -810,6 +810,11 @@ static struct futex_pi_state * alloc_pi_
+@@ -811,6 +811,11 @@ static struct futex_pi_state * alloc_pi_state(void)
  	return pi_state;
  }
  
@@ -47,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Drops a reference to the pi_state object and frees or caches it
   * when the last reference is gone.
-@@ -854,7 +859,7 @@ static void put_pi_state(struct futex_pi
+@@ -855,7 +860,7 @@ static void put_pi_state(struct futex_pi_state *pi_state)
   * Look up the task based on what TID userspace gave us.
   * We dont trust it.
   */
@@ -56,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct task_struct *p;
  
-@@ -1101,7 +1106,7 @@ static int attach_to_pi_state(u32 __user
+@@ -1102,7 +1107,7 @@ static int attach_to_pi_state(u32 __user *uaddr, u32 uval,
  		goto out_einval;
  
  out_attach:
@@ -65,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
  	*ps = pi_state;
  	return 0;
-@@ -1988,7 +1993,7 @@ static int futex_requeue(u32 __user *uad
+@@ -1989,7 +1994,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
  			 * refcount on the pi_state and store the pointer in
  			 * the futex_q object of the waiter.
  			 */
diff --git a/debian/patches/features/all/rt/0007-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch b/debian/patches/features/all/rt/0011-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
similarity index 86%
rename from debian/patches/features/all/rt/0007-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
rename to debian/patches/features/all/rt/0011-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
index a305e4c..28e6718 100644
--- a/debian/patches/features/all/rt/0007-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
+++ b/debian/patches/features/all/rt/0011-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:54 +0100
-Subject: [PATCH] futex: Rework inconsistent rt_mutex/futex_q state
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 011/332] futex: Rework inconsistent rt_mutex/futex_q state
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c4ff1b93deb2fb468dd1f747b48999328b79ca2b
 
 Upstream commit 73d786bd043ebc855f349c81ea805f6b11cbf2aa
 
@@ -54,12 +54,14 @@ Link: http://lkml.kernel.org/r/20170322104151.850383690@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |   50 ++++++++++++++------------------------------------
+ kernel/futex.c | 50 ++++++++++++++------------------------------------
  1 file changed, 14 insertions(+), 36 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index b970b95f0508..81439b91133b 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1402,12 +1402,19 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1403,12 +1403,19 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  	new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
  
  	/*
@@ -84,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * We pass it to the next owner. The WAITERS bit is always
-@@ -2330,7 +2337,6 @@ static long futex_wait_restart(struct re
+@@ -2331,7 +2338,6 @@ static long futex_wait_restart(struct restart_block *restart);
   */
  static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
  {
@@ -92,10 +94,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int ret = 0;
  
  	if (locked) {
-@@ -2344,43 +2350,15 @@ static int fixup_owner(u32 __user *uaddr
+@@ -2344,44 +2350,16 @@ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
+ 		goto out;
  	}
  
- 	/*
+-	/*
 -	 * Catch the rare case, where the lock was released when we were on the
 -	 * way back before we locked the hash bucket.
 -	 */
@@ -124,7 +127,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -		goto out;
 -	}
 -
--	/*
+ 	/*
  	 * Paranoia check. If we did not take the lock, then we should not be
  	 * the owner of the rt_mutex.
  	 */
diff --git a/debian/patches/features/all/rt/0008-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch b/debian/patches/features/all/rt/0012-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
similarity index 83%
rename from debian/patches/features/all/rt/0008-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
rename to debian/patches/features/all/rt/0012-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
index 8eab01d..4a9882d 100644
--- a/debian/patches/features/all/rt/0008-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
+++ b/debian/patches/features/all/rt/0012-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
@@ -1,7 +1,8 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:55 +0100
-Subject: [PATCH] futex: Pull rt_mutex_futex_unlock() out from under hb->lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 012/332] futex: Pull rt_mutex_futex_unlock() out from under
+ hb->lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=303e2cdeecef593b767c999dc9657ccba64427c9
 
 Upstream commit 16ffa12d742534d4ff73e8b3a4e81c1de39196f0
 
@@ -40,12 +41,14 @@ Link: http://lkml.kernel.org/r/20170322104151.900002056@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |  154 +++++++++++++++++++++++++++++++++++++--------------------
+ kernel/futex.c | 154 +++++++++++++++++++++++++++++++++++++--------------------
  1 file changed, 100 insertions(+), 54 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 81439b91133b..f23864847549 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -919,10 +919,12 @@ void exit_pi_state_list(struct task_stru
+@@ -920,10 +920,12 @@ void exit_pi_state_list(struct task_struct *curr)
  		pi_state->owner = NULL;
  		raw_spin_unlock_irq(&curr->pi_lock);
  
@@ -60,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		raw_spin_lock_irq(&curr->pi_lock);
  	}
  	raw_spin_unlock_irq(&curr->pi_lock);
-@@ -1035,6 +1037,11 @@ static int attach_to_pi_state(u32 __user
+@@ -1036,6 +1038,11 @@ static int attach_to_pi_state(u32 __user *uaddr, u32 uval,
  	 * has dropped the hb->lock in between queue_me() and unqueue_me_pi(),
  	 * which in turn means that futex_lock_pi() still has a reference on
  	 * our pi_state.
@@ -72,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 */
  	WARN_ON(!atomic_read(&pi_state->refcount));
  
-@@ -1378,48 +1385,40 @@ static void mark_wake_futex(struct wake_
+@@ -1379,48 +1386,40 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
  	smp_store_release(&q->lock_ptr, NULL);
  }
  
@@ -144,7 +147,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 */
  	newval = FUTEX_WAITERS | task_pid_vnr(new_owner);
  
-@@ -1442,10 +1441,8 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1443,10 +1442,8 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  			ret = -EINVAL;
  	}
  
@@ -157,7 +160,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	raw_spin_lock(&pi_state->owner->pi_lock);
  	WARN_ON(list_empty(&pi_state->list));
-@@ -1463,15 +1460,15 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1464,15 +1461,15 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *top_waiter
  	 */
  	deboost = __rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q);
  
@@ -175,7 +178,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -2230,7 +2227,8 @@ static int fixup_pi_state_owner(u32 __us
+@@ -2231,7 +2228,8 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
  	/*
  	 * We are here either because we stole the rtmutex from the
  	 * previous highest priority waiter or we are the highest priority
@@ -185,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 * We have to replace the newowner TID in the user space variable.
  	 * This must be atomic as we have to preserve the owner died bit here.
  	 *
-@@ -2247,7 +2245,7 @@ static int fixup_pi_state_owner(u32 __us
+@@ -2248,7 +2246,7 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
  	if (get_futex_value_locked(&uval, uaddr))
  		goto handle_fault;
  
@@ -194,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		newval = (uval & FUTEX_OWNER_DIED) | newtid;
  
  		if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval))
-@@ -2343,6 +2341,10 @@ static int fixup_owner(u32 __user *uaddr
+@@ -2344,6 +2342,10 @@ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
  		/*
  		 * Got the lock. We might not be the anticipated owner if we
  		 * did a lock-steal - fix up the PI-state in that case:
@@ -205,7 +208,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		 */
  		if (q->pi_state->owner != current)
  			ret = fixup_pi_state_owner(uaddr, q, current);
-@@ -2582,6 +2584,7 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2583,6 +2585,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  			 ktime_t *time, int trylock)
  {
  	struct hrtimer_sleeper timeout, *to = NULL;
@@ -213,7 +216,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct futex_hash_bucket *hb;
  	struct futex_q q = futex_q_init;
  	int res, ret;
-@@ -2668,12 +2671,19 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2669,12 +2672,19 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  	 * If fixup_owner() faulted and was unable to handle the fault, unlock
  	 * it and return the fault to userspace.
  	 */
@@ -235,7 +238,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	goto out_put_key;
  
  out_unlock_put_key:
-@@ -2736,10 +2746,36 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2737,10 +2747,36 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  	 */
  	top_waiter = futex_top_waiter(hb, &key);
  	if (top_waiter) {
@@ -253,7 +256,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +		if (pi_state->owner != current)
 +			goto out_unlock;
 +
-+		/*
+ 		/*
+-		 * In case of success wake_futex_pi dropped the hash
+-		 * bucket lock.
 +		 * Grab a reference on the pi_state and drop hb->lock.
 +		 *
 +		 * The reference ensures pi_state lives, dropping the hb->lock
@@ -268,14 +273,12 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +
 +		put_pi_state(pi_state);
 +
- 		/*
--		 * In case of success wake_futex_pi dropped the hash
--		 * bucket lock.
++		/*
 +		 * Success, we're done! No tricky corner cases.
  		 */
  		if (!ret)
  			goto out_putkey;
-@@ -2754,7 +2790,6 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2755,7 +2791,6 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  		 * setting the FUTEX_WAITERS bit. Try again.
  		 */
  		if (ret == -EAGAIN) {
@@ -283,7 +286,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			put_futex_key(&key);
  			goto retry;
  		}
-@@ -2762,7 +2797,7 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2763,7 +2798,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  		 * wake_futex_pi has detected invalid state. Tell user
  		 * space.
  		 */
@@ -292,7 +295,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	/*
-@@ -2772,8 +2807,10 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2773,8 +2808,10 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  	 * preserve the WAITERS bit not the OWNER_DIED one. We are the
  	 * owner.
  	 */
@@ -304,7 +307,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * If uval has changed, let user space handle it.
-@@ -2787,7 +2824,6 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2788,7 +2825,6 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  	return ret;
  
  pi_faulted:
@@ -312,7 +315,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	put_futex_key(&key);
  
  	ret = fault_in_user_writeable(uaddr);
-@@ -2891,6 +2927,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2892,6 +2928,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  				 u32 __user *uaddr2)
  {
  	struct hrtimer_sleeper timeout, *to = NULL;
@@ -320,7 +323,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct rt_mutex_waiter rt_waiter;
  	struct futex_hash_bucket *hb;
  	union futex_key key2 = FUTEX_KEY_INIT;
-@@ -2975,8 +3012,10 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2976,8 +3013,10 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		if (q.pi_state && (q.pi_state->owner != current)) {
  			spin_lock(q.lock_ptr);
  			ret = fixup_pi_state_owner(uaddr2, &q, current);
@@ -333,7 +336,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			/*
  			 * Drop the reference to the pi state which
  			 * the requeue_pi() code acquired for us.
-@@ -3015,13 +3054,20 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3016,13 +3055,20 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		 * the fault, unlock the rt_mutex and return the fault to
  		 * userspace.
  		 */
diff --git a/debian/patches/features/all/rt/0009-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch b/debian/patches/features/all/rt/0013-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
similarity index 70%
rename from debian/patches/features/all/rt/0009-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
rename to debian/patches/features/all/rt/0013-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
index 0a12332..c9938a1 100644
--- a/debian/patches/features/all/rt/0009-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
+++ b/debian/patches/features/all/rt/0013-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:56 +0100
-Subject: [PATCH] futex,rt_mutex: Introduce rt_mutex_init_waiter()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 013/332] futex,rt_mutex: Introduce rt_mutex_init_waiter()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c24bf4ab150892784d6a779334824f9ac99dab00
 
 Upstream commit 50809358dd7199aa7ce232f6877dd09ec30ef374
 
@@ -21,14 +21,16 @@ Link: http://lkml.kernel.org/r/20170322104151.950039479@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c                  |    5 +----
- kernel/locking/rtmutex.c        |   12 +++++++++---
- kernel/locking/rtmutex_common.h |    1 +
+ kernel/futex.c                  |  5 +----
+ kernel/locking/rtmutex.c        | 12 +++++++++---
+ kernel/locking/rtmutex_common.h |  1 +
  3 files changed, 11 insertions(+), 7 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index f23864847549..5708b1840e0f 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2954,10 +2954,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2955,10 +2955,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  	 * The waiter is allocated on our stack, manipulated by the requeue
  	 * code while we sleep on uaddr.
  	 */
@@ -40,9 +42,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE);
  	if (unlikely(ret != 0))
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 8412d872455b..92499cbcb2f7 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1151,6 +1151,14 @@ void rt_mutex_adjust_pi(struct task_stru
+@@ -1151,6 +1151,14 @@ void rt_mutex_adjust_pi(struct task_struct *task)
  				   next_lock, NULL, task);
  }
  
@@ -57,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * __rt_mutex_slowlock() - Perform the wait-wake-try-to-take loop
   * @lock:		 the rt_mutex to take
-@@ -1233,9 +1241,7 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1233,9 +1241,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  	unsigned long flags;
  	int ret = 0;
  
@@ -68,9 +72,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * Technically we could use raw_spin_[un]lock_irq() here, but this can
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 2441c2d2e6f3..d16de23680a9 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -103,6 +103,7 @@ extern void rt_mutex_init_proxy_locked(s
+@@ -103,6 +103,7 @@ extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
  				       struct task_struct *proxy_owner);
  extern void rt_mutex_proxy_unlock(struct rt_mutex *lock,
  				  struct task_struct *proxy_owner);
diff --git a/debian/patches/features/all/rt/0010-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch b/debian/patches/features/all/rt/0014-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
similarity index 83%
rename from debian/patches/features/all/rt/0010-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
rename to debian/patches/features/all/rt/0014-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
index 8581b4a..5ef2ab6 100644
--- a/debian/patches/features/all/rt/0010-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
+++ b/debian/patches/features/all/rt/0014-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
@@ -1,7 +1,8 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:57 +0100
-Subject: [PATCH] futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 014/332] futex,rt_mutex: Restructure
+ rt_mutex_finish_proxy_lock()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=be6a81af2795201544de2249fe20963bad794201
 
 Upstream commit 38d589f2fd08f1296aea3ce62bebd185125c6d81
 
@@ -34,14 +35,16 @@ Link: http://lkml.kernel.org/r/20170322104152.001659630@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c                  |    7 +++--
- kernel/locking/rtmutex.c        |   52 ++++++++++++++++++++++++++++++++++------
- kernel/locking/rtmutex_common.h |    8 +++---
+ kernel/futex.c                  |  7 ++++--
+ kernel/locking/rtmutex.c        | 52 +++++++++++++++++++++++++++++++++++------
+ kernel/locking/rtmutex_common.h |  8 ++++---
  3 files changed, 55 insertions(+), 12 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 5708b1840e0f..b72be871ac27 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -3030,10 +3030,13 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3031,10 +3031,13 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		 */
  		WARN_ON(!q.pi_state);
  		pi_mutex = &q.pi_state->pi_mutex;
@@ -57,9 +60,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/*
  		 * Fixup the pi_state owner and possibly acquire the lock if we
  		 * haven't already.
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 92499cbcb2f7..fb86e5fd24e3 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1743,21 +1743,23 @@ struct task_struct *rt_mutex_next_owner(
+@@ -1743,21 +1743,23 @@ struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock)
  }
  
  /**
@@ -87,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			       struct hrtimer_sleeper *to,
  			       struct rt_mutex_waiter *waiter)
  {
-@@ -1770,9 +1772,6 @@ int rt_mutex_finish_proxy_lock(struct rt
+@@ -1770,9 +1772,6 @@ int rt_mutex_finish_proxy_lock(struct rt_mutex *lock,
  	/* sleep on the mutex */
  	ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter);
  
@@ -97,7 +102,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/*
  	 * try_to_take_rt_mutex() sets the waiter bit unconditionally. We might
  	 * have to fix that up.
-@@ -1783,3 +1782,42 @@ int rt_mutex_finish_proxy_lock(struct rt
+@@ -1783,3 +1782,42 @@ int rt_mutex_finish_proxy_lock(struct rt_mutex *lock,
  
  	return ret;
  }
@@ -140,9 +145,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +
 +	return cleanup;
 +}
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index d16de23680a9..fedd5abe0b52 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -107,9 +107,11 @@ extern void rt_mutex_init_waiter(struct
+@@ -107,9 +107,11 @@ extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter);
  extern int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  				     struct rt_mutex_waiter *waiter,
  				     struct task_struct *task);
diff --git a/debian/patches/features/all/rt/0011-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch b/debian/patches/features/all/rt/0015-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
similarity index 83%
rename from debian/patches/features/all/rt/0011-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
rename to debian/patches/features/all/rt/0015-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
index 4ba2d46..89ec21f 100644
--- a/debian/patches/features/all/rt/0011-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
+++ b/debian/patches/features/all/rt/0015-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
@@ -1,7 +1,8 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:58 +0100
-Subject: [PATCH] futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 015/332] futex: Rework futex_lock_pi() to use
+ rt_mutex_*_proxy_lock()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4419417f126ac4ca32ad403f0c0505fbf857f74f
 
 Upstream commit cfafcd117da0216520568c195cb2f6cd1980c4bb
 
@@ -83,14 +84,16 @@ Link: http://lkml.kernel.org/r/20170322104152.062785528@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c                  |   77 ++++++++++++++++++++++++++++------------
- kernel/locking/rtmutex.c        |   26 +++----------
- kernel/locking/rtmutex_common.h |    1 
+ kernel/futex.c                  | 77 +++++++++++++++++++++++++++++------------
+ kernel/locking/rtmutex.c        | 26 ++++----------
+ kernel/locking/rtmutex_common.h |  1 -
  3 files changed, 62 insertions(+), 42 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index b72be871ac27..bff0a7e0cec5 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2097,20 +2097,7 @@ queue_unlock(struct futex_hash_bucket *h
+@@ -2098,20 +2098,7 @@ queue_unlock(struct futex_hash_bucket *hb)
  	hb_waiters_dec(hb);
  }
  
@@ -112,7 +115,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	int prio;
  
-@@ -2127,6 +2114,24 @@ static inline void queue_me(struct futex
+@@ -2128,6 +2115,24 @@ static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb)
  	plist_node_init(&q->list, prio);
  	plist_add(&q->list, &hb->chain);
  	q->task = current;
@@ -137,7 +140,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_unlock(&hb->lock);
  }
  
-@@ -2585,6 +2590,7 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2586,6 +2591,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  {
  	struct hrtimer_sleeper timeout, *to = NULL;
  	struct futex_pi_state *pi_state = NULL;
@@ -145,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct futex_hash_bucket *hb;
  	struct futex_q q = futex_q_init;
  	int res, ret;
-@@ -2637,25 +2643,52 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2638,24 +2644,51 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  		}
  	}
  
@@ -169,8 +172,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/* Fixup the trylock return value: */
  		ret = ret ? 0 : -EWOULDBLOCK;
 +		goto no_block;
- 	}
- 
++	}
++
 +	/*
 +	 * We must add ourselves to the rt_mutex waitlist while holding hb->lock
 +	 * such that the hb and rt_mutex wait lists match.
@@ -182,8 +185,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +			ret = 0;
 +
 +		goto no_block;
-+	}
-+
+ 	}
+ 
 +	spin_unlock(q.lock_ptr);
 +
 +	if (unlikely(to))
@@ -192,7 +195,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter);
 +
  	spin_lock(q.lock_ptr);
- 	/*
++	/*
 +	 * If we failed to acquire the lock (signal/timeout), we must
 +	 * first acquire the hb->lock before removing the lock from the
 +	 * rt_mutex waitqueue, such that we can keep the hb and rt_mutex
@@ -202,16 +205,18 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +		ret = 0;
 +
 +no_block:
-+	/*
+ 	/*
  	 * Fixup the pi_state owner and possibly acquire the lock if we
  	 * haven't already.
- 	 */
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index fb86e5fd24e3..de0d97838ed9 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1491,19 +1491,6 @@ int __sched rt_mutex_lock_interruptible(
+@@ -1490,19 +1490,6 @@ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock)
+ }
  EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible);
  
- /*
+-/*
 - * Futex variant with full deadlock detection.
 - * Futex variants must not use the fast-path, see __rt_mutex_futex_unlock().
 - */
@@ -224,11 +229,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -				 timeout, RT_MUTEX_FULL_CHAINWALK);
 -}
 -
--/*
+ /*
   * Futex variant, must not use fastpath.
   */
- int __sched rt_mutex_futex_trylock(struct rt_mutex *lock)
-@@ -1772,12 +1759,6 @@ int rt_mutex_wait_proxy_lock(struct rt_m
+@@ -1772,12 +1759,6 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  	/* sleep on the mutex */
  	ret = __rt_mutex_slowlock(lock, TASK_INTERRUPTIBLE, to, waiter);
  
@@ -241,7 +245,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&lock->wait_lock);
  
  	return ret;
-@@ -1817,6 +1798,13 @@ bool rt_mutex_cleanup_proxy_lock(struct
+@@ -1817,6 +1798,13 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
  		fixup_rt_mutex_waiters(lock);
  		cleanup = true;
  	}
@@ -255,9 +259,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&lock->wait_lock);
  
  	return cleanup;
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index fedd5abe0b52..4fe3f32da3c5 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -113,7 +113,6 @@ extern int rt_mutex_wait_proxy_lock(stru
+@@ -113,7 +113,6 @@ extern int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  extern bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
  				 struct rt_mutex_waiter *waiter);
  
diff --git a/debian/patches/features/all/rt/0012-futex-Futex_unlock_pi-determinism.patch b/debian/patches/features/all/rt/0016-futex-Futex_unlock_pi-determinism.patch
similarity index 84%
rename from debian/patches/features/all/rt/0012-futex-Futex_unlock_pi-determinism.patch
rename to debian/patches/features/all/rt/0016-futex-Futex_unlock_pi-determinism.patch
index b2a8bf3..6065ba0 100644
--- a/debian/patches/features/all/rt/0012-futex-Futex_unlock_pi-determinism.patch
+++ b/debian/patches/features/all/rt/0016-futex-Futex_unlock_pi-determinism.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:35:59 +0100
-Subject: [PATCH] futex: Futex_unlock_pi() determinism
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 016/332] futex: Futex_unlock_pi() determinism
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8c5acec11510eb8cf920f7bbbcaf27172ad508bf
 
 Upstream commit bebe5b514345f09be2c15e414d076b02ecb9cce8
 
@@ -31,12 +31,14 @@ Link: http://lkml.kernel.org/r/20170322104152.112378812@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |   24 +++++++++++-------------
+ kernel/futex.c | 24 +++++++++++-------------
  1 file changed, 11 insertions(+), 13 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index bff0a7e0cec5..3d1be05af5ec 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1396,15 +1396,10 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1397,15 +1397,10 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	WAKE_Q(wake_q);
  	int ret = 0;
  
@@ -54,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		 *
  		 * When this happens, give up our locks and try again, giving
  		 * the futex_lock_pi() instance time to complete, either by
-@@ -2792,15 +2787,18 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2793,15 +2788,18 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  		if (pi_state->owner != current)
  			goto out_unlock;
  
diff --git a/debian/patches/features/all/rt/0013-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch b/debian/patches/features/all/rt/0017-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
similarity index 85%
rename from debian/patches/features/all/rt/0013-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
rename to debian/patches/features/all/rt/0017-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
index 1ea9960..b32ee7e 100644
--- a/debian/patches/features/all/rt/0013-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
+++ b/debian/patches/features/all/rt/0017-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 22 Mar 2017 11:36:00 +0100
-Subject: [PATCH] futex: Drop hb->lock before enqueueing on the rtmutex
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 017/332] futex: Drop hb->lock before enqueueing on the rtmutex
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f1af8e10d5d1cc0fbe78d86033e2b3056478e782
 
 Upstream commit 56222b212e8edb1cf51f5dd73ff645809b082b40
 
@@ -48,14 +48,16 @@ Link: http://lkml.kernel.org/r/20170322104152.161341537@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c                  |   30 +++++++++++++++++-------
- kernel/locking/rtmutex.c        |   49 ++++++++++++++++++++++------------------
- kernel/locking/rtmutex_common.h |    3 ++
+ kernel/futex.c                  | 30 +++++++++++++++++--------
+ kernel/locking/rtmutex.c        | 49 +++++++++++++++++++++++------------------
+ kernel/locking/rtmutex_common.h |  3 +++
  3 files changed, 52 insertions(+), 30 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 3d1be05af5ec..cdd205aa929e 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2652,20 +2652,33 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2653,20 +2653,33 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  		goto no_block;
  	}
  
@@ -94,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (unlikely(to))
  		hrtimer_start_expires(&to->timer, HRTIMER_MODE_ABS);
-@@ -2678,6 +2691,9 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2679,6 +2692,9 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  	 * first acquire the hb->lock before removing the lock from the
  	 * rt_mutex waitqueue, such that we can keep the hb and rt_mutex
  	 * wait lists consistent.
@@ -104,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	 */
  	if (ret && !rt_mutex_cleanup_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter))
  		ret = 0;
-@@ -2789,10 +2805,6 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2790,10 +2806,6 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  
  		get_pi_state(pi_state);
  		/*
@@ -115,9 +117,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		 * By taking wait_lock while still holding hb->lock, we ensure
  		 * there is no point where we hold neither; and therefore
  		 * wake_futex_pi() must observe a state consistent with what we
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index de0d97838ed9..30f08b70433a 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1659,31 +1659,14 @@ void rt_mutex_proxy_unlock(struct rt_mut
+@@ -1659,31 +1659,14 @@ void rt_mutex_proxy_unlock(struct rt_mutex *lock,
  	rt_mutex_set_owner(lock, NULL);
  }
  
@@ -151,7 +155,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* We enforce deadlock detection for futexes */
  	ret = task_blocks_on_rt_mutex(lock, waiter, task,
-@@ -1702,12 +1685,36 @@ int rt_mutex_start_proxy_lock(struct rt_
+@@ -1702,13 +1685,37 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  	if (unlikely(ret))
  		remove_waiter(lock, waiter);
  
@@ -161,7 +165,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return ret;
  }
-+
+ 
 +/**
 + * rt_mutex_start_proxy_lock() - Start lock acquisition for another task
 + * @lock:		the rt_mutex to take
@@ -187,12 +191,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +
 +	return ret;
 +}
- 
++
  /**
   * rt_mutex_next_owner - return the next owner of the lock
+  *
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 4fe3f32da3c5..25ccf716b936 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -104,6 +104,9 @@ extern void rt_mutex_init_proxy_locked(s
+@@ -104,6 +104,9 @@ extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
  extern void rt_mutex_proxy_unlock(struct rt_mutex *lock,
  				  struct task_struct *proxy_owner);
  extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter);
diff --git a/debian/patches/features/all/rt/0001-rtmutex-Deboost-before-waking-up-the-top-waiter.patch b/debian/patches/features/all/rt/0018-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
similarity index 76%
rename from debian/patches/features/all/rt/0001-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
rename to debian/patches/features/all/rt/0018-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
index 2c2eb87..7a4e919 100644
--- a/debian/patches/features/all/rt/0001-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
+++ b/debian/patches/features/all/rt/0018-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
@@ -1,7 +1,7 @@
 From: Xunlei Pang <xlpang at redhat.com>
 Date: Thu, 23 Mar 2017 15:56:07 +0100
-Subject: [PATCH] rtmutex: Deboost before waking up the top waiter
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 018/332] rtmutex: Deboost before waking up the top waiter
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=86895741c6e4b35c81b0d515aac94c409ad4b29a
 
 Upstream commit 2a1c6029940675abb2217b590512dbf691867ec4
 
@@ -38,14 +38,16 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.110065320@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/futex.c                  |    5 ---
- kernel/locking/rtmutex.c        |   59 +++++++++++++++++++++-------------------
- kernel/locking/rtmutex_common.h |    2 -
+ kernel/futex.c                  |  5 +---
+ kernel/locking/rtmutex.c        | 59 ++++++++++++++++++++++-------------------
+ kernel/locking/rtmutex_common.h |  2 +-
  3 files changed, 34 insertions(+), 32 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index cdd205aa929e..ee247b6290be 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1458,10 +1458,7 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1459,10 +1459,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  out_unlock:
  	raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock);
  
@@ -57,12 +59,15 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 30f08b70433a..440469b69df9 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -371,24 +371,6 @@ static void __rt_mutex_adjust_prio(struc
+@@ -370,24 +370,6 @@ static void __rt_mutex_adjust_prio(struct task_struct *task)
+ 		rt_mutex_setprio(task, prio);
  }
  
- /*
+-/*
 - * Adjust task priority (undo boosting). Called from the exit path of
 - * rt_mutex_slowunlock() and rt_mutex_slowlock().
 - *
@@ -80,11 +85,10 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 -	raw_spin_unlock_irqrestore(&task->pi_lock, flags);
 -}
 -
--/*
+ /*
   * Deadlock detection is conditional:
   *
-  * If CONFIG_DEBUG_RT_MUTEXES=n, deadlock detection is only conducted
-@@ -1049,6 +1031,7 @@ static void mark_wakeup_next_waiter(stru
+@@ -1049,6 +1031,7 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
  	 * lock->wait_lock.
  	 */
  	rt_mutex_dequeue_pi(current, waiter);
@@ -92,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * As we are waking up the top waiter, and the waiter stays
-@@ -1391,6 +1374,16 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1391,6 +1374,16 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  	 */
  	mark_wakeup_next_waiter(wake_q, lock);
  
@@ -109,7 +113,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  
  	/* check PI boosting */
-@@ -1440,6 +1433,18 @@ rt_mutex_fasttrylock(struct rt_mutex *lo
+@@ -1440,6 +1433,18 @@ rt_mutex_fasttrylock(struct rt_mutex *lock,
  	return slowfn(lock);
  }
  
@@ -128,7 +132,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline void
  rt_mutex_fastunlock(struct rt_mutex *lock,
  		    bool (*slowfn)(struct rt_mutex *lock,
-@@ -1453,11 +1458,7 @@ rt_mutex_fastunlock(struct rt_mutex *loc
+@@ -1453,11 +1458,7 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
  
  	deboost = slowfn(lock, &wake_q);
  
@@ -141,7 +145,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -1570,6 +1571,13 @@ bool __sched __rt_mutex_futex_unlock(str
+@@ -1570,6 +1571,13 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
  	}
  
  	mark_wakeup_next_waiter(wake_q, lock);
@@ -155,7 +159,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return true; /* deboost and wakeups */
  }
  
-@@ -1582,10 +1590,7 @@ void __sched rt_mutex_futex_unlock(struc
+@@ -1582,10 +1590,7 @@ void __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
  	deboost = __rt_mutex_futex_unlock(lock, &wake_q);
  	raw_spin_unlock_irq(&lock->wait_lock);
  
@@ -167,9 +171,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 25ccf716b936..6f073579b00b 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -122,7 +122,7 @@ extern void rt_mutex_futex_unlock(struct
+@@ -122,7 +122,7 @@ extern void rt_mutex_futex_unlock(struct rt_mutex *lock);
  extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock,
  				 struct wake_q_head *wqh);
  
diff --git a/debian/patches/features/all/rt/0002-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch b/debian/patches/features/all/rt/0019-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
similarity index 74%
rename from debian/patches/features/all/rt/0002-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
rename to debian/patches/features/all/rt/0019-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
index b751d5b..3914b00 100644
--- a/debian/patches/features/all/rt/0002-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
+++ b/debian/patches/features/all/rt/0019-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
@@ -1,7 +1,8 @@
 From: Xunlei Pang <xlpang at redhat.com>
 Date: Thu, 23 Mar 2017 15:56:08 +0100
-Subject: [PATCH] sched/rtmutex/deadline: Fix a PI crash for deadline tasks
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 019/332] sched/rtmutex/deadline: Fix a PI crash for deadline
+ tasks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7951afeef42768d17c89d065d74fa0c606f5e896
 
 Upstream commit e96a7705e7d3fef96aec9b590c63b2f6f7d2ba22
 
@@ -51,17 +52,19 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.157682758@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/init_task.h |    1 +
- include/linux/sched.h     |    2 ++
- include/linux/sched/rt.h  |    1 +
- kernel/fork.c             |    1 +
- kernel/locking/rtmutex.c  |   29 +++++++++++++++++++++--------
- kernel/sched/core.c       |    2 ++
+ include/linux/init_task.h |  1 +
+ include/linux/sched.h     |  2 ++
+ include/linux/sched/rt.h  |  1 +
+ kernel/fork.c             |  1 +
+ kernel/locking/rtmutex.c  | 29 +++++++++++++++++++++--------
+ kernel/sched/core.c       |  2 ++
  6 files changed, 28 insertions(+), 8 deletions(-)
 
+diff --git a/include/linux/init_task.h b/include/linux/init_task.h
+index 325f649d77ff..d359b1a71610 100644
 --- a/include/linux/init_task.h
 +++ b/include/linux/init_task.h
-@@ -164,6 +164,7 @@ extern struct task_group root_task_group
+@@ -164,6 +164,7 @@ extern struct task_group root_task_group;
  #ifdef CONFIG_RT_MUTEXES
  # define INIT_RT_MUTEXES(tsk)						\
  	.pi_waiters = RB_ROOT,						\
@@ -69,9 +72,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	.pi_waiters_leftmost = NULL,
  #else
  # define INIT_RT_MUTEXES(tsk)
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index a4d0afc009a7..117293dcbf2a 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1723,6 +1723,8 @@ struct task_struct {
+@@ -1733,6 +1733,8 @@ struct task_struct {
  	/* PI waiters blocked on a rt_mutex held by this task */
  	struct rb_root pi_waiters;
  	struct rb_node *pi_waiters_leftmost;
@@ -80,9 +85,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/* Deadlock detection and priority inheritance handling */
  	struct rt_mutex_waiter *pi_blocked_on;
  #endif
+diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h
+index a30b172df6e1..60d0c4740b9f 100644
 --- a/include/linux/sched/rt.h
 +++ b/include/linux/sched/rt.h
-@@ -19,6 +19,7 @@ static inline int rt_task(struct task_st
+@@ -19,6 +19,7 @@ static inline int rt_task(struct task_struct *p)
  extern int rt_mutex_getprio(struct task_struct *p);
  extern void rt_mutex_setprio(struct task_struct *p, int prio);
  extern int rt_mutex_get_effective_prio(struct task_struct *task, int newprio);
@@ -90,9 +97,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task);
  extern void rt_mutex_adjust_pi(struct task_struct *p);
  static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 50bf262cc427..d6260cdc0294 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -1417,6 +1417,7 @@ static void rt_mutex_init_task(struct ta
+@@ -1418,6 +1418,7 @@ static void rt_mutex_init_task(struct task_struct *p)
  #ifdef CONFIG_RT_MUTEXES
  	p->pi_waiters = RB_ROOT;
  	p->pi_waiters_leftmost = NULL;
@@ -100,12 +109,15 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	p->pi_blocked_on = NULL;
  #endif
  }
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 440469b69df9..3c4e5bff1d9a 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -321,6 +321,19 @@ rt_mutex_dequeue_pi(struct task_struct *
+@@ -320,6 +320,19 @@ rt_mutex_dequeue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter)
+ 	RB_CLEAR_NODE(&waiter->pi_tree_entry);
  }
  
- /*
++/*
 + * Must hold both p->pi_lock and task_rq(p)->lock.
 + */
 +void rt_mutex_update_top_task(struct task_struct *p)
@@ -118,11 +130,10 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	p->pi_top_task = task_top_pi_waiter(p)->task;
 +}
 +
-+/*
+ /*
   * Calculate task priority from the waiter tree priority
   *
-  * Return task->normal_prio when the waiter tree is empty or when
-@@ -335,12 +348,12 @@ int rt_mutex_getprio(struct task_struct
+@@ -335,12 +348,12 @@ int rt_mutex_getprio(struct task_struct *task)
  		   task->normal_prio);
  }
  
@@ -139,7 +150,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -349,12 +362,12 @@ struct task_struct *rt_mutex_get_top_tas
+@@ -349,12 +362,12 @@ struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
   */
  int rt_mutex_get_effective_prio(struct task_struct *task, int newprio)
  {
@@ -156,9 +167,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 2098954c690f..2db43f49f8cd 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3669,6 +3669,8 @@ void rt_mutex_setprio(struct task_struct
+@@ -3669,6 +3669,8 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
  		goto out_unlock;
  	}
  
diff --git a/debian/patches/features/all/rt/0003-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch b/debian/patches/features/all/rt/0020-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
similarity index 81%
rename from debian/patches/features/all/rt/0003-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
rename to debian/patches/features/all/rt/0020-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
index 641205f..5a90e35 100644
--- a/debian/patches/features/all/rt/0003-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
+++ b/debian/patches/features/all/rt/0020-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
@@ -1,8 +1,8 @@
 From: Xunlei Pang <xlpang at redhat.com>
 Date: Thu, 23 Mar 2017 15:56:09 +0100
-Subject: [PATCH] sched/deadline/rtmutex: Dont miss the
+Subject: [PATCH 020/332] sched/deadline/rtmutex: Dont miss the
  dl_runtime/dl_period update
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c539edf1d3da80e7aeaa98556dc12515e189394f
 
 Upstream commit 85e2d4f992868ad78dc8bb2c077b652fcfb3661a
 
@@ -38,12 +38,14 @@ Link: http://lkml.kernel.org/r/1460633827-345-7-git-send-email-xlpang@redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.206577901@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/locking/rtmutex.c |    2 +-
+ kernel/locking/rtmutex.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 3c4e5bff1d9a..f0dc1f6cf22b 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -603,7 +603,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -603,7 +603,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  	 * enabled we continue, but stop the requeueing in the chain
  	 * walk.
  	 */
diff --git a/debian/patches/features/all/rt/0004-rtmutex-Clean-up.patch b/debian/patches/features/all/rt/0021-rtmutex-Clean-up.patch
similarity index 76%
rename from debian/patches/features/all/rt/0004-rtmutex-Clean-up.patch
rename to debian/patches/features/all/rt/0021-rtmutex-Clean-up.patch
index df75a04..3c1950d 100644
--- a/debian/patches/features/all/rt/0004-rtmutex-Clean-up.patch
+++ b/debian/patches/features/all/rt/0021-rtmutex-Clean-up.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 23 Mar 2017 15:56:10 +0100
-Subject: [PATCH] rtmutex: Clean up
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 021/332] rtmutex: Clean up
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d59328be42a556b1a554253d0e0d171a09445731
 
 Upstream commit aa2bfe55366552cb7e93e8709d66e698d79ccc47
 
@@ -19,14 +19,16 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.255058238@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/futex.c                  |    7 ++++---
- kernel/locking/rtmutex.c        |   28 +++++++++++++---------------
- kernel/locking/rtmutex_common.h |    2 +-
+ kernel/futex.c                  |  7 ++++---
+ kernel/locking/rtmutex.c        | 28 +++++++++++++---------------
+ kernel/locking/rtmutex_common.h |  2 +-
  3 files changed, 18 insertions(+), 19 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index ee247b6290be..3c5173f520c6 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1392,7 +1392,7 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1393,7 +1393,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  {
  	u32 uninitialized_var(curval), newval;
  	struct task_struct *new_owner;
@@ -35,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	WAKE_Q(wake_q);
  	int ret = 0;
  
-@@ -1453,12 +1453,13 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1454,12 +1454,13 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	/*
  	 * We've updated the uservalue, this unlock cannot fail.
  	 */
@@ -51,9 +53,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index f0dc1f6cf22b..7ca8407e865a 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1328,7 +1328,8 @@ static inline int rt_mutex_slowtrylock(s
+@@ -1328,7 +1328,8 @@ static inline int rt_mutex_slowtrylock(struct rt_mutex *lock)
  
  /*
   * Slow path to release a rt-mutex.
@@ -63,7 +67,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   */
  static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  					struct wake_q_head *wake_q)
-@@ -1399,8 +1400,7 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1399,8 +1400,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  
  	raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  
@@ -73,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1447,15 +1447,14 @@ rt_mutex_fasttrylock(struct rt_mutex *lo
+@@ -1447,15 +1447,14 @@ rt_mutex_fasttrylock(struct rt_mutex *lock,
  }
  
  /*
@@ -92,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static inline void
-@@ -1464,14 +1463,12 @@ rt_mutex_fastunlock(struct rt_mutex *loc
+@@ -1464,14 +1463,12 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
  				   struct wake_q_head *wqh))
  {
  	WAKE_Q(wake_q);
@@ -109,7 +113,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -1591,19 +1588,20 @@ bool __sched __rt_mutex_futex_unlock(str
+@@ -1591,19 +1588,20 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
  	 */
  	preempt_disable();
  
@@ -134,9 +138,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 6f073579b00b..d1c07126e890 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -122,7 +122,7 @@ extern void rt_mutex_futex_unlock(struct
+@@ -122,7 +122,7 @@ extern void rt_mutex_futex_unlock(struct rt_mutex *lock);
  extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock,
  				 struct wake_q_head *wqh);
  
diff --git a/debian/patches/features/all/rt/0005-sched-rtmutex-Refactor-rt_mutex_setprio.patch b/debian/patches/features/all/rt/0022-sched-rtmutex-Refactor-rt_mutex_setprio.patch
similarity index 84%
rename from debian/patches/features/all/rt/0005-sched-rtmutex-Refactor-rt_mutex_setprio.patch
rename to debian/patches/features/all/rt/0022-sched-rtmutex-Refactor-rt_mutex_setprio.patch
index c83a42b..a5da65b 100644
--- a/debian/patches/features/all/rt/0005-sched-rtmutex-Refactor-rt_mutex_setprio.patch
+++ b/debian/patches/features/all/rt/0022-sched-rtmutex-Refactor-rt_mutex_setprio.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 23 Mar 2017 15:56:11 +0100
-Subject: [PATCH] sched/rtmutex: Refactor rt_mutex_setprio()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 022/332] sched/rtmutex: Refactor rt_mutex_setprio()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5327988a7e22cbea84ad4aa43e4cee5e1b9dd794
 
 Upstream commit acd58620e415aee4a43a808d7d2fd87259ee0001
 
@@ -29,14 +29,16 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.303827095@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/sched/rt.h |   24 +++-------
- kernel/locking/rtmutex.c |  112 ++++++++++++-----------------------------------
- kernel/sched/core.c      |   66 ++++++++++++++++++++++-----
+ include/linux/sched/rt.h |  24 ++++------
+ kernel/locking/rtmutex.c | 112 +++++++++++++----------------------------------
+ kernel/sched/core.c      |  66 ++++++++++++++++++++++------
  3 files changed, 91 insertions(+), 111 deletions(-)
 
+diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h
+index 60d0c4740b9f..db3e91f2bc03 100644
 --- a/include/linux/sched/rt.h
 +++ b/include/linux/sched/rt.h
-@@ -16,28 +16,20 @@ static inline int rt_task(struct task_st
+@@ -16,28 +16,20 @@ static inline int rt_task(struct task_struct *p)
  }
  
  #ifdef CONFIG_RT_MUTEXES
@@ -73,9 +75,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
  {
  	return NULL;
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 7ca8407e865a..6eb6a8a9dd61 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -320,67 +320,16 @@ rt_mutex_dequeue_pi(struct task_struct *
+@@ -320,67 +320,16 @@ rt_mutex_dequeue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter)
  	RB_CLEAR_NODE(&waiter->pi_tree_entry);
  }
  
@@ -149,7 +153,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -740,7 +689,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -740,7 +689,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  		 */
  		rt_mutex_dequeue_pi(task, prerequeue_top_waiter);
  		rt_mutex_enqueue_pi(task, waiter);
@@ -158,7 +162,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	} else if (prerequeue_top_waiter == waiter) {
  		/*
-@@ -756,7 +705,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -756,7 +705,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  		rt_mutex_dequeue_pi(task, waiter);
  		waiter = rt_mutex_top_waiter(lock);
  		rt_mutex_enqueue_pi(task, waiter);
@@ -167,7 +171,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else {
  		/*
  		 * Nothing changed. No need to do any priority
-@@ -964,7 +913,7 @@ static int task_blocks_on_rt_mutex(struc
+@@ -964,7 +913,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  		return -EDEADLK;
  
  	raw_spin_lock(&task->pi_lock);
@@ -176,7 +180,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	waiter->task = task;
  	waiter->lock = lock;
  	waiter->prio = task->prio;
-@@ -986,7 +935,7 @@ static int task_blocks_on_rt_mutex(struc
+@@ -986,7 +935,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  		rt_mutex_dequeue_pi(owner, top_waiter);
  		rt_mutex_enqueue_pi(owner, waiter);
  
@@ -185,7 +189,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (owner->pi_blocked_on)
  			chain_walk = 1;
  	} else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) {
-@@ -1038,13 +987,14 @@ static void mark_wakeup_next_waiter(stru
+@@ -1038,13 +987,14 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
  	waiter = rt_mutex_top_waiter(lock);
  
  	/*
@@ -205,7 +209,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * As we are waking up the top waiter, and the waiter stays
-@@ -1056,9 +1006,19 @@ static void mark_wakeup_next_waiter(stru
+@@ -1056,9 +1006,19 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
  	 */
  	lock->owner = (void *) RT_MUTEX_HAS_WAITERS;
  
@@ -227,7 +231,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1093,7 +1053,7 @@ static void remove_waiter(struct rt_mute
+@@ -1093,7 +1053,7 @@ static void remove_waiter(struct rt_mutex *lock,
  	if (rt_mutex_has_waiters(lock))
  		rt_mutex_enqueue_pi(owner, rt_mutex_top_waiter(lock));
  
@@ -236,7 +240,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Store the lock on which owner is blocked or NULL */
  	next_lock = task_blocked_on_lock(owner);
-@@ -1132,8 +1092,7 @@ void rt_mutex_adjust_pi(struct task_stru
+@@ -1132,8 +1092,7 @@ void rt_mutex_adjust_pi(struct task_struct *task)
  	raw_spin_lock_irqsave(&task->pi_lock, flags);
  
  	waiter = task->pi_blocked_on;
@@ -246,7 +250,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		raw_spin_unlock_irqrestore(&task->pi_lock, flags);
  		return;
  	}
-@@ -1387,17 +1346,6 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1387,17 +1346,6 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  	 * Queue the next waiter for wakeup once we release the wait_lock.
  	 */
  	mark_wakeup_next_waiter(wake_q, lock);
@@ -264,6 +268,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  
  	return true; /* call rt_mutex_postunlock() */
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 2db43f49f8cd..77631ab98e3a 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
 @@ -3629,10 +3629,25 @@ EXPORT_SYMBOL(default_wake_function);
@@ -338,7 +344,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * Idle task boosting is a nono in general. There is one
-@@ -3669,9 +3708,7 @@ void rt_mutex_setprio(struct task_struct
+@@ -3669,9 +3708,7 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
  		goto out_unlock;
  	}
  
@@ -349,7 +355,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	oldprio = p->prio;
  
  	if (oldprio == prio)
-@@ -3695,7 +3732,6 @@ void rt_mutex_setprio(struct task_struct
+@@ -3695,7 +3732,6 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
  	 *          running task
  	 */
  	if (dl_prio(prio)) {
@@ -357,7 +363,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (!dl_prio(p->normal_prio) ||
  		    (pi_task && dl_entity_preempt(&pi_task->dl, &p->dl))) {
  			p->dl.dl_boosted = 1;
-@@ -3732,6 +3768,11 @@ void rt_mutex_setprio(struct task_struct
+@@ -3732,6 +3768,11 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
  	balance_callback(rq);
  	preempt_enable();
  }
@@ -369,7 +375,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  void set_user_nice(struct task_struct *p, long nice)
-@@ -3976,10 +4017,9 @@ static void __setscheduler(struct rq *rq
+@@ -3976,10 +4017,9 @@ static void __setscheduler(struct rq *rq, struct task_struct *p,
  	 * Keep a potential priority boosting if called from
  	 * sched_setscheduler().
  	 */
@@ -382,7 +388,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (dl_prio(p->prio))
  		p->sched_class = &dl_sched_class;
-@@ -4266,7 +4306,7 @@ static int __sched_setscheduler(struct t
+@@ -4266,7 +4306,7 @@ static int __sched_setscheduler(struct task_struct *p,
  		 * the runqueue. This will be done when the task deboost
  		 * itself.
  		 */
diff --git a/debian/patches/features/all/rt/0006-sched-tracing-Update-trace_sched_pi_setprio.patch b/debian/patches/features/all/rt/0023-sched-tracing-Update-trace_sched_pi_setprio.patch
similarity index 79%
rename from debian/patches/features/all/rt/0006-sched-tracing-Update-trace_sched_pi_setprio.patch
rename to debian/patches/features/all/rt/0023-sched-tracing-Update-trace_sched_pi_setprio.patch
index 7fd765b..aedf9c3 100644
--- a/debian/patches/features/all/rt/0006-sched-tracing-Update-trace_sched_pi_setprio.patch
+++ b/debian/patches/features/all/rt/0023-sched-tracing-Update-trace_sched_pi_setprio.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 23 Mar 2017 15:56:12 +0100
-Subject: [PATCH] sched,tracing: Update trace_sched_pi_setprio()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 023/332] sched,tracing: Update trace_sched_pi_setprio()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c24ae021858c0590b582223dfcea2e12acaf03b0
 
 Upstream commit b91473ff6e979c0028f02f90e40c844959c736d8
 
@@ -24,13 +24,15 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.353599881@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/trace/events/sched.h |   16 +++++++++-------
- kernel/sched/core.c          |    2 +-
+ include/trace/events/sched.h | 16 +++++++++-------
+ kernel/sched/core.c          |  2 +-
  2 files changed, 10 insertions(+), 8 deletions(-)
 
+diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
+index 9b90c57517a9..516ae88cddf4 100644
 --- a/include/trace/events/sched.h
 +++ b/include/trace/events/sched.h
-@@ -70,7 +70,7 @@ DECLARE_EVENT_CLASS(sched_wakeup_templat
+@@ -70,7 +70,7 @@ DECLARE_EVENT_CLASS(sched_wakeup_template,
  	TP_fast_assign(
  		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
  		__entry->pid		= p->pid;
@@ -56,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		__entry->orig_cpu	= task_cpu(p);
  		__entry->dest_cpu	= dest_cpu;
  	),
-@@ -206,7 +207,7 @@ DECLARE_EVENT_CLASS(sched_process_templa
+@@ -206,7 +207,7 @@ DECLARE_EVENT_CLASS(sched_process_template,
  	TP_fast_assign(
  		memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
  		__entry->pid		= p->pid;
@@ -74,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	),
  
  	TP_printk("comm=%s pid=%d prio=%d",
-@@ -413,9 +414,9 @@ DEFINE_EVENT(sched_stat_runtime, sched_s
+@@ -413,9 +414,9 @@ DEFINE_EVENT(sched_stat_runtime, sched_stat_runtime,
   */
  TRACE_EVENT(sched_pi_setprio,
  
@@ -96,9 +98,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	),
  
  	TP_printk("comm=%s pid=%d oldprio=%d newprio=%d",
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 77631ab98e3a..85d7540fe468 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3708,7 +3708,7 @@ void rt_mutex_setprio(struct task_struct
+@@ -3708,7 +3708,7 @@ void rt_mutex_setprio(struct task_struct *p, struct task_struct *pi_task)
  		goto out_unlock;
  	}
  
diff --git a/debian/patches/features/all/rt/0007-rtmutex-Fix-PI-chain-order-integrity.patch b/debian/patches/features/all/rt/0024-rtmutex-Fix-PI-chain-order-integrity.patch
similarity index 77%
rename from debian/patches/features/all/rt/0007-rtmutex-Fix-PI-chain-order-integrity.patch
rename to debian/patches/features/all/rt/0024-rtmutex-Fix-PI-chain-order-integrity.patch
index 445e9df..8f5c51b 100644
--- a/debian/patches/features/all/rt/0007-rtmutex-Fix-PI-chain-order-integrity.patch
+++ b/debian/patches/features/all/rt/0024-rtmutex-Fix-PI-chain-order-integrity.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 23 Mar 2017 15:56:13 +0100
-Subject: [PATCH] rtmutex: Fix PI chain order integrity
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 024/332] rtmutex: Fix PI chain order integrity
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=14180abbf597db26e4f00d3cc5a115e400925b71
 
 Upstream commit e0aad5b44ff5d28ac1d6ae70cdf84ca228e889dc
 
@@ -32,13 +32,15 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.403992539@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/locking/rtmutex.c        |   29 +++++++++++++++++++++++++++--
- kernel/locking/rtmutex_common.h |    1 +
+ kernel/locking/rtmutex.c        | 29 +++++++++++++++++++++++++++--
+ kernel/locking/rtmutex_common.h |  1 +
  2 files changed, 28 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 6eb6a8a9dd61..e275b8148db9 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -236,8 +236,7 @@ rt_mutex_waiter_less(struct rt_mutex_wai
+@@ -236,8 +236,7 @@ rt_mutex_waiter_less(struct rt_mutex_waiter *left,
  	 * then right waiter has a dl_prio() too.
  	 */
  	if (dl_prio(left->prio))
@@ -48,7 +50,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return 0;
  }
-@@ -648,7 +647,26 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -648,7 +647,26 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  
  	/* [7] Requeue the waiter in the lock waiter tree. */
  	rt_mutex_dequeue(lock, waiter);
@@ -75,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	rt_mutex_enqueue(lock, waiter);
  
  	/* [8] Release the task */
-@@ -775,6 +793,8 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -775,6 +793,8 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  				struct rt_mutex_waiter *waiter)
  {
@@ -84,7 +86,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * Before testing whether we can acquire @lock, we set the
  	 * RT_MUTEX_HAS_WAITERS bit in @lock->owner. This forces all
-@@ -900,6 +920,8 @@ static int task_blocks_on_rt_mutex(struc
+@@ -900,6 +920,8 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  	struct rt_mutex *next_lock;
  	int chain_walk = 0, res;
  
@@ -93,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * Early deadlock detection. We really don't want the task to
  	 * enqueue on itself just to untangle the mess later. It's not
-@@ -917,6 +939,7 @@ static int task_blocks_on_rt_mutex(struc
+@@ -917,6 +939,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  	waiter->task = task;
  	waiter->lock = lock;
  	waiter->prio = task->prio;
@@ -101,7 +103,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Get the top priority waiter on the lock */
  	if (rt_mutex_has_waiters(lock))
-@@ -1034,6 +1057,8 @@ static void remove_waiter(struct rt_mute
+@@ -1034,6 +1057,8 @@ static void remove_waiter(struct rt_mutex *lock,
  	struct task_struct *owner = rt_mutex_owner(lock);
  	struct rt_mutex *next_lock;
  
@@ -110,6 +112,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spin_lock(&current->pi_lock);
  	rt_mutex_dequeue(lock, waiter);
  	current->pi_blocked_on = NULL;
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index d1c07126e890..722e3cf38acf 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
 @@ -33,6 +33,7 @@ struct rt_mutex_waiter {
diff --git a/debian/patches/features/all/rt/0008-rtmutex-Fix-more-prio-comparisons.patch b/debian/patches/features/all/rt/0025-rtmutex-Fix-more-prio-comparisons.patch
similarity index 78%
rename from debian/patches/features/all/rt/0008-rtmutex-Fix-more-prio-comparisons.patch
rename to debian/patches/features/all/rt/0025-rtmutex-Fix-more-prio-comparisons.patch
index 4cdcd6d..a9f9c99 100644
--- a/debian/patches/features/all/rt/0008-rtmutex-Fix-more-prio-comparisons.patch
+++ b/debian/patches/features/all/rt/0025-rtmutex-Fix-more-prio-comparisons.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 23 Mar 2017 15:56:14 +0100
-Subject: [PATCH] rtmutex: Fix more prio comparisons
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 025/332] rtmutex: Fix more prio comparisons
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=66f547bf3593af35491303c60fc2307119674427
 
 Upstream commit 19830e55247cddb3f46f1bf60b8e245593491bea
 
@@ -28,12 +28,14 @@ Cc: bristot at redhat.com
 Link: http://lkml.kernel.org/r/20170323150216.455584638@infradead.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   32 +++++++++++++++++++++++++++++---
+ kernel/locking/rtmutex.c | 32 +++++++++++++++++++++++++++++---
  1 file changed, 29 insertions(+), 3 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index e275b8148db9..a8202c772907 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -222,6 +222,12 @@ static inline bool unlock_rt_mutex_safe(
+@@ -222,6 +222,12 @@ static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock,
  }
  #endif
  
@@ -46,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline int
  rt_mutex_waiter_less(struct rt_mutex_waiter *left,
  		     struct rt_mutex_waiter *right)
-@@ -241,6 +247,25 @@ rt_mutex_waiter_less(struct rt_mutex_wai
+@@ -241,6 +247,25 @@ rt_mutex_waiter_less(struct rt_mutex_waiter *left,
  	return 0;
  }
  
@@ -72,7 +74,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static void
  rt_mutex_enqueue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter)
  {
-@@ -551,7 +576,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -551,7 +576,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  	 * enabled we continue, but stop the requeueing in the chain
  	 * walk.
  	 */
@@ -81,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (!detect_deadlock)
  			goto out_unlock_pi;
  		else
-@@ -854,7 +879,8 @@ static int try_to_take_rt_mutex(struct r
+@@ -854,7 +879,8 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  			 * the top waiter priority (kernel view),
  			 * @task lost.
  			 */
@@ -91,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				return 0;
  
  			/*
-@@ -1117,7 +1143,7 @@ void rt_mutex_adjust_pi(struct task_stru
+@@ -1117,7 +1143,7 @@ void rt_mutex_adjust_pi(struct task_struct *task)
  	raw_spin_lock_irqsave(&task->pi_lock, flags);
  
  	waiter = task->pi_blocked_on;
diff --git a/debian/patches/features/all/rt/0009-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch b/debian/patches/features/all/rt/0026-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
similarity index 79%
rename from debian/patches/features/all/rt/0009-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
rename to debian/patches/features/all/rt/0026-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
index 91f7ae7..4b0f8a3 100644
--- a/debian/patches/features/all/rt/0009-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
+++ b/debian/patches/features/all/rt/0026-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
@@ -1,8 +1,8 @@
 From: Mike Galbraith <efault at gmx.de>
 Date: Wed, 5 Apr 2017 10:08:27 +0200
-Subject: [PATCH] rtmutex: Plug preempt count leak in
+Subject: [PATCH 026/332] rtmutex: Plug preempt count leak in
  rt_mutex_futex_unlock()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e1f90089e6b9077413e227c7285588fce4edd8e5
 
 Upstream commit def34eaae5ce04b324e48e1bfac873091d945213
 
@@ -17,12 +17,14 @@ Cc: rostedt at goodmis.org
 Link: http://lkml.kernel.org/r/1491379707.6538.2.camel@gmx.de
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   10 +++++-----
+ kernel/locking/rtmutex.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index a8202c772907..ed2755befa35 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1579,13 +1579,13 @@ bool __sched __rt_mutex_futex_unlock(str
+@@ -1579,13 +1579,13 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
  		return false; /* done */
  	}
  
diff --git a/debian/patches/features/all/rt/0001-futex-Avoid-freeing-an-active-timer.patch b/debian/patches/features/all/rt/0027-futex-Avoid-freeing-an-active-timer.patch
similarity index 81%
rename from debian/patches/features/all/rt/0001-futex-Avoid-freeing-an-active-timer.patch
rename to debian/patches/features/all/rt/0027-futex-Avoid-freeing-an-active-timer.patch
index 98a92ef..e27410d 100644
--- a/debian/patches/features/all/rt/0001-futex-Avoid-freeing-an-active-timer.patch
+++ b/debian/patches/features/all/rt/0027-futex-Avoid-freeing-an-active-timer.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 10 Apr 2017 18:03:36 +0200
-Subject: [PATCH] futex: Avoid freeing an active timer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 027/332] futex: Avoid freeing an active timer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5046327db9d652ecc673475d9e1df3d56426e4ce
 
 Upstream commit 97181f9bd57405b879403763284537e27d46963d
 
@@ -34,12 +34,14 @@ Fixes: cfafcd117da0 ("futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock
 Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704101802370.2906@nanos
 Signed-off-by: Ingo Molnar <mingo at kernel.org>
 ---
- kernel/futex.c |    4 +++-
+ kernel/futex.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 3c5173f520c6..51455f2fb072 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2734,8 +2734,10 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2735,8 +2735,10 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  out_put_key:
  	put_futex_key(&q.key);
  out:
diff --git a/debian/patches/features/all/rt/0002-futex-Fix-small-and-harmless-looking-inconsistencies.patch b/debian/patches/features/all/rt/0028-futex-Fix-small-and-harmless-looking-inconsistencies.patch
similarity index 70%
rename from debian/patches/features/all/rt/0002-futex-Fix-small-and-harmless-looking-inconsistencies.patch
rename to debian/patches/features/all/rt/0028-futex-Fix-small-and-harmless-looking-inconsistencies.patch
index 6bc8aba..61b7d99 100644
--- a/debian/patches/features/all/rt/0002-futex-Fix-small-and-harmless-looking-inconsistencies.patch
+++ b/debian/patches/features/all/rt/0028-futex-Fix-small-and-harmless-looking-inconsistencies.patch
@@ -1,7 +1,8 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Fri, 7 Apr 2017 09:04:07 +0200
-Subject: [PATCH] futex: Fix small (and harmless looking) inconsistencies
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 028/332] futex: Fix small (and harmless looking)
+ inconsistencies
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3550a2a373383759b9743a7bbb4cf0b718bf8a11
 
 Upstream commit 94ffac5d847cfd790bb37b7cef1cad803743985e
 
@@ -18,12 +19,14 @@ Cc: Thomas Gleixner <tglx at linutronix.de>
 Cc: linux-kernel at vger.kernel.org
 Signed-off-by: Ingo Molnar <mingo at kernel.org>
 ---
- kernel/futex.c |   11 +++++++----
+ kernel/futex.c | 11 +++++++----
  1 file changed, 7 insertions(+), 4 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 51455f2fb072..216a6427670d 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1023,7 +1023,8 @@ static int attach_to_pi_state(u32 __user
+@@ -1024,7 +1024,8 @@ static int attach_to_pi_state(u32 __user *uaddr, u32 uval,
  			      struct futex_pi_state **ps)
  {
  	pid_t pid = uval & FUTEX_TID_MASK;
@@ -33,7 +36,7 @@ Signed-off-by: Ingo Molnar <mingo at kernel.org>
  
  	/*
  	 * Userspace might have messed up non-PI and PI futexes [3]
-@@ -1439,6 +1440,11 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1440,6 +1441,11 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	if (ret)
  		goto out_unlock;
  
@@ -45,7 +48,7 @@ Signed-off-by: Ingo Molnar <mingo at kernel.org>
  	raw_spin_lock(&pi_state->owner->pi_lock);
  	WARN_ON(list_empty(&pi_state->list));
  	list_del_init(&pi_state->list);
-@@ -1450,9 +1456,6 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1451,9 +1457,6 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	pi_state->owner = new_owner;
  	raw_spin_unlock(&new_owner->pi_lock);
  
diff --git a/debian/patches/features/all/rt/0003-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch b/debian/patches/features/all/rt/0029-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
similarity index 76%
rename from debian/patches/features/all/rt/0003-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
rename to debian/patches/features/all/rt/0029-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
index d6b8d4b..cca5985 100644
--- a/debian/patches/features/all/rt/0003-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
+++ b/debian/patches/features/all/rt/0029-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
@@ -1,7 +1,7 @@
 From: "Darren Hart (VMware)" <dvhart at infradead.org>
 Date: Fri, 14 Apr 2017 15:31:38 -0700
-Subject: [PATCH] futex: Clarify mark_wake_futex memory barrier usage
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 029/332] futex: Clarify mark_wake_futex memory barrier usage
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9760c28f174cd477036fa99ce85e14c6082ffcf3
 
 Upstream commit 38fcd06e9b7f6855db1f3ebac5e18b8fdb467ffd
 
@@ -15,12 +15,14 @@ Cc: Peter Zijlstra <peterz at infradead.org>
 Link: http://lkml.kernel.org/r/20170414223138.GA4222@fury
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/futex.c |    9 +++++----
+ kernel/futex.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 216a6427670d..c1d2034800aa 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1378,10 +1378,11 @@ static void mark_wake_futex(struct wake_
+@@ -1379,10 +1379,11 @@ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q)
  	wake_q_add(wake_q, p);
  	__unqueue_futex(q);
  	/*
diff --git a/debian/patches/features/all/rt/0004-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch b/debian/patches/features/all/rt/0030-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
similarity index 83%
rename from debian/patches/features/all/rt/0004-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
rename to debian/patches/features/all/rt/0030-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
index 28e8f86..de60feb 100644
--- a/debian/patches/features/all/rt/0004-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
+++ b/debian/patches/features/all/rt/0030-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
@@ -1,7 +1,7 @@
 From: "Darren Hart (VMware)" <dvhart at infradead.org>
 Date: Fri, 14 Apr 2017 15:46:08 -0700
-Subject: [PATCH] MAINTAINERS: Add FUTEX SUBSYSTEM
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 030/332] MAINTAINERS: Add FUTEX SUBSYSTEM
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e0b5df085724d6b5a74f43c38cd72b807269e0af
 
 Upstream commit 59cd42c29618c45cd3c56da43402b14f611888dd
 
@@ -19,9 +19,11 @@ Cc: Arnaldo Carvalho de Melo <acme at kernel.org>
 Link: http://lkml.kernel.org/r/20170414224608.GA5180@fury
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- MAINTAINERS |   17 +++++++++++++++++
+ MAINTAINERS | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
 
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 63cefa62324c..be0ea1e5c4cc 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -5196,6 +5196,23 @@ F:	fs/fuse/
diff --git a/debian/patches/features/all/rt/futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch b/debian/patches/features/all/rt/0031-futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
similarity index 90%
rename from debian/patches/features/all/rt/futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
rename to debian/patches/features/all/rt/0031-futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
index abf5bda..845616a 100644
--- a/debian/patches/features/all/rt/futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
+++ b/debian/patches/features/all/rt/0031-futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Mon, 22 May 2017 13:04:50 -0700
-Subject: [PATCH] futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 031/332] futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=643edfc5db76de2becc5a7ac5fd3f117bec37b37
 
 Markus reported that the glibc/nptl/tst-robustpi8 test was failing after
 commit:
@@ -72,12 +72,14 @@ Link: http://lkml.kernel.org/r/20170519154850.mlomgdsd26drq5j6@hirez.programming
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   24 ++++++++++++++++++------
+ kernel/locking/rtmutex.c | 24 ++++++++++++++++++------
  1 file changed, 18 insertions(+), 6 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index ed2755befa35..4b2126de44bb 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1775,12 +1775,14 @@ int rt_mutex_wait_proxy_lock(struct rt_m
+@@ -1775,12 +1775,14 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  	int ret;
  
  	raw_spin_lock_irq(&lock->wait_lock);
@@ -96,10 +98,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&lock->wait_lock);
  
  	return ret;
-@@ -1812,15 +1814,25 @@ bool rt_mutex_cleanup_proxy_lock(struct
+@@ -1811,16 +1813,26 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
+ 	bool cleanup = false;
  
  	raw_spin_lock_irq(&lock->wait_lock);
- 	/*
++	/*
 +	 * Do an unconditional try-lock, this deals with the lock stealing
 +	 * state where __rt_mutex_futex_unlock() -> mark_wakeup_next_waiter()
 +	 * sets a NULL owner.
@@ -111,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	 * ourselves.
 +	 */
 +	try_to_take_rt_mutex(lock, current, waiter);
-+	/*
+ 	/*
  	 * Unless we're the owner; we're still enqueued on the wait_list.
  	 * So check if we became owner, if not, take us off the wait_list.
  	 */
diff --git a/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch b/debian/patches/features/all/rt/0032-arm-at91-do-not-disable-enable-clocks-in-a-row.patch
similarity index 73%
rename from debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch
rename to debian/patches/features/all/rt/0032-arm-at91-do-not-disable-enable-clocks-in-a-row.patch
index b079c50..20f0264 100644
--- a/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch
+++ b/debian/patches/features/all/rt/0032-arm-at91-do-not-disable-enable-clocks-in-a-row.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
-Date: Wed, 09 Mar 2016 10:51:06 +0100
-Subject: arm: at91: do not disable/enable clocks in a row
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 9 Mar 2016 10:51:06 +0100
+Subject: [PATCH 032/332] arm: at91: do not disable/enable clocks in a row
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=163a1aaeb34220f24b9fc4e299dcfa2297ccfda0
 
 Currently the driver will disable the clock and enable it one line later
 if it is switching from periodic mode into one shot.
@@ -9,9 +9,11 @@ This can be avoided and causes a needless warning on -RT.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/clocksource/tcb_clksrc.c |   33 +++++++++++++++++++++++++++++----
+ drivers/clocksource/tcb_clksrc.c | 33 +++++++++++++++++++++++++++++----
  1 file changed, 29 insertions(+), 4 deletions(-)
 
+diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
+index 4da2af9694a2..ed1ae4445e8d 100644
 --- a/drivers/clocksource/tcb_clksrc.c
 +++ b/drivers/clocksource/tcb_clksrc.c
 @@ -74,6 +74,7 @@ static struct clocksource clksrc = {
@@ -22,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	void __iomem			*regs;
  };
  
-@@ -91,6 +92,24 @@ static struct tc_clkevt_device *to_tc_cl
+@@ -91,6 +92,24 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt)
   */
  static u32 timer_clock;
  
@@ -47,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static int tc_shutdown(struct clock_event_device *d)
  {
  	struct tc_clkevt_device *tcd = to_tc_clkevt(d);
-@@ -98,8 +117,14 @@ static int tc_shutdown(struct clock_even
+@@ -98,8 +117,14 @@ static int tc_shutdown(struct clock_event_device *d)
  
  	__raw_writel(0xff, regs + ATMEL_TC_REG(2, IDR));
  	__raw_writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR));
@@ -63,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -112,7 +137,7 @@ static int tc_set_oneshot(struct clock_e
+@@ -112,7 +137,7 @@ static int tc_set_oneshot(struct clock_event_device *d)
  	if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
  		tc_shutdown(d);
  
@@ -72,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* slow clock, count up to RC, then irq and stop */
  	__raw_writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE |
-@@ -134,7 +159,7 @@ static int tc_set_periodic(struct clock_
+@@ -134,7 +159,7 @@ static int tc_set_periodic(struct clock_event_device *d)
  	/* By not making the gentime core emulate periodic mode on top
  	 * of oneshot, we get lower overhead and improved accuracy.
  	 */
@@ -81,7 +83,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* slow clock, count up to RC, then irq and restart */
  	__raw_writel(timer_clock | ATMEL_TC_WAVE | ATMEL_TC_WAVESEL_UP_AUTO,
-@@ -168,7 +193,7 @@ static struct tc_clkevt_device clkevt =
+@@ -168,7 +193,7 @@ static struct tc_clkevt_device clkevt = {
  		/* Should be lower than at91rm9200's system timer */
  		.rating			= 125,
  		.set_next_event		= tc_next_event,
diff --git a/debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch b/debian/patches/features/all/rt/0033-ARM-smp-Move-clear_tasks_mm_cpumask-call-to-__cpu_di.patch
similarity index 86%
rename from debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch
rename to debian/patches/features/all/rt/0033-ARM-smp-Move-clear_tasks_mm_cpumask-call-to-__cpu_di.patch
index 9da4799..38166c1 100644
--- a/debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch
+++ b/debian/patches/features/all/rt/0033-ARM-smp-Move-clear_tasks_mm_cpumask-call-to-__cpu_di.patch
@@ -1,7 +1,8 @@
-Subject: ARM: smp: Move clear_tasks_mm_cpumask() call to __cpu_die()
 From: Grygorii Strashko <grygorii.strashko at ti.com>
 Date: Fri, 11 Sep 2015 21:21:23 +0300
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 033/332] ARM: smp: Move clear_tasks_mm_cpumask() call to
+ __cpu_die()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5bf3c2ff6825431f24fdaf571c0b436f46e496ca
 
 When running with the RT-kernel (4.1.5-rt5) on TI OMAP dra7-evm and trying
 to do Suspend to RAM, the following backtrace occurs:
@@ -61,18 +62,11 @@ Cc: stable-rt at vger.kernel.org
 Link: http://lkml.kernel.org/r/1441995683-30817-1-git-send-email-grygorii.strashko@ti.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
-
-RFC: I'm not sure how safe this change is and will be appreciated for any comments.
-Most of arches call clear_tasks_mm_cpumask() from __cpu_disable(), but *powerpc*
-calls it from CPU_DEAD notifier. This patch follows powerpc's approach in
-general.
-
-This issue was first reported in:
- http://www.spinics.net/lists/linux-rt-users/msg13752.html
-
- arch/arm/kernel/smp.c |    5 +++--
+ arch/arm/kernel/smp.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
+diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
+index 7dd14e8395e6..4cd7e3d98035 100644
 --- a/arch/arm/kernel/smp.c
 +++ b/arch/arm/kernel/smp.c
 @@ -234,8 +234,6 @@ int __cpu_disable(void)
diff --git a/debian/patches/features/all/rt/rtmutex--Handle-non-enqueued-waiters-gracefully.patch b/debian/patches/features/all/rt/0034-rtmutex-Handle-non-enqueued-waiters-gracefully.patch
similarity index 66%
rename from debian/patches/features/all/rt/rtmutex--Handle-non-enqueued-waiters-gracefully.patch
rename to debian/patches/features/all/rt/0034-rtmutex-Handle-non-enqueued-waiters-gracefully.patch
index 50815e7..d96e26f 100644
--- a/debian/patches/features/all/rt/rtmutex--Handle-non-enqueued-waiters-gracefully.patch
+++ b/debian/patches/features/all/rt/0034-rtmutex-Handle-non-enqueued-waiters-gracefully.patch
@@ -1,7 +1,7 @@
-Subject: rtmutex: Handle non enqueued waiters gracefully
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Fri, 06 Nov 2015 18:51:03 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 6 Nov 2015 18:51:03 +0100
+Subject: [PATCH 034/332] rtmutex: Handle non enqueued waiters gracefully
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=db0f0f1503763abf30ab3f00daa9854116e733fe
 
 Yimin debugged that in case of a PI wakeup in progress when
 rt_mutex_start_proxy_lock() calls task_blocks_on_rt_mutex() the latter
@@ -15,14 +15,15 @@ remove_waiter() so we can call it unconditionally.
 Reported-and-debugged-by: Yimin Deng <yimin11.deng at gmail.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Cc: stable-rt at vger.kernel.org
-
 ---
- kernel/locking/rtmutex.c |    2 +-
+ kernel/locking/rtmutex.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 4b2126de44bb..5138805ee66c 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1697,7 +1697,7 @@ int __rt_mutex_start_proxy_lock(struct r
+@@ -1697,7 +1697,7 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  		ret = 0;
  	}
  
diff --git a/debian/patches/features/all/rt/fs-dcache-include-wait.h.patch b/debian/patches/features/all/rt/0035-fs-dcache-include-wait.h.patch
similarity index 66%
rename from debian/patches/features/all/rt/fs-dcache-include-wait.h.patch
rename to debian/patches/features/all/rt/0035-fs-dcache-include-wait.h.patch
index d04baaf..7678f7b 100644
--- a/debian/patches/features/all/rt/fs-dcache-include-wait.h.patch
+++ b/debian/patches/features/all/rt/0035-fs-dcache-include-wait.h.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 14 Sep 2016 11:55:23 +0200
-Subject: fs/dcache: include wait.h
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 035/332] fs/dcache: include wait.h
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1aa8d486c7065205f59fa4c7b7ce73f2262c1a03
 
 Since commit d9171b934526 ("parallel lookups machinery, part 4 (and
 last)") dcache.h is using but does not include wait.h. It works as long
@@ -9,9 +9,11 @@ as it is included somehow earlier and fails otherwise.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/dcache.h |    1 +
+ include/linux/dcache.h | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/include/linux/dcache.h b/include/linux/dcache.h
+index ff295e166b2c..8b10a30f5087 100644
 --- a/include/linux/dcache.h
 +++ b/include/linux/dcache.h
 @@ -11,6 +11,7 @@
diff --git a/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch b/debian/patches/features/all/rt/0036-rbtree-include-rcu.h-because-we-use-it.patch
similarity index 65%
rename from debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch
rename to debian/patches/features/all/rt/0036-rbtree-include-rcu.h-because-we-use-it.patch
index 40523a0..c75297a 100644
--- a/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch
+++ b/debian/patches/features/all/rt/0036-rbtree-include-rcu.h-because-we-use-it.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 14 Sep 2016 11:52:17 +0200
-Subject: rbtree: include rcu.h because we use it
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 036/332] rbtree: include rcu.h because we use it
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6d90e681209776e95f32607abfdb39c247b16f82
 
 Since commit c1adf20052d8 ("Introduce rb_replace_node_rcu()")
 rbtree_augmented.h uses RCU related data structures but does not include
@@ -10,9 +10,11 @@ otherwise.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/rbtree_augmented.h |    1 +
+ include/linux/rbtree_augmented.h | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/include/linux/rbtree_augmented.h b/include/linux/rbtree_augmented.h
+index d076183e49be..36bfb4dd57ae 100644
 --- a/include/linux/rbtree_augmented.h
 +++ b/include/linux/rbtree_augmented.h
 @@ -26,6 +26,7 @@
diff --git a/debian/patches/features/all/rt/fs-dcache-init-in_lookup_hashtable.patch b/debian/patches/features/all/rt/0037-fs-dcache-init-in_lookup_hashtable.patch
similarity index 65%
rename from debian/patches/features/all/rt/fs-dcache-init-in_lookup_hashtable.patch
rename to debian/patches/features/all/rt/0037-fs-dcache-init-in_lookup_hashtable.patch
index a13ee5d..060d583 100644
--- a/debian/patches/features/all/rt/fs-dcache-init-in_lookup_hashtable.patch
+++ b/debian/patches/features/all/rt/0037-fs-dcache-init-in_lookup_hashtable.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 14 Sep 2016 17:57:03 +0200
-Subject: [PATCH] fs/dcache: init in_lookup_hashtable
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 037/332] fs/dcache: init in_lookup_hashtable
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2d74442e069521c2d6887c08462b4c872625451b
 
 in_lookup_hashtable was introduced in commit 94bdd655caba ("parallel
 lookups machinery, part 3") and never initialized but since it is in
@@ -9,12 +9,14 @@ the data it is all zeros. But we need this for -RT.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/dcache.c |    5 +++++
+ fs/dcache.c | 5 +++++
  1 file changed, 5 insertions(+)
 
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 67957f5b325c..10f848262852 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -3604,6 +3604,11 @@ EXPORT_SYMBOL(d_genocide);
+@@ -3632,6 +3632,11 @@ EXPORT_SYMBOL(d_genocide);
  
  void __init vfs_caches_init_early(void)
  {
diff --git a/debian/patches/features/all/rt/iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch b/debian/patches/features/all/rt/0038-iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
similarity index 76%
rename from debian/patches/features/all/rt/iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
rename to debian/patches/features/all/rt/0038-iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
index c4040ec..cb0d76a 100644
--- a/debian/patches/features/all/rt/iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
+++ b/debian/patches/features/all/rt/0038-iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 15 Sep 2016 16:58:19 +0200
-Subject: [PATCH] iommu/iova: don't disable preempt around this_cpu_ptr()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 038/332] iommu/iova: don't disable preempt around
+ this_cpu_ptr()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0550b939c845870cbeb828625e8140d469bebdf4
 
 Commit 583248e6620a ("iommu/iova: Disable preemption around use of
 this_cpu_ptr()") disables preemption while accessing a per-CPU variable.
@@ -22,9 +23,11 @@ protection against concurrent access).
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/iommu/iova.c |    9 +++------
+ drivers/iommu/iova.c | 9 +++------
  1 file changed, 3 insertions(+), 6 deletions(-)
 
+diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
+index e23001bfcfee..359d5d169ec0 100644
 --- a/drivers/iommu/iova.c
 +++ b/drivers/iommu/iova.c
 @@ -22,6 +22,7 @@
@@ -35,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static bool iova_rcache_insert(struct iova_domain *iovad,
  			       unsigned long pfn,
-@@ -420,10 +421,8 @@ alloc_iova_fast(struct iova_domain *iova
+@@ -420,10 +421,8 @@ alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
  
  		/* Try replenishing IOVAs by flushing rcache. */
  		flushed_rcache = true;
@@ -46,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		goto retry;
  	}
  
-@@ -751,7 +750,7 @@ static bool __iova_rcache_insert(struct
+@@ -751,7 +750,7 @@ static bool __iova_rcache_insert(struct iova_domain *iovad,
  	bool can_insert = false;
  	unsigned long flags;
  
@@ -55,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_lock_irqsave(&cpu_rcache->lock, flags);
  
  	if (!iova_magazine_full(cpu_rcache->loaded)) {
-@@ -781,7 +780,6 @@ static bool __iova_rcache_insert(struct
+@@ -781,7 +780,6 @@ static bool __iova_rcache_insert(struct iova_domain *iovad,
  		iova_magazine_push(cpu_rcache->loaded, iova_pfn);
  
  	spin_unlock_irqrestore(&cpu_rcache->lock, flags);
@@ -63,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (mag_to_free) {
  		iova_magazine_free_pfns(mag_to_free, iovad);
-@@ -815,7 +813,7 @@ static unsigned long __iova_rcache_get(s
+@@ -815,7 +813,7 @@ static unsigned long __iova_rcache_get(struct iova_rcache *rcache,
  	bool has_pfn = false;
  	unsigned long flags;
  
@@ -72,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_lock_irqsave(&cpu_rcache->lock, flags);
  
  	if (!iova_magazine_empty(cpu_rcache->loaded)) {
-@@ -837,7 +835,6 @@ static unsigned long __iova_rcache_get(s
+@@ -837,7 +835,6 @@ static unsigned long __iova_rcache_get(struct iova_rcache *rcache,
  		iova_pfn = iova_magazine_pop(cpu_rcache->loaded, limit_pfn);
  
  	spin_unlock_irqrestore(&cpu_rcache->lock, flags);
diff --git a/debian/patches/features/all/rt/iommu-vt-d-don-t-disable-preemption-while-accessing-.patch b/debian/patches/features/all/rt/0039-iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
similarity index 78%
rename from debian/patches/features/all/rt/iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
rename to debian/patches/features/all/rt/0039-iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
index 9318fbe..1daa884 100644
--- a/debian/patches/features/all/rt/iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
+++ b/debian/patches/features/all/rt/0039-iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
@@ -1,8 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 15 Sep 2016 17:16:44 +0200
-Subject: [PATCH] iommu/vt-d: don't disable preemption while accessing
+Subject: [PATCH 039/332] iommu/vt-d: don't disable preemption while accessing
  deferred_flush()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=47c65b1d49657aed75a1819650d6c960b6f52d1e
 
 get_cpu() disables preemption and returns the current CPU number. The
 CPU number is later only used once while retrieving the address of the
@@ -22,9 +22,11 @@ reference to it outside of this file.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/iommu/intel-iommu.c |    8 ++------
+ drivers/iommu/intel-iommu.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
 
+diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
+index 002f8a421efa..980f41f1a194 100644
 --- a/drivers/iommu/intel-iommu.c
 +++ b/drivers/iommu/intel-iommu.c
 @@ -479,7 +479,7 @@ struct deferred_flush_data {
@@ -36,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  /* bitmap for indexing intel_iommus */
  static int g_num_of_iommus;
-@@ -3719,10 +3719,8 @@ static void add_unmap(struct dmar_domain
+@@ -3719,10 +3719,8 @@ static void add_unmap(struct dmar_domain *dom, unsigned long iova_pfn,
  	struct intel_iommu *iommu;
  	struct deferred_flush_entry *entry;
  	struct deferred_flush_data *flush_data;
@@ -48,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* Flush all CPUs' entries to avoid deferring too much.  If
  	 * this becomes a bottleneck, can just flush us, and rely on
-@@ -3755,8 +3753,6 @@ static void add_unmap(struct dmar_domain
+@@ -3755,8 +3753,6 @@ static void add_unmap(struct dmar_domain *dom, unsigned long iova_pfn,
  	}
  	flush_data->size++;
  	spin_unlock_irqrestore(&flush_data->lock, flags);
diff --git a/debian/patches/features/all/rt/x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch b/debian/patches/features/all/rt/0040-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
similarity index 77%
rename from debian/patches/features/all/rt/x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
rename to debian/patches/features/all/rt/0040-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
index 29012dd..75ae90b 100644
--- a/debian/patches/features/all/rt/x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
+++ b/debian/patches/features/all/rt/0040-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
@@ -1,8 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 21 Oct 2016 10:29:11 +0200
-Subject: [PATCH] x86/apic: get rid of "warning: 'acpi_ioapic_lock' defined but
- not used"
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 040/332] x86/apic: get rid of "warning: 'acpi_ioapic_lock'
+ defined but not used"
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d130761cffed30ce550f7d0180b861de6b19ff62
 
 kbuild test robot reported this against the -RT tree:
 
@@ -27,12 +27,14 @@ emit a warning.
 Reported-by: kbuild test robot <fengguang.wu at intel.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/kernel/acpi/boot.c |    2 ++
+ arch/x86/kernel/acpi/boot.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
+index d3e0d049a0c2..11e572561960 100644
 --- a/arch/x86/kernel/acpi/boot.c
 +++ b/arch/x86/kernel/acpi/boot.c
-@@ -87,7 +87,9 @@ static u64 acpi_lapic_addr __initdata =
+@@ -87,7 +87,9 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
   *		->ioapic_mutex
   *			->ioapic_lock
   */
diff --git a/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch b/debian/patches/features/all/rt/0041-rxrpc-remove-unused-static-variables.patch
similarity index 72%
rename from debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch
rename to debian/patches/features/all/rt/0041-rxrpc-remove-unused-static-variables.patch
index 1045320..7a60b20 100644
--- a/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch
+++ b/debian/patches/features/all/rt/0041-rxrpc-remove-unused-static-variables.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 21 Oct 2016 10:54:50 +0200
-Subject: [PATCH] rxrpc: remove unused static variables
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 041/332] rxrpc: remove unused static variables
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a5ef62460313def4ed04cbbdf479905bb93c29a7
 
 The rxrpc_security_methods and rxrpc_security_sem user has been removed
 in 648af7fca159 ("rxrpc: Absorb the rxkad security module"). This was
@@ -10,9 +10,11 @@ noticed by kbuild test robot for the -RT tree but is also true for !RT.
 Reported-by: kbuild test robot <fengguang.wu at intel.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/rxrpc/security.c |    3 ---
+ net/rxrpc/security.c | 3 ---
  1 file changed, 3 deletions(-)
 
+diff --git a/net/rxrpc/security.c b/net/rxrpc/security.c
+index 7d921e56e715..13df56a738e5 100644
 --- a/net/rxrpc/security.c
 +++ b/net/rxrpc/security.c
 @@ -19,9 +19,6 @@
diff --git a/debian/patches/features/all/rt/rcu-update-make-RCU_EXPEDITE_BOOT-default.patch b/debian/patches/features/all/rt/0042-rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
similarity index 79%
rename from debian/patches/features/all/rt/rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
rename to debian/patches/features/all/rt/0042-rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
index a0234c9..5890e26 100644
--- a/debian/patches/features/all/rt/rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
+++ b/debian/patches/features/all/rt/0042-rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 2 Nov 2016 16:45:58 +0100
-Subject: [PATCH] rcu: update: make RCU_EXPEDITE_BOOT default
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 042/332] rcu: update: make RCU_EXPEDITE_BOOT default
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d34e9ba78c899206b84bb1c272434918cb85f0c5
 
 RCU_EXPEDITE_BOOT should speed up the boot process by enforcing
 synchronize_rcu_expedited() instead of synchronize_rcu() during the boot
@@ -11,10 +11,12 @@ Therefore make it default.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- init/Kconfig        |   13 -------------
- kernel/rcu/update.c |    6 ++----
+ init/Kconfig        | 13 -------------
+ kernel/rcu/update.c |  6 ++----
  2 files changed, 2 insertions(+), 17 deletions(-)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index 34407f15e6d3..ea73e8a9e89e 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -781,19 +781,6 @@ config RCU_NOCB_CPU_ALL
@@ -37,6 +39,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  endmenu # "RCU Subsystem"
  
  config BUILD_BIN2C
+diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
+index 4f6db7e6a117..019b4708c9fa 100644
 --- a/kernel/rcu/update.c
 +++ b/kernel/rcu/update.c
 @@ -132,8 +132,7 @@ bool rcu_gp_is_normal(void)
diff --git a/debian/patches/features/all/rt/locking-percpu-rwsem-use-swait-for-the-wating-writer.patch b/debian/patches/features/all/rt/0043-locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
similarity index 70%
rename from debian/patches/features/all/rt/locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
rename to debian/patches/features/all/rt/0043-locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
index 2865e74..5870e09 100644
--- a/debian/patches/features/all/rt/locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
+++ b/debian/patches/features/all/rt/0043-locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 21 Nov 2016 19:26:15 +0100
-Subject: [PATCH] locking/percpu-rwsem: use swait for the wating writer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 043/332] locking/percpu-rwsem: use swait for the wating writer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8314802da7deb627cbe6d8d97dc568845fc2a7ea
 
 Use struct swait_queue_head instead of wait_queue_head_t for the waiting
 writer. The swait implementation is smaller and lightweight compared to
@@ -9,10 +9,12 @@ wait_queue_head_t.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/percpu-rwsem.h  |    6 +++---
- kernel/locking/percpu-rwsem.c |    6 +++---
+ include/linux/percpu-rwsem.h  | 6 +++---
+ kernel/locking/percpu-rwsem.c | 6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)
 
+diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h
+index 5b2e6159b744..82d54a4b9988 100644
 --- a/include/linux/percpu-rwsem.h
 +++ b/include/linux/percpu-rwsem.h
 @@ -4,7 +4,7 @@
@@ -33,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int			readers_block;
  };
  
-@@ -22,7 +22,7 @@ static struct percpu_rw_semaphore name =
+@@ -22,7 +22,7 @@ static struct percpu_rw_semaphore name = {				\
  	.rss = __RCU_SYNC_INITIALIZER(name.rss, RCU_SCHED_SYNC),	\
  	.read_count = &__percpu_rwsem_rc_##name,			\
  	.rw_sem = __RWSEM_INITIALIZER(name.rw_sem),			\
@@ -42,9 +44,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  extern int __percpu_down_read(struct percpu_rw_semaphore *, int);
+diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c
+index ce182599cf2e..2ad3a1e8344c 100644
 --- a/kernel/locking/percpu-rwsem.c
 +++ b/kernel/locking/percpu-rwsem.c
-@@ -18,7 +18,7 @@ int __percpu_init_rwsem(struct percpu_rw
+@@ -18,7 +18,7 @@ int __percpu_init_rwsem(struct percpu_rw_semaphore *sem,
  	/* ->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);
@@ -53,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	sem->readers_block = 0;
  	return 0;
  }
-@@ -103,7 +103,7 @@ void __percpu_up_read(struct percpu_rw_s
+@@ -103,7 +103,7 @@ void __percpu_up_read(struct percpu_rw_semaphore *sem)
  	__this_cpu_dec(*sem->read_count);
  
  	/* Prod writer to recheck readers_active */
@@ -62,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(__percpu_up_read);
  
-@@ -160,7 +160,7 @@ void percpu_down_write(struct percpu_rw_
+@@ -160,7 +160,7 @@ void percpu_down_write(struct percpu_rw_semaphore *sem)
  	 */
  
  	/* Wait for all now active readers to complete. */
diff --git a/debian/patches/features/all/rt/pinctrl-qcom-Use-raw-spinlock-variants.patch b/debian/patches/features/all/rt/0044-pinctrl-qcom-Use-raw-spinlock-variants.patch
similarity index 77%
rename from debian/patches/features/all/rt/pinctrl-qcom-Use-raw-spinlock-variants.patch
rename to debian/patches/features/all/rt/0044-pinctrl-qcom-Use-raw-spinlock-variants.patch
index 8119658..9dd26f0 100644
--- a/debian/patches/features/all/rt/pinctrl-qcom-Use-raw-spinlock-variants.patch
+++ b/debian/patches/features/all/rt/0044-pinctrl-qcom-Use-raw-spinlock-variants.patch
@@ -1,7 +1,7 @@
 From: Julia Cartwright <julia at ni.com>
 Date: Fri, 20 Jan 2017 10:13:47 -0600
-Subject: [PATCH] pinctrl: qcom: Use raw spinlock variants
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 044/332] pinctrl: qcom: Use raw spinlock variants
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5ea64550af4dcca5e951b8f556f383fafdcc8ce5
 
 The MSM pinctrl driver currently implements an irq_chip for handling
 GPIO interrupts; due to how irq_chip handling is done, it's necessary
@@ -41,9 +41,11 @@ Tested-by: Brian Wrenn <dcbrianw at gmail.com>
 Signed-off-by: Julia Cartwright <julia at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/pinctrl/qcom/pinctrl-msm.c |   48 ++++++++++++++++++-------------------
+ drivers/pinctrl/qcom/pinctrl-msm.c | 48 +++++++++++++++++++-------------------
  1 file changed, 24 insertions(+), 24 deletions(-)
 
+diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
+index bedce3453dd3..faf038978650 100644
 --- a/drivers/pinctrl/qcom/pinctrl-msm.c
 +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
 @@ -61,7 +61,7 @@ struct msm_pinctrl {
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO);
  	DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO);
-@@ -153,14 +153,14 @@ static int msm_pinmux_set_mux(struct pin
+@@ -153,14 +153,14 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev,
  	if (WARN_ON(i == g->nfuncs))
  		return -EINVAL;
  
@@ -72,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -323,14 +323,14 @@ static int msm_config_group_set(struct p
+@@ -323,14 +323,14 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
  			break;
  		case PIN_CONFIG_OUTPUT:
  			/* set output value */
@@ -89,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  			/* enable output */
  			arg = 1;
-@@ -351,12 +351,12 @@ static int msm_config_group_set(struct p
+@@ -351,12 +351,12 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
  			return -EINVAL;
  		}
  
@@ -104,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	return 0;
-@@ -384,13 +384,13 @@ static int msm_gpio_direction_input(stru
+@@ -384,13 +384,13 @@ static int msm_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
  
  	g = &pctrl->soc->groups[offset];
  
@@ -120,7 +122,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -404,7 +404,7 @@ static int msm_gpio_direction_output(str
+@@ -404,7 +404,7 @@ static int msm_gpio_direction_output(struct gpio_chip *chip, unsigned offset, in
  
  	g = &pctrl->soc->groups[offset];
  
@@ -129,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	val = readl(pctrl->regs + g->io_reg);
  	if (value)
-@@ -417,7 +417,7 @@ static int msm_gpio_direction_output(str
+@@ -417,7 +417,7 @@ static int msm_gpio_direction_output(struct gpio_chip *chip, unsigned offset, in
  	val |= BIT(g->oe_bit);
  	writel(val, pctrl->regs + g->ctl_reg);
  
@@ -138,7 +140,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -443,7 +443,7 @@ static void msm_gpio_set(struct gpio_chi
+@@ -443,7 +443,7 @@ static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
  
  	g = &pctrl->soc->groups[offset];
  
@@ -147,7 +149,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	val = readl(pctrl->regs + g->io_reg);
  	if (value)
-@@ -452,7 +452,7 @@ static void msm_gpio_set(struct gpio_chi
+@@ -452,7 +452,7 @@ static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
  		val &= ~BIT(g->out_bit);
  	writel(val, pctrl->regs + g->io_reg);
  
@@ -156,7 +158,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  #ifdef CONFIG_DEBUG_FS
-@@ -571,7 +571,7 @@ static void msm_gpio_irq_mask(struct irq
+@@ -571,7 +571,7 @@ static void msm_gpio_irq_mask(struct irq_data *d)
  
  	g = &pctrl->soc->groups[d->hwirq];
  
@@ -165,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	val = readl(pctrl->regs + g->intr_cfg_reg);
  	val &= ~BIT(g->intr_enable_bit);
-@@ -579,7 +579,7 @@ static void msm_gpio_irq_mask(struct irq
+@@ -579,7 +579,7 @@ static void msm_gpio_irq_mask(struct irq_data *d)
  
  	clear_bit(d->hwirq, pctrl->enabled_irqs);
  
@@ -174,7 +176,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void msm_gpio_irq_unmask(struct irq_data *d)
-@@ -592,7 +592,7 @@ static void msm_gpio_irq_unmask(struct i
+@@ -592,7 +592,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
  
  	g = &pctrl->soc->groups[d->hwirq];
  
@@ -183,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	val = readl(pctrl->regs + g->intr_cfg_reg);
  	val |= BIT(g->intr_enable_bit);
-@@ -600,7 +600,7 @@ static void msm_gpio_irq_unmask(struct i
+@@ -600,7 +600,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d)
  
  	set_bit(d->hwirq, pctrl->enabled_irqs);
  
@@ -192,7 +194,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void msm_gpio_irq_ack(struct irq_data *d)
-@@ -613,7 +613,7 @@ static void msm_gpio_irq_ack(struct irq_
+@@ -613,7 +613,7 @@ static void msm_gpio_irq_ack(struct irq_data *d)
  
  	g = &pctrl->soc->groups[d->hwirq];
  
@@ -201,7 +203,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	val = readl(pctrl->regs + g->intr_status_reg);
  	if (g->intr_ack_high)
-@@ -625,7 +625,7 @@ static void msm_gpio_irq_ack(struct irq_
+@@ -625,7 +625,7 @@ static void msm_gpio_irq_ack(struct irq_data *d)
  	if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
  		msm_gpio_update_dual_edge_pos(pctrl, g, d);
  
@@ -210,7 +212,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
-@@ -638,7 +638,7 @@ static int msm_gpio_irq_set_type(struct
+@@ -638,7 +638,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
  
  	g = &pctrl->soc->groups[d->hwirq];
  
@@ -219,7 +221,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * For hw without possibility of detecting both edges
-@@ -712,7 +712,7 @@ static int msm_gpio_irq_set_type(struct
+@@ -712,7 +712,7 @@ static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
  	if (test_bit(d->hwirq, pctrl->dual_edge_irqs))
  		msm_gpio_update_dual_edge_pos(pctrl, g, d);
  
@@ -228,7 +230,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
  		irq_set_handler_locked(d, handle_level_irq);
-@@ -728,11 +728,11 @@ static int msm_gpio_irq_set_wake(struct
+@@ -728,11 +728,11 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
  	struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
  	unsigned long flags;
  
@@ -242,7 +244,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return 0;
  }
-@@ -878,7 +878,7 @@ int msm_pinctrl_probe(struct platform_de
+@@ -878,7 +878,7 @@ int msm_pinctrl_probe(struct platform_device *pdev,
  	pctrl->soc = soc_data;
  	pctrl->chip = msm_gpio_template;
  
diff --git a/debian/patches/features/all/rt/x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch b/debian/patches/features/all/rt/0045-x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
similarity index 72%
rename from debian/patches/features/all/rt/x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
rename to debian/patches/features/all/rt/0045-x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
index 6dc764e..c34772f 100644
--- a/debian/patches/features/all/rt/x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
+++ b/debian/patches/features/all/rt/0045-x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
@@ -1,7 +1,7 @@
 From: John Ogness <john.ogness at linutronix.de>
 Date: Mon, 30 Jan 2017 09:41:21 +0100
-Subject: [PATCH] x86/mm/cpa: avoid wbinvd() for PREEMPT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 045/332] x86/mm/cpa: avoid wbinvd() for PREEMPT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c6d9127f2940f9240356fd3a1af7671ae56359b4
 
 Although wbinvd() is faster than flushing many individual pages, it
 blocks the memory bus for "long" periods of time (>100us), thus
@@ -16,12 +16,14 @@ Acked-by: Peter Zijlstra (Intel) <peterz at infradead.org>
 Signed-off-by: John Ogness <john.ogness at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/mm/pageattr.c |    8 ++++++++
+ arch/x86/mm/pageattr.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
+diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
+index e3353c97d086..01664968555c 100644
 --- a/arch/x86/mm/pageattr.c
 +++ b/arch/x86/mm/pageattr.c
-@@ -214,7 +214,15 @@ static void cpa_flush_array(unsigned lon
+@@ -214,7 +214,15 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache,
  			    int in_flags, struct page **pages)
  {
  	unsigned int i, level;
diff --git a/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch b/debian/patches/features/all/rt/0046-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
similarity index 73%
rename from debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
rename to debian/patches/features/all/rt/0046-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
index f65cf1d..b59022b 100644
--- a/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
+++ b/debian/patches/features/all/rt/0046-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
@@ -1,11 +1,7 @@
-Date:   Fri, 28 Oct 2016 23:05:11 +0200
-From:   Sebastian Andrzej Siewior <bigeasy at linutronix.de>
-To:     Trond Myklebust <trond.myklebust at primarydata.com>
-Cc:     Anna Schumaker <anna.schumaker at netapp.com>,
-        linux-nfs at vger.kernel.org, linux-kernel at vger.kernel.org,
-        tglx at linutronix.de
-Subject: NFSv4: replace seqcount_t with a seqlock_t
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+Date: Fri, 28 Oct 2016 23:05:11 +0200
+Subject: [PATCH 046/332] NFSv4: replace seqcount_t with a seqlock_t
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9ef876a736a7ac353a96ee43005e82708f97e880
 
 The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me
 because it maps to preempt_disable() in -RT which I can't have at this
@@ -23,15 +19,17 @@ block readers).
 Reported-by: kernel test robot <xiaolong.ye at intel.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/nfs/delegation.c |    4 ++--
- fs/nfs/nfs4_fs.h    |    2 +-
- fs/nfs/nfs4proc.c   |    4 ++--
- fs/nfs/nfs4state.c  |   22 ++++++++++++++++------
+ fs/nfs/delegation.c |  4 ++--
+ fs/nfs/nfs4_fs.h    |  2 +-
+ fs/nfs/nfs4proc.c   |  4 ++--
+ fs/nfs/nfs4state.c  | 22 ++++++++++++++++------
  4 files changed, 21 insertions(+), 11 deletions(-)
 
+diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
+index dff600ae0d74..d726d2e09353 100644
 --- a/fs/nfs/delegation.c
 +++ b/fs/nfs/delegation.c
-@@ -150,11 +150,11 @@ static int nfs_delegation_claim_opens(st
+@@ -150,11 +150,11 @@ static int nfs_delegation_claim_opens(struct inode *inode,
  		sp = state->owner;
  		/* Block nfs4_proc_unlck */
  		mutex_lock(&sp->so_delegreturn_mutex);
@@ -45,6 +43,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			err = -EAGAIN;
  		mutex_unlock(&sp->so_delegreturn_mutex);
  		put_nfs_open_context(ctx);
+diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
+index 1452177c822d..f43b01d54c59 100644
 --- a/fs/nfs/nfs4_fs.h
 +++ b/fs/nfs/nfs4_fs.h
 @@ -111,7 +111,7 @@ struct nfs4_state_owner {
@@ -56,9 +56,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct mutex	     so_delegreturn_mutex;
  };
  
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
+index a53b8e0c896a..da0a483c5442 100644
 --- a/fs/nfs/nfs4proc.c
 +++ b/fs/nfs/nfs4proc.c
-@@ -2697,7 +2697,7 @@ static int _nfs4_open_and_get_state(stru
+@@ -2695,7 +2695,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
  	unsigned int seq;
  	int ret;
  
@@ -67,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	ret = _nfs4_proc_open(opendata);
  	if (ret != 0)
-@@ -2735,7 +2735,7 @@ static int _nfs4_open_and_get_state(stru
+@@ -2733,7 +2733,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
  
  	if (d_inode(dentry) == state->inode) {
  		nfs_inode_attach_open_context(ctx);
@@ -76,9 +78,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			nfs4_schedule_stateid_recovery(server, state);
  	}
  out:
+diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
+index 92671914067f..44038480c88c 100644
 --- a/fs/nfs/nfs4state.c
 +++ b/fs/nfs/nfs4state.c
-@@ -488,7 +488,7 @@ nfs4_alloc_state_owner(struct nfs_server
+@@ -488,7 +488,7 @@ nfs4_alloc_state_owner(struct nfs_server *server,
  	nfs4_init_seqid_counter(&sp->so_seqid);
  	atomic_set(&sp->so_count, 1);
  	INIT_LIST_HEAD(&sp->so_lru);
@@ -87,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	mutex_init(&sp->so_delegreturn_mutex);
  	return sp;
  }
-@@ -1497,8 +1497,12 @@ static int nfs4_reclaim_open_state(struc
+@@ -1498,8 +1498,12 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
  	 * recovering after a network partition or a reboot from a
  	 * server that doesn't support a grace period.
  	 */
@@ -101,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  restart:
  	list_for_each_entry(state, &sp->so_states, open_states) {
  		if (!test_and_clear_bit(ops->state_flag_bit, &state->flags))
-@@ -1567,14 +1571,20 @@ static int nfs4_reclaim_open_state(struc
+@@ -1568,14 +1572,20 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
  		spin_lock(&sp->so_lock);
  		goto restart;
  	}
diff --git a/debian/patches/features/all/rt/sparc64-use-generic-rwsem-spinlocks-rt.patch b/debian/patches/features/all/rt/0047-sparc64-use-generic-rwsem-spinlocks-rt.patch
similarity index 65%
rename from debian/patches/features/all/rt/sparc64-use-generic-rwsem-spinlocks-rt.patch
rename to debian/patches/features/all/rt/0047-sparc64-use-generic-rwsem-spinlocks-rt.patch
index 4ba595a..0cd041c 100644
--- a/debian/patches/features/all/rt/sparc64-use-generic-rwsem-spinlocks-rt.patch
+++ b/debian/patches/features/all/rt/0047-sparc64-use-generic-rwsem-spinlocks-rt.patch
@@ -1,14 +1,16 @@
 From: Allen Pais <allen.pais at oracle.com>
 Date: Fri, 13 Dec 2013 09:44:41 +0530
-Subject: sparc64: use generic rwsem spinlocks rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 047/332] sparc64: use generic rwsem spinlocks rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=169620a1ab2f3b12620e0342d56a88c3239ed6eb
 
 Signed-off-by: Allen Pais <allen.pais at oracle.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/sparc/Kconfig |    6 ++----
+ arch/sparc/Kconfig | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
 
+diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
+index b27e48e25841..2965bf76d070 100644
 --- a/arch/sparc/Kconfig
 +++ b/arch/sparc/Kconfig
 @@ -194,12 +194,10 @@ config NR_CPUS
diff --git a/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch b/debian/patches/features/all/rt/0048-kernel-SRCU-provide-a-static-initializer.patch
similarity index 82%
rename from debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch
rename to debian/patches/features/all/rt/0048-kernel-SRCU-provide-a-static-initializer.patch
index 8b2aa70..0f047ef 100644
--- a/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch
+++ b/debian/patches/features/all/rt/0048-kernel-SRCU-provide-a-static-initializer.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 19 Mar 2013 14:44:30 +0100
-Subject: kernel/SRCU: provide a static initializer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 048/332] kernel/SRCU: provide a static initializer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1573b194120448cae9fb9b11007710281a4b9d80
 
 There are macros for static initializer for the three out of four
 possible notifier types, that are:
@@ -14,10 +14,12 @@ complete.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/notifier.h |   34 +++++++++++++++++++++++++---------
- include/linux/srcu.h     |    6 +++---
+ include/linux/notifier.h | 34 +++++++++++++++++++++++++---------
+ include/linux/srcu.h     |  6 +++---
  2 files changed, 28 insertions(+), 12 deletions(-)
 
+diff --git a/include/linux/notifier.h b/include/linux/notifier.h
+index 4149868de4e6..babe5b9bcb91 100644
 --- a/include/linux/notifier.h
 +++ b/include/linux/notifier.h
 @@ -6,7 +6,7 @@
@@ -49,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
  #define srcu_cleanup_notifier_head(name)	\
  		cleanup_srcu_struct(&(name)->srcu);
-@@ -103,7 +101,13 @@ extern void srcu_init_notifier_head(stru
+@@ -103,7 +101,13 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
  		.head = NULL }
  #define RAW_NOTIFIER_INIT(name)	{				\
  		.head = NULL }
@@ -64,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #define ATOMIC_NOTIFIER_HEAD(name)				\
  	struct atomic_notifier_head name =			\
-@@ -115,6 +119,18 @@ extern void srcu_init_notifier_head(stru
+@@ -115,6 +119,18 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
  	struct raw_notifier_head name =				\
  		RAW_NOTIFIER_INIT(name)
  
@@ -83,7 +85,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #ifdef __KERNEL__
  
  extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
-@@ -184,12 +200,12 @@ static inline int notifier_to_errno(int
+@@ -184,12 +200,12 @@ static inline int notifier_to_errno(int ret)
  
  /*
   *	Declared notifiers so far. I can imagine quite a few more chains
@@ -99,9 +101,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /* CPU notfiers are defined in include/linux/cpu.h. */
  
  /* netdevice notifiers are defined in include/linux/netdevice.h */
+diff --git a/include/linux/srcu.h b/include/linux/srcu.h
+index dc8eb63c6568..e793d3a257da 100644
 --- a/include/linux/srcu.h
 +++ b/include/linux/srcu.h
-@@ -84,10 +84,10 @@ int init_srcu_struct(struct srcu_struct
+@@ -84,10 +84,10 @@ int init_srcu_struct(struct srcu_struct *sp);
  
  void process_srcu(struct work_struct *work);
  
@@ -114,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		.queue_lock = __SPIN_LOCK_UNLOCKED(name.queue_lock),	\
  		.running = false,					\
  		.batch_queue = RCU_BATCH_INIT(name.batch_queue),	\
-@@ -119,7 +119,7 @@ void process_srcu(struct work_struct *wo
+@@ -119,7 +119,7 @@ void process_srcu(struct work_struct *work);
   */
  #define __DEFINE_SRCU(name, is_static)					\
  	static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
diff --git a/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch b/debian/patches/features/all/rt/0049-block-Shorten-interrupt-disabled-regions.patch
similarity index 79%
rename from debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch
rename to debian/patches/features/all/rt/0049-block-Shorten-interrupt-disabled-regions.patch
index 77e4894..8afd57d 100644
--- a/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch
+++ b/debian/patches/features/all/rt/0049-block-Shorten-interrupt-disabled-regions.patch
@@ -1,7 +1,7 @@
-Subject: block: Shorten interrupt disabled regions
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 22 Jun 2011 19:47:02 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 049/332] block: Shorten interrupt disabled regions
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=782c161b4cd5f10646cf0f9ea02f58a9aa986e91
 
 Moving the blk_sched_flush_plug() call out of the interrupt/preempt
 disabled region in the scheduler allows us to replace
@@ -43,12 +43,14 @@ Cc: Jens Axboe <axboe at kernel.dk>
 Cc: Linus Torvalds <torvalds at linux-foundation.org>
 Link: http://lkml.kernel.org/r/20110622174919.025446432@linutronix.de
 ---
- block/blk-core.c |   12 ++----------
+ block/blk-core.c | 12 ++----------
  1 file changed, 2 insertions(+), 10 deletions(-)
 
+diff --git a/block/blk-core.c b/block/blk-core.c
+index d1f2801ce836..5174ef3d7580 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
-@@ -3200,7 +3200,7 @@ static void queue_unplugged(struct reque
+@@ -3200,7 +3200,7 @@ static void queue_unplugged(struct request_queue *q, unsigned int depth,
  		blk_run_queue_async(q);
  	else
  		__blk_run_queue(q);
@@ -65,7 +67,7 @@ Link: http://lkml.kernel.org/r/20110622174919.025446432@linutronix.de
  	struct request *rq;
  	LIST_HEAD(list);
  	unsigned int depth;
-@@ -3268,11 +3267,6 @@ void blk_flush_plug_list(struct blk_plug
+@@ -3268,11 +3267,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
  	q = NULL;
  	depth = 0;
  
@@ -77,7 +79,7 @@ Link: http://lkml.kernel.org/r/20110622174919.025446432@linutronix.de
  	while (!list_empty(&list)) {
  		rq = list_entry_rq(list.next);
  		list_del_init(&rq->queuelist);
-@@ -3285,7 +3279,7 @@ void blk_flush_plug_list(struct blk_plug
+@@ -3285,7 +3279,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
  				queue_unplugged(q, depth, from_schedule);
  			q = rq->q;
  			depth = 0;
@@ -86,7 +88,7 @@ Link: http://lkml.kernel.org/r/20110622174919.025446432@linutronix.de
  		}
  
  		/*
-@@ -3312,8 +3306,6 @@ void blk_flush_plug_list(struct blk_plug
+@@ -3312,8 +3306,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule)
  	 */
  	if (q)
  		queue_unplugged(q, depth, from_schedule);
diff --git a/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch b/debian/patches/features/all/rt/0050-timekeeping-Split-jiffies-seqlock.patch
similarity index 73%
rename from debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch
rename to debian/patches/features/all/rt/0050-timekeeping-Split-jiffies-seqlock.patch
index 26597cc..1107bdd 100644
--- a/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch
+++ b/debian/patches/features/all/rt/0050-timekeeping-Split-jiffies-seqlock.patch
@@ -1,23 +1,25 @@
-Subject: timekeeping: Split jiffies seqlock
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 14 Feb 2013 22:36:59 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 050/332] timekeeping: Split jiffies seqlock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=10b749478503a1ed5ab9a55163192030c9eda962
 
 Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so
 it can be taken in atomic context on RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/time/jiffies.c     |    7 ++++---
- kernel/time/tick-common.c |   10 ++++++----
- kernel/time/tick-sched.c  |   19 ++++++++++++-------
- kernel/time/timekeeping.c |    6 ++++--
- kernel/time/timekeeping.h |    3 ++-
+ kernel/time/jiffies.c     |  7 ++++---
+ kernel/time/tick-common.c | 10 ++++++----
+ kernel/time/tick-sched.c  | 19 ++++++++++++-------
+ kernel/time/timekeeping.c |  6 ++++--
+ kernel/time/timekeeping.h |  3 ++-
  5 files changed, 28 insertions(+), 17 deletions(-)
 
+diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
+index 555e21f7b966..a5d6435fabbb 100644
 --- a/kernel/time/jiffies.c
 +++ b/kernel/time/jiffies.c
-@@ -74,7 +74,8 @@ static struct clocksource clocksource_ji
+@@ -74,7 +74,8 @@ static struct clocksource clocksource_jiffies = {
  	.max_cycles	= 10,
  };
  
@@ -39,6 +41,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return ret;
  }
  EXPORT_SYMBOL(get_jiffies_64);
+diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
+index 4fcd99e12aa0..5a47f2e98faf 100644
 --- a/kernel/time/tick-common.c
 +++ b/kernel/time/tick-common.c
 @@ -79,13 +79,15 @@ int tick_is_oneshot_available(void)
@@ -59,7 +63,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		update_wall_time();
  	}
  
-@@ -157,9 +159,9 @@ void tick_setup_periodic(struct clock_ev
+@@ -157,9 +159,9 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
  		ktime_t next;
  
  		do {
@@ -71,9 +75,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT);
  
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 3bcb61b52f6c..10cb224cb9d4 100644
 --- a/kernel/time/tick-sched.c
 +++ b/kernel/time/tick-sched.c
-@@ -62,7 +62,8 @@ static void tick_do_update_jiffies64(kti
+@@ -62,7 +62,8 @@ static void tick_do_update_jiffies64(ktime_t now)
  		return;
  
  	/* Reevaluate with jiffies_lock held */
@@ -83,7 +89,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	delta = ktime_sub(now, last_jiffies_update);
  	if (delta.tv64 >= tick_period.tv64) {
-@@ -85,10 +86,12 @@ static void tick_do_update_jiffies64(kti
+@@ -85,10 +86,12 @@ static void tick_do_update_jiffies64(ktime_t now)
  		/* Keep the tick_next_period variable up to date */
  		tick_next_period = ktime_add(last_jiffies_update, tick_period);
  	} else {
@@ -98,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	update_wall_time();
  }
  
-@@ -99,12 +102,14 @@ static ktime_t tick_init_jiffy_update(vo
+@@ -99,12 +102,14 @@ static ktime_t tick_init_jiffy_update(void)
  {
  	ktime_t period;
  
@@ -115,7 +121,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return period;
  }
  
-@@ -673,10 +678,10 @@ static ktime_t tick_nohz_stop_sched_tick
+@@ -673,10 +678,10 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
  
  	/* Read jiffies and the time when jiffies were updated last */
  	do {
@@ -128,9 +134,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	ts->last_jiffies = basejiff;
  
  	if (rcu_needs_cpu(basemono, &next_rcu) ||
+diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
+index d831827d7ab0..76d982c11ac3 100644
 --- a/kernel/time/timekeeping.c
 +++ b/kernel/time/timekeeping.c
-@@ -2328,8 +2328,10 @@ EXPORT_SYMBOL(hardpps);
+@@ -2348,8 +2348,10 @@ EXPORT_SYMBOL(hardpps);
   */
  void xtime_update(unsigned long ticks)
  {
@@ -143,6 +151,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	raw_spin_unlock(&jiffies_lock);
  	update_wall_time();
  }
+diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h
+index 704f595ce83f..763a3e5121ff 100644
 --- a/kernel/time/timekeeping.h
 +++ b/kernel/time/timekeeping.h
 @@ -19,7 +19,8 @@ extern void timekeeping_resume(void);
diff --git a/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch b/debian/patches/features/all/rt/0051-tracing-Account-for-preempt-off-in-preempt_schedule.patch
similarity index 78%
rename from debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch
rename to debian/patches/features/all/rt/0051-tracing-Account-for-preempt-off-in-preempt_schedule.patch
index e842e15..ddb3c23 100644
--- a/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch
+++ b/debian/patches/features/all/rt/0051-tracing-Account-for-preempt-off-in-preempt_schedule.patch
@@ -1,7 +1,8 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Thu, 29 Sep 2011 12:24:30 -0500
-Subject: tracing: Account for preempt off in preempt_schedule()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 051/332] tracing: Account for preempt off in
+ preempt_schedule()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=85272b3622715d60d4751f6d66c40d923917098e
 
 The preempt_schedule() uses the preempt_disable_notrace() version
 because it can cause infinite recursion by the function tracer as
@@ -23,12 +24,14 @@ Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Clark Williams <williams at redhat.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/sched/core.c |    9 +++++++++
+ kernel/sched/core.c | 9 +++++++++
  1 file changed, 9 insertions(+)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 85d7540fe468..36698b5fb0c7 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3583,7 +3583,16 @@ asmlinkage __visible void __sched notrac
+@@ -3583,7 +3583,16 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
  		 * an infinite recursion.
  		 */
  		prev_ctx = exception_enter();
diff --git a/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches/features/all/rt/0052-signal-Revert-ptrace-preempt-magic.patch
similarity index 66%
rename from debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch
rename to debian/patches/features/all/rt/0052-signal-Revert-ptrace-preempt-magic.patch
index e55cee7..42654eb 100644
--- a/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch
+++ b/debian/patches/features/all/rt/0052-signal-Revert-ptrace-preempt-magic.patch
@@ -1,7 +1,7 @@
-Subject: signal: Revert ptrace preempt magic
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 21 Sep 2011 19:57:12 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 052/332] signal: Revert ptrace preempt magic
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cd3f477bccf7d256a7d235ec5732ad2aec5e3daf
 
 Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more
 than a bandaid around the ptrace design trainwreck. It's not a
@@ -9,12 +9,14 @@ correctness issue, it's merily a cosmetic bandaid.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/signal.c |    8 --------
+ kernel/signal.c | 8 --------
  1 file changed, 8 deletions(-)
 
+diff --git a/kernel/signal.c b/kernel/signal.c
+index e48668c3c972..4d58564ac7e3 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1846,15 +1846,7 @@ static void ptrace_stop(int exit_code, i
+@@ -1854,15 +1854,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
  		if (gstop_done && ptrace_reparented(current))
  			do_notify_parent_cldstop(current, false, why);
  
diff --git a/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch b/debian/patches/features/all/rt/0053-arm-Convert-arm-boot_lock-to-raw.patch
similarity index 70%
rename from debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch
rename to debian/patches/features/all/rt/0053-arm-Convert-arm-boot_lock-to-raw.patch
index bc89fdf..27c97a6 100644
--- a/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch
+++ b/debian/patches/features/all/rt/0053-arm-Convert-arm-boot_lock-to-raw.patch
@@ -1,7 +1,7 @@
 From: Frank Rowand <frank.rowand at am.sony.com>
 Date: Mon, 19 Sep 2011 14:51:14 -0700
-Subject: arm: Convert arm boot_lock to raw
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 053/332] arm: Convert arm boot_lock to raw
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=de56fd27a4b2977231efa5c16f94efec22b93f54
 
 The arm boot_lock is used by the secondary processor startup code.  The locking
 task is the idle thread, which has idle->sched_class == &idle_sched_class.
@@ -20,16 +20,18 @@ Signed-off-by: Frank Rowand <frank.rowand at am.sony.com>
 Link: http://lkml.kernel.org/r/4E77B952.3010606@am.sony.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/arm/mach-exynos/platsmp.c    |   12 ++++++------
- arch/arm/mach-hisi/platmcpm.c     |   22 +++++++++++-----------
- arch/arm/mach-omap2/omap-smp.c    |   10 +++++-----
- arch/arm/mach-prima2/platsmp.c    |   10 +++++-----
- arch/arm/mach-qcom/platsmp.c      |   10 +++++-----
- arch/arm/mach-spear/platsmp.c     |   10 +++++-----
- arch/arm/mach-sti/platsmp.c       |   10 +++++-----
- arch/arm/plat-versatile/platsmp.c |   10 +++++-----
+ arch/arm/mach-exynos/platsmp.c    | 12 ++++++------
+ arch/arm/mach-hisi/platmcpm.c     | 22 +++++++++++-----------
+ arch/arm/mach-omap2/omap-smp.c    | 10 +++++-----
+ arch/arm/mach-prima2/platsmp.c    | 10 +++++-----
+ arch/arm/mach-qcom/platsmp.c      | 10 +++++-----
+ arch/arm/mach-spear/platsmp.c     | 10 +++++-----
+ arch/arm/mach-sti/platsmp.c       | 10 +++++-----
+ arch/arm/plat-versatile/platsmp.c | 10 +++++-----
  8 files changed, 47 insertions(+), 47 deletions(-)
 
+diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
+index 98ffe1e62ad5..df9769ddece5 100644
 --- a/arch/arm/mach-exynos/platsmp.c
 +++ b/arch/arm/mach-exynos/platsmp.c
 @@ -229,7 +229,7 @@ static void __iomem *scu_base_addr(void)
@@ -41,7 +43,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void exynos_secondary_init(unsigned int cpu)
  {
-@@ -242,8 +242,8 @@ static void exynos_secondary_init(unsign
+@@ -242,8 +242,8 @@ static void exynos_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -52,7 +54,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr)
-@@ -307,7 +307,7 @@ static int exynos_boot_secondary(unsigne
+@@ -307,7 +307,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * Set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -61,7 +63,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * The secondary processor is waiting to be released from
-@@ -334,7 +334,7 @@ static int exynos_boot_secondary(unsigne
+@@ -334,7 +334,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
  
  		if (timeout == 0) {
  			printk(KERN_ERR "cpu1 power enable failed");
@@ -70,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			return -ETIMEDOUT;
  		}
  	}
-@@ -380,7 +380,7 @@ static int exynos_boot_secondary(unsigne
+@@ -380,7 +380,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * calibrations, then wait for it to finish
  	 */
  fail:
@@ -79,6 +81,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return pen_release != -1 ? ret : 0;
  }
+diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
+index 4b653a8cb75c..b03d5a922cb1 100644
 --- a/arch/arm/mach-hisi/platmcpm.c
 +++ b/arch/arm/mach-hisi/platmcpm.c
 @@ -61,7 +61,7 @@
@@ -90,7 +94,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static u32 fabric_phys_addr;
  /*
   * [0]: bootwrapper physical address
-@@ -113,7 +113,7 @@ static int hip04_boot_secondary(unsigned
+@@ -113,7 +113,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle)
  	if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER)
  		return -EINVAL;
  
@@ -99,7 +103,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (hip04_cpu_table[cluster][cpu])
  		goto out;
-@@ -147,7 +147,7 @@ static int hip04_boot_secondary(unsigned
+@@ -147,7 +147,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle)
  
  out:
  	hip04_cpu_table[cluster][cpu]++;
@@ -108,7 +112,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return 0;
  }
-@@ -162,11 +162,11 @@ static void hip04_cpu_die(unsigned int l
+@@ -162,11 +162,11 @@ static void hip04_cpu_die(unsigned int l_cpu)
  	cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
  	cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
  
@@ -122,7 +126,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		return;
  	} else if (hip04_cpu_table[cluster][cpu] > 1) {
  		pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu);
-@@ -174,7 +174,7 @@ static void hip04_cpu_die(unsigned int l
+@@ -174,7 +174,7 @@ static void hip04_cpu_die(unsigned int l_cpu)
  	}
  
  	last_man = hip04_cluster_is_down(cluster);
@@ -131,7 +135,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (last_man) {
  		/* Since it's Cortex A15, disable L2 prefetching. */
  		asm volatile(
-@@ -203,7 +203,7 @@ static int hip04_cpu_kill(unsigned int l
+@@ -203,7 +203,7 @@ static int hip04_cpu_kill(unsigned int l_cpu)
  	       cpu >= HIP04_MAX_CPUS_PER_CLUSTER);
  
  	count = TIMEOUT_MSEC / POLL_MSEC;
@@ -140,7 +144,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	for (tries = 0; tries < count; tries++) {
  		if (hip04_cpu_table[cluster][cpu])
  			goto err;
-@@ -211,10 +211,10 @@ static int hip04_cpu_kill(unsigned int l
+@@ -211,10 +211,10 @@ static int hip04_cpu_kill(unsigned int l_cpu)
  		data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster));
  		if (data & CORE_WFI_STATUS(cpu))
  			break;
@@ -153,7 +157,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  	if (tries >= count)
  		goto err;
-@@ -231,10 +231,10 @@ static int hip04_cpu_kill(unsigned int l
+@@ -231,10 +231,10 @@ static int hip04_cpu_kill(unsigned int l_cpu)
  		goto err;
  	if (hip04_cluster_is_down(cluster))
  		hip04_set_snoop_filter(cluster, 0);
@@ -166,9 +170,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return 0;
  }
  #endif
+diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
+index b4de3da6dffa..b52893319d75 100644
 --- a/arch/arm/mach-omap2/omap-smp.c
 +++ b/arch/arm/mach-omap2/omap-smp.c
-@@ -64,7 +64,7 @@ static const struct omap_smp_config omap
+@@ -64,7 +64,7 @@ static const struct omap_smp_config omap5_cfg __initconst = {
  	.startup_addr = omap5_secondary_startup,
  };
  
@@ -177,7 +183,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  void __iomem *omap4_get_scu_base(void)
  {
-@@ -131,8 +131,8 @@ static void omap4_secondary_init(unsigne
+@@ -131,8 +131,8 @@ static void omap4_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -188,7 +194,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
-@@ -146,7 +146,7 @@ static int omap4_boot_secondary(unsigned
+@@ -146,7 +146,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * Set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -197,7 +203,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * Update the AuxCoreBoot0 with boot state for secondary core.
-@@ -223,7 +223,7 @@ static int omap4_boot_secondary(unsigned
+@@ -223,7 +223,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * Now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
@@ -206,6 +212,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return 0;
  }
+diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
+index 0875b99add18..18b6d98d2581 100644
 --- a/arch/arm/mach-prima2/platsmp.c
 +++ b/arch/arm/mach-prima2/platsmp.c
 @@ -22,7 +22,7 @@
@@ -217,7 +225,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void sirfsoc_secondary_init(unsigned int cpu)
  {
-@@ -36,8 +36,8 @@ static void sirfsoc_secondary_init(unsig
+@@ -36,8 +36,8 @@ static void sirfsoc_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -228,7 +236,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static const struct of_device_id clk_ids[]  = {
-@@ -75,7 +75,7 @@ static int sirfsoc_boot_secondary(unsign
+@@ -75,7 +75,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	/* make sure write buffer is drained */
  	mb();
  
@@ -237,7 +245,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * The secondary processor is waiting to be released from
-@@ -107,7 +107,7 @@ static int sirfsoc_boot_secondary(unsign
+@@ -107,7 +107,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
@@ -246,6 +254,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return pen_release != -1 ? -ENOSYS : 0;
  }
+diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
+index 5494c9e0c909..e8ce157d3548 100644
 --- a/arch/arm/mach-qcom/platsmp.c
 +++ b/arch/arm/mach-qcom/platsmp.c
 @@ -46,7 +46,7 @@
@@ -257,7 +267,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_HOTPLUG_CPU
  static void qcom_cpu_die(unsigned int cpu)
-@@ -60,8 +60,8 @@ static void qcom_secondary_init(unsigned
+@@ -60,8 +60,8 @@ static void qcom_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -268,7 +278,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static int scss_release_secondary(unsigned int cpu)
-@@ -284,7 +284,7 @@ static int qcom_boot_secondary(unsigned
+@@ -284,7 +284,7 @@ static int qcom_boot_secondary(unsigned int cpu, int (*func)(unsigned int))
  	 * set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -277,7 +287,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * Send the secondary CPU a soft interrupt, thereby causing
-@@ -297,7 +297,7 @@ static int qcom_boot_secondary(unsigned
+@@ -297,7 +297,7 @@ static int qcom_boot_secondary(unsigned int cpu, int (*func)(unsigned int))
  	 * now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
@@ -286,6 +296,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
+diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
+index 8d1e2d551786..7fa56cc78118 100644
 --- a/arch/arm/mach-spear/platsmp.c
 +++ b/arch/arm/mach-spear/platsmp.c
 @@ -32,7 +32,7 @@ static void write_pen_release(int val)
@@ -297,7 +309,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
  
-@@ -47,8 +47,8 @@ static void spear13xx_secondary_init(uns
+@@ -47,8 +47,8 @@ static void spear13xx_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -308,7 +320,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
-@@ -59,7 +59,7 @@ static int spear13xx_boot_secondary(unsi
+@@ -59,7 +59,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -317,7 +329,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * The secondary processor is waiting to be released from
-@@ -84,7 +84,7 @@ static int spear13xx_boot_secondary(unsi
+@@ -84,7 +84,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
@@ -326,6 +338,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return pen_release != -1 ? -ENOSYS : 0;
  }
+diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
+index ea5a2277ee46..b988e081ac79 100644
 --- a/arch/arm/mach-sti/platsmp.c
 +++ b/arch/arm/mach-sti/platsmp.c
 @@ -35,7 +35,7 @@ static void write_pen_release(int val)
@@ -337,7 +351,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void sti_secondary_init(unsigned int cpu)
  {
-@@ -48,8 +48,8 @@ static void sti_secondary_init(unsigned
+@@ -48,8 +48,8 @@ static void sti_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -348,7 +362,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
-@@ -60,7 +60,7 @@ static int sti_boot_secondary(unsigned i
+@@ -60,7 +60,7 @@ static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -357,7 +371,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * The secondary processor is waiting to be released from
-@@ -91,7 +91,7 @@ static int sti_boot_secondary(unsigned i
+@@ -91,7 +91,7 @@ static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
@@ -366,6 +380,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return pen_release != -1 ? -ENOSYS : 0;
  }
+diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
+index c2366510187a..6b60f582b738 100644
 --- a/arch/arm/plat-versatile/platsmp.c
 +++ b/arch/arm/plat-versatile/platsmp.c
 @@ -32,7 +32,7 @@ static void write_pen_release(int val)
@@ -377,7 +393,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  void versatile_secondary_init(unsigned int cpu)
  {
-@@ -45,8 +45,8 @@ void versatile_secondary_init(unsigned i
+@@ -45,8 +45,8 @@ void versatile_secondary_init(unsigned int cpu)
  	/*
  	 * Synchronise with the boot thread.
  	 */
@@ -388,7 +404,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
-@@ -57,7 +57,7 @@ int versatile_boot_secondary(unsigned in
+@@ -57,7 +57,7 @@ int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * Set synchronisation state between this boot processor
  	 * and the secondary one
  	 */
@@ -397,7 +413,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * This is really belt and braces; we hold unintended secondary
-@@ -87,7 +87,7 @@ int versatile_boot_secondary(unsigned in
+@@ -87,7 +87,7 @@ int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
  	 * now the secondary core is starting up let it run its
  	 * calibrations, then wait for it to finish
  	 */
diff --git a/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch b/debian/patches/features/all/rt/0054-arm-kprobe-replace-patch_lock-to-raw-lock.patch
similarity index 83%
rename from debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch
rename to debian/patches/features/all/rt/0054-arm-kprobe-replace-patch_lock-to-raw-lock.patch
index 409fed9..54747d7 100644
--- a/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch
+++ b/debian/patches/features/all/rt/0054-arm-kprobe-replace-patch_lock-to-raw-lock.patch
@@ -1,7 +1,7 @@
 From: Yang Shi <yang.shi at linaro.org>
 Date: Thu, 10 Nov 2016 16:17:55 -0800
-Subject: [PATCH] arm: kprobe: replace patch_lock to raw lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 054/332] arm: kprobe: replace patch_lock to raw lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=db49a2763843a1387db5a7bdcb8fc12aff2dd6ee
 
 When running kprobe on -rt kernel, the below bug is caught:
 
@@ -36,9 +36,11 @@ to raw lock.
 Signed-off-by: Yang Shi <yang.shi at linaro.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/kernel/patch.c |    6 +++---
+ arch/arm/kernel/patch.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/arch/arm/kernel/patch.c b/arch/arm/kernel/patch.c
+index 69bda1a5707e..1f665acaa6a9 100644
 --- a/arch/arm/kernel/patch.c
 +++ b/arch/arm/kernel/patch.c
 @@ -15,7 +15,7 @@ struct patch {
@@ -50,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
  	__acquires(&patch_lock)
-@@ -32,7 +32,7 @@ static void __kprobes *patch_map(void *a
+@@ -32,7 +32,7 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
  		return addr;
  
  	if (flags)
@@ -59,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	else
  		__acquire(&patch_lock);
  
-@@ -47,7 +47,7 @@ static void __kprobes patch_unmap(int fi
+@@ -47,7 +47,7 @@ static void __kprobes patch_unmap(int fixmap, unsigned long *flags)
  	clear_fixmap(fixmap);
  
  	if (flags)
diff --git a/debian/patches/features/all/rt/posix-timers-no-broadcast.patch b/debian/patches/features/all/rt/0055-posix-timers-Prevent-broadcast-signals.patch
similarity index 64%
rename from debian/patches/features/all/rt/posix-timers-no-broadcast.patch
rename to debian/patches/features/all/rt/0055-posix-timers-Prevent-broadcast-signals.patch
index 550871f..0c2b368 100644
--- a/debian/patches/features/all/rt/posix-timers-no-broadcast.patch
+++ b/debian/patches/features/all/rt/0055-posix-timers-Prevent-broadcast-signals.patch
@@ -1,20 +1,21 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 3 Jul 2009 08:29:20 -0500
-Subject: posix-timers: Prevent broadcast signals
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 055/332] posix-timers: Prevent broadcast signals
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0809dfd6028370e9e4432e40c981718dee378b6a
 
 Posix timers should not send broadcast signals and kernel only
 signals. Prevent it.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- kernel/time/posix-timers.c |    4 +++-
+ kernel/time/posix-timers.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
+index f2826c35e918..81aec84e65e7 100644
 --- a/kernel/time/posix-timers.c
 +++ b/kernel/time/posix-timers.c
-@@ -506,6 +506,7 @@ static enum hrtimer_restart posix_timer_
+@@ -506,6 +506,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
  static struct pid *good_sigevent(sigevent_t * event)
  {
  	struct task_struct *rtn = current->group_leader;
@@ -22,7 +23,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if ((event->sigev_notify & SIGEV_THREAD_ID ) &&
  		(!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) ||
-@@ -514,7 +515,8 @@ static struct pid *good_sigevent(sigeven
+@@ -514,7 +515,8 @@ static struct pid *good_sigevent(sigevent_t * event)
  		return NULL;
  
  	if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) &&
diff --git a/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches/features/all/rt/0056-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch
similarity index 69%
rename from debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch
rename to debian/patches/features/all/rt/0056-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch
index 80a7420..75d6a55 100644
--- a/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch
+++ b/debian/patches/features/all/rt/0056-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch
@@ -1,24 +1,25 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 3 Jul 2009 08:44:56 -0500
-Subject: signals: Allow rt tasks to cache one sigqueue struct
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 056/332] signals: Allow rt tasks to cache one sigqueue struct
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=30e24b72dbc9a5d863955eebea77cfedda37c0c7
 
 To avoid allocation allow rt tasks to cache one sigqueue struct in
 task struct.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/sched.h  |    1 
- include/linux/signal.h |    1 
- kernel/exit.c          |    2 -
- kernel/fork.c          |    1 
- kernel/signal.c        |   69 ++++++++++++++++++++++++++++++++++++++++++++++---
+ include/linux/sched.h  |  1 +
+ include/linux/signal.h |  1 +
+ kernel/exit.c          |  2 +-
+ kernel/fork.c          |  1 +
+ kernel/signal.c        | 69 +++++++++++++++++++++++++++++++++++++++++++++++---
  5 files changed, 69 insertions(+), 5 deletions(-)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 117293dcbf2a..a15c94f3cbb6 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1689,6 +1689,7 @@ struct task_struct {
+@@ -1699,6 +1699,7 @@ struct task_struct {
  /* signal handlers */
  	struct signal_struct *signal;
  	struct sighand_struct *sighand;
@@ -26,9 +27,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	sigset_t blocked, real_blocked;
  	sigset_t saved_sigmask;	/* restored if set_restore_sigmask() was used */
+diff --git a/include/linux/signal.h b/include/linux/signal.h
+index b63f63eaa39c..295540fdfc72 100644
 --- a/include/linux/signal.h
 +++ b/include/linux/signal.h
-@@ -233,6 +233,7 @@ static inline void init_sigpending(struc
+@@ -233,6 +233,7 @@ static inline void init_sigpending(struct sigpending *sig)
  }
  
  extern void flush_sigqueue(struct sigpending *queue);
@@ -36,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
  static inline int valid_signal(unsigned long sig)
+diff --git a/kernel/exit.c b/kernel/exit.c
+index 3076f3089919..fb2ebcf3ca7c 100644
 --- a/kernel/exit.c
 +++ b/kernel/exit.c
-@@ -143,7 +143,7 @@ static void __exit_signal(struct task_st
+@@ -143,7 +143,7 @@ static void __exit_signal(struct task_struct *tsk)
  	 * Do this under ->siglock, we can race with another thread
  	 * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
  	 */
@@ -47,9 +52,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	tsk->sighand = NULL;
  	spin_unlock(&sighand->siglock);
  
+diff --git a/kernel/fork.c b/kernel/fork.c
+index d6260cdc0294..eb3d7d75576d 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -1553,6 +1553,7 @@ static __latent_entropy struct task_stru
+@@ -1554,6 +1554,7 @@ static __latent_entropy struct task_struct *copy_process(
  	spin_lock_init(&p->alloc_lock);
  
  	init_sigpending(&p->pending);
@@ -57,6 +64,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	p->utime = p->stime = p->gtime = 0;
  	p->utimescaled = p->stimescaled = 0;
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 4d58564ac7e3..739615d8d5ae 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
 @@ -14,6 +14,7 @@
@@ -67,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/fs.h>
  #include <linux/tty.h>
  #include <linux/binfmts.h>
-@@ -352,13 +353,30 @@ static bool task_participate_group_stop(
+@@ -352,13 +353,30 @@ static bool task_participate_group_stop(struct task_struct *task)
  	return false;
  }
  
@@ -99,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	struct sigqueue *q = NULL;
  	struct user_struct *user;
-@@ -375,7 +393,10 @@ static struct sigqueue *
+@@ -375,7 +393,10 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi
  	if (override_rlimit ||
  	    atomic_read(&user->sigpending) <=
  			task_rlimit(t, RLIMIT_SIGPENDING)) {
@@ -111,7 +120,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else {
  		print_dropped_signal(sig);
  	}
-@@ -392,6 +413,13 @@ static struct sigqueue *
+@@ -392,6 +413,13 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi
  	return q;
  }
  
@@ -125,7 +134,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static void __sigqueue_free(struct sigqueue *q)
  {
  	if (q->flags & SIGQUEUE_PREALLOC)
-@@ -401,6 +429,21 @@ static void __sigqueue_free(struct sigqu
+@@ -401,6 +429,21 @@ static void __sigqueue_free(struct sigqueue *q)
  	kmem_cache_free(sigqueue_cachep, q);
  }
  
@@ -147,10 +156,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void flush_sigqueue(struct sigpending *queue)
  {
  	struct sigqueue *q;
-@@ -414,6 +457,21 @@ void flush_sigqueue(struct sigpending *q
+@@ -413,6 +456,21 @@ void flush_sigqueue(struct sigpending *queue)
+ 	}
  }
  
- /*
++/*
 + * Called from __exit_signal. Flush tsk->pending and
 + * tsk->sigqueue_cache
 + */
@@ -165,21 +175,20 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +		kmem_cache_free(sigqueue_cachep, q);
 +}
 +
-+/*
+ /*
   * Flush all pending signals for this kthread.
   */
- void flush_signals(struct task_struct *t)
-@@ -525,7 +583,7 @@ static void collect_signal(int sig, stru
- still_pending:
- 		list_del_init(&first->list);
- 		copy_siginfo(info, &first->info);
+@@ -532,7 +590,7 @@ static void collect_signal(int sig, struct sigpending *list, siginfo_t *info,
+ 			(info->si_code == SI_TIMER) &&
+ 			(info->si_sys_private);
+ 
 -		__sigqueue_free(first);
 +		sigqueue_free_current(first);
  	} else {
  		/*
  		 * Ok, it wasn't in the queue.  This must be
-@@ -560,6 +618,8 @@ int dequeue_signal(struct task_struct *t
- {
+@@ -568,6 +626,8 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
+ 	bool resched_timer = false;
  	int signr;
  
 +	WARN_ON_ONCE(tsk != current);
@@ -187,7 +196,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/* We only dequeue private signals from ourselves, we don't let
  	 * signalfd steal them
  	 */
-@@ -1485,7 +1545,8 @@ EXPORT_SYMBOL(kill_pid);
+@@ -1493,7 +1553,8 @@ EXPORT_SYMBOL(kill_pid);
   */
  struct sigqueue *sigqueue_alloc(void)
  {
diff --git a/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch b/debian/patches/features/all/rt/0057-drivers-random-Reduce-preempt-disabled-region.patch
similarity index 54%
rename from debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch
rename to debian/patches/features/all/rt/0057-drivers-random-Reduce-preempt-disabled-region.patch
index 15c6002..b28b2b9 100644
--- a/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch
+++ b/debian/patches/features/all/rt/0057-drivers-random-Reduce-preempt-disabled-region.patch
@@ -1,20 +1,21 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:30 -0500
-Subject: drivers: random: Reduce preempt disabled region
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 057/332] drivers: random: Reduce preempt disabled region
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c42abc8453f3c6deba74f3ad892feff99aee89bd
 
 No need to keep preemption disabled across the whole function.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/char/random.c |    3 ---
+ drivers/char/random.c | 3 ---
  1 file changed, 3 deletions(-)
 
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index 08d1dd58c0d2..f17bc435eee1 100644
 --- a/drivers/char/random.c
 +++ b/drivers/char/random.c
-@@ -1028,8 +1028,6 @@ static void add_timer_randomness(struct
+@@ -1028,8 +1028,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
  	} sample;
  	long delta, delta2, delta3;
  
@@ -23,7 +24,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	sample.jiffies = jiffies;
  	sample.cycles = random_get_entropy();
  	sample.num = num;
-@@ -1070,7 +1068,6 @@ static void add_timer_randomness(struct
+@@ -1070,7 +1068,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num)
  		 */
  		credit_entropy_bits(r, min_t(int, fls(delta>>1), 11));
  	}
diff --git a/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch b/debian/patches/features/all/rt/0058-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch
similarity index 76%
rename from debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch
rename to debian/patches/features/all/rt/0058-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch
index 9c0e338..eedcb8c 100644
--- a/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch
+++ b/debian/patches/features/all/rt/0058-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch
@@ -1,7 +1,11 @@
 From: Benedikt Spranger <b.spranger at linutronix.de>
 Date: Sat, 6 Mar 2010 17:47:10 +0100
-Subject: ARM: AT91: PIT: Remove irq handler when clock event is unused
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 058/332] ARM: AT91: PIT: Remove irq handler when clock event
+ is unused
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3039989fd94380d71a24022c31598c6779c4b65d
 
 Setup and remove the interrupt handler in clock event mode selection.
 This avoids calling the (shared) interrupt handler when the device is
@@ -14,13 +18,15 @@ commit 8fe82a55 ("ARM: at91: sparse irq support") which is included since v3.6.
 Patch based on what Sami Pietikäinen <Sami.Pietikainen at wapice.com> suggested].
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/clocksource/timer-atmel-pit.c |   18 +++++++++---------
- drivers/clocksource/timer-atmel-st.c  |   34 ++++++++++++++++++++++------------
+ drivers/clocksource/timer-atmel-pit.c | 18 +++++++++---------
+ drivers/clocksource/timer-atmel-st.c  | 34 ++++++++++++++++++++++------------
  2 files changed, 31 insertions(+), 21 deletions(-)
 
+diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c
+index 6555821bbdae..2c66bb3e595b 100644
 --- a/drivers/clocksource/timer-atmel-pit.c
 +++ b/drivers/clocksource/timer-atmel-pit.c
-@@ -96,15 +96,24 @@ static int pit_clkevt_shutdown(struct cl
+@@ -96,15 +96,24 @@ static int pit_clkevt_shutdown(struct clock_event_device *dev)
  
  	/* disable irq, leaving the clocksource active */
  	pit_write(data->base, AT91_PIT_MR, (data->cycle - 1) | AT91_PIT_PITEN);
@@ -45,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* update clocksource counter */
  	data->cnt += data->cycle * PIT_PICNT(pit_read(data->base, AT91_PIT_PIVR));
-@@ -230,15 +239,6 @@ static int __init at91sam926x_pit_dt_ini
+@@ -230,15 +239,6 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
  		return ret;
  	}
  
@@ -61,9 +67,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* Set up and register clockevents */
  	data->clkevt.name = "pit";
  	data->clkevt.features = CLOCK_EVT_FEAT_PERIODIC;
+diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c
+index e90ab5b63a90..9e124087c55f 100644
 --- a/drivers/clocksource/timer-atmel-st.c
 +++ b/drivers/clocksource/timer-atmel-st.c
-@@ -115,18 +115,29 @@ static void clkdev32k_disable_and_flush_
+@@ -115,18 +115,29 @@ static void clkdev32k_disable_and_flush_irq(void)
  	last_crtr = read_CRTR();
  }
  
@@ -93,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/*
  	 * ALM for oneshot irqs, set by next_event()
  	 * before 32 seconds have passed.
-@@ -139,8 +150,16 @@ static int clkevt32k_set_oneshot(struct
+@@ -139,8 +150,16 @@ static int clkevt32k_set_oneshot(struct clock_event_device *dev)
  
  static int clkevt32k_set_periodic(struct clock_event_device *dev)
  {
@@ -110,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* PIT for periodic irqs; fixed rate of 1/HZ */
  	irqmask = AT91_ST_PITS;
  	regmap_write(regmap_st, AT91_ST_PIMR, timer_latch);
-@@ -198,7 +217,7 @@ static int __init atmel_st_timer_init(st
+@@ -198,7 +217,7 @@ static int __init atmel_st_timer_init(struct device_node *node)
  {
  	struct clk *sclk;
  	unsigned int sclk_rate, val;
@@ -119,7 +127,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	regmap_st = syscon_node_to_regmap(node);
  	if (IS_ERR(regmap_st)) {
-@@ -212,21 +231,12 @@ static int __init atmel_st_timer_init(st
+@@ -212,21 +231,12 @@ static int __init atmel_st_timer_init(struct device_node *node)
  	regmap_read(regmap_st, AT91_ST_SR, &val);
  
  	/* Get the interrupts property */
diff --git a/debian/patches/features/all/rt/clockevents-drivers-timer-atmel-pit-fix-double-free_.patch b/debian/patches/features/all/rt/0059-clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
similarity index 68%
rename from debian/patches/features/all/rt/clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
rename to debian/patches/features/all/rt/0059-clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
index 4ec8809..38fcd91 100644
--- a/debian/patches/features/all/rt/clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
+++ b/debian/patches/features/all/rt/0059-clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
@@ -1,7 +1,8 @@
 From: Alexandre Belloni <alexandre.belloni at free-electrons.com>
 Date: Thu, 17 Mar 2016 21:09:43 +0100
-Subject: [PATCH] clockevents/drivers/timer-atmel-pit: fix double free_irq
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 059/332] clockevents/drivers/timer-atmel-pit: fix double
+ free_irq
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5ff1290cf372b98df535708d414cd419c2309928
 
 clockevents_exchange_device() changes the state from detached to shutdown
 and so at that point the IRQ has not yet been requested.
@@ -10,9 +11,11 @@ Acked-by: Nicolas Ferre <nicolas.ferre at atmel.com>
 Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/clocksource/timer-atmel-pit.c |    8 +++++++-
+ drivers/clocksource/timer-atmel-pit.c | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
 
+diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c
+index 2c66bb3e595b..93288849b2bd 100644
 --- a/drivers/clocksource/timer-atmel-pit.c
 +++ b/drivers/clocksource/timer-atmel-pit.c
 @@ -46,6 +46,7 @@ struct pit_data {
@@ -23,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct clk	*mck;
  };
  
-@@ -96,7 +97,10 @@ static int pit_clkevt_shutdown(struct cl
+@@ -96,7 +97,10 @@ static int pit_clkevt_shutdown(struct clock_event_device *dev)
  
  	/* disable irq, leaving the clocksource active */
  	pit_write(data->base, AT91_PIT_MR, (data->cycle - 1) | AT91_PIT_PITEN);
@@ -35,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 0;
  }
  
-@@ -115,6 +119,8 @@ static int pit_clkevt_set_periodic(struc
+@@ -115,6 +119,8 @@ static int pit_clkevt_set_periodic(struct clock_event_device *dev)
  	if (ret)
  		panic(pr_fmt("Unable to setup IRQ\n"));
  
diff --git a/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch b/debian/patches/features/all/rt/0060-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch
similarity index 79%
rename from debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch
rename to debian/patches/features/all/rt/0060-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch
index 419cab1..224c0c9 100644
--- a/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch
+++ b/debian/patches/features/all/rt/0060-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch
@@ -1,7 +1,11 @@
 From: Benedikt Spranger <b.spranger at linutronix.de>
 Date: Mon, 8 Mar 2010 18:57:04 +0100
-Subject: clocksource: TCLIB: Allow higher clock rates for clock events
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 060/332] clocksource: TCLIB: Allow higher clock rates for
+ clock events
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e2ff7328d5da069b1a87be4dfbddcb5a0f083ebf
 
 As default the TCLIB uses the 32KiHz base clock rate for clock events.
 Add a compile time selection to allow higher clock resulution.
@@ -11,10 +15,12 @@ Add a compile time selection to allow higher clock resulution.
 Signed-off-by: Benedikt Spranger <b.spranger at linutronix.de>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/clocksource/tcb_clksrc.c |   36 +++++++++++++++++++++---------------
- drivers/misc/Kconfig             |   12 ++++++++++--
+ drivers/clocksource/tcb_clksrc.c | 36 +++++++++++++++++++++---------------
+ drivers/misc/Kconfig             | 12 ++++++++++--
  2 files changed, 31 insertions(+), 17 deletions(-)
 
+diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
+index ed1ae4445e8d..5b6f57f500b8 100644
 --- a/drivers/clocksource/tcb_clksrc.c
 +++ b/drivers/clocksource/tcb_clksrc.c
 @@ -23,8 +23,7 @@
@@ -35,7 +41,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	void __iomem			*regs;
  };
  
-@@ -83,13 +83,6 @@ static struct tc_clkevt_device *to_tc_cl
+@@ -83,13 +83,6 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt)
  	return container_of(clkevt, struct tc_clkevt_device, clkevt);
  }
  
@@ -49,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static u32 timer_clock;
  
  static void tc_clk_disable(struct clock_event_device *d)
-@@ -139,7 +132,7 @@ static int tc_set_oneshot(struct clock_e
+@@ -139,7 +132,7 @@ static int tc_set_oneshot(struct clock_event_device *d)
  
  	tc_clk_enable(d);
  
@@ -58,7 +64,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	__raw_writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE |
  		     ATMEL_TC_WAVESEL_UP_AUTO, regs + ATMEL_TC_REG(2, CMR));
  	__raw_writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER));
-@@ -161,10 +154,10 @@ static int tc_set_periodic(struct clock_
+@@ -161,10 +154,10 @@ static int tc_set_periodic(struct clock_event_device *d)
  	 */
  	tc_clk_enable(d);
  
@@ -71,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Enable clock and interrupts on RC compare */
  	__raw_writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER));
-@@ -191,7 +184,11 @@ static struct tc_clkevt_device clkevt =
+@@ -191,7 +184,11 @@ static struct tc_clkevt_device clkevt = {
  		.features		= CLOCK_EVT_FEAT_PERIODIC |
  					  CLOCK_EVT_FEAT_ONESHOT,
  		/* Should be lower than at91rm9200's system timer */
@@ -83,7 +89,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		.set_next_event		= tc_next_event,
  		.set_state_shutdown	= tc_shutdown_clk_off,
  		.set_state_periodic	= tc_set_periodic,
-@@ -213,8 +210,9 @@ static irqreturn_t ch2_irq(int irq, void
+@@ -213,8 +210,9 @@ static irqreturn_t ch2_irq(int irq, void *handle)
  	return IRQ_NONE;
  }
  
@@ -94,7 +100,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	int ret;
  	struct clk *t2_clk = tc->clk[2];
  	int irq = tc->irq[2];
-@@ -235,7 +233,11 @@ static int __init setup_clkevents(struct
+@@ -235,7 +233,11 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
  	clkevt.regs = tc->regs;
  	clkevt.clk = t2_clk;
  
@@ -107,7 +113,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	clkevt.clkevt.cpumask = cpumask_of(0);
  
-@@ -246,7 +248,7 @@ static int __init setup_clkevents(struct
+@@ -246,7 +248,7 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
  		return ret;
  	}
  
@@ -128,6 +134,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (ret)
  		goto err_unregister_clksrc;
  
+diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
+index 64971baf11fa..9a6d60d57ec5 100644
 --- a/drivers/misc/Kconfig
 +++ b/drivers/misc/Kconfig
 @@ -69,8 +69,7 @@ config ATMEL_TCB_CLKSRC
diff --git a/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch b/debian/patches/features/all/rt/0061-drivers-net-Use-disable_irq_nosync-in-8139too.patch
similarity index 56%
rename from debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch
rename to debian/patches/features/all/rt/0061-drivers-net-Use-disable_irq_nosync-in-8139too.patch
index 4e24741..00d40de 100644
--- a/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch
+++ b/debian/patches/features/all/rt/0061-drivers-net-Use-disable_irq_nosync-in-8139too.patch
@@ -1,21 +1,22 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:24 -0500
-Subject: drivers/net: Use disable_irq_nosync() in 8139too
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 061/332] drivers/net: Use disable_irq_nosync() in 8139too
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=201b071e6f3628ac101efec47707ac253f1eed4f
 
 Use disable_irq_nosync() instead of disable_irq() as this might be
 called in atomic context with netpoll.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/net/ethernet/realtek/8139too.c |    2 +-
+ drivers/net/ethernet/realtek/8139too.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
+index da4c2d8a4173..1420dfb56bac 100644
 --- a/drivers/net/ethernet/realtek/8139too.c
 +++ b/drivers/net/ethernet/realtek/8139too.c
-@@ -2233,7 +2233,7 @@ static void rtl8139_poll_controller(stru
+@@ -2233,7 +2233,7 @@ static void rtl8139_poll_controller(struct net_device *dev)
  	struct rtl8139_private *tp = netdev_priv(dev);
  	const int irq = tp->pci_dev->irq;
  
diff --git a/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch b/debian/patches/features/all/rt/0062-suspend-Prevent-might-sleep-splats.patch
similarity index 67%
rename from debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch
rename to debian/patches/features/all/rt/0062-suspend-Prevent-might-sleep-splats.patch
index 8e0b8cc..e94eef5 100644
--- a/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch
+++ b/debian/patches/features/all/rt/0062-suspend-Prevent-might-sleep-splats.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 15 Jul 2010 10:29:00 +0200
-Subject: suspend: Prevent might sleep splats
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 062/332] suspend: Prevent might sleep splats
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=42a06979ab172e96727b893ae32159ca51cc6778
 
 timekeeping suspend/resume calls read_persistant_clock() which takes
 rtc_lock. That results in might sleep warnings because at that point
@@ -17,13 +17,14 @@ and restoring it to SYSTEM_RUNNING afer sysdev_resume().
 Needs to be revisited.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/kernel.h   |    1 +
- kernel/power/hibernate.c |    7 +++++++
- kernel/power/suspend.c   |    4 ++++
+ include/linux/kernel.h   | 1 +
+ kernel/power/hibernate.c | 7 +++++++
+ kernel/power/suspend.c   | 4 ++++
  3 files changed, 12 insertions(+)
 
+diff --git a/include/linux/kernel.h b/include/linux/kernel.h
+index bc6ed52a39b9..cfc57ced1d11 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
 @@ -488,6 +488,7 @@ extern enum system_states {
@@ -34,9 +35,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  } system_state;
  
  #define TAINT_PROPRIETARY_MODULE	0
+diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
+index b26dbc48c75b..72d2d26b5ce8 100644
 --- a/kernel/power/hibernate.c
 +++ b/kernel/power/hibernate.c
-@@ -286,6 +286,8 @@ static int create_image(int platform_mod
+@@ -286,6 +286,8 @@ static int create_image(int platform_mode)
  
  	local_irq_disable();
  
@@ -45,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	error = syscore_suspend();
  	if (error) {
  		printk(KERN_ERR "PM: Some system devices failed to power down, "
-@@ -317,6 +319,7 @@ static int create_image(int platform_mod
+@@ -317,6 +319,7 @@ static int create_image(int platform_mode)
  	syscore_resume();
  
   Enable_irqs:
@@ -53,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_irq_enable();
  
   Enable_cpus:
-@@ -446,6 +449,7 @@ static int resume_target_kernel(bool pla
+@@ -446,6 +449,7 @@ static int resume_target_kernel(bool platform_mode)
  		goto Enable_cpus;
  
  	local_irq_disable();
@@ -61,7 +64,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	error = syscore_suspend();
  	if (error)
-@@ -479,6 +483,7 @@ static int resume_target_kernel(bool pla
+@@ -479,6 +483,7 @@ static int resume_target_kernel(bool platform_mode)
  	syscore_resume();
  
   Enable_irqs:
@@ -85,9 +88,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_irq_enable();
  
   Enable_cpus:
+diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
+index 6ccb08f57fcb..40f8332ec170 100644
 --- a/kernel/power/suspend.c
 +++ b/kernel/power/suspend.c
-@@ -369,6 +369,8 @@ static int suspend_enter(suspend_state_t
+@@ -369,6 +369,8 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
  	arch_suspend_disable_irqs();
  	BUG_ON(!irqs_disabled());
  
@@ -96,7 +101,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	error = syscore_suspend();
  	if (!error) {
  		*wakeup = pm_wakeup_pending();
-@@ -385,6 +387,8 @@ static int suspend_enter(suspend_state_t
+@@ -385,6 +387,8 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
  		syscore_resume();
  	}
  
diff --git a/debian/patches/features/all/rt/net-prevent-abba-deadlock.patch b/debian/patches/features/all/rt/0063-net-flip-lock-dep-thingy.patch.patch
similarity index 91%
rename from debian/patches/features/all/rt/net-prevent-abba-deadlock.patch
rename to debian/patches/features/all/rt/0063-net-flip-lock-dep-thingy.patch.patch
index 5a3442e..e36d075 100644
--- a/debian/patches/features/all/rt/net-prevent-abba-deadlock.patch
+++ b/debian/patches/features/all/rt/0063-net-flip-lock-dep-thingy.patch.patch
@@ -1,7 +1,7 @@
-Subject: net-flip-lock-dep-thingy.patch
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 28 Jun 2011 10:59:58 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 063/332] net-flip-lock-dep-thingy.patch
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dc2de78b14ba0eb6f18005db140c00aea69bdff6
 
 =======================================================
 [ INFO: possible circular locking dependency detected ]
@@ -91,12 +91,14 @@ Call Trace:
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- net/core/sock.c |    3 +--
+ net/core/sock.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
+diff --git a/net/core/sock.c b/net/core/sock.c
+index 1989b3dd6d17..a32563e7e979 100644
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2499,12 +2499,11 @@ void lock_sock_nested(struct sock *sk, i
+@@ -2492,12 +2492,11 @@ void lock_sock_nested(struct sock *sk, int subclass)
  	if (sk->sk_lock.owned)
  		__lock_sock(sk);
  	sk->sk_lock.owned = 1;
diff --git a/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch b/debian/patches/features/all/rt/0064-net-sched-Use-msleep-instead-of-yield.patch
similarity index 88%
rename from debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch
rename to debian/patches/features/all/rt/0064-net-sched-Use-msleep-instead-of-yield.patch
index 3931a53..4e55672 100644
--- a/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch
+++ b/debian/patches/features/all/rt/0064-net-sched-Use-msleep-instead-of-yield.patch
@@ -1,7 +1,7 @@
 From: Marc Kleine-Budde <mkl at pengutronix.de>
 Date: Wed, 5 Mar 2014 00:49:47 +0100
-Subject: net: sched: Use msleep() instead of yield()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 064/332] net: sched: Use msleep() instead of yield()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0e2150f79aeca505b25d8eaca5f328de287cccaa
 
 On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50
 (by default). If a high priority userspace process tries to shut down a busy
@@ -42,12 +42,14 @@ solution.
 Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/sched/sch_generic.c |    2 +-
+ net/sched/sch_generic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
+index 6cfb6e9038c2..e57aa7293f86 100644
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
-@@ -925,7 +925,7 @@ void dev_deactivate_many(struct list_hea
+@@ -925,7 +925,7 @@ void dev_deactivate_many(struct list_head *head)
  	/* Wait for outstanding qdisc_run calls. */
  	list_for_each_entry(dev, head, close_list)
  		while (some_qdisc_is_busy(dev))
diff --git a/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch b/debian/patches/features/all/rt/0065-x86-ioapic-Do-not-unmask-io_apic-when-interrupt-is-i.patch
similarity index 60%
rename from debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch
rename to debian/patches/features/all/rt/0065-x86-ioapic-Do-not-unmask-io_apic-when-interrupt-is-i.patch
index e751d4a..139ba32 100644
--- a/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch
+++ b/debian/patches/features/all/rt/0065-x86-ioapic-Do-not-unmask-io_apic-when-interrupt-is-i.patch
@@ -1,22 +1,23 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:27 -0500
-Subject: x86/ioapic: Do not unmask io_apic when interrupt is in progress
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 065/332] x86/ioapic: Do not unmask io_apic when interrupt is
+ in progress
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=59aef9b47ae1fd508de9568d1a3cc987eae61550
 
 With threaded interrupts we might see an interrupt in progress on
 migration. Do not unmask it when this is the case.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
-xXx
- arch/x86/kernel/apic/io_apic.c |    3 ++-
+ arch/x86/kernel/apic/io_apic.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
+index cf89928dbd46..18b5ec2a71df 100644
 --- a/arch/x86/kernel/apic/io_apic.c
 +++ b/arch/x86/kernel/apic/io_apic.c
-@@ -1712,7 +1712,8 @@ static bool io_apic_level_ack_pending(st
+@@ -1712,7 +1712,8 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data)
  static inline bool ioapic_irqd_mask(struct irq_data *data)
  {
  	/* If we are moving the irq we need to mask it */
diff --git a/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch b/debian/patches/features/all/rt/0066-pci-Use-__wake_up_all_locked-in-pci_unblock_user_cfg.patch
similarity index 57%
rename from debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch
rename to debian/patches/features/all/rt/0066-pci-Use-__wake_up_all_locked-in-pci_unblock_user_cfg.patch
index c0c6e89..f380774 100644
--- a/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch
+++ b/debian/patches/features/all/rt/0066-pci-Use-__wake_up_all_locked-in-pci_unblock_user_cfg.patch
@@ -1,21 +1,23 @@
-Subject: pci: Use __wake_up_all_locked in pci_unblock_user_cfg_access()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Thu, 01 Dec 2011 00:07:16 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Thu, 1 Dec 2011 00:07:16 +0100
+Subject: [PATCH 066/332] pci: Use __wake_up_all_locked in
+ pci_unblock_user_cfg_access()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6f7d5da188d44c8c9f4f5c41491f87be692ab715
 
 The waitqueue is protected by the pci_lock, so we can just avoid to
 lock the waitqueue lock itself. That prevents the
 might_sleep()/scheduling while atomic problem on RT
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/pci/access.c |    2 +-
+ drivers/pci/access.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/pci/access.c b/drivers/pci/access.c
+index d11cdbb8fba3..223bbb9acb03 100644
 --- a/drivers/pci/access.c
 +++ b/drivers/pci/access.c
-@@ -672,7 +672,7 @@ void pci_cfg_access_unlock(struct pci_de
+@@ -672,7 +672,7 @@ void pci_cfg_access_unlock(struct pci_dev *dev)
  	WARN_ON(!dev->block_cfg_access);
  
  	dev->block_cfg_access = 0;
diff --git a/debian/patches/features/all/rt/latencyhist-disable-jump-labels.patch b/debian/patches/features/all/rt/0067-latencyhist-disable-jump-labels.patch
similarity index 90%
rename from debian/patches/features/all/rt/latencyhist-disable-jump-labels.patch
rename to debian/patches/features/all/rt/0067-latencyhist-disable-jump-labels.patch
index 3242593..08b5ee1 100644
--- a/debian/patches/features/all/rt/latencyhist-disable-jump-labels.patch
+++ b/debian/patches/features/all/rt/0067-latencyhist-disable-jump-labels.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 4 Feb 2016 14:08:06 +0100
-Subject: latencyhist: disable jump-labels
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 067/332] latencyhist: disable jump-labels
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c7c59e69ec0f83a9ea6a0b7d4b06375c550a369d
 
 Atleast on X86 we die a recursive death
 
@@ -47,9 +47,11 @@ Reported-By: Christoph Mathys <eraserix at gmail.com>
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/Kconfig |    1 +
+ arch/Kconfig | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/arch/Kconfig b/arch/Kconfig
+index 659bdd079277..daac7dc4591c 100644
 --- a/arch/Kconfig
 +++ b/arch/Kconfig
 @@ -52,6 +52,7 @@ config KPROBES
diff --git a/debian/patches/features/all/rt/latency-hist.patch b/debian/patches/features/all/rt/0068-tracing-Add-latency-histograms.patch
similarity index 95%
rename from debian/patches/features/all/rt/latency-hist.patch
rename to debian/patches/features/all/rt/0068-tracing-Add-latency-histograms.patch
index 73c75c4..76efcda 100644
--- a/debian/patches/features/all/rt/latency-hist.patch
+++ b/debian/patches/features/all/rt/0068-tracing-Add-latency-histograms.patch
@@ -1,7 +1,7 @@
-Subject: tracing: Add latency histograms
 From: Carsten Emde <C.Emde at osadl.org>
 Date: Tue, 19 Jul 2011 14:03:41 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 068/332] tracing: Add latency histograms
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=51d2fd49f00080c9139395daedf9814e0a85c575
 
 This patch provides a recording mechanism to store data of potential
 sources of system latencies. The recordings separately determine the
@@ -12,20 +12,26 @@ filesystem. For details please consult Documentation/trace/histograms.txt.
 
 Signed-off-by: Carsten Emde <C.Emde at osadl.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- Documentation/trace/histograms.txt  |  186 +++++
- include/linux/hrtimer.h             |    4 
- include/linux/sched.h               |    6 
- include/trace/events/hist.h         |   73 ++
- include/trace/events/latency_hist.h |   29 
- kernel/time/hrtimer.c               |   21 
- kernel/trace/Kconfig                |  104 +++
- kernel/trace/Makefile               |    4 
- kernel/trace/latency_hist.c         | 1178 ++++++++++++++++++++++++++++++++++++
- kernel/trace/trace_irqsoff.c        |   11 
+ Documentation/trace/histograms.txt  |  186 ++++++
+ include/linux/hrtimer.h             |    4 +
+ include/linux/sched.h               |    6 +
+ include/trace/events/hist.h         |   73 +++
+ include/trace/events/latency_hist.h |   29 +
+ kernel/time/hrtimer.c               |   21 +
+ kernel/trace/Kconfig                |  104 ++++
+ kernel/trace/Makefile               |    4 +
+ kernel/trace/latency_hist.c         | 1178 +++++++++++++++++++++++++++++++++++
+ kernel/trace/trace_irqsoff.c        |   11 +
  10 files changed, 1616 insertions(+)
+ create mode 100644 Documentation/trace/histograms.txt
+ create mode 100644 include/trace/events/hist.h
+ create mode 100644 include/trace/events/latency_hist.h
+ create mode 100644 kernel/trace/latency_hist.c
 
+diff --git a/Documentation/trace/histograms.txt b/Documentation/trace/histograms.txt
+new file mode 100644
+index 000000000000..6f2aeabf7faa
 --- /dev/null
 +++ b/Documentation/trace/histograms.txt
 @@ -0,0 +1,186 @@
@@ -215,6 +221,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +is provided.
 +
 +These data are also reset when the wakeup histogram is reset.
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index 5e00f80b1535..3bddb7c8cc93 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
 @@ -87,6 +87,7 @@ enum hrtimer_restart {
@@ -235,9 +243,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	u8				is_rel;
  #ifdef CONFIG_TIMER_STATS
  	int				start_pid;
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index a15c94f3cbb6..30fbc4bb8f44 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1924,6 +1924,12 @@ struct task_struct {
+@@ -1934,6 +1934,12 @@ struct task_struct {
  	/* bitmask and counter of trace recursion */
  	unsigned long trace_recursion;
  #endif /* CONFIG_TRACING */
@@ -250,6 +260,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_KCOV
  	/* Coverage collection mode enabled for this task (0 if disabled). */
  	enum kcov_mode kcov_mode;
+diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h
+new file mode 100644
+index 000000000000..f7710de1b1f3
 --- /dev/null
 +++ b/include/trace/events/hist.h
 @@ -0,0 +1,73 @@
@@ -326,6 +339,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +
 +/* This part must be outside protection */
 +#include <trace/define_trace.h>
+diff --git a/include/trace/events/latency_hist.h b/include/trace/events/latency_hist.h
+new file mode 100644
+index 000000000000..d3f2fbd560b1
 --- /dev/null
 +++ b/include/trace/events/latency_hist.h
 @@ -0,0 +1,29 @@
@@ -358,6 +374,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +
 +#endif /* _LATENCY_HIST_H */
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index bb5ec425dfe0..cdb382ab2b1d 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
 @@ -53,6 +53,7 @@
@@ -368,7 +386,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #include "tick-internal.h"
  
-@@ -991,7 +992,16 @@ void hrtimer_start_range_ns(struct hrtim
+@@ -991,7 +992,16 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
  	new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
  
  	timer_stats_hrtimer_set_start_info(timer);
@@ -385,7 +403,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	leftmost = enqueue_hrtimer(timer, new_base);
  	if (!leftmost)
  		goto unlock;
-@@ -1265,6 +1275,8 @@ static void __run_hrtimer(struct hrtimer
+@@ -1265,6 +1275,8 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
  	cpu_base->running = NULL;
  }
  
@@ -394,7 +412,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
  {
  	struct hrtimer_clock_base *base = cpu_base->clock_base;
-@@ -1284,6 +1296,15 @@ static void __hrtimer_run_queues(struct
+@@ -1284,6 +1296,15 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
  
  			timer = container_of(node, struct hrtimer, node);
  
@@ -410,6 +428,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			/*
  			 * The immediate goal for using the softexpires is
  			 * minimizing wakeups, not running timers at the
+diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
+index 2a96b063d659..812e37237eb8 100644
 --- a/kernel/trace/Kconfig
 +++ b/kernel/trace/Kconfig
 @@ -182,6 +182,24 @@ config IRQSOFF_TRACER
@@ -537,9 +557,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  config ENABLE_DEFAULT_TRACERS
  	bool "Trace process context switches and events"
  	depends on !GENERIC_TRACER
+diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
+index e57980845549..83af000b783c 100644
 --- a/kernel/trace/Makefile
 +++ b/kernel/trace/Makefile
-@@ -38,6 +38,10 @@ obj-$(CONFIG_IRQSOFF_TRACER) += trace_ir
+@@ -38,6 +38,10 @@ obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o
  obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o
  obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o
  obj-$(CONFIG_HWLAT_TRACER) += trace_hwlat.o
@@ -550,6 +572,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  obj-$(CONFIG_NOP_TRACER) += trace_nop.o
  obj-$(CONFIG_STACK_TRACER) += trace_stack.o
  obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o
+diff --git a/kernel/trace/latency_hist.c b/kernel/trace/latency_hist.c
+new file mode 100644
+index 000000000000..66a69eb5329c
 --- /dev/null
 +++ b/kernel/trace/latency_hist.c
 @@ -0,0 +1,1178 @@
@@ -1731,6 +1756,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +
 +device_initcall(latency_hist_init);
+diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
+index 03cdff84d026..0b5947ea46ef 100644
 --- a/kernel/trace/trace_irqsoff.c
 +++ b/kernel/trace/trace_irqsoff.c
 @@ -13,6 +13,7 @@
@@ -1755,7 +1782,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (preempt_trace() || irq_trace())
  		stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
  }
-@@ -438,6 +441,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings)
+@@ -438,6 +441,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings);
  #ifdef CONFIG_PROVE_LOCKING
  void time_hardirqs_on(unsigned long a0, unsigned long a1)
  {
@@ -1763,7 +1790,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (!preempt_trace() && irq_trace())
  		stop_critical_timing(a0, a1);
  }
-@@ -446,6 +450,7 @@ void time_hardirqs_off(unsigned long a0,
+@@ -446,6 +450,7 @@ void time_hardirqs_off(unsigned long a0, unsigned long a1)
  {
  	if (!preempt_trace() && irq_trace())
  		start_critical_timing(a0, a1);
@@ -1771,7 +1798,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  #else /* !CONFIG_PROVE_LOCKING */
-@@ -471,6 +476,7 @@ inline void print_irqtrace_events(struct
+@@ -471,6 +476,7 @@ inline void print_irqtrace_events(struct task_struct *curr)
   */
  void trace_hardirqs_on(void)
  {
@@ -1793,7 +1820,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (!preempt_trace() && irq_trace())
  		stop_critical_timing(CALLER_ADDR0, caller_addr);
  }
-@@ -494,6 +502,7 @@ EXPORT_SYMBOL(trace_hardirqs_on_caller);
+@@ -494,6 +502,7 @@ __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
  {
  	if (!preempt_trace() && irq_trace())
  		start_critical_timing(CALLER_ADDR0, caller_addr);
@@ -1801,7 +1828,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(trace_hardirqs_off_caller);
  
-@@ -503,12 +512,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller)
+@@ -503,12 +512,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller);
  #ifdef CONFIG_PREEMPT_TRACER
  void trace_preempt_on(unsigned long a0, unsigned long a1)
  {
diff --git a/debian/patches/features/all/rt/latency_hist-update-sched_wakeup-probe.patch b/debian/patches/features/all/rt/0069-latency_hist-Update-sched_wakeup-probe.patch
similarity index 73%
rename from debian/patches/features/all/rt/latency_hist-update-sched_wakeup-probe.patch
rename to debian/patches/features/all/rt/0069-latency_hist-Update-sched_wakeup-probe.patch
index d0c863b..b384ce3 100644
--- a/debian/patches/features/all/rt/latency_hist-update-sched_wakeup-probe.patch
+++ b/debian/patches/features/all/rt/0069-latency_hist-Update-sched_wakeup-probe.patch
@@ -1,7 +1,7 @@
-Subject: latency_hist: Update sched_wakeup probe
 From: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
 Date: Sun, 25 Oct 2015 18:06:05 -0400
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 069/332] latency_hist: Update sched_wakeup probe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e579badb8fa9ebf1362c610bef973cb0c6426f71
 
 "sched: Introduce the 'trace_sched_waking' tracepoint" introduces a
 prototype change for the sched_wakeup probe: the "success" argument is
@@ -16,12 +16,14 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
 Link: http://lkml.kernel.org/r/1445810765-18732-1-git-send-email-mathieu.desnoyers@efficios.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/trace/latency_hist.c |    4 ++--
+ kernel/trace/latency_hist.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/trace/latency_hist.c b/kernel/trace/latency_hist.c
+index 66a69eb5329c..b6c1d14b71c4 100644
 --- a/kernel/trace/latency_hist.c
 +++ b/kernel/trace/latency_hist.c
-@@ -115,7 +115,7 @@ static DEFINE_PER_CPU(struct hist_data,
+@@ -115,7 +115,7 @@ static DEFINE_PER_CPU(struct hist_data, wakeup_latency_hist_sharedprio);
  static char *wakeup_latency_hist_dir = "wakeup";
  static char *wakeup_latency_hist_dir_sharedprio = "sharedprio";
  static notrace void probe_wakeup_latency_hist_start(void *v,
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static notrace void probe_wakeup_latency_hist_stop(void *v,
  	struct task_struct *prev, struct task_struct *next);
  static notrace void probe_sched_migrate_task(void *,
-@@ -869,7 +869,7 @@ static notrace void probe_sched_migrate_
+@@ -869,7 +869,7 @@ static notrace void probe_sched_migrate_task(void *v, struct task_struct *task,
  }
  
  static notrace void probe_wakeup_latency_hist_start(void *v,
diff --git a/debian/patches/features/all/rt/trace-latency-hist-Consider-new-argument-when-probin.patch b/debian/patches/features/all/rt/0070-trace-latency-hist-Consider-new-argument-when-probin.patch
similarity index 67%
rename from debian/patches/features/all/rt/trace-latency-hist-Consider-new-argument-when-probin.patch
rename to debian/patches/features/all/rt/0070-trace-latency-hist-Consider-new-argument-when-probin.patch
index 867d681..5af9cbd 100644
--- a/debian/patches/features/all/rt/trace-latency-hist-Consider-new-argument-when-probin.patch
+++ b/debian/patches/features/all/rt/0070-trace-latency-hist-Consider-new-argument-when-probin.patch
@@ -1,8 +1,8 @@
 From: Carsten Emde <C.Emde at osadl.org>
 Date: Tue, 5 Jan 2016 10:21:59 +0100
-Subject: trace/latency-hist: Consider new argument when probing the
- sched_switch tracer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 070/332] trace/latency-hist: Consider new argument when
+ probing the sched_switch tracer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9159ae42188595a5ea0fe12ec39b1ab9e4307293
 
 The sched_switch tracer has got a new argument. Fix the latency tracer
 accordingly.
@@ -13,12 +13,14 @@ v4.4-rc1.
 Signed-off-by: Carsten Emde <C.Emde at osadl.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/trace/latency_hist.c |    4 ++--
+ kernel/trace/latency_hist.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/trace/latency_hist.c b/kernel/trace/latency_hist.c
+index b6c1d14b71c4..7f6ee70dea41 100644
 --- a/kernel/trace/latency_hist.c
 +++ b/kernel/trace/latency_hist.c
-@@ -117,7 +117,7 @@ static char *wakeup_latency_hist_dir_sha
+@@ -117,7 +117,7 @@ static char *wakeup_latency_hist_dir_sharedprio = "sharedprio";
  static notrace void probe_wakeup_latency_hist_start(void *v,
  	struct task_struct *p);
  static notrace void probe_wakeup_latency_hist_stop(void *v,
@@ -27,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static notrace void probe_sched_migrate_task(void *,
  	struct task_struct *task, int cpu);
  static struct enable_data wakeup_latency_enabled_data = {
-@@ -907,7 +907,7 @@ static notrace void probe_wakeup_latency
+@@ -907,7 +907,7 @@ static notrace void probe_wakeup_latency_hist_start(void *v,
  }
  
  static notrace void probe_wakeup_latency_hist_stop(void *v,
diff --git a/debian/patches/features/all/rt/trace_Use_rcuidle_version_for_preemptoff_hist_trace_point.patch b/debian/patches/features/all/rt/0071-trace-Use-rcuidle-version-for-preemptoff_hist-trace-.patch
similarity index 85%
rename from debian/patches/features/all/rt/trace_Use_rcuidle_version_for_preemptoff_hist_trace_point.patch
rename to debian/patches/features/all/rt/0071-trace-Use-rcuidle-version-for-preemptoff_hist-trace-.patch
index 3ce95fc..027f860 100644
--- a/debian/patches/features/all/rt/trace_Use_rcuidle_version_for_preemptoff_hist_trace_point.patch
+++ b/debian/patches/features/all/rt/0071-trace-Use-rcuidle-version-for-preemptoff_hist-trace-.patch
@@ -1,7 +1,8 @@
-Subject: trace: Use rcuidle version for preemptoff_hist trace point
 From: Yang Shi <yang.shi at windriver.com>
 Date: Tue, 23 Feb 2016 13:23:23 -0800
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 071/332] trace: Use rcuidle version for preemptoff_hist trace
+ point
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1212783e7c04dffb0e1ee869c77b7d2f56490ec5
 
 When running -rt kernel with both PREEMPT_OFF_HIST and LOCKDEP enabled,
 the below error is reported:
@@ -47,12 +48,11 @@ Cc: linux-rt-users at vger.kernel.org
 Link: http://lkml.kernel.org/r/1456262603-10075-1-git-send-email-yang.shi@windriver.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
-I recall the rcuidle version is used by 4.1-rt, but not sure why it is dropped
-in 4.4-rt. It looks such fix is still needed. 
-
- kernel/trace/trace_irqsoff.c |    8 ++++----
+ kernel/trace/trace_irqsoff.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
+index 0b5947ea46ef..940bd10b4406 100644
 --- a/kernel/trace/trace_irqsoff.c
 +++ b/kernel/trace/trace_irqsoff.c
 @@ -425,13 +425,13 @@ void start_critical_timings(void)
@@ -71,7 +71,7 @@ in 4.4-rt. It looks such fix is still needed.
  	if (preempt_trace() || irq_trace())
  		stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1);
  }
-@@ -441,7 +441,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings)
+@@ -441,7 +441,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings);
  #ifdef CONFIG_PROVE_LOCKING
  void time_hardirqs_on(unsigned long a0, unsigned long a1)
  {
@@ -80,7 +80,7 @@ in 4.4-rt. It looks such fix is still needed.
  	if (!preempt_trace() && irq_trace())
  		stop_critical_timing(a0, a1);
  }
-@@ -450,7 +450,7 @@ void time_hardirqs_off(unsigned long a0,
+@@ -450,7 +450,7 @@ void time_hardirqs_off(unsigned long a0, unsigned long a1)
  {
  	if (!preempt_trace() && irq_trace())
  		start_critical_timing(a0, a1);
diff --git a/debian/patches/features/all/rt/printk-kill.patch b/debian/patches/features/all/rt/0072-printk-Add-a-printk-kill-switch.patch
similarity index 71%
rename from debian/patches/features/all/rt/printk-kill.patch
rename to debian/patches/features/all/rt/0072-printk-Add-a-printk-kill-switch.patch
index d52b2af..38b1195 100644
--- a/debian/patches/features/all/rt/printk-kill.patch
+++ b/debian/patches/features/all/rt/0072-printk-Add-a-printk-kill-switch.patch
@@ -1,18 +1,20 @@
-Subject: printk: Add a printk kill switch
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 22 Jul 2011 17:58:40 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 072/332] printk: Add a printk kill switch
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=744b774f50f43943933c3f0c7673d07f015339c4
 
 Add a prinkt-kill-switch. This is used from (NMI) watchdog to ensure that
 it does not dead-lock with the early printk code.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/printk.h |    2 +
- kernel/printk/printk.c |   79 ++++++++++++++++++++++++++++++++++++-------------
- kernel/watchdog.c      |   10 ++++++
- 3 files changed, 71 insertions(+), 20 deletions(-)
+ include/linux/printk.h |  2 ++
+ kernel/printk/printk.c | 79 +++++++++++++++++++++++++++++++++++++-------------
+ kernel/watchdog_hld.c  |  9 ++++++
+ 3 files changed, 70 insertions(+), 20 deletions(-)
 
+diff --git a/include/linux/printk.h b/include/linux/printk.h
+index eac1af8502bb..37e647af0b0b 100644
 --- a/include/linux/printk.h
 +++ b/include/linux/printk.h
 @@ -126,9 +126,11 @@ struct va_format {
@@ -27,9 +29,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  #ifdef CONFIG_PRINTK_NMI
+diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
+index 9c5b231684d0..9d9e1f7e4240 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
-@@ -351,6 +351,58 @@ struct printk_log {
+@@ -351,6 +351,58 @@ __packed __aligned(4)
   */
  DEFINE_RAW_SPINLOCK(logbuf_lock);
  
@@ -88,7 +92,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_PRINTK
  DECLARE_WAIT_QUEUE_HEAD(log_wait);
  /* the next printk record to read by syslog(READ) or /proc/kmsg */
-@@ -1781,6 +1833,13 @@ asmlinkage int vprintk_emit(int facility
+@@ -1781,6 +1833,13 @@ asmlinkage int vprintk_emit(int facility, int level,
  	/* cpu currently holding logbuf_lock in this function */
  	static unsigned int logbuf_cpu = UINT_MAX;
  
@@ -102,7 +106,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (level == LOGLEVEL_SCHED) {
  		level = LOGLEVEL_DEFAULT;
  		in_sched = true;
-@@ -2014,26 +2073,6 @@ DEFINE_PER_CPU(printk_func_t, printk_fun
+@@ -2014,26 +2073,6 @@ DEFINE_PER_CPU(printk_func_t, printk_func);
  
  #endif /* CONFIG_PRINTK */
  
@@ -129,18 +133,19 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static int __add_preferred_console(char *name, int idx, char *options,
  				   char *brl_options)
  {
---- a/kernel/watchdog.c
-+++ b/kernel/watchdog.c
-@@ -315,6 +315,8 @@ static int is_softlockup(unsigned long t
- 
- #ifdef CONFIG_HARDLOCKUP_DETECTOR
- 
+diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c
+index 12b8dd640786..4c90d2ee7433 100644
+--- a/kernel/watchdog_hld.c
++++ b/kernel/watchdog_hld.c
+@@ -19,6 +19,7 @@
+ static DEFINE_PER_CPU(bool, hard_watchdog_warn);
+ static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
+ static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
 +static DEFINE_RAW_SPINLOCK(watchdog_output_lock);
-+
- static struct perf_event_attr wd_hw_attr = {
- 	.type		= PERF_TYPE_HARDWARE,
- 	.config		= PERF_COUNT_HW_CPU_CYCLES,
-@@ -348,6 +350,13 @@ static void watchdog_overflow_callback(s
+ 
+ /* boot commands */
+ /*
+@@ -104,6 +105,13 @@ static void watchdog_overflow_callback(struct perf_event *event,
  		/* only print hardlockups once */
  		if (__this_cpu_read(hard_watchdog_warn) == true)
  			return;
@@ -154,7 +159,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
  		print_modules();
-@@ -365,6 +374,7 @@ static void watchdog_overflow_callback(s
+@@ -121,6 +129,7 @@ static void watchdog_overflow_callback(struct perf_event *event,
  				!test_and_set_bit(0, &hardlockup_allcpu_dumped))
  			trigger_allbutself_cpu_backtrace();
  
diff --git a/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch b/debian/patches/features/all/rt/0073-printk-Add-force_early_printk-boot-param-to-help-wit.patch
similarity index 61%
rename from debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch
rename to debian/patches/features/all/rt/0073-printk-Add-force_early_printk-boot-param-to-help-wit.patch
index 56c0689..6ca0e8f 100644
--- a/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch
+++ b/debian/patches/features/all/rt/0073-printk-Add-force_early_printk-boot-param-to-help-wit.patch
@@ -1,7 +1,8 @@
-Subject: printk: Add "force_early_printk" boot param to help with debugging
 From: Peter Zijlstra <peterz at infradead.org>
-Date: Fri, 02 Sep 2011 14:41:29 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 2 Sep 2011 14:41:29 +0200
+Subject: [PATCH 073/332] printk: Add "force_early_printk" boot param to help
+ with debugging
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6b619b1d8c87dcd794c924b93afb220dd72ce049
 
 Gives me an option to screw printk and actually see what the machine
 says.
@@ -11,12 +12,14 @@ Link: http://lkml.kernel.org/r/1314967289.1301.11.camel@twins
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Link: http://lkml.kernel.org/n/tip-ykb97nsfmobq44xketrxs977@git.kernel.org
 ---
- kernel/printk/printk.c |    7 +++++++
+ kernel/printk/printk.c | 7 +++++++
  1 file changed, 7 insertions(+)
 
+diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
+index 9d9e1f7e4240..35fb8be3e811 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
-@@ -381,6 +381,13 @@ asmlinkage void early_printk(const char
+@@ -381,6 +381,13 @@ asmlinkage void early_printk(const char *fmt, ...)
   */
  static bool __read_mostly printk_killswitch;
  
diff --git a/debian/patches/features/all/rt/rt-preempt-base-config.patch b/debian/patches/features/all/rt/0074-rt-Provide-PREEMPT_RT_BASE-config-switch.patch
similarity index 79%
rename from debian/patches/features/all/rt/rt-preempt-base-config.patch
rename to debian/patches/features/all/rt/0074-rt-Provide-PREEMPT_RT_BASE-config-switch.patch
index ed64104..c8ae906 100644
--- a/debian/patches/features/all/rt/rt-preempt-base-config.patch
+++ b/debian/patches/features/all/rt/0074-rt-Provide-PREEMPT_RT_BASE-config-switch.patch
@@ -1,7 +1,7 @@
-Subject: rt: Provide PREEMPT_RT_BASE config switch
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 17 Jun 2011 12:39:57 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 074/332] rt: Provide PREEMPT_RT_BASE config switch
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=633763a3997f79bf85fac1854c2a32c872914560
 
 Introduce PREEMPT_RT_BASE which enables parts of
 PREEMPT_RT_FULL. Forces interrupt threading and enables some of the RT
@@ -9,9 +9,11 @@ substitutions for testing.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/Kconfig.preempt |   19 +++++++++++++++++--
+ kernel/Kconfig.preempt | 19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
+index 3f9c97419f02..c669134982ec 100644
 --- a/kernel/Kconfig.preempt
 +++ b/kernel/Kconfig.preempt
 @@ -1,3 +1,10 @@
diff --git a/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch b/debian/patches/features/all/rt/0075-kconfig-Disable-config-options-which-are-not-RT-comp.patch
similarity index 66%
rename from debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch
rename to debian/patches/features/all/rt/0075-kconfig-Disable-config-options-which-are-not-RT-comp.patch
index 67de3bd..0a43f52 100644
--- a/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch
+++ b/debian/patches/features/all/rt/0075-kconfig-Disable-config-options-which-are-not-RT-comp.patch
@@ -1,16 +1,19 @@
-Subject: kconfig: Disable config options which are not RT compatible
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 24 Jul 2011 12:11:43 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 075/332] kconfig: Disable config options which are not RT
+ compatible
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3c2893a32ad2a35f883320e5f37904dbd69980c4
 
 Disable stuff which is known to have issues on RT
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/Kconfig |    1 +
- mm/Kconfig   |    2 +-
+ arch/Kconfig | 1 +
+ mm/Kconfig   | 2 +-
  2 files changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/arch/Kconfig b/arch/Kconfig
+index daac7dc4591c..099fc0f5155e 100644
 --- a/arch/Kconfig
 +++ b/arch/Kconfig
 @@ -9,6 +9,7 @@ config OPROFILE
@@ -21,6 +24,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	select RING_BUFFER
  	select RING_BUFFER_ALLOW_SWAP
  	help
+diff --git a/mm/Kconfig b/mm/Kconfig
+index 86e3e0e74d20..77e5862a1ed2 100644
 --- a/mm/Kconfig
 +++ b/mm/Kconfig
 @@ -410,7 +410,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
diff --git a/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch b/debian/patches/features/all/rt/0076-kconfig-Add-PREEMPT_RT_FULL.patch
similarity index 70%
rename from debian/patches/features/all/rt/kconfig-preempt-rt-full.patch
rename to debian/patches/features/all/rt/0076-kconfig-Add-PREEMPT_RT_FULL.patch
index d60cedd..07b9dfa 100644
--- a/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch
+++ b/debian/patches/features/all/rt/0076-kconfig-Add-PREEMPT_RT_FULL.patch
@@ -1,25 +1,29 @@
-Subject: kconfig: Add PREEMPT_RT_FULL
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 29 Jun 2011 14:58:57 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 076/332] kconfig: Add PREEMPT_RT_FULL
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1ab6d9e267cc81a2695560f4b363c388c8b8dd73
 
 Introduce the final symbol for PREEMPT_RT_FULL.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- init/Makefile          |    2 +-
- kernel/Kconfig.preempt |    8 ++++++++
- scripts/mkcompile_h    |    4 +++-
+ init/Makefile          | 2 +-
+ kernel/Kconfig.preempt | 8 ++++++++
+ scripts/mkcompile_h    | 4 +++-
  3 files changed, 12 insertions(+), 2 deletions(-)
 
+diff --git a/init/Makefile b/init/Makefile
+index c4fb45525d08..821190dfaa75 100644
 --- a/init/Makefile
 +++ b/init/Makefile
-@@ -35,4 +35,4 @@ mounts-$(CONFIG_BLK_DEV_MD)	+= do_mounts
+@@ -35,4 +35,4 @@ $(obj)/version.o: include/generated/compile.h
  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 --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
+index c669134982ec..f8a2982bdbde 100644
 --- a/kernel/Kconfig.preempt
 +++ b/kernel/Kconfig.preempt
 @@ -67,6 +67,14 @@ config PREEMPT_RTB
@@ -37,6 +41,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  endchoice
  
  config PREEMPT_COUNT
+diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
+index 6fdc97ef6023..523e0420d7f0 100755
 --- a/scripts/mkcompile_h
 +++ b/scripts/mkcompile_h
 @@ -4,7 +4,8 @@ TARGET=$1
diff --git a/debian/patches/features/all/rt/bug-rt-dependend-variants.patch b/debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
similarity index 68%
rename from debian/patches/features/all/rt/bug-rt-dependend-variants.patch
rename to debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
index 91824ed..25d6145 100644
--- a/debian/patches/features/all/rt/bug-rt-dependend-variants.patch
+++ b/debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
@@ -1,20 +1,21 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:58 -0500
-Subject: bug: BUG_ON/WARN_ON variants dependend on RT/!RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 077/332] bug: BUG_ON/WARN_ON variants dependend on RT/!RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f38daa3bf5b2f85cc8bd852b9b24ff3ca4161612
 
 Introduce RT/NON-RT WARN/BUG statements to avoid ifdefs in the code.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/asm-generic/bug.h |   14 ++++++++++++++
+ include/asm-generic/bug.h | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
 
+diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
+index 6f96247226a4..fa53a21263c2 100644
 --- a/include/asm-generic/bug.h
 +++ b/include/asm-generic/bug.h
-@@ -215,6 +215,20 @@ void __warn(const char *file, int line,
+@@ -215,6 +215,20 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
  # define WARN_ON_SMP(x)			({0;})
  #endif
  
diff --git a/debian/patches/features/all/rt/iommu-amd--Use-WARN_ON_NORT.patch b/debian/patches/features/all/rt/0078-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
similarity index 77%
rename from debian/patches/features/all/rt/iommu-amd--Use-WARN_ON_NORT.patch
rename to debian/patches/features/all/rt/0078-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
index 00f0814..35de504 100644
--- a/debian/patches/features/all/rt/iommu-amd--Use-WARN_ON_NORT.patch
+++ b/debian/patches/features/all/rt/0078-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
@@ -1,7 +1,7 @@
-Subject: iommu/amd: Use WARN_ON_NORT in __attach_device()
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 27 Feb 2016 10:22:23 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 078/332] iommu/amd: Use WARN_ON_NORT in __attach_device()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f7670baf7d141f4c9416c06bf0f6c8c1557471d3
 
 RT does not disable interrupts here, but the protection is still
 correct. Fixup the WARN_ON so it won't yell on RT.
@@ -12,12 +12,14 @@ amd_iommu_devtable_lock is held.
 Reported-by: DIXLOR <dixlor at gmail.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/iommu/amd_iommu.c |   12 ++++++------
+ drivers/iommu/amd_iommu.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
 
+diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
+index c380b7e8f1c6..8604651dfb59 100644
 --- a/drivers/iommu/amd_iommu.c
 +++ b/drivers/iommu/amd_iommu.c
-@@ -1923,10 +1923,10 @@ static int __attach_device(struct iommu_
+@@ -1923,10 +1923,10 @@ static int __attach_device(struct iommu_dev_data *dev_data,
  	int ret;
  
  	/*
@@ -31,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* lock domain */
  	spin_lock(&domain->lock);
-@@ -2094,10 +2094,10 @@ static void __detach_device(struct iommu
+@@ -2094,10 +2094,10 @@ static void __detach_device(struct iommu_dev_data *dev_data)
  	struct protection_domain *domain;
  
  	/*
diff --git a/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch b/debian/patches/features/all/rt/0079-rt-local_irq_-variants-depending-on-RT-RT.patch
similarity index 72%
rename from debian/patches/features/all/rt/local-irq-rt-depending-variants.patch
rename to debian/patches/features/all/rt/0079-rt-local_irq_-variants-depending-on-RT-RT.patch
index 08c280c..ee629da 100644
--- a/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch
+++ b/debian/patches/features/all/rt/0079-rt-local_irq_-variants-depending-on-RT-RT.patch
@@ -1,22 +1,23 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 21 Jul 2009 22:34:14 +0200
-Subject: rt: local_irq_* variants depending on RT/!RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 079/332] rt: local_irq_* variants depending on RT/!RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=78c0b773e47eb70060f7fa504de181798f975537
 
 Add local_irq_*_(no)rt variant which are mainly used to break
 interrupt disabled sections on PREEMPT_RT or to explicitely disable
 interrupts on PREEMPT_RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/interrupt.h |    2 +-
- include/linux/irqflags.h  |   19 +++++++++++++++++++
+ include/linux/interrupt.h |  2 +-
+ include/linux/irqflags.h  | 19 +++++++++++++++++++
  2 files changed, 20 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 72f0721f75e7..3b41621b0697 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
-@@ -196,7 +196,7 @@ extern void devm_free_irq(struct device
+@@ -196,7 +196,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
  #ifdef CONFIG_LOCKDEP
  # define local_irq_enable_in_hardirq()	do { } while (0)
  #else
@@ -25,6 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  extern void disable_irq_nosync(unsigned int irq);
+diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
+index 5dd1272d1ab2..f8f27cc5546f 100644
 --- a/include/linux/irqflags.h
 +++ b/include/linux/irqflags.h
 @@ -148,4 +148,23 @@
diff --git a/debian/patches/features/all/rt/preempt-nort-rt-variants.patch b/debian/patches/features/all/rt/0080-preempt-Provide-preempt_-_-no-rt-variants.patch
similarity index 79%
rename from debian/patches/features/all/rt/preempt-nort-rt-variants.patch
rename to debian/patches/features/all/rt/0080-preempt-Provide-preempt_-_-no-rt-variants.patch
index aa00aa6..a246a2c 100644
--- a/debian/patches/features/all/rt/preempt-nort-rt-variants.patch
+++ b/debian/patches/features/all/rt/0080-preempt-Provide-preempt_-_-no-rt-variants.patch
@@ -1,17 +1,18 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 24 Jul 2009 12:38:56 +0200
-Subject: preempt: Provide preempt_*_(no)rt variants
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 080/332] preempt: Provide preempt_*_(no)rt variants
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cdeb92ec78eb96f1dbaa62700dc866e207d42a93
 
 RT needs a few preempt_disable/enable points which are not necessary
 otherwise. Implement variants to avoid #ifdeffery.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/preempt.h |   18 +++++++++++++++++-
+ include/linux/preempt.h | 18 +++++++++++++++++-
  1 file changed, 17 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 75e4e30677f1..a15f948667e9 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -154,7 +154,11 @@ do { \
diff --git a/debian/patches/features/all/rt/introduce_migrate_disable_cpu_light.patch b/debian/patches/features/all/rt/0081-Intrduce-migrate_disable-cpu_light.patch
similarity index 76%
rename from debian/patches/features/all/rt/introduce_migrate_disable_cpu_light.patch
rename to debian/patches/features/all/rt/0081-Intrduce-migrate_disable-cpu_light.patch
index 8ff2fdf..2f82b5a 100644
--- a/debian/patches/features/all/rt/introduce_migrate_disable_cpu_light.patch
+++ b/debian/patches/features/all/rt/0081-Intrduce-migrate_disable-cpu_light.patch
@@ -1,7 +1,7 @@
-Subject: Intrduce migrate_disable() + cpu_light()
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 17 Jun 2011 15:42:38 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 081/332] Intrduce migrate_disable() + cpu_light()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e2a8770059be1ec00116d8c316b3fb343098baf2
 
 Introduce migrate_disable(). The task can't be pushed to another CPU but can
 be preempted.
@@ -31,18 +31,20 @@ invoked again from another caller on the same CPU.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/cpu.h     |    3 ++
- include/linux/preempt.h |    9 ++++++
- include/linux/sched.h   |   39 +++++++++++++++++++++-----
- include/linux/smp.h     |    3 ++
- kernel/sched/core.c     |   70 +++++++++++++++++++++++++++++++++++++++++++++++-
- kernel/sched/debug.c    |    7 ++++
- lib/smp_processor_id.c  |    5 ++-
+ include/linux/cpu.h     |  3 +++
+ include/linux/preempt.h |  9 +++++++
+ include/linux/sched.h   | 39 +++++++++++++++++++++------
+ include/linux/smp.h     |  3 +++
+ kernel/sched/core.c     | 70 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ kernel/sched/debug.c    |  7 +++++
+ lib/smp_processor_id.c  |  5 ++--
  7 files changed, 125 insertions(+), 11 deletions(-)
 
+diff --git a/include/linux/cpu.h b/include/linux/cpu.h
+index e571128ad99a..dcfcdd563f69 100644
 --- a/include/linux/cpu.h
 +++ b/include/linux/cpu.h
-@@ -173,6 +173,9 @@ static inline void cpu_notifier_register
+@@ -173,6 +173,9 @@ static inline void cpu_notifier_register_done(void)
  #endif /* CONFIG_SMP */
  extern struct bus_type cpu_subsys;
  
@@ -52,6 +54,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_HOTPLUG_CPU
  /* Stop CPUs going up and down. */
  
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index a15f948667e9..57c7731bfe04 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -257,11 +257,20 @@ do { \
@@ -75,9 +79,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  #ifdef CONFIG_PREEMPT_NOTIFIERS
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 30fbc4bb8f44..bfe832b3fc9f 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1520,6 +1520,12 @@ struct task_struct {
+@@ -1530,6 +1530,12 @@ struct task_struct {
  #endif
  
  	unsigned int policy;
@@ -90,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	int nr_cpus_allowed;
  	cpumask_t cpus_allowed;
  
-@@ -1997,14 +2003,6 @@ static inline struct vm_struct *task_sta
+@@ -2007,14 +2013,6 @@ static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t)
  }
  #endif
  
@@ -105,7 +111,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define TNF_MIGRATED	0x01
  #define TNF_NO_GROUP	0x02
  #define TNF_SHARED	0x04
-@@ -3522,6 +3520,31 @@ static inline void set_task_cpu(struct t
+@@ -3536,6 +3534,31 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
  
  #endif /* CONFIG_SMP */
  
@@ -137,6 +143,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask);
  extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
  
+diff --git a/include/linux/smp.h b/include/linux/smp.h
+index 68123c1fe549..891c533724f5 100644
 --- a/include/linux/smp.h
 +++ b/include/linux/smp.h
 @@ -197,6 +197,9 @@ static inline int get_boot_cpu_id(void)
@@ -149,9 +157,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Callback to arch code if there's nosmp or maxcpus=0 on the
   * boot command line:
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 36698b5fb0c7..bf8f5ad19ac5 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -1100,6 +1100,11 @@ void do_set_cpus_allowed(struct task_str
+@@ -1100,6 +1100,11 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
  
  	lockdep_assert_held(&p->pi_lock);
  
@@ -163,7 +173,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	queued = task_on_rq_queued(p);
  	running = task_current(rq, p);
  
-@@ -1179,7 +1184,7 @@ static int __set_cpus_allowed_ptr(struct
+@@ -1179,7 +1184,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,
  	}
  
  	/* Can the task run on the task's current CPU? If so, we're done */
@@ -172,7 +182,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		goto out;
  
  	dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask);
-@@ -3252,6 +3257,69 @@ static inline void schedule_debug(struct
+@@ -3252,6 +3257,69 @@ static inline void schedule_debug(struct task_struct *prev)
  	schedstat_inc(this_rq()->sched_count);
  }
  
@@ -242,9 +252,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Pick up the highest-prio task:
   */
+diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
+index fa178b62ea79..935224123441 100644
 --- a/kernel/sched/debug.c
 +++ b/kernel/sched/debug.c
-@@ -558,6 +558,9 @@ void print_rt_rq(struct seq_file *m, int
+@@ -558,6 +558,9 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
  	P(rt_throttled);
  	PN(rt_time);
  	PN(rt_runtime);
@@ -254,7 +266,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #undef PN
  #undef P
-@@ -953,6 +956,10 @@ void proc_sched_show_task(struct task_st
+@@ -953,6 +956,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
  #endif
  	P(policy);
  	P(prio);
@@ -265,9 +277,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #undef PN_SCHEDSTAT
  #undef PN
  #undef __PN
+diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
+index 1afec32de6f2..11fa431046a8 100644
 --- a/lib/smp_processor_id.c
 +++ b/lib/smp_processor_id.c
-@@ -39,8 +39,9 @@ notrace static unsigned int check_preemp
+@@ -39,8 +39,9 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
  	if (!printk_ratelimit())
  		goto out_enable;
  
diff --git a/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch b/debian/patches/features/all/rt/0082-futex-workaround-migrate_disable-enable-in-different.patch
similarity index 77%
rename from debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch
rename to debian/patches/features/all/rt/0082-futex-workaround-migrate_disable-enable-in-different.patch
index 8d6d8ce..92a825d 100644
--- a/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch
+++ b/debian/patches/features/all/rt/0082-futex-workaround-migrate_disable-enable-in-different.patch
@@ -1,7 +1,8 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 8 Mar 2017 14:23:35 +0100
-Subject: [PATCH] futex: workaround migrate_disable/enable in different context
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 082/332] futex: workaround migrate_disable/enable in different
+ context
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7d9f0c504d69ced03dd094c2855fae5b8838489c
 
 migrate_disable()/migrate_enable() takes a different path in atomic() vs
 !atomic() context. These little hacks ensure that we don't underflow / overflow
@@ -11,12 +12,14 @@ enabled and unlock it with interrupts disabled.
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |   20 ++++++++++++++++++++
+ kernel/futex.c | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index c1d2034800aa..1ec1a9910beb 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2669,9 +2669,18 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2670,9 +2670,18 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  	 * lock handoff sequence.
  	 */
  	raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock);
@@ -35,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (ret) {
  		if (ret == 1)
-@@ -2815,10 +2824,21 @@ static int futex_unlock_pi(u32 __user *u
+@@ -2816,10 +2825,21 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
  		 * observed.
  		 */
  		raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
diff --git a/debian/patches/features/all/rt/rt-local-irq-lock.patch b/debian/patches/features/all/rt/0083-rt-Add-local-irq-locks.patch
similarity index 93%
rename from debian/patches/features/all/rt/rt-local-irq-lock.patch
rename to debian/patches/features/all/rt/0083-rt-Add-local-irq-locks.patch
index 9fc4f30..e97779d 100644
--- a/debian/patches/features/all/rt/rt-local-irq-lock.patch
+++ b/debian/patches/features/all/rt/0083-rt-Add-local-irq-locks.patch
@@ -1,7 +1,7 @@
-Subject: rt: Add local irq locks
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 20 Jun 2011 09:03:47 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 083/332] rt: Add local irq locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=57982830f4e3df791a7cef27bae1afdc34e87592
 
 Introduce locallock. For !RT this maps to preempt_disable()/
 local_irq_disable() so there is not much that changes. For RT this will
@@ -13,10 +13,14 @@ is held and the owner is preempted.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/locallock.h |  266 ++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/percpu.h    |   29 +++++
+ include/linux/locallock.h | 266 ++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/percpu.h    |  29 +++++
  2 files changed, 295 insertions(+)
+ create mode 100644 include/linux/locallock.h
 
+diff --git a/include/linux/locallock.h b/include/linux/locallock.h
+new file mode 100644
+index 000000000000..218e5a4db343
 --- /dev/null
 +++ b/include/linux/locallock.h
 @@ -0,0 +1,266 @@
@@ -286,6 +290,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +#endif
 +
 +#endif
+diff --git a/include/linux/percpu.h b/include/linux/percpu.h
+index 491b3f5a5f8a..b988bf40ad3e 100644
 --- a/include/linux/percpu.h
 +++ b/include/linux/percpu.h
 @@ -18,6 +18,35 @@
diff --git a/debian/patches/features/all/rt/locallock-add-local_lock_on.patch b/debian/patches/features/all/rt/0084-locallock-add-local_lock_on.patch
similarity index 63%
rename from debian/patches/features/all/rt/locallock-add-local_lock_on.patch
rename to debian/patches/features/all/rt/0084-locallock-add-local_lock_on.patch
index e0b0f0e..a5b9a69 100644
--- a/debian/patches/features/all/rt/locallock-add-local_lock_on.patch
+++ b/debian/patches/features/all/rt/0084-locallock-add-local_lock_on.patch
@@ -1,16 +1,18 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 27 May 2016 15:11:51 +0200
-Subject: [PATCH] locallock: add local_lock_on()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 084/332] locallock: add local_lock_on()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e7433476dbf7d7c9c758b6177296a65e3d3a49be
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/locallock.h |    6 ++++++
+ include/linux/locallock.h | 6 ++++++
  1 file changed, 6 insertions(+)
 
+diff --git a/include/linux/locallock.h b/include/linux/locallock.h
+index 218e5a4db343..96f22c568998 100644
 --- a/include/linux/locallock.h
 +++ b/include/linux/locallock.h
-@@ -60,6 +60,9 @@ static inline void __local_lock(struct l
+@@ -60,6 +60,9 @@ static inline void __local_lock(struct local_irq_lock *lv)
  #define local_lock(lvar)					\
  	do { __local_lock(&get_local_var(lvar)); } while (0)
  
@@ -20,7 +22,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static inline int __local_trylock(struct local_irq_lock *lv)
  {
  	if (lv->owner != current && spin_trylock_local(&lv->lock)) {
-@@ -98,6 +101,9 @@ static inline void __local_unlock(struct
+@@ -98,6 +101,9 @@ static inline void __local_unlock(struct local_irq_lock *lv)
  		put_local_var(lvar);				\
  	} while (0)
  
diff --git a/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch b/debian/patches/features/all/rt/0085-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch
similarity index 63%
rename from debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch
rename to debian/patches/features/all/rt/0085-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch
index 5c38ffe..75a30da 100644
--- a/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch
+++ b/debian/patches/features/all/rt/0085-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch
@@ -1,21 +1,23 @@
 From: Steven Rostedt <srostedt at redhat.com>
 Date: Fri, 3 Jul 2009 08:44:29 -0500
-Subject: ata: Do not disable interrupts in ide code for preempt-rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 085/332] ata: Do not disable interrupts in ide code for
+ preempt-rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5ef752b679ce794658ca680e26a996cf9224304e
 
 Use the local_irq_*_nort variants.
 
 Signed-off-by: Steven Rostedt <srostedt at redhat.com>
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/ata/libata-sff.c |   12 ++++++------
+ drivers/ata/libata-sff.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
 
+diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
+index 051b6158d1b7..7ad293bef6ed 100644
 --- a/drivers/ata/libata-sff.c
 +++ b/drivers/ata/libata-sff.c
-@@ -678,9 +678,9 @@ unsigned int ata_sff_data_xfer_noirq(str
+@@ -678,9 +678,9 @@ unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, unsigned char *buf,
  	unsigned long flags;
  	unsigned int consumed;
  
@@ -27,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return consumed;
  }
-@@ -719,7 +719,7 @@ static void ata_pio_sector(struct ata_qu
+@@ -719,7 +719,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
  		unsigned long flags;
  
  		/* FIXME: use a bounce buffer */
@@ -36,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		buf = kmap_atomic(page);
  
  		/* do the actual data transfer */
-@@ -727,7 +727,7 @@ static void ata_pio_sector(struct ata_qu
+@@ -727,7 +727,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
  				       do_write);
  
  		kunmap_atomic(buf);
@@ -45,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else {
  		buf = page_address(page);
  		ap->ops->sff_data_xfer(qc->dev, buf + offset, qc->sect_size,
-@@ -864,7 +864,7 @@ static int __atapi_pio_bytes(struct ata_
+@@ -864,7 +864,7 @@ static int __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
  		unsigned long flags;
  
  		/* FIXME: use bounce buffer */
@@ -54,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		buf = kmap_atomic(page);
  
  		/* do the actual data transfer */
-@@ -872,7 +872,7 @@ static int __atapi_pio_bytes(struct ata_
+@@ -872,7 +872,7 @@ static int __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
  								count, rw);
  
  		kunmap_atomic(buf);
diff --git a/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch b/debian/patches/features/all/rt/0086-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch
similarity index 60%
rename from debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch
rename to debian/patches/features/all/rt/0086-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch
index 12230a5..6e3d789 100644
--- a/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch
+++ b/debian/patches/features/all/rt/0086-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch
@@ -1,26 +1,27 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:30:16 -0500
-Subject: ide: Do not disable interrupts for PREEMPT-RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 086/332] ide: Do not disable interrupts for PREEMPT-RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=780125cc29b647742d37d60edfb41be8d4ac1025
 
 Use the local_irq_*_nort variants.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/ide/alim15x3.c     |    4 ++--
- drivers/ide/hpt366.c       |    4 ++--
- drivers/ide/ide-io-std.c   |    8 ++++----
- drivers/ide/ide-io.c       |    2 +-
- drivers/ide/ide-iops.c     |    4 ++--
- drivers/ide/ide-probe.c    |    4 ++--
- drivers/ide/ide-taskfile.c |    6 +++---
+ drivers/ide/alim15x3.c     | 4 ++--
+ drivers/ide/hpt366.c       | 4 ++--
+ drivers/ide/ide-io-std.c   | 8 ++++----
+ drivers/ide/ide-io.c       | 2 +-
+ drivers/ide/ide-iops.c     | 4 ++--
+ drivers/ide/ide-probe.c    | 4 ++--
+ drivers/ide/ide-taskfile.c | 6 +++---
  7 files changed, 16 insertions(+), 16 deletions(-)
 
+diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
+index 36f76e28a0bf..394f142f90c7 100644
 --- a/drivers/ide/alim15x3.c
 +++ b/drivers/ide/alim15x3.c
-@@ -234,7 +234,7 @@ static int init_chipset_ali15x3(struct p
+@@ -234,7 +234,7 @@ static int init_chipset_ali15x3(struct pci_dev *dev)
  
  	isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
  
@@ -29,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (m5229_revision < 0xC2) {
  		/*
-@@ -325,7 +325,7 @@ static int init_chipset_ali15x3(struct p
+@@ -325,7 +325,7 @@ static int init_chipset_ali15x3(struct pci_dev *dev)
  	}
  	pci_dev_put(north);
  	pci_dev_put(isa_dev);
@@ -38,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return 0;
  }
  
+diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
+index 0ceae5cbd89a..c212e85d7f3e 100644
 --- a/drivers/ide/hpt366.c
 +++ b/drivers/ide/hpt366.c
-@@ -1236,7 +1236,7 @@ static int init_dma_hpt366(ide_hwif_t *h
+@@ -1236,7 +1236,7 @@ static int init_dma_hpt366(ide_hwif_t *hwif,
  
  	dma_old = inb(base + 2);
  
@@ -49,7 +52,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	dma_new = dma_old;
  	pci_read_config_byte(dev, hwif->channel ? 0x4b : 0x43, &masterdma);
-@@ -1247,7 +1247,7 @@ static int init_dma_hpt366(ide_hwif_t *h
+@@ -1247,7 +1247,7 @@ static int init_dma_hpt366(ide_hwif_t *hwif,
  	if (dma_new != dma_old)
  		outb(dma_new, base + 2);
  
@@ -58,9 +61,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	printk(KERN_INFO "    %s: BM-DMA at 0x%04lx-0x%04lx\n",
  			 hwif->name, base, base + 7);
+diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
+index 19763977568c..4169433faab5 100644
 --- a/drivers/ide/ide-io-std.c
 +++ b/drivers/ide/ide-io-std.c
-@@ -175,7 +175,7 @@ void ide_input_data(ide_drive_t *drive,
+@@ -175,7 +175,7 @@ void ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
  		unsigned long uninitialized_var(flags);
  
  		if ((io_32bit & 2) && !mmio) {
@@ -69,7 +74,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			ata_vlb_sync(io_ports->nsect_addr);
  		}
  
-@@ -186,7 +186,7 @@ void ide_input_data(ide_drive_t *drive,
+@@ -186,7 +186,7 @@ void ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
  			insl(data_addr, buf, words);
  
  		if ((io_32bit & 2) && !mmio)
@@ -78,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		if (((len + 1) & 3) < 2)
  			return;
-@@ -219,7 +219,7 @@ void ide_output_data(ide_drive_t *drive,
+@@ -219,7 +219,7 @@ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
  		unsigned long uninitialized_var(flags);
  
  		if ((io_32bit & 2) && !mmio) {
@@ -87,7 +92,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			ata_vlb_sync(io_ports->nsect_addr);
  		}
  
-@@ -230,7 +230,7 @@ void ide_output_data(ide_drive_t *drive,
+@@ -230,7 +230,7 @@ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf,
  			outsl(data_addr, buf, words);
  
  		if ((io_32bit & 2) && !mmio)
@@ -96,9 +101,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		if (((len + 1) & 3) < 2)
  			return;
+diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
+index 669ea1e45795..e12e43e62245 100644
 --- a/drivers/ide/ide-io.c
 +++ b/drivers/ide/ide-io.c
-@@ -659,7 +659,7 @@ void ide_timer_expiry (unsigned long dat
+@@ -659,7 +659,7 @@ void ide_timer_expiry (unsigned long data)
  		/* disable_irq_nosync ?? */
  		disable_irq(hwif->irq);
  		/* local CPU only, as if we were handling an interrupt */
@@ -107,9 +114,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (hwif->polling) {
  			startstop = handler(drive);
  		} else if (drive_is_ready(drive)) {
+diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
+index 376f2dc410c5..f014dd1b73dc 100644
 --- a/drivers/ide/ide-iops.c
 +++ b/drivers/ide/ide-iops.c
-@@ -129,12 +129,12 @@ int __ide_wait_stat(ide_drive_t *drive,
+@@ -129,12 +129,12 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
  				if ((stat & ATA_BUSY) == 0)
  					break;
  
@@ -124,9 +133,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  	/*
  	 * Allow status to settle, then read it again.
+diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
+index 0b63facd1d87..4ceba37afc0c 100644
 --- a/drivers/ide/ide-probe.c
 +++ b/drivers/ide/ide-probe.c
-@@ -196,10 +196,10 @@ static void do_identify(ide_drive_t *dri
+@@ -196,10 +196,10 @@ static void do_identify(ide_drive_t *drive, u8 cmd, u16 *id)
  	int bswap = 1;
  
  	/* local CPU only; some systems need this */
@@ -139,9 +150,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	drive->dev_flags |= IDE_DFLAG_ID_READ;
  #ifdef DEBUG
+diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
+index a716693417a3..be0568c722d6 100644
 --- a/drivers/ide/ide-taskfile.c
 +++ b/drivers/ide/ide-taskfile.c
-@@ -250,7 +250,7 @@ void ide_pio_bytes(ide_drive_t *drive, s
+@@ -250,7 +250,7 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
  
  		page_is_high = PageHighMem(page);
  		if (page_is_high)
@@ -150,7 +163,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		buf = kmap_atomic(page) + offset;
  
-@@ -271,7 +271,7 @@ void ide_pio_bytes(ide_drive_t *drive, s
+@@ -271,7 +271,7 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
  		kunmap_atomic(buf);
  
  		if (page_is_high)
@@ -159,7 +172,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		len -= nr_bytes;
  	}
-@@ -414,7 +414,7 @@ static ide_startstop_t pre_task_out_intr
+@@ -414,7 +414,7 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive,
  	}
  
  	if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0)
diff --git a/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch b/debian/patches/features/all/rt/0087-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch
similarity index 65%
rename from debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch
rename to debian/patches/features/all/rt/0087-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch
index cca140d..2a67507 100644
--- a/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch
+++ b/debian/patches/features/all/rt/0087-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch
@@ -1,7 +1,8 @@
 From: Sven-Thorsten Dietrich <sdietrich at novell.com>
 Date: Fri, 3 Jul 2009 08:30:35 -0500
-Subject: infiniband: Mellanox IB driver patch use _nort() primitives
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 087/332] infiniband: Mellanox IB driver patch use _nort()
+ primitives
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=354989769bd11026fd31687cccc70c4ad4431898
 
 Fixes in_atomic stack-dump, when Mellanox module is loaded into the RT
 Kernel.
@@ -14,14 +15,15 @@ changes."
 Signed-off-by: Sven-Thorsten Dietrich <sven at thebigcorporation.com>
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    4 ++--
+ drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+index fddff403d5d2..cca1bb4fbfe3 100644
 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
 +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
-@@ -902,7 +902,7 @@ void ipoib_mcast_restart_task(struct wor
+@@ -902,7 +902,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
  
  	ipoib_dbg_mcast(priv, "restarting multicast task\n");
  
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	netif_addr_lock(dev);
  	spin_lock(&priv->lock);
  
-@@ -984,7 +984,7 @@ void ipoib_mcast_restart_task(struct wor
+@@ -984,7 +984,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
  
  	spin_unlock(&priv->lock);
  	netif_addr_unlock(dev);
diff --git a/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch b/debian/patches/features/all/rt/0088-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch
similarity index 67%
rename from debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch
rename to debian/patches/features/all/rt/0088-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch
index 5b07aa8..027c18c 100644
--- a/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch
+++ b/debian/patches/features/all/rt/0088-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch
@@ -1,20 +1,22 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:30:16 -0500
-Subject: input: gameport: Do not disable interrupts on PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 088/332] input: gameport: Do not disable interrupts on
+ PREEMPT_RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1e0e4ca38aa1eac7a6bec5020a681369f224a301
 
 Use the _nort() primitives.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/input/gameport/gameport.c |   12 ++++++------
+ drivers/input/gameport/gameport.c | 12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
 
+diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
+index 4a2a9e370be7..e970d9afd179 100644
 --- a/drivers/input/gameport/gameport.c
 +++ b/drivers/input/gameport/gameport.c
-@@ -91,13 +91,13 @@ static int gameport_measure_speed(struct
+@@ -91,13 +91,13 @@ static int gameport_measure_speed(struct gameport *gameport)
  	tx = ~0;
  
  	for (i = 0; i < 50; i++) {
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		udelay(i * 10);
  		t = (t2 - t1) - (t3 - t2);
  		if (t < tx)
-@@ -124,12 +124,12 @@ static int old_gameport_measure_speed(st
+@@ -124,12 +124,12 @@ static int old_gameport_measure_speed(struct gameport *gameport)
  	tx = 1 << 30;
  
  	for(i = 0; i < 50; i++) {
@@ -45,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		udelay(i * 10);
  		if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t;
  	}
-@@ -148,11 +148,11 @@ static int old_gameport_measure_speed(st
+@@ -148,11 +148,11 @@ static int old_gameport_measure_speed(struct gameport *gameport)
  	tx = 1 << 30;
  
  	for(i = 0; i < 50; i++) {
diff --git a/debian/patches/features/all/rt/user-use-local-irq-nort.patch b/debian/patches/features/all/rt/0089-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch
similarity index 68%
rename from debian/patches/features/all/rt/user-use-local-irq-nort.patch
rename to debian/patches/features/all/rt/0089-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch
index 18a471c..b29cff5 100644
--- a/debian/patches/features/all/rt/user-use-local-irq-nort.patch
+++ b/debian/patches/features/all/rt/0089-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch
@@ -1,17 +1,19 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 21 Jul 2009 23:06:05 +0200
-Subject: core: Do not disable interrupts on RT in kernel/users.c
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 089/332] core: Do not disable interrupts on RT in
+ kernel/users.c
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=053cb671ea31dfac65fd66cca23dc42ecc1e971b
 
 Use the local_irq_*_nort variants to reduce latencies in RT. The code
 is serialized by the locks. No need to disable interrupts.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- kernel/user.c |    4 ++--
+ kernel/user.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/user.c b/kernel/user.c
+index b069ccbfb0b0..1a2e88e98b5e 100644
 --- a/kernel/user.c
 +++ b/kernel/user.c
 @@ -161,11 +161,11 @@ void free_uid(struct user_struct *up)
diff --git a/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch b/debian/patches/features/all/rt/0090-usb-Use-_nort-in-giveback-function.patch
similarity index 85%
rename from debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch
rename to debian/patches/features/all/rt/0090-usb-Use-_nort-in-giveback-function.patch
index 48ecb34..405c15b 100644
--- a/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch
+++ b/debian/patches/features/all/rt/0090-usb-Use-_nort-in-giveback-function.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 8 Nov 2013 17:34:54 +0100
-Subject: usb: Use _nort in giveback function
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 090/332] usb: Use _nort in giveback function
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e19fe22c64a11d9aa3b8aa8b9de9bc2b7bd727d5
 
 Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet
 context") I see
@@ -39,12 +39,14 @@ on -RT we run threaded so no need to disable interrupts.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/usb/core/hcd.c |    4 ++--
+ drivers/usb/core/hcd.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
+index 882fc4e08284..14ab6046e440 100644
 --- a/drivers/usb/core/hcd.c
 +++ b/drivers/usb/core/hcd.c
-@@ -1764,9 +1764,9 @@ static void __usb_hcd_giveback_urb(struc
+@@ -1764,9 +1764,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
  	 * and no one may trigger the above deadlock situation when
  	 * running complete() in tasklet.
  	 */
diff --git a/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches/features/all/rt/0091-mm-scatterlist-Do-not-disable-irqs-on-RT.patch
similarity index 64%
rename from debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch
rename to debian/patches/features/all/rt/0091-mm-scatterlist-Do-not-disable-irqs-on-RT.patch
index 40ee4b6..2254423 100644
--- a/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch
+++ b/debian/patches/features/all/rt/0091-mm-scatterlist-Do-not-disable-irqs-on-RT.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 3 Jul 2009 08:44:34 -0500
-Subject: mm/scatterlist: Do not disable irqs on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 091/332] mm/scatterlist: Do not disable irqs on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=25ce65c0ea7e108974d2310589e5bf93fcfca448
 
 The local_irq_save() is not only used to get things done "fast" but
 also to ensure that in case of SG_MITER_ATOMIC we are in "atomic"
@@ -10,12 +10,14 @@ disabled (which is currently handled by kmap_atomic()).
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- lib/scatterlist.c |    6 +++---
+ lib/scatterlist.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/lib/scatterlist.c b/lib/scatterlist.c
+index 004fc70fc56a..ccc46992a517 100644
 --- a/lib/scatterlist.c
 +++ b/lib/scatterlist.c
-@@ -620,7 +620,7 @@ void sg_miter_stop(struct sg_mapping_ite
+@@ -620,7 +620,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
  			flush_kernel_dcache_page(miter->page);
  
  		if (miter->__flags & SG_MITER_ATOMIC) {
@@ -24,7 +26,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			kunmap_atomic(miter->addr);
  		} else
  			kunmap(miter->page);
-@@ -664,7 +664,7 @@ size_t sg_copy_buffer(struct scatterlist
+@@ -664,7 +664,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
  	if (!sg_miter_skip(&miter, skip))
  		return false;
  
@@ -33,7 +35,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	while (sg_miter_next(&miter) && offset < buflen) {
  		unsigned int len;
-@@ -681,7 +681,7 @@ size_t sg_copy_buffer(struct scatterlist
+@@ -681,7 +681,7 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
  
  	sg_miter_stop(&miter);
  
diff --git a/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch b/debian/patches/features/all/rt/0092-mm-workingset-Do-not-protect-workingset_shadow_nodes.patch
similarity index 77%
rename from debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch
rename to debian/patches/features/all/rt/0092-mm-workingset-Do-not-protect-workingset_shadow_nodes.patch
index b2a9de1..8fe7301 100644
--- a/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch
+++ b/debian/patches/features/all/rt/0092-mm-workingset-Do-not-protect-workingset_shadow_nodes.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 29 Jan 2015 17:19:44 +0100
-Subject: mm/workingset: Do not protect workingset_shadow_nodes with irq off
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 092/332] mm/workingset: Do not protect workingset_shadow_nodes
+ with irq off
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cf3c0b02507208734b1b01ce6dc50b7794c673fd
 
 workingset_shadow_nodes is protected by local_irq_disable(). Some users
 use spin_lock_irq().
@@ -10,12 +11,14 @@ so I catch users of it which will be introduced later.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/swap.h |    4 +++-
- mm/filemap.c         |   13 +++++++++----
- mm/truncate.c        |    7 +++++--
- mm/workingset.c      |   23 ++++++++++++-----------
+ include/linux/swap.h |  4 +++-
+ mm/filemap.c         | 13 +++++++++----
+ mm/truncate.c        |  7 +++++--
+ mm/workingset.c      | 23 ++++++++++++-----------
  4 files changed, 29 insertions(+), 18 deletions(-)
 
+diff --git a/include/linux/swap.h b/include/linux/swap.h
+index 55ff5593c193..eb112633ba25 100644
 --- a/include/linux/swap.h
 +++ b/include/linux/swap.h
 @@ -11,6 +11,7 @@
@@ -36,9 +39,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static inline unsigned int workingset_node_pages(struct radix_tree_node *node)
  {
+diff --git a/mm/filemap.c b/mm/filemap.c
+index edfb90e3830c..a8d2c7a73d54 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
-@@ -159,9 +159,12 @@ static int page_cache_tree_insert(struct
+@@ -159,9 +159,12 @@ static int page_cache_tree_insert(struct address_space *mapping,
  		 * node->private_list is protected by
  		 * mapping->tree_lock.
  		 */
@@ -53,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  	return 0;
  }
-@@ -217,8 +220,10 @@ static void page_cache_tree_delete(struc
+@@ -217,8 +220,10 @@ static void page_cache_tree_delete(struct address_space *mapping,
  		if (!dax_mapping(mapping) && !workingset_node_pages(node) &&
  				list_empty(&node->private_list)) {
  			node->private_data = mapping;
@@ -66,9 +71,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  	}
  
+diff --git a/mm/truncate.c b/mm/truncate.c
+index 9c809e7d73c3..b7681e888ba0 100644
 --- a/mm/truncate.c
 +++ b/mm/truncate.c
-@@ -62,9 +62,12 @@ static void clear_exceptional_entry(stru
+@@ -62,9 +62,12 @@ static void clear_exceptional_entry(struct address_space *mapping,
  	 * protected by mapping->tree_lock.
  	 */
  	if (!workingset_node_shadows(node) &&
@@ -83,9 +90,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	__radix_tree_delete_node(&mapping->page_tree, node);
  unlock:
  	spin_unlock_irq(&mapping->tree_lock);
+diff --git a/mm/workingset.c b/mm/workingset.c
+index 4c4f05655e6e..b97b1e87b54c 100644
 --- a/mm/workingset.c
 +++ b/mm/workingset.c
-@@ -334,7 +334,8 @@ void workingset_activation(struct page *
+@@ -334,7 +334,8 @@ void workingset_activation(struct page *page)
   * point where they would still be useful.
   */
  
@@ -95,7 +104,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static unsigned long count_shadow_nodes(struct shrinker *shrinker,
  					struct shrink_control *sc)
-@@ -344,9 +345,9 @@ static unsigned long count_shadow_nodes(
+@@ -344,9 +345,9 @@ static unsigned long count_shadow_nodes(struct shrinker *shrinker,
  	unsigned long pages;
  
  	/* list_lru lock nests inside IRQ-safe mapping->tree_lock */
@@ -108,7 +117,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (sc->memcg) {
  		pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid,
-@@ -438,9 +439,9 @@ static enum lru_status shadow_lru_isolat
+@@ -438,9 +439,9 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
  	spin_unlock(&mapping->tree_lock);
  	ret = LRU_REMOVED_RETRY;
  out:
@@ -120,7 +129,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_lock(lru_lock);
  	return ret;
  }
-@@ -451,10 +452,10 @@ static unsigned long scan_shadow_nodes(s
+@@ -451,10 +452,10 @@ static unsigned long scan_shadow_nodes(struct shrinker *shrinker,
  	unsigned long ret;
  
  	/* list_lru lock nests inside IRQ-safe mapping->tree_lock */
diff --git a/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch b/debian/patches/features/all/rt/0093-signal-Make-__lock_task_sighand-RT-aware.patch
similarity index 63%
rename from debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch
rename to debian/patches/features/all/rt/0093-signal-Make-__lock_task_sighand-RT-aware.patch
index 0cf77ab..72c0106 100644
--- a/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch
+++ b/debian/patches/features/all/rt/0093-signal-Make-__lock_task_sighand-RT-aware.patch
@@ -1,19 +1,21 @@
-Subject: signal: Make __lock_task_sighand() RT aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 22 Jul 2011 08:07:08 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 093/332] signal: Make __lock_task_sighand() RT aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b46583bbac5c04d10a09f301c009b84ddd67d49f
 
 local_irq_save() + spin_lock(&sighand->siglock) does not work on
 -RT. Use the nort variants.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/signal.c |    6 +++---
+ kernel/signal.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/kernel/signal.c b/kernel/signal.c
+index 739615d8d5ae..be9753809dc7 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1276,12 +1276,12 @@ struct sighand_struct *__lock_task_sigha
+@@ -1284,12 +1284,12 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
  		 * Disable interrupts early to avoid deadlocks.
  		 * See rcu_read_unlock() comment header for details.
  		 */
@@ -28,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			break;
  		}
  		/*
-@@ -1302,7 +1302,7 @@ struct sighand_struct *__lock_task_sigha
+@@ -1310,7 +1310,7 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
  		}
  		spin_unlock(&sighand->siglock);
  		rcu_read_unlock();
diff --git a/debian/patches/features/all/rt/oleg-signal-rt-fix.patch b/debian/patches/features/all/rt/0094-signal-x86-Delay-calling-signals-in-atomic.patch
similarity index 78%
rename from debian/patches/features/all/rt/oleg-signal-rt-fix.patch
rename to debian/patches/features/all/rt/0094-signal-x86-Delay-calling-signals-in-atomic.patch
index 6b2e55d..d707781 100644
--- a/debian/patches/features/all/rt/oleg-signal-rt-fix.patch
+++ b/debian/patches/features/all/rt/0094-signal-x86-Delay-calling-signals-in-atomic.patch
@@ -1,7 +1,7 @@
 From: Oleg Nesterov <oleg at redhat.com>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: signal/x86: Delay calling signals in atomic
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 094/332] signal/x86: Delay calling signals in atomic
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=eaa5bdb451492fa3d5e51dcba594d3be0ae18e2e
 
 On x86_64 we must disable preemption before we enable interrupts
 for stack faults, int3 and debugging, because the current task is using
@@ -30,16 +30,17 @@ Signed-off-by: Oleg Nesterov <oleg at redhat.com>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
-
- arch/x86/entry/common.c       |    7 +++++++
- arch/x86/include/asm/signal.h |   13 +++++++++++++
- include/linux/sched.h         |    4 ++++
- kernel/signal.c               |   37 +++++++++++++++++++++++++++++++++++--
+ arch/x86/entry/common.c       |  7 +++++++
+ arch/x86/include/asm/signal.h | 13 +++++++++++++
+ include/linux/sched.h         |  4 ++++
+ kernel/signal.c               | 37 +++++++++++++++++++++++++++++++++++--
  4 files changed, 59 insertions(+), 2 deletions(-)
 
+diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
+index bdd9cc59d20f..90c7c6aa1ed3 100644
 --- a/arch/x86/entry/common.c
 +++ b/arch/x86/entry/common.c
-@@ -148,6 +148,13 @@ static void exit_to_usermode_loop(struct
+@@ -148,6 +148,13 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
  		if (cached_flags & _TIF_NEED_RESCHED)
  			schedule();
  
@@ -53,6 +54,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (cached_flags & _TIF_UPROBE)
  			uprobe_notify_resume(regs);
  
+diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
+index 8af22be0fe61..c370fba8c38b 100644
 --- a/arch/x86/include/asm/signal.h
 +++ b/arch/x86/include/asm/signal.h
 @@ -27,6 +27,19 @@ typedef struct {
@@ -75,9 +78,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifndef CONFIG_COMPAT
  typedef sigset_t compat_sigset_t;
  #endif
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index bfe832b3fc9f..040ae135ecb0 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1700,6 +1700,10 @@ struct task_struct {
+@@ -1710,6 +1710,10 @@ struct task_struct {
  	sigset_t blocked, real_blocked;
  	sigset_t saved_sigmask;	/* restored if set_restore_sigmask() was used */
  	struct sigpending pending;
@@ -88,9 +93,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	unsigned long sas_ss_sp;
  	size_t sas_ss_size;
+diff --git a/kernel/signal.c b/kernel/signal.c
+index be9753809dc7..99918dcd836f 100644
 --- a/kernel/signal.c
 +++ b/kernel/signal.c
-@@ -1216,8 +1216,8 @@ int do_send_sig_info(int sig, struct sig
+@@ -1224,8 +1224,8 @@ int do_send_sig_info(int sig, struct siginfo *info, struct task_struct *p,
   * We don't want to have recursive SIGSEGV's etc, for example,
   * that is why we also clear SIGNAL_UNKILLABLE.
   */
@@ -101,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	unsigned long int flags;
  	int ret, blocked, ignored;
-@@ -1242,6 +1242,39 @@ force_sig_info(int sig, struct siginfo *
+@@ -1250,6 +1250,39 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
  	return ret;
  }
  
diff --git a/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch b/debian/patches/features/all/rt/0095-x86-signal-delay-calling-signals-on-32bit.patch
similarity index 79%
rename from debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch
rename to debian/patches/features/all/rt/0095-x86-signal-delay-calling-signals-on-32bit.patch
index 8643aa7..d8a5415 100644
--- a/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch
+++ b/debian/patches/features/all/rt/0095-x86-signal-delay-calling-signals-on-32bit.patch
@@ -1,7 +1,7 @@
 From: Yang Shi <yang.shi at linaro.org>
 Date: Thu, 10 Dec 2015 10:58:51 -0800
-Subject: x86/signal: delay calling signals on 32bit
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 095/332] x86/signal: delay calling signals on 32bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dc5025a4471fe311e49db24be56d00150e3aa914
 
 When running some ptrace single step tests on x86-32 machine, the below problem
 is triggered:
@@ -27,9 +27,11 @@ from IST context") which was merged in v4.1-rc1.
 Signed-off-by: Yang Shi <yang.shi at linaro.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/include/asm/signal.h |    2 +-
+ arch/x86/include/asm/signal.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
+index c370fba8c38b..d1328789b759 100644
 --- a/arch/x86/include/asm/signal.h
 +++ b/arch/x86/include/asm/signal.h
 @@ -36,7 +36,7 @@ typedef struct {
diff --git a/debian/patches/features/all/rt/net-wireless-warn-nort.patch b/debian/patches/features/all/rt/0096-net-wireless-Use-WARN_ON_NORT.patch
similarity index 58%
rename from debian/patches/features/all/rt/net-wireless-warn-nort.patch
rename to debian/patches/features/all/rt/0096-net-wireless-Use-WARN_ON_NORT.patch
index 4925333..6e5ce7e 100644
--- a/debian/patches/features/all/rt/net-wireless-warn-nort.patch
+++ b/debian/patches/features/all/rt/0096-net-wireless-Use-WARN_ON_NORT.patch
@@ -1,19 +1,21 @@
-Subject: net/wireless: Use WARN_ON_NORT()
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 21 Jul 2011 21:05:33 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 096/332] net/wireless: Use WARN_ON_NORT()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=018de508d64eff3d2db3da1c0217b5e79abb5d72
 
 The softirq counter is meaningless on RT, so the check triggers a
 false positive.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- net/mac80211/rx.c |    2 +-
+ net/mac80211/rx.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index 439e597fd374..ca0daeaff370 100644
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -4230,7 +4230,7 @@ void ieee80211_rx_napi(struct ieee80211_
+@@ -4229,7 +4229,7 @@ void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta,
  	struct ieee80211_supported_band *sband;
  	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
  
diff --git a/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch b/debian/patches/features/all/rt/0097-buffer_head-Replace-bh_uptodate_lock-for-rt.patch
similarity index 72%
rename from debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch
rename to debian/patches/features/all/rt/0097-buffer_head-Replace-bh_uptodate_lock-for-rt.patch
index e55a20e..27a48ad 100644
--- a/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch
+++ b/debian/patches/features/all/rt/0097-buffer_head-Replace-bh_uptodate_lock-for-rt.patch
@@ -1,21 +1,23 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 18 Mar 2011 09:18:52 +0100
-Subject: buffer_head: Replace bh_uptodate_lock for -rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 097/332] buffer_head: Replace bh_uptodate_lock for -rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=165fde4fe45c7a47e05bc03a1b06525e8c8fba48
 
 Wrap the bit_spin_lock calls into a separate inline and add the RT
 replacements with a real spinlock.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- fs/buffer.c                 |   21 +++++++--------------
- fs/ntfs/aops.c              |   10 +++-------
- include/linux/buffer_head.h |   34 ++++++++++++++++++++++++++++++++++
+ fs/buffer.c                 | 21 +++++++--------------
+ fs/ntfs/aops.c              | 10 +++-------
+ include/linux/buffer_head.h | 34 ++++++++++++++++++++++++++++++++++
  3 files changed, 44 insertions(+), 21 deletions(-)
 
+diff --git a/fs/buffer.c b/fs/buffer.c
+index 5d8f496d624e..48074bd91ea3 100644
 --- a/fs/buffer.c
 +++ b/fs/buffer.c
-@@ -301,8 +301,7 @@ static void end_buffer_async_read(struct
+@@ -301,8 +301,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
  	 * decide that the page is now completely done.
  	 */
  	first = page_buffers(page);
@@ -25,7 +27,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	clear_buffer_async_read(bh);
  	unlock_buffer(bh);
  	tmp = bh;
-@@ -315,8 +314,7 @@ static void end_buffer_async_read(struct
+@@ -315,8 +314,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
  		}
  		tmp = tmp->b_this_page;
  	} while (tmp != bh);
@@ -35,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * If none of the buffers had errors and they are all
-@@ -328,9 +326,7 @@ static void end_buffer_async_read(struct
+@@ -328,9 +326,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
  	return;
  
  still_busy:
@@ -46,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -358,8 +354,7 @@ void end_buffer_async_write(struct buffe
+@@ -358,8 +354,7 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate)
  	}
  
  	first = page_buffers(page);
@@ -56,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	clear_buffer_async_write(bh);
  	unlock_buffer(bh);
-@@ -371,15 +366,12 @@ void end_buffer_async_write(struct buffe
+@@ -371,15 +366,12 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate)
  		}
  		tmp = tmp->b_this_page;
  	}
@@ -74,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(end_buffer_async_write);
  
-@@ -3383,6 +3375,7 @@ struct buffer_head *alloc_buffer_head(gf
+@@ -3383,6 +3375,7 @@ struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
  	struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags);
  	if (ret) {
  		INIT_LIST_HEAD(&ret->b_assoc_buffers);
@@ -82,9 +84,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		preempt_disable();
  		__this_cpu_inc(bh_accounting.nr);
  		recalc_bh_state();
+diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
+index fe251f187ff8..8bb79f5fda59 100644
 --- a/fs/ntfs/aops.c
 +++ b/fs/ntfs/aops.c
-@@ -107,8 +107,7 @@ static void ntfs_end_buffer_async_read(s
+@@ -107,8 +107,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
  				"0x%llx.", (unsigned long long)bh->b_blocknr);
  	}
  	first = page_buffers(page);
@@ -94,7 +98,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	clear_buffer_async_read(bh);
  	unlock_buffer(bh);
  	tmp = bh;
-@@ -123,8 +122,7 @@ static void ntfs_end_buffer_async_read(s
+@@ -123,8 +122,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
  		}
  		tmp = tmp->b_this_page;
  	} while (tmp != bh);
@@ -104,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * If none of the buffers had errors then we can set the page uptodate,
  	 * but we first have to perform the post read mst fixups, if the
-@@ -159,9 +157,7 @@ static void ntfs_end_buffer_async_read(s
+@@ -159,9 +157,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
  	unlock_page(page);
  	return;
  still_busy:
@@ -115,6 +119,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
+diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
+index ebbacd14d450..ba18cfe6392d 100644
 --- a/include/linux/buffer_head.h
 +++ b/include/linux/buffer_head.h
 @@ -75,8 +75,42 @@ struct buffer_head {
diff --git a/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch b/debian/patches/features/all/rt/0098-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch
similarity index 75%
rename from debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch
rename to debian/patches/features/all/rt/0098-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch
index f607cdb..affc092 100644
--- a/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch
+++ b/debian/patches/features/all/rt/0098-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch
@@ -1,7 +1,8 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 18 Mar 2011 10:11:25 +0100
-Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 098/332] fs: jbd/jbd2: Make state lock and journal head lock
+ rt safe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=394e55f0606e88a48facdc5795325a6fde67060b
 
 bit_spin_locks break under RT.
 
@@ -11,7 +12,13 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  include/linux/buffer_head.h |    8 ++++++++
  include/linux/jbd2.h        |   24 ++++++++++++++++++++++++
  2 files changed, 32 insertions(+)
+---
+ include/linux/buffer_head.h |  8 ++++++++
+ include/linux/jbd2.h        | 24 ++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+)
 
+diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
+index ba18cfe6392d..be5e87f6360a 100644
 --- a/include/linux/buffer_head.h
 +++ b/include/linux/buffer_head.h
 @@ -77,6 +77,10 @@ struct buffer_head {
@@ -25,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  };
  
-@@ -108,6 +112,10 @@ static inline void buffer_head_init_lock
+@@ -108,6 +112,10 @@ static inline void buffer_head_init_locks(struct buffer_head *bh)
  {
  #ifdef CONFIG_PREEMPT_RT_BASE
  	spin_lock_init(&bh->b_uptodate_lock);
@@ -36,9 +43,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  }
  
+diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
+index dfaa1f4dcb0c..d57dd06544a1 100644
 --- a/include/linux/jbd2.h
 +++ b/include/linux/jbd2.h
-@@ -347,32 +347,56 @@ static inline struct journal_head *bh2jh
+@@ -347,32 +347,56 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh)
  
  static inline void jbd_lock_bh_state(struct buffer_head *bh)
  {
diff --git a/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch b/debian/patches/features/all/rt/0099-list_bl-Make-list-head-locking-RT-safe.patch
similarity index 89%
rename from debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch
rename to debian/patches/features/all/rt/0099-list_bl-Make-list-head-locking-RT-safe.patch
index 4615b26..34d28b9 100644
--- a/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch
+++ b/debian/patches/features/all/rt/0099-list_bl-Make-list-head-locking-RT-safe.patch
@@ -1,7 +1,7 @@
 From: Paul Gortmaker <paul.gortmaker at windriver.com>
 Date: Fri, 21 Jun 2013 15:07:25 -0400
-Subject: list_bl: Make list head locking RT safe
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 099/332] list_bl: Make list head locking RT safe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=244d6b0eb8a4eda67ed5ae7d7f0f51d2c0e3dbe6
 
 As per changes in include/linux/jbd_common.h for avoiding the
 bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal
@@ -48,9 +48,11 @@ concern.
 Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/list_bl.h |   28 ++++++++++++++++++++++++++--
+ include/linux/list_bl.h | 28 ++++++++++++++++++++++++++--
  1 file changed, 26 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
+index cb483305e1f5..d3af0990f01a 100644
 --- a/include/linux/list_bl.h
 +++ b/include/linux/list_bl.h
 @@ -2,6 +2,7 @@
@@ -86,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h)
  {
-@@ -118,12 +128,26 @@ static inline void hlist_bl_del_init(str
+@@ -118,12 +128,26 @@ static inline void hlist_bl_del_init(struct hlist_bl_node *n)
  
  static inline void hlist_bl_lock(struct hlist_bl_head *b)
  {
diff --git a/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch b/debian/patches/features/all/rt/0100-list_bl-fixup-bogus-lockdep-warning.patch
similarity index 89%
rename from debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch
rename to debian/patches/features/all/rt/0100-list_bl-fixup-bogus-lockdep-warning.patch
index a99a0d8..504356e 100644
--- a/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch
+++ b/debian/patches/features/all/rt/0100-list_bl-fixup-bogus-lockdep-warning.patch
@@ -1,7 +1,7 @@
 From: Josh Cartwright <joshc at ni.com>
 Date: Thu, 31 Mar 2016 00:04:25 -0500
-Subject: [PATCH] list_bl: fixup bogus lockdep warning
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 100/332] list_bl: fixup bogus lockdep warning
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=95f981b3fabc8b98061195fcf199563a2291883f
 
 At first glance, the use of 'static inline' seems appropriate for
 INIT_HLIST_BL_HEAD().
@@ -70,9 +70,11 @@ Tested-by: Luis Claudio R. Goncalves <lclaudio at uudg.org>
 Signed-off-by: Josh Cartwright <joshc at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/list_bl.h |   12 +++++++-----
+ include/linux/list_bl.h | 12 +++++++-----
  1 file changed, 7 insertions(+), 5 deletions(-)
 
+diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
+index d3af0990f01a..4e5062316bb6 100644
 --- a/include/linux/list_bl.h
 +++ b/include/linux/list_bl.h
 @@ -42,13 +42,15 @@ struct hlist_bl_node {
diff --git a/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches/features/all/rt/0101-genirq-Disable-irqpoll-on-rt.patch
similarity index 69%
rename from debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch
rename to debian/patches/features/all/rt/0101-genirq-Disable-irqpoll-on-rt.patch
index c15dd7d..6e9332d 100644
--- a/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch
+++ b/debian/patches/features/all/rt/0101-genirq-Disable-irqpoll-on-rt.patch
@@ -1,20 +1,21 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:57 -0500
-Subject: genirq: Disable irqpoll on -rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 101/332] genirq: Disable irqpoll on -rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3bc91eced6e6eadf2eaffb66aeedf73489c45b41
 
 Creates long latencies for no value
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- kernel/irq/spurious.c |    8 ++++++++
+ kernel/irq/spurious.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
+diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
+index 5707f97a3e6a..73f38dc7a7fb 100644
 --- a/kernel/irq/spurious.c
 +++ b/kernel/irq/spurious.c
-@@ -442,6 +442,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable ir
+@@ -442,6 +442,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true");
  
  static int __init irqfixup_setup(char *str)
  {
diff --git a/debian/patches/features/all/rt/genirq-force-threading.patch b/debian/patches/features/all/rt/0102-genirq-Force-interrupt-thread-on-RT.patch
similarity index 59%
rename from debian/patches/features/all/rt/genirq-force-threading.patch
rename to debian/patches/features/all/rt/0102-genirq-Force-interrupt-thread-on-RT.patch
index 8b807cb..91bc898 100644
--- a/debian/patches/features/all/rt/genirq-force-threading.patch
+++ b/debian/patches/features/all/rt/0102-genirq-Force-interrupt-thread-on-RT.patch
@@ -1,20 +1,22 @@
-Subject: genirq: Force interrupt thread on RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Sun, 03 Apr 2011 11:57:29 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Sun, 3 Apr 2011 11:57:29 +0200
+Subject: [PATCH 102/332] genirq: Force interrupt thread on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=66a3367ea063efa2e1e5b2948d5eeee48410c573
 
 Force threaded_irqs and optimize the code (force_irqthreads) in regard
 to this.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/interrupt.h |    6 +++++-
- kernel/irq/manage.c       |    2 ++
+ include/linux/interrupt.h | 6 +++++-
+ kernel/irq/manage.c       | 2 ++
  2 files changed, 7 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 3b41621b0697..59acc26fa74f 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
-@@ -406,9 +406,13 @@ extern int irq_set_irqchip_state(unsigne
+@@ -406,9 +406,13 @@ extern int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
  				 bool state);
  
  #ifdef CONFIG_IRQ_FORCED_THREADING
@@ -29,6 +31,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  #ifndef __ARCH_SET_SOFTIRQ_PENDING
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index ea41820ab12e..bc1bfce421fd 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
 @@ -22,6 +22,7 @@
@@ -39,7 +43,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  __read_mostly bool force_irqthreads;
  
  static int __init setup_forced_irqthreads(char *arg)
-@@ -30,6 +31,7 @@ static int __init setup_forced_irqthread
+@@ -30,6 +31,7 @@ static int __init setup_forced_irqthreads(char *arg)
  	return 0;
  }
  early_param("threadirqs", setup_forced_irqthreads);
diff --git a/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch b/debian/patches/features/all/rt/0103-drivers-net-vortex-fix-locking-issues.patch
similarity index 74%
rename from debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch
rename to debian/patches/features/all/rt/0103-drivers-net-vortex-fix-locking-issues.patch
index 0aabfbf..3472868 100644
--- a/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch
+++ b/debian/patches/features/all/rt/0103-drivers-net-vortex-fix-locking-issues.patch
@@ -1,7 +1,7 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Fri, 3 Jul 2009 08:30:00 -0500
-Subject: drivers/net: vortex fix locking issues
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 103/332] drivers/net: vortex fix locking issues
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9a68517b86ba8c4205d001f481f6b50a5dd90c70
 
 Argh, cut and paste wasn't enough...
 
@@ -17,10 +17,15 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
+---
+ drivers/net/ethernet/3com/3c59x.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c
+index 9133e7926da5..63afb921ed40 100644
 --- a/drivers/net/ethernet/3com/3c59x.c
 +++ b/drivers/net/ethernet/3com/3c59x.c
-@@ -842,9 +842,9 @@ static void poll_vortex(struct net_devic
+@@ -842,9 +842,9 @@ static void poll_vortex(struct net_device *dev)
  {
  	struct vortex_private *vp = netdev_priv(dev);
  	unsigned long flags;
@@ -32,7 +37,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  }
  #endif
  
-@@ -1910,12 +1910,12 @@ static void vortex_tx_timeout(struct net
+@@ -1910,12 +1910,12 @@ static void vortex_tx_timeout(struct net_device *dev)
  			 * Block interrupts because vortex_interrupt does a bare spin_lock()
  			 */
  			unsigned long flags;
diff --git a/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches/features/all/rt/0104-mm-page_alloc-rt-friendly-per-cpu-pages.patch
similarity index 77%
rename from debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch
rename to debian/patches/features/all/rt/0104-mm-page_alloc-rt-friendly-per-cpu-pages.patch
index d30d26c..bb8d938 100644
--- a/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch
+++ b/debian/patches/features/all/rt/0104-mm-page_alloc-rt-friendly-per-cpu-pages.patch
@@ -1,7 +1,7 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:37 -0500
-Subject: mm: page_alloc: rt-friendly per-cpu pages
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 104/332] mm: page_alloc: rt-friendly per-cpu pages
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=60851c15a70ccfdda4614a46908a52dbb51b16b7
 
 rt-friendly per-cpu pages: convert the irqs-off per-cpu locking
 method into a preemptible, explicit-per-cpu-locks method.
@@ -13,9 +13,11 @@ Contains fixes from:
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- mm/page_alloc.c |   57 ++++++++++++++++++++++++++++++++++++++++----------------
+ mm/page_alloc.c | 57 +++++++++++++++++++++++++++++++++++++++++----------------
  1 file changed, 41 insertions(+), 16 deletions(-)
 
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 2abf8d5f0ad4..11593e07c487 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
 @@ -61,6 +61,7 @@
@@ -45,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  int page_group_by_mobility_disabled __read_mostly;
  
  #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
-@@ -1244,10 +1257,10 @@ static void __free_pages_ok(struct page
+@@ -1255,10 +1268,10 @@ static void __free_pages_ok(struct page *page, unsigned int order)
  		return;
  
  	migratetype = get_pfnblock_migratetype(page, pfn);
@@ -58,7 +60,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void __init __free_pages_boot_core(struct page *page, unsigned int order)
-@@ -2248,14 +2261,14 @@ void drain_zone_pages(struct zone *zone,
+@@ -2263,14 +2276,14 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
  	unsigned long flags;
  	int to_drain, batch;
  
@@ -75,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  #endif
  
-@@ -2272,7 +2285,7 @@ static void drain_pages_zone(unsigned in
+@@ -2287,7 +2300,7 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
  	struct per_cpu_pageset *pset;
  	struct per_cpu_pages *pcp;
  
@@ -84,7 +86,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	pset = per_cpu_ptr(zone->pageset, cpu);
  
  	pcp = &pset->pcp;
-@@ -2280,7 +2293,7 @@ static void drain_pages_zone(unsigned in
+@@ -2295,7 +2308,7 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
  		free_pcppages_bulk(zone, pcp->count, pcp);
  		pcp->count = 0;
  	}
@@ -93,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -2366,8 +2379,17 @@ void drain_all_pages(struct zone *zone)
+@@ -2381,8 +2394,17 @@ void drain_all_pages(struct zone *zone)
  		else
  			cpumask_clear_cpu(cpu, &cpus_with_pcps);
  	}
@@ -111,7 +113,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  #ifdef CONFIG_HIBERNATION
-@@ -2427,7 +2449,7 @@ void free_hot_cold_page(struct page *pag
+@@ -2442,7 +2464,7 @@ void free_hot_cold_page(struct page *page, bool cold)
  
  	migratetype = get_pfnblock_migratetype(page, pfn);
  	set_pcppage_migratetype(page, migratetype);
@@ -120,7 +122,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	__count_vm_event(PGFREE);
  
  	/*
-@@ -2458,7 +2480,7 @@ void free_hot_cold_page(struct page *pag
+@@ -2473,7 +2495,7 @@ void free_hot_cold_page(struct page *page, bool cold)
  	}
  
  out:
@@ -129,7 +131,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -2600,7 +2622,7 @@ struct page *buffered_rmqueue(struct zon
+@@ -2615,7 +2637,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
  		struct per_cpu_pages *pcp;
  		struct list_head *list;
  
@@ -138,7 +140,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		do {
  			pcp = &this_cpu_ptr(zone->pageset)->pcp;
  			list = &pcp->lists[migratetype];
-@@ -2627,7 +2649,7 @@ struct page *buffered_rmqueue(struct zon
+@@ -2642,7 +2664,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
  		 * allocate greater than order-1 page units with __GFP_NOFAIL.
  		 */
  		WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
@@ -147,7 +149,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		do {
  			page = NULL;
-@@ -2639,22 +2661,24 @@ struct page *buffered_rmqueue(struct zon
+@@ -2654,22 +2676,24 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
  			if (!page)
  				page = __rmqueue(zone, order, migratetype);
  		} while (page && check_new_pages(page, order));
@@ -176,7 +178,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return NULL;
  }
  
-@@ -6558,6 +6582,7 @@ static int page_alloc_cpu_notify(struct
+@@ -6573,6 +6597,7 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
  void __init page_alloc_init(void)
  {
  	hotcpu_notifier(page_alloc_cpu_notify, 0);
@@ -184,7 +186,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -7386,7 +7411,7 @@ void zone_pcp_reset(struct zone *zone)
+@@ -7401,7 +7426,7 @@ void zone_pcp_reset(struct zone *zone)
  	struct per_cpu_pageset *pset;
  
  	/* avoid races with drain_pages()  */
@@ -193,7 +195,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (zone->pageset != &boot_pageset) {
  		for_each_online_cpu(cpu) {
  			pset = per_cpu_ptr(zone->pageset, cpu);
-@@ -7395,7 +7420,7 @@ void zone_pcp_reset(struct zone *zone)
+@@ -7410,7 +7435,7 @@ void zone_pcp_reset(struct zone *zone)
  		free_percpu(zone->pageset);
  		zone->pageset = &boot_pageset;
  	}
diff --git a/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch b/debian/patches/features/all/rt/0105-mm-page_alloc-Reduce-lock-sections-further.patch
similarity index 83%
rename from debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch
rename to debian/patches/features/all/rt/0105-mm-page_alloc-Reduce-lock-sections-further.patch
index 3878f43..8dea2c4 100644
--- a/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch
+++ b/debian/patches/features/all/rt/0105-mm-page_alloc-Reduce-lock-sections-further.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
-Date: Fri Jul 3 08:44:37 2009 -0500
-Subject: mm: page_alloc: Reduce lock sections further
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 3 Jul 2009 08:44:37 -0500
+Subject: [PATCH 105/332] mm: page_alloc: Reduce lock sections further
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d9a52f5ac26e4ac2c5c74155da03a63ea692dfd6
 
 Split out the pages which are to be freed into a separate list and
 call free_pages_bulk() outside of the percpu page allocator locks.
@@ -9,12 +9,14 @@ call free_pages_bulk() outside of the percpu page allocator locks.
 Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- mm/page_alloc.c |   94 +++++++++++++++++++++++++++++++++++++++-----------------
+ mm/page_alloc.c | 94 ++++++++++++++++++++++++++++++++++++++++-----------------
  1 file changed, 66 insertions(+), 28 deletions(-)
 
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 11593e07c487..0e094e322344 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -1085,7 +1085,7 @@ static bool bulkfree_pcp_prepare(struct
+@@ -1096,7 +1096,7 @@ static bool bulkfree_pcp_prepare(struct page *page)
  #endif /* CONFIG_DEBUG_VM */
  
  /*
@@ -23,7 +25,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * Assumes all pages on list are in same zone, and of same order.
   * count is the number of pages to free.
   *
-@@ -1096,19 +1096,58 @@ static bool bulkfree_pcp_prepare(struct
+@@ -1107,19 +1107,58 @@ static bool bulkfree_pcp_prepare(struct page *page)
   * pinned" detection logic.
   */
  static void free_pcppages_bulk(struct zone *zone, int count,
@@ -86,7 +88,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	while (count) {
  		struct page *page;
  		struct list_head *list;
-@@ -1124,7 +1163,7 @@ static void free_pcppages_bulk(struct zo
+@@ -1135,7 +1174,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,
  			batch_free++;
  			if (++migratetype == MIGRATE_PCPTYPES)
  				migratetype = 0;
@@ -95,7 +97,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		} while (list_empty(list));
  
  		/* This is the only non-empty list. Free them all. */
-@@ -1132,27 +1171,12 @@ static void free_pcppages_bulk(struct zo
+@@ -1143,27 +1182,12 @@ static void free_pcppages_bulk(struct zone *zone, int count,
  			batch_free = count;
  
  		do {
@@ -124,7 +126,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void free_one_page(struct zone *zone,
-@@ -1161,7 +1185,9 @@ static void free_one_page(struct zone *z
+@@ -1172,7 +1196,9 @@ static void free_one_page(struct zone *zone,
  				int migratetype)
  {
  	unsigned long nr_scanned;
@@ -135,7 +137,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	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);
-@@ -1171,7 +1197,7 @@ static void free_one_page(struct zone *z
+@@ -1182,7 +1208,7 @@ static void free_one_page(struct zone *zone,
  		migratetype = get_pfnblock_migratetype(page, pfn);
  	}
  	__free_one_page(page, pfn, zone, order, migratetype);
@@ -144,7 +146,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void __meminit __init_single_page(struct page *page, unsigned long pfn,
-@@ -2259,16 +2285,18 @@ static int rmqueue_bulk(struct zone *zon
+@@ -2274,16 +2300,18 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
  void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
  {
  	unsigned long flags;
@@ -164,7 +166,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  #endif
  
-@@ -2284,16 +2312,21 @@ static void drain_pages_zone(unsigned in
+@@ -2299,16 +2327,21 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
  	unsigned long flags;
  	struct per_cpu_pageset *pset;
  	struct per_cpu_pages *pcp;
@@ -188,7 +190,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -2475,8 +2508,13 @@ void free_hot_cold_page(struct page *pag
+@@ -2490,8 +2523,13 @@ void free_hot_cold_page(struct page *page, bool cold)
  	pcp->count++;
  	if (pcp->count >= pcp->high) {
  		unsigned long batch = READ_ONCE(pcp->batch);
diff --git a/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch b/debian/patches/features/all/rt/0106-mm-swap-Convert-to-percpu-locked.patch
similarity index 80%
rename from debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch
rename to debian/patches/features/all/rt/0106-mm-swap-Convert-to-percpu-locked.patch
index 59cd12b..19f45be 100644
--- a/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch
+++ b/debian/patches/features/all/rt/0106-mm-swap-Convert-to-percpu-locked.patch
@@ -1,24 +1,25 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:51 -0500
-Subject: mm/swap: Convert to percpu locked
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 106/332] mm/swap: Convert to percpu locked
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d6038ffc2e4e46f1f4b74e9ce3d1399fd1b5df42
 
 Replace global locks (get_cpu + local_irq_save) with "local_locks()".
 Currently there is one of for "rotate" and one for "swap".
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/swap.h |    1 +
- mm/compaction.c      |    6 ++++--
- mm/page_alloc.c      |    2 ++
- mm/swap.c            |   38 ++++++++++++++++++++++----------------
+ include/linux/swap.h |  1 +
+ mm/compaction.c      |  6 ++++--
+ mm/page_alloc.c      |  2 ++
+ mm/swap.c            | 38 ++++++++++++++++++++++----------------
  4 files changed, 29 insertions(+), 18 deletions(-)
 
+diff --git a/include/linux/swap.h b/include/linux/swap.h
+index eb112633ba25..52bf5477dc92 100644
 --- a/include/linux/swap.h
 +++ b/include/linux/swap.h
-@@ -294,6 +294,7 @@ extern unsigned long nr_free_pagecache_p
+@@ -294,6 +294,7 @@ extern unsigned long nr_free_pagecache_pages(void);
  
  
  /* linux/mm/swap.c */
@@ -26,9 +27,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  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 --git a/mm/compaction.c b/mm/compaction.c
+index 70e6bec46dc2..6678ed58b7c6 100644
 --- a/mm/compaction.c
 +++ b/mm/compaction.c
-@@ -1593,10 +1593,12 @@ static enum compact_result compact_zone(
+@@ -1593,10 +1593,12 @@ static enum compact_result compact_zone(struct zone *zone, struct compact_contro
  				block_start_pfn(cc->migrate_pfn, cc->order);
  
  			if (cc->last_migrated_pfn < current_block_start) {
@@ -43,9 +46,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				/* No more flushing until we migrate again */
  				cc->last_migrated_pfn = 0;
  			}
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 0e094e322344..b5fb2b66ee15 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -6594,7 +6594,9 @@ static int page_alloc_cpu_notify(struct
+@@ -6609,7 +6609,9 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
  	int cpu = (unsigned long)hcpu;
  
  	if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
@@ -55,6 +60,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		drain_pages(cpu);
  
  		/*
+diff --git a/mm/swap.c b/mm/swap.c
+index 4dcf852e1e6d..93840ec3cc62 100644
 --- a/mm/swap.c
 +++ b/mm/swap.c
 @@ -32,6 +32,7 @@
@@ -65,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/hugetlb.h>
  #include <linux/page_idle.h>
  
-@@ -50,6 +51,8 @@ static DEFINE_PER_CPU(struct pagevec, lr
+@@ -50,6 +51,8 @@ static DEFINE_PER_CPU(struct pagevec, lru_deactivate_pvecs);
  #ifdef CONFIG_SMP
  static DEFINE_PER_CPU(struct pagevec, activate_page_pvecs);
  #endif
@@ -74,7 +81,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * This path almost never happens for VM activity - pages are normally
-@@ -240,11 +243,11 @@ void rotate_reclaimable_page(struct page
+@@ -240,11 +243,11 @@ void rotate_reclaimable_page(struct page *page)
  		unsigned long flags;
  
  		get_page(page);
@@ -113,7 +120,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	int i;
  
  	/*
-@@ -348,7 +352,7 @@ static void __lru_cache_activate_page(st
+@@ -348,7 +352,7 @@ static void __lru_cache_activate_page(struct page *page)
  		}
  	}
  
@@ -149,7 +156,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  
  	pvec = &per_cpu(lru_deactivate_file_pvecs, cpu);
-@@ -627,11 +631,12 @@ void deactivate_file_page(struct page *p
+@@ -627,11 +631,12 @@ void deactivate_file_page(struct page *page)
  		return;
  
  	if (likely(get_page_unless_zero(page))) {
@@ -164,7 +171,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  }
  
-@@ -646,19 +651,20 @@ void deactivate_file_page(struct page *p
+@@ -646,19 +651,20 @@ void deactivate_file_page(struct page *page)
  void deactivate_page(struct page *page)
  {
  	if (PageLRU(page) && PageActive(page) && !PageUnevictable(page)) {
diff --git a/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch b/debian/patches/features/all/rt/0107-mm-perform-lru_add_drain_all-remotely.patch
similarity index 91%
rename from debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch
rename to debian/patches/features/all/rt/0107-mm-perform-lru_add_drain_all-remotely.patch
index a8da1e2..65b6f93 100644
--- a/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch
+++ b/debian/patches/features/all/rt/0107-mm-perform-lru_add_drain_all-remotely.patch
@@ -1,7 +1,7 @@
 From: Luiz Capitulino <lcapitulino at redhat.com>
 Date: Fri, 27 May 2016 15:03:28 +0200
-Subject: [PATCH] mm: perform lru_add_drain_all() remotely
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 107/332] mm: perform lru_add_drain_all() remotely
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a7dbb575ce9cfc3eb94d386b3160318f6d4952be
 
 lru_add_drain_all() works by scheduling lru_add_drain_cpu() to run
 on all CPUs that have non-empty LRU pagevecs and then waiting for
@@ -20,9 +20,11 @@ Signed-off-by: Rik van Riel <riel at redhat.com>
 Signed-off-by: Luiz Capitulino <lcapitulino at redhat.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/swap.c |   42 ++++++++++++++++++++++++++++++++----------
+ mm/swap.c | 42 ++++++++++++++++++++++++++++++++----------
  1 file changed, 32 insertions(+), 10 deletions(-)
 
+diff --git a/mm/swap.c b/mm/swap.c
+index 93840ec3cc62..69c3a5b24060 100644
 --- a/mm/swap.c
 +++ b/mm/swap.c
 @@ -597,9 +597,15 @@ void lru_add_drain_cpu(int cpu)
diff --git a/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch b/debian/patches/features/all/rt/0108-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch
similarity index 63%
rename from debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch
rename to debian/patches/features/all/rt/0108-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch
index 69e4786..b7ad72b 100644
--- a/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch
+++ b/debian/patches/features/all/rt/0108-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch
@@ -1,7 +1,8 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:30:13 -0500
-Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 108/332] mm/vmstat: Protect per cpu variables with preempt
+ disable on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4310def0e1d771f32fb0dbb1595177b24117df6d
 
 Disable preemption on -RT for the vmstat code. On vanila the code runs in
 IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the
@@ -9,15 +10,16 @@ same ressources is not updated in parallel due to preemption.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/vmstat.h |    4 ++++
- mm/vmstat.c            |   12 ++++++++++++
+ include/linux/vmstat.h |  4 ++++
+ mm/vmstat.c            | 12 ++++++++++++
  2 files changed, 16 insertions(+)
 
+diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
+index 613771909b6e..e28c5a43229d 100644
 --- a/include/linux/vmstat.h
 +++ b/include/linux/vmstat.h
-@@ -33,7 +33,9 @@ DECLARE_PER_CPU(struct vm_event_state, v
+@@ -33,7 +33,9 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
   */
  static inline void __count_vm_event(enum vm_event_item item)
  {
@@ -27,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static inline void count_vm_event(enum vm_event_item item)
-@@ -43,7 +45,9 @@ static inline void count_vm_event(enum v
+@@ -43,7 +45,9 @@ static inline void count_vm_event(enum vm_event_item item)
  
  static inline void __count_vm_events(enum vm_event_item item, long delta)
  {
@@ -37,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static inline void count_vm_events(enum vm_event_item item, long delta)
+diff --git a/mm/vmstat.c b/mm/vmstat.c
+index 604f26a4f696..312006d2db50 100644
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -245,6 +245,7 @@ void __mod_zone_page_state(struct zone *
+@@ -245,6 +245,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
  	long x;
  	long t;
  
@@ -47,7 +51,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	x = delta + __this_cpu_read(*p);
  
  	t = __this_cpu_read(pcp->stat_threshold);
-@@ -254,6 +255,7 @@ void __mod_zone_page_state(struct zone *
+@@ -254,6 +255,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
  		x = 0;
  	}
  	__this_cpu_write(*p, x);
@@ -55,7 +59,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(__mod_zone_page_state);
  
-@@ -265,6 +267,7 @@ void __mod_node_page_state(struct pglist
+@@ -265,6 +267,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
  	long x;
  	long t;
  
@@ -63,7 +67,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	x = delta + __this_cpu_read(*p);
  
  	t = __this_cpu_read(pcp->stat_threshold);
-@@ -274,6 +277,7 @@ void __mod_node_page_state(struct pglist
+@@ -274,6 +277,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
  		x = 0;
  	}
  	__this_cpu_write(*p, x);
@@ -71,7 +75,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(__mod_node_page_state);
  
-@@ -306,6 +310,7 @@ void __inc_zone_state(struct zone *zone,
+@@ -306,6 +310,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
  	s8 __percpu *p = pcp->vm_stat_diff + item;
  	s8 v, t;
  
@@ -79,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	v = __this_cpu_inc_return(*p);
  	t = __this_cpu_read(pcp->stat_threshold);
  	if (unlikely(v > t)) {
-@@ -314,6 +319,7 @@ void __inc_zone_state(struct zone *zone,
+@@ -314,6 +319,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
  		zone_page_state_add(v + overstep, zone, item);
  		__this_cpu_write(*p, -overstep);
  	}
@@ -87,7 +91,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
-@@ -322,6 +328,7 @@ void __inc_node_state(struct pglist_data
+@@ -322,6 +328,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
  	s8 __percpu *p = pcp->vm_node_stat_diff + item;
  	s8 v, t;
  
@@ -95,7 +99,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	v = __this_cpu_inc_return(*p);
  	t = __this_cpu_read(pcp->stat_threshold);
  	if (unlikely(v > t)) {
-@@ -330,6 +337,7 @@ void __inc_node_state(struct pglist_data
+@@ -330,6 +337,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
  		node_page_state_add(v + overstep, pgdat, item);
  		__this_cpu_write(*p, -overstep);
  	}
@@ -103,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
-@@ -350,6 +358,7 @@ void __dec_zone_state(struct zone *zone,
+@@ -350,6 +358,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
  	s8 __percpu *p = pcp->vm_stat_diff + item;
  	s8 v, t;
  
@@ -111,7 +115,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	v = __this_cpu_dec_return(*p);
  	t = __this_cpu_read(pcp->stat_threshold);
  	if (unlikely(v < - t)) {
-@@ -358,6 +367,7 @@ void __dec_zone_state(struct zone *zone,
+@@ -358,6 +367,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
  		zone_page_state_add(v - overstep, zone, item);
  		__this_cpu_write(*p, overstep);
  	}
@@ -119,7 +123,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
-@@ -366,6 +376,7 @@ void __dec_node_state(struct pglist_data
+@@ -366,6 +376,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
  	s8 __percpu *p = pcp->vm_node_stat_diff + item;
  	s8 v, t;
  
@@ -127,7 +131,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	v = __this_cpu_dec_return(*p);
  	t = __this_cpu_read(pcp->stat_threshold);
  	if (unlikely(v < - t)) {
-@@ -374,6 +385,7 @@ void __dec_node_state(struct pglist_data
+@@ -374,6 +385,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
  		node_page_state_add(v - overstep, pgdat, item);
  		__this_cpu_write(*p, overstep);
  	}
diff --git a/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch b/debian/patches/features/all/rt/0109-ARM-Initialize-split-page-table-locks-for-vector-pag.patch
similarity index 81%
rename from debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch
rename to debian/patches/features/all/rt/0109-ARM-Initialize-split-page-table-locks-for-vector-pag.patch
index ed40a06..5f5516d 100644
--- a/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch
+++ b/debian/patches/features/all/rt/0109-ARM-Initialize-split-page-table-locks-for-vector-pag.patch
@@ -1,7 +1,8 @@
-Subject: ARM: Initialize split page table locks for vector page
 From: Frank Rowand <frank.rowand at am.sony.com>
 Date: Sat, 1 Oct 2011 18:58:13 -0700
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 109/332] ARM: Initialize split page table locks for vector
+ page
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=56b7a1de4f71ea9143e7d059bdbf18b1c2358c07
 
 Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if
 PREEMPT_RT_FULL=y because vectors_user_mapping() creates a
@@ -31,12 +32,14 @@ Cc: Peter Zijlstra <peterz at infradead.org>
 Link: http://lkml.kernel.org/r/4E87C535.2030907@am.sony.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/arm/kernel/process.c |   24 ++++++++++++++++++++++++
+ arch/arm/kernel/process.c | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
 
+diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
+index 91d2d5b01414..750550098b59 100644
 --- a/arch/arm/kernel/process.c
 +++ b/arch/arm/kernel/process.c
-@@ -322,6 +322,30 @@ unsigned long arch_randomize_brk(struct
+@@ -322,6 +322,30 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
  }
  
  #ifdef CONFIG_MMU
diff --git a/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch b/debian/patches/features/all/rt/0110-mm-bounce-Use-local_irq_save_nort.patch
similarity index 55%
rename from debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch
rename to debian/patches/features/all/rt/0110-mm-bounce-Use-local_irq_save_nort.patch
index 41f43e6..4def9a4 100644
--- a/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch
+++ b/debian/patches/features/all/rt/0110-mm-bounce-Use-local_irq_save_nort.patch
@@ -1,18 +1,20 @@
-Subject: mm: bounce: Use local_irq_save_nort
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 09 Jan 2013 10:33:09 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 9 Jan 2013 10:33:09 +0100
+Subject: [PATCH 110/332] mm: bounce: Use local_irq_save_nort
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1950e455d0f98d4dd5e31c10ef14758672af3c81
 
 kmap_atomic() is preemptible on RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- block/bounce.c |    4 ++--
+ block/bounce.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/block/bounce.c b/block/bounce.c
+index 1cb5dd3a5da1..2f1ec8a67cbe 100644
 --- a/block/bounce.c
 +++ b/block/bounce.c
-@@ -55,11 +55,11 @@ static void bounce_copy_vec(struct bio_v
+@@ -55,11 +55,11 @@ static void bounce_copy_vec(struct bio_vec *to, unsigned char *vfrom)
  	unsigned long flags;
  	unsigned char *vto;
  
diff --git a/debian/patches/features/all/rt/mm-disable-sloub-rt.patch b/debian/patches/features/all/rt/0111-mm-Allow-only-slub-on-RT.patch
similarity index 73%
rename from debian/patches/features/all/rt/mm-disable-sloub-rt.patch
rename to debian/patches/features/all/rt/0111-mm-Allow-only-slub-on-RT.patch
index 918d6fa..d81e2f0 100644
--- a/debian/patches/features/all/rt/mm-disable-sloub-rt.patch
+++ b/debian/patches/features/all/rt/0111-mm-Allow-only-slub-on-RT.patch
@@ -1,17 +1,18 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:44:03 -0500
-Subject: mm: Allow only slub on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 111/332] mm: Allow only slub on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7db11b6fd9922d09be3d83979966ad5db023af0c
 
 Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- init/Kconfig |    2 ++
+ init/Kconfig | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index ea73e8a9e89e..f3fe8040ff0f 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1759,6 +1759,7 @@ choice
diff --git a/debian/patches/features/all/rt/mm-enable-slub.patch b/debian/patches/features/all/rt/0112-mm-Enable-SLUB-for-RT.patch
similarity index 72%
rename from debian/patches/features/all/rt/mm-enable-slub.patch
rename to debian/patches/features/all/rt/0112-mm-Enable-SLUB-for-RT.patch
index f5e942b..945f356 100644
--- a/debian/patches/features/all/rt/mm-enable-slub.patch
+++ b/debian/patches/features/all/rt/0112-mm-Enable-SLUB-for-RT.patch
@@ -1,20 +1,22 @@
-Subject: mm: Enable SLUB for RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 25 Oct 2012 10:32:35 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 112/332] mm: Enable SLUB for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=00f8e58c278b2f3d1edc0a0766e63c4c4742990f
 
 Make SLUB RT aware by converting locks to raw and using free lists to
 move the freeing out of the lock held region.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- mm/slab.h |    4 +
- mm/slub.c |  134 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
+ mm/slab.h |   4 ++
+ mm/slub.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
  2 files changed, 109 insertions(+), 29 deletions(-)
 
+diff --git a/mm/slab.h b/mm/slab.h
+index ceb7d70cdb76..dfd281e43fbe 100644
 --- a/mm/slab.h
 +++ b/mm/slab.h
-@@ -426,7 +426,11 @@ static inline void slab_post_alloc_hook(
+@@ -426,7 +426,11 @@ static inline void slab_post_alloc_hook(struct kmem_cache *s, gfp_t flags,
   * The slab lists for all objects.
   */
  struct kmem_cache_node {
@@ -26,9 +28,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_SLAB
  	struct list_head slabs_partial;	/* partial list first, better asm code */
+diff --git a/mm/slub.c b/mm/slub.c
+index edc79ca3c6d5..bc7a5d448150 100644
 --- a/mm/slub.c
 +++ b/mm/slub.c
-@@ -1141,7 +1141,7 @@ static noinline int free_debug_processin
+@@ -1144,7 +1144,7 @@ static noinline int free_debug_processing(
  	unsigned long uninitialized_var(flags);
  	int ret = 0;
  
@@ -37,7 +41,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	slab_lock(page);
  
  	if (s->flags & SLAB_CONSISTENCY_CHECKS) {
-@@ -1176,7 +1176,7 @@ static noinline int free_debug_processin
+@@ -1179,7 +1179,7 @@ static noinline int free_debug_processing(
  			 bulk_cnt, cnt);
  
  	slab_unlock(page);
@@ -46,7 +50,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (!ret)
  		slab_fix(s, "Object at 0x%p not freed", object);
  	return ret;
-@@ -1304,6 +1304,12 @@ static inline void dec_slabs_node(struct
+@@ -1307,6 +1307,12 @@ static inline void dec_slabs_node(struct kmem_cache *s, int node,
  
  #endif /* CONFIG_SLUB_DEBUG */
  
@@ -59,7 +63,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Hooks for other subsystems that check memory allocations. In a typical
   * production configuration these hooks all should produce no code at all.
-@@ -1530,7 +1536,11 @@ static struct page *allocate_slab(struct
+@@ -1533,7 +1539,11 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
  
  	flags &= gfp_allowed_mask;
  
@@ -71,7 +75,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		local_irq_enable();
  
  	flags |= s->allocflags;
-@@ -1605,7 +1615,11 @@ static struct page *allocate_slab(struct
+@@ -1608,7 +1618,11 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
  	page->frozen = 1;
  
  out:
@@ -83,7 +87,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		local_irq_disable();
  	if (!page)
  		return NULL;
-@@ -1664,6 +1678,16 @@ static void __free_slab(struct kmem_cach
+@@ -1667,6 +1681,16 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
  	__free_pages(page, order);
  }
  
@@ -100,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define need_reserve_slab_rcu						\
  	(sizeof(((struct page *)NULL)->lru) < sizeof(struct rcu_head))
  
-@@ -1695,6 +1719,12 @@ static void free_slab(struct kmem_cache
+@@ -1698,6 +1722,12 @@ static void free_slab(struct kmem_cache *s, struct page *page)
  		}
  
  		call_rcu(head, rcu_free_slab);
@@ -113,7 +117,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else
  		__free_slab(s, page);
  }
-@@ -1802,7 +1832,7 @@ static void *get_partial_node(struct kme
+@@ -1805,7 +1835,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
  	if (!n || !n->nr_partial)
  		return NULL;
  
@@ -122,7 +126,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	list_for_each_entry_safe(page, page2, &n->partial, lru) {
  		void *t;
  
-@@ -1827,7 +1857,7 @@ static void *get_partial_node(struct kme
+@@ -1830,7 +1860,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
  			break;
  
  	}
@@ -131,7 +135,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return object;
  }
  
-@@ -2073,7 +2103,7 @@ static void deactivate_slab(struct kmem_
+@@ -2076,7 +2106,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
  			 * that acquire_slab() will see a slab page that
  			 * is frozen
  			 */
@@ -140,7 +144,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  	} else {
  		m = M_FULL;
-@@ -2084,7 +2114,7 @@ static void deactivate_slab(struct kmem_
+@@ -2087,7 +2117,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
  			 * slabs from diagnostic functions will not see
  			 * any frozen slabs.
  			 */
@@ -149,7 +153,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  	}
  
-@@ -2119,7 +2149,7 @@ static void deactivate_slab(struct kmem_
+@@ -2122,7 +2152,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
  		goto redo;
  
  	if (lock)
@@ -158,7 +162,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (m == M_FREE) {
  		stat(s, DEACTIVATE_EMPTY);
-@@ -2151,10 +2181,10 @@ static void unfreeze_partials(struct kme
+@@ -2154,10 +2184,10 @@ static void unfreeze_partials(struct kmem_cache *s,
  		n2 = get_node(s, page_to_nid(page));
  		if (n != n2) {
  			if (n)
@@ -171,7 +175,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  
  		do {
-@@ -2183,7 +2213,7 @@ static void unfreeze_partials(struct kme
+@@ -2186,7 +2216,7 @@ static void unfreeze_partials(struct kmem_cache *s,
  	}
  
  	if (n)
@@ -180,7 +184,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	while (discard_page) {
  		page = discard_page;
-@@ -2222,14 +2252,21 @@ static void put_cpu_partial(struct kmem_
+@@ -2225,14 +2255,21 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain)
  			pobjects = oldpage->pobjects;
  			pages = oldpage->pages;
  			if (drain && pobjects > s->cpu_partial) {
@@ -202,7 +206,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				oldpage = NULL;
  				pobjects = 0;
  				pages = 0;
-@@ -2301,7 +2338,22 @@ static bool has_cpu_slab(int cpu, void *
+@@ -2304,7 +2341,22 @@ static bool has_cpu_slab(int cpu, void *info)
  
  static void flush_all(struct kmem_cache *s)
  {
@@ -225,7 +229,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -2356,10 +2408,10 @@ static unsigned long count_partial(struc
+@@ -2359,10 +2411,10 @@ static unsigned long count_partial(struct kmem_cache_node *n,
  	unsigned long x = 0;
  	struct page *page;
  
@@ -238,7 +242,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return x;
  }
  #endif /* CONFIG_SLUB_DEBUG || CONFIG_SYSFS */
-@@ -2497,8 +2549,10 @@ static inline void *get_freelist(struct
+@@ -2500,8 +2552,10 @@ static inline void *get_freelist(struct kmem_cache *s, struct page *page)
   * already disabled (which is the case for bulk allocation).
   */
  static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
@@ -250,7 +254,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	void *freelist;
  	struct page *page;
  
-@@ -2558,6 +2612,13 @@ static void *___slab_alloc(struct kmem_c
+@@ -2561,6 +2615,13 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
  	VM_BUG_ON(!c->page->frozen);
  	c->freelist = get_freepointer(s, freelist);
  	c->tid = next_tid(c->tid);
@@ -264,7 +268,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return freelist;
  
  new_slab:
-@@ -2589,7 +2650,7 @@ static void *___slab_alloc(struct kmem_c
+@@ -2592,7 +2653,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
  	deactivate_slab(s, page, get_freepointer(s, freelist));
  	c->page = NULL;
  	c->freelist = NULL;
@@ -273,7 +277,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -2601,6 +2662,7 @@ static void *__slab_alloc(struct kmem_ca
+@@ -2604,6 +2665,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
  {
  	void *p;
  	unsigned long flags;
@@ -281,7 +285,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	local_irq_save(flags);
  #ifdef CONFIG_PREEMPT
-@@ -2612,8 +2674,9 @@ static void *__slab_alloc(struct kmem_ca
+@@ -2615,8 +2677,9 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
  	c = this_cpu_ptr(s->cpu_slab);
  #endif
  
@@ -292,7 +296,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return p;
  }
  
-@@ -2799,7 +2862,7 @@ static void __slab_free(struct kmem_cach
+@@ -2802,7 +2865,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
  
  	do {
  		if (unlikely(n)) {
@@ -301,7 +305,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			n = NULL;
  		}
  		prior = page->freelist;
-@@ -2831,7 +2894,7 @@ static void __slab_free(struct kmem_cach
+@@ -2834,7 +2897,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
  				 * Otherwise the list_lock will synchronize with
  				 * other processors updating the list of slabs.
  				 */
@@ -310,7 +314,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  			}
  		}
-@@ -2873,7 +2936,7 @@ static void __slab_free(struct kmem_cach
+@@ -2876,7 +2939,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
  		add_partial(n, page, DEACTIVATE_TO_TAIL);
  		stat(s, FREE_ADD_PARTIAL);
  	}
@@ -319,7 +323,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return;
  
  slab_empty:
-@@ -2888,7 +2951,7 @@ static void __slab_free(struct kmem_cach
+@@ -2891,7 +2954,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
  		remove_full(s, n, page);
  	}
  
@@ -328,7 +332,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	stat(s, FREE_SLAB);
  	discard_slab(s, page);
  }
-@@ -3093,6 +3156,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca
+@@ -3096,6 +3159,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
  			  void **p)
  {
  	struct kmem_cache_cpu *c;
@@ -336,7 +340,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	int i;
  
  	/* memcg and kmem_cache debug support */
-@@ -3116,7 +3180,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca
+@@ -3119,7 +3183,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
  			 * of re-populating per CPU c->freelist
  			 */
  			p[i] = ___slab_alloc(s, flags, NUMA_NO_NODE,
@@ -345,7 +349,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			if (unlikely(!p[i]))
  				goto error;
  
-@@ -3128,6 +3192,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca
+@@ -3131,6 +3195,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
  	}
  	c->tid = next_tid(c->tid);
  	local_irq_enable();
@@ -353,7 +357,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Clear memory outside IRQ disabled fastpath loop */
  	if (unlikely(flags & __GFP_ZERO)) {
-@@ -3275,7 +3340,7 @@ static void
+@@ -3278,7 +3343,7 @@ static void
  init_kmem_cache_node(struct kmem_cache_node *n)
  {
  	n->nr_partial = 0;
@@ -362,7 +366,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	INIT_LIST_HEAD(&n->partial);
  #ifdef CONFIG_SLUB_DEBUG
  	atomic_long_set(&n->nr_slabs, 0);
-@@ -3619,6 +3684,10 @@ static void list_slab_objects(struct kme
+@@ -3622,6 +3687,10 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
  							const char *text)
  {
  #ifdef CONFIG_SLUB_DEBUG
@@ -373,7 +377,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	void *addr = page_address(page);
  	void *p;
  	unsigned long *map = kzalloc(BITS_TO_LONGS(page->objects) *
-@@ -3639,6 +3708,7 @@ static void list_slab_objects(struct kme
+@@ -3642,6 +3711,7 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
  	slab_unlock(page);
  	kfree(map);
  #endif
@@ -381,7 +385,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -3652,7 +3722,7 @@ static void free_partial(struct kmem_cac
+@@ -3655,7 +3725,7 @@ static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n)
  	struct page *page, *h;
  
  	BUG_ON(irqs_disabled());
@@ -390,7 +394,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	list_for_each_entry_safe(page, h, &n->partial, lru) {
  		if (!page->inuse) {
  			remove_partial(n, page);
-@@ -3662,7 +3732,7 @@ static void free_partial(struct kmem_cac
+@@ -3665,7 +3735,7 @@ static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n)
  			"Objects remaining in %s on __kmem_cache_shutdown()");
  		}
  	}
@@ -399,7 +403,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	list_for_each_entry_safe(page, h, &discard, lru)
  		discard_slab(s, page);
-@@ -3905,7 +3975,7 @@ int __kmem_cache_shrink(struct kmem_cach
+@@ -3908,7 +3978,7 @@ int __kmem_cache_shrink(struct kmem_cache *s)
  		for (i = 0; i < SHRINK_PROMOTE_MAX; i++)
  			INIT_LIST_HEAD(promote + i);
  
@@ -408,7 +412,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		/*
  		 * Build lists of slabs to discard or promote.
-@@ -3936,7 +4006,7 @@ int __kmem_cache_shrink(struct kmem_cach
+@@ -3939,7 +4009,7 @@ int __kmem_cache_shrink(struct kmem_cache *s)
  		for (i = SHRINK_PROMOTE_MAX - 1; i >= 0; i--)
  			list_splice(promote + i, &n->partial);
  
@@ -417,7 +421,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		/* Release empty slabs */
  		list_for_each_entry_safe(page, t, &discard, lru)
-@@ -4112,6 +4182,12 @@ void __init kmem_cache_init(void)
+@@ -4115,6 +4185,12 @@ void __init kmem_cache_init(void)
  {
  	static __initdata struct kmem_cache boot_kmem_cache,
  		boot_kmem_cache_node;
@@ -430,7 +434,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (debug_guardpage_minorder())
  		slub_max_order = 0;
-@@ -4320,7 +4396,7 @@ static int validate_slab_node(struct kme
+@@ -4323,7 +4399,7 @@ static int validate_slab_node(struct kmem_cache *s,
  	struct page *page;
  	unsigned long flags;
  
@@ -439,7 +443,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	list_for_each_entry(page, &n->partial, lru) {
  		validate_slab_slab(s, page, map);
-@@ -4342,7 +4418,7 @@ static int validate_slab_node(struct kme
+@@ -4345,7 +4421,7 @@ static int validate_slab_node(struct kmem_cache *s,
  		       s->name, count, atomic_long_read(&n->nr_slabs));
  
  out:
@@ -448,7 +452,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return count;
  }
  
-@@ -4530,12 +4606,12 @@ static int list_locations(struct kmem_ca
+@@ -4533,12 +4609,12 @@ static int list_locations(struct kmem_cache *s, char *buf,
  		if (!atomic_long_read(&n->nr_slabs))
  			continue;
  
diff --git a/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch b/debian/patches/features/all/rt/0113-slub-Enable-irqs-for-__GFP_WAIT.patch
similarity index 63%
rename from debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch
rename to debian/patches/features/all/rt/0113-slub-Enable-irqs-for-__GFP_WAIT.patch
index 7ca6270..12c3ed2 100644
--- a/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch
+++ b/debian/patches/features/all/rt/0113-slub-Enable-irqs-for-__GFP_WAIT.patch
@@ -1,19 +1,21 @@
-Subject: slub: Enable irqs for __GFP_WAIT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 09 Jan 2013 12:08:15 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 9 Jan 2013 12:08:15 +0100
+Subject: [PATCH 113/332] slub: Enable irqs for __GFP_WAIT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d0a9678a0730823a411a51d29b1d3ed6edff0dca
 
 SYSTEM_RUNNING might be too late for enabling interrupts. Allocations
 with GFP_WAIT can happen before that. So use this as an indicator.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- mm/slub.c |   13 ++++++-------
+ mm/slub.c | 13 ++++++-------
  1 file changed, 6 insertions(+), 7 deletions(-)
 
+diff --git a/mm/slub.c b/mm/slub.c
+index bc7a5d448150..67eb368b9314 100644
 --- a/mm/slub.c
 +++ b/mm/slub.c
-@@ -1533,14 +1533,17 @@ static struct page *allocate_slab(struct
+@@ -1536,14 +1536,17 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
  	void *start, *p;
  	int idx, order;
  	bool shuffle;
@@ -33,7 +35,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		local_irq_enable();
  
  	flags |= s->allocflags;
-@@ -1615,11 +1618,7 @@ static struct page *allocate_slab(struct
+@@ -1618,11 +1621,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
  	page->frozen = 1;
  
  out:
diff --git a/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches/features/all/rt/0114-slub-Disable-SLUB_CPU_PARTIAL.patch
similarity index 87%
rename from debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch
rename to debian/patches/features/all/rt/0114-slub-Disable-SLUB_CPU_PARTIAL.patch
index 7a1e0a2..81df845 100644
--- a/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch
+++ b/debian/patches/features/all/rt/0114-slub-Disable-SLUB_CPU_PARTIAL.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 15 Apr 2015 19:00:47 +0200
-Subject: slub: Disable SLUB_CPU_PARTIAL
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 114/332] slub: Disable SLUB_CPU_PARTIAL
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f16dcc8c57565b5d2cb8372cfabb431b08c432a7
 
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915
 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7
@@ -32,9 +32,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- init/Kconfig |    2 +-
+ init/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index f3fe8040ff0f..333d2b269208 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1799,7 +1799,7 @@ config SLAB_FREELIST_RANDOM
diff --git a/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch b/debian/patches/features/all/rt/0115-mm-page_alloc-Use-local_lock_on-instead-of-plain-spi.patch
similarity index 73%
rename from debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch
rename to debian/patches/features/all/rt/0115-mm-page_alloc-Use-local_lock_on-instead-of-plain-spi.patch
index e3e776f..148f5e6 100644
--- a/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch
+++ b/debian/patches/features/all/rt/0115-mm-page_alloc-Use-local_lock_on-instead-of-plain-spi.patch
@@ -1,17 +1,19 @@
-Subject: mm: page_alloc: Use local_lock_on() instead of plain spinlock
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 27 Sep 2012 11:11:46 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 115/332] mm: page_alloc: Use local_lock_on() instead of plain
+ spinlock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2ba90481661fc23e9d811eaa2751b8af3bb6ddcb
 
 The plain spinlock while sufficient does not update the local_lock
 internals. Use a proper local_lock function instead to ease debugging.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- mm/page_alloc.c |    4 ++--
+ mm/page_alloc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index b5fb2b66ee15..a63aa41760af 100644
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
 @@ -286,9 +286,9 @@ static DEFINE_LOCAL_IRQ_LOCK(pa_lock);
diff --git a/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/debian/patches/features/all/rt/0116-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
similarity index 83%
rename from debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
rename to debian/patches/features/all/rt/0116-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
index a3cc82f..af7173b 100644
--- a/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
+++ b/debian/patches/features/all/rt/0116-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
@@ -1,7 +1,8 @@
 From: Yang Shi <yang.shi at windriver.com>
-Subject: mm/memcontrol: Don't call schedule_work_on in preemption disabled context
 Date: Wed, 30 Oct 2013 11:48:33 -0700
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 116/332] mm/memcontrol: Don't call schedule_work_on in
+ preemption disabled context
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6258aa6465eca062351b30477f16d26a322c3fb0
 
 The following trace is triggered when running ltp oom test cases:
 
@@ -43,13 +44,14 @@ replace the pair of get/put_cpu() to get/put_cpu_light().
 Signed-off-by: Yang Shi <yang.shi at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
-
- mm/memcontrol.c |    4 ++--
+ mm/memcontrol.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/mm/memcontrol.c b/mm/memcontrol.c
+index 47559cc0cdcc..efb41a543ae0 100644
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
-@@ -1792,7 +1792,7 @@ static void drain_all_stock(struct mem_c
+@@ -1792,7 +1792,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
  		return;
  	/* Notify other cpus that system-wide "drain" is running */
  	get_online_cpus();
@@ -58,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	for_each_online_cpu(cpu) {
  		struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu);
  		struct mem_cgroup *memcg;
-@@ -1809,7 +1809,7 @@ static void drain_all_stock(struct mem_c
+@@ -1809,7 +1809,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
  				schedule_work_on(cpu, &stock->work);
  		}
  	}
diff --git a/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch b/debian/patches/features/all/rt/0117-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch
similarity index 84%
rename from debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch
rename to debian/patches/features/all/rt/0117-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch
index 544c331..8fa77c7 100644
--- a/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch
+++ b/debian/patches/features/all/rt/0117-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch
@@ -1,16 +1,19 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
-Subject: mm/memcontrol: Replace local_irq_disable with local locks
 Date: Wed, 28 Jan 2015 17:14:16 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 117/332] mm/memcontrol: Replace local_irq_disable with local
+ locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=946483f2d509bfbe5c80d35e5d5acc31beef83b8
 
 There are a few local_irq_disable() which then take sleeping locks. This
 patch converts them local locks.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/memcontrol.c |   20 ++++++++++++++------
+ mm/memcontrol.c | 20 ++++++++++++++------
  1 file changed, 14 insertions(+), 6 deletions(-)
 
+diff --git a/mm/memcontrol.c b/mm/memcontrol.c
+index efb41a543ae0..3daeee356665 100644
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
 @@ -67,6 +67,7 @@
@@ -30,7 +33,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /* Whether legacy memory+swap accounting is active */
  static bool do_memsw_account(void)
  {
-@@ -4555,12 +4558,12 @@ static int mem_cgroup_move_account(struc
+@@ -4555,12 +4558,12 @@ static int mem_cgroup_move_account(struct page *page,
  
  	ret = 0;
  
@@ -45,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  out_unlock:
  	unlock_page(page);
  out:
-@@ -5435,10 +5438,10 @@ void mem_cgroup_commit_charge(struct pag
+@@ -5435,10 +5438,10 @@ void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg,
  
  	commit_charge(page, memcg, lrucare);
  
@@ -58,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (do_memsw_account() && PageSwapCache(page)) {
  		swp_entry_t entry = { .val = page_private(page) };
-@@ -5494,14 +5497,14 @@ static void uncharge_batch(struct mem_cg
+@@ -5494,14 +5497,14 @@ static void uncharge_batch(struct mem_cgroup *memcg, unsigned long pgpgout,
  		memcg_oom_recover(memcg);
  	}
  
@@ -75,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (!mem_cgroup_is_root(memcg))
  		css_put_many(&memcg->css, nr_pages);
-@@ -5850,6 +5853,7 @@ void mem_cgroup_swapout(struct page *pag
+@@ -5850,6 +5853,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
  {
  	struct mem_cgroup *memcg, *swap_memcg;
  	unsigned short oldid;
@@ -83,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	VM_BUG_ON_PAGE(PageLRU(page), page);
  	VM_BUG_ON_PAGE(page_count(page), page);
-@@ -5890,12 +5894,16 @@ void mem_cgroup_swapout(struct page *pag
+@@ -5890,12 +5894,16 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
  	 * important here to have the interrupts disabled because it is the
  	 * only synchronisation we have for udpating the per-CPU variables.
  	 */
diff --git a/debian/patches/features/all/rt/mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch b/debian/patches/features/all/rt/0118-mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
similarity index 72%
rename from debian/patches/features/all/rt/mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
rename to debian/patches/features/all/rt/0118-mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
index 986f56a..30b8f3d 100644
--- a/debian/patches/features/all/rt/mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
+++ b/debian/patches/features/all/rt/0118-mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
@@ -1,8 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sun, 5 Jun 2016 08:11:13 +0200
-Subject: [PATCH] mm/memcontrol: mem_cgroup_migrate() - replace another
+Subject: [PATCH 118/332] mm/memcontrol: mem_cgroup_migrate() - replace another
  local_irq_disable() w. local_lock_irq()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cebd1d2e5f0bab4ee99d612bdf98f2c777f3038a
 
 v4.6 grew a local_irq_disable() in mm/memcontrol.c::mem_cgroup_migrate().
 Convert it to use the existing local lock (event_lock) like the others.
@@ -10,12 +10,14 @@ Convert it to use the existing local lock (event_lock) like the others.
 Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/memcontrol.c |    4 ++--
+ mm/memcontrol.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/mm/memcontrol.c b/mm/memcontrol.c
+index 3daeee356665..58d032994c2d 100644
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
-@@ -5659,10 +5659,10 @@ void mem_cgroup_migrate(struct page *old
+@@ -5659,10 +5659,10 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)
  
  	commit_charge(newpage, memcg, false);
  
diff --git a/debian/patches/features/all/rt/mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch b/debian/patches/features/all/rt/0119-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
similarity index 77%
rename from debian/patches/features/all/rt/mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
rename to debian/patches/features/all/rt/0119-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
index ac0e7b8..35c70f9 100644
--- a/debian/patches/features/all/rt/mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
+++ b/debian/patches/features/all/rt/0119-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 5 Feb 2016 12:17:14 +0100
-Subject: mm: backing-dev: don't disable IRQs in wb_congested_put()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 119/332] mm: backing-dev: don't disable IRQs in
+ wb_congested_put()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dbead7ad2607181ace41f15392bcefd2511037af
 
 it triggers:
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:930
@@ -23,12 +24,14 @@ due to cgwb_lock beeing taken with spin_lock_irqsave() usually.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/backing-dev.c |    4 ++--
+ mm/backing-dev.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/mm/backing-dev.c b/mm/backing-dev.c
+index 6ff2d7744223..b5a91dd53b5f 100644
 --- a/mm/backing-dev.c
 +++ b/mm/backing-dev.c
-@@ -457,9 +457,9 @@ void wb_congested_put(struct bdi_writeba
+@@ -457,9 +457,9 @@ void wb_congested_put(struct bdi_writeback_congested *congested)
  {
  	unsigned long flags;
  
diff --git a/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches/features/all/rt/0120-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch
similarity index 83%
rename from debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch
rename to debian/patches/features/all/rt/0120-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch
index 7857361..ae64848 100644
--- a/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch
+++ b/debian/patches/features/all/rt/0120-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Tue, 22 Mar 2016 11:16:09 +0100
-Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 120/332] mm/zsmalloc: copy with get_cpu_var() and locking
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a1b0cbf24e603f6a89d0f5913cd90128f9011f7b
 
 get_cpu_var() disables preemption and triggers a might_sleep() splat later.
 This is replaced with get_locked_var().
@@ -13,9 +13,11 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 fixed the size magic]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/zsmalloc.c |   80 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ mm/zsmalloc.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
  1 file changed, 74 insertions(+), 6 deletions(-)
 
+diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
+index 1689bb58e0d1..e52a8cb6aa5a 100644
 --- a/mm/zsmalloc.c
 +++ b/mm/zsmalloc.c
 @@ -53,6 +53,7 @@
@@ -50,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Object location (<PFN>, <obj_idx>) is encoded as
   * as single (unsigned long) handle value.
-@@ -327,7 +341,7 @@ static void SetZsPageMovable(struct zs_p
+@@ -327,7 +341,7 @@ static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage) {}
  
  static int create_cache(struct zs_pool *pool)
  {
@@ -59,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  					0, 0, NULL);
  	if (!pool->handle_cachep)
  		return 1;
-@@ -351,10 +365,27 @@ static void destroy_cache(struct zs_pool
+@@ -351,10 +365,27 @@ static void destroy_cache(struct zs_pool *pool)
  
  static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)
  {
@@ -89,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
  {
  	kmem_cache_free(pool->handle_cachep, (void *)handle);
-@@ -373,12 +404,18 @@ static void cache_free_zspage(struct zs_
+@@ -373,12 +404,18 @@ static void cache_free_zspage(struct zs_pool *pool, struct zspage *zspage)
  
  static void record_obj(unsigned long handle, unsigned long obj)
  {
@@ -116,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static bool is_zspage_isolated(struct zspage *zspage)
  {
-@@ -902,7 +940,13 @@ static unsigned long location_to_obj(str
+@@ -902,7 +940,13 @@ static unsigned long location_to_obj(struct page *page, unsigned int obj_idx)
  
  static unsigned long handle_to_obj(unsigned long handle)
  {
@@ -130,7 +132,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static unsigned long obj_to_head(struct page *page, void *obj)
-@@ -916,22 +960,46 @@ static unsigned long obj_to_head(struct
+@@ -916,22 +960,46 @@ static unsigned long obj_to_head(struct page *page, void *obj)
  
  static inline int testpin_tag(unsigned long handle)
  {
@@ -177,7 +179,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void reset_page(struct page *page)
-@@ -1423,7 +1491,7 @@ void *zs_map_object(struct zs_pool *pool
+@@ -1423,7 +1491,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle,
  	class = pool->size_class[class_idx];
  	off = (class->size * obj_idx) & ~PAGE_MASK;
  
@@ -186,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	area->vm_mm = mm;
  	if (off + class->size <= PAGE_SIZE) {
  		/* this object is contained entirely within a page */
-@@ -1477,7 +1545,7 @@ void zs_unmap_object(struct zs_pool *poo
+@@ -1477,7 +1545,7 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle)
  
  		__zs_unmap_object(area, pages, off, class->size);
  	}
diff --git a/debian/patches/features/all/rt/radix-tree-use-local-locks.patch b/debian/patches/features/all/rt/0121-radix-tree-use-local-locks.patch
similarity index 77%
rename from debian/patches/features/all/rt/radix-tree-use-local-locks.patch
rename to debian/patches/features/all/rt/0121-radix-tree-use-local-locks.patch
index ccb8b44..8fd102d 100644
--- a/debian/patches/features/all/rt/radix-tree-use-local-locks.patch
+++ b/debian/patches/features/all/rt/0121-radix-tree-use-local-locks.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 25 Jan 2017 16:34:27 +0100
-Subject: [PATCH] radix-tree: use local locks
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 121/332] radix-tree: use local locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=db616771bcdc0402bbca61e5fa7942eb5c248982
 
 The preload functionality uses per-CPU variables and preempt-disable to
 ensure that it does not switch CPUs during its usage. This patch adds
@@ -12,13 +12,15 @@ Cc: stable-rt at vger.kernel.org
 Reported-and-debugged-by: Mike Galbraith <efault at gmx.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/radix-tree.h |    7 ++-----
- lib/radix-tree.c           |   22 +++++++++++++++-------
+ include/linux/radix-tree.h |  7 ++-----
+ lib/radix-tree.c           | 22 +++++++++++++++-------
  2 files changed, 17 insertions(+), 12 deletions(-)
 
+diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
+index af3581b8a451..277295039c8f 100644
 --- a/include/linux/radix-tree.h
 +++ b/include/linux/radix-tree.h
-@@ -292,6 +292,8 @@ unsigned int radix_tree_gang_lookup_slot
+@@ -292,6 +292,8 @@ unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root,
  int radix_tree_preload(gfp_t gfp_mask);
  int radix_tree_maybe_preload(gfp_t gfp_mask);
  int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order);
@@ -27,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  void radix_tree_init(void);
  void *radix_tree_tag_set(struct radix_tree_root *root,
  			unsigned long index, unsigned int tag);
-@@ -314,11 +316,6 @@ unsigned long radix_tree_range_tag_if_ta
+@@ -314,11 +316,6 @@ unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root,
  int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
  unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item);
  
@@ -39,6 +41,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * struct radix_tree_iter - radix tree iterator state
   *
+diff --git a/lib/radix-tree.c b/lib/radix-tree.c
+index 8e6d552c40dd..741da5a77fd5 100644
 --- a/lib/radix-tree.c
 +++ b/lib/radix-tree.c
 @@ -36,7 +36,7 @@
@@ -58,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static inline void *node_to_entry(void *ptr)
  {
-@@ -290,13 +291,14 @@ radix_tree_node_alloc(struct radix_tree_
+@@ -290,13 +291,14 @@ radix_tree_node_alloc(struct radix_tree_root *root)
  		 * succeed in getting a node here (and never reach
  		 * kmem_cache_alloc)
  		 */
@@ -74,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/*
  		 * Update the allocation stack trace as this is more useful
  		 * for debugging.
-@@ -357,14 +359,14 @@ static int __radix_tree_preload(gfp_t gf
+@@ -357,14 +359,14 @@ static int __radix_tree_preload(gfp_t gfp_mask, int nr)
  	 */
  	gfp_mask &= ~__GFP_ACCOUNT;
  
@@ -92,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		rtp = this_cpu_ptr(&radix_tree_preloads);
  		if (rtp->nr < nr) {
  			node->private_data = rtp->nodes;
-@@ -406,7 +408,7 @@ int radix_tree_maybe_preload(gfp_t gfp_m
+@@ -406,7 +408,7 @@ int radix_tree_maybe_preload(gfp_t gfp_mask)
  	if (gfpflags_allow_blocking(gfp_mask))
  		return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE);
  	/* Preloading doesn't help anything with this gfp mask, skip it */
@@ -101,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 0;
  }
  EXPORT_SYMBOL(radix_tree_maybe_preload);
-@@ -422,7 +424,7 @@ int radix_tree_maybe_preload_order(gfp_t
+@@ -422,7 +424,7 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order)
  
  	/* Preloading doesn't help anything with this gfp mask, skip it */
  	if (!gfpflags_allow_blocking(gfp_mask)) {
@@ -110,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		return 0;
  	}
  
-@@ -456,6 +458,12 @@ int radix_tree_maybe_preload_order(gfp_t
+@@ -456,6 +458,12 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order)
  	return __radix_tree_preload(gfp_mask, nr_nodes);
  }
  
diff --git a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch b/debian/patches/features/all/rt/0122-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch
similarity index 62%
rename from debian/patches/features/all/rt/panic-disable-random-on-rt.patch
rename to debian/patches/features/all/rt/0122-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch
index 5180da5..8f8a315 100644
--- a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch
+++ b/debian/patches/features/all/rt/0122-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch
@@ -1,16 +1,19 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 122/332] panic: skip get_random_bytes for RT_FULL in
+ init_oops_id
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b3fc2a1e13be3efd24b55298083804a0c674422e
 
 Disable on -RT. If this is invoked from irq-context we will have problems
 to acquire the sleeping lock.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/panic.c |    2 ++
+ kernel/panic.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/kernel/panic.c b/kernel/panic.c
+index dbec387099b1..b67a4803ff2b 100644
 --- a/kernel/panic.c
 +++ b/kernel/panic.c
 @@ -482,9 +482,11 @@ static u64 oops_id;
diff --git a/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch b/debian/patches/features/all/rt/0123-timers-Prepare-for-full-preemption.patch
similarity index 75%
rename from debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch
rename to debian/patches/features/all/rt/0123-timers-Prepare-for-full-preemption.patch
index e8f233a..33da560 100644
--- a/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch
+++ b/debian/patches/features/all/rt/0123-timers-Prepare-for-full-preemption.patch
@@ -1,7 +1,7 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:34 -0500
-Subject: timers: Prepare for full preemption
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 123/332] timers: Prepare for full preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c14b6dc620fcdcb74e051d344a26529757dd3cb0
 
 When softirqs can be preempted we need to make sure that cancelling
 the timer from the active thread can not deadlock vs. a running timer
@@ -9,16 +9,17 @@ callback. Add a waitqueue to resolve that.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/timer.h |    2 +-
- kernel/sched/core.c   |    9 +++++++--
- kernel/time/timer.c   |   44 ++++++++++++++++++++++++++++++++++++++++----
+ include/linux/timer.h |  2 +-
+ kernel/sched/core.c   |  9 +++++++--
+ kernel/time/timer.c   | 44 ++++++++++++++++++++++++++++++++++++++++----
  3 files changed, 48 insertions(+), 7 deletions(-)
 
+diff --git a/include/linux/timer.h b/include/linux/timer.h
+index 51d601f192d4..83cea629efe1 100644
 --- a/include/linux/timer.h
 +++ b/include/linux/timer.h
-@@ -241,7 +241,7 @@ extern void add_timer(struct timer_list
+@@ -241,7 +241,7 @@ extern void add_timer(struct timer_list *timer);
  
  extern int try_to_del_timer_sync(struct timer_list *timer);
  
@@ -27,6 +28,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
    extern int del_timer_sync(struct timer_list *timer);
  #else
  # define del_timer_sync(t)		del_timer(t)
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index bf8f5ad19ac5..0e41f3036a6f 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
 @@ -525,11 +525,14 @@ void resched_cpu(int cpu)
@@ -55,6 +58,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return cpu;
  }
  /*
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index 666465939d59..847804e76487 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
 @@ -195,6 +195,9 @@ EXPORT_SYMBOL(jiffies_64);
@@ -67,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	unsigned long		clk;
  	unsigned long		next_expiry;
  	unsigned int		cpu;
-@@ -1157,6 +1160,33 @@ void add_timer_on(struct timer_list *tim
+@@ -1170,6 +1173,33 @@ void add_timer_on(struct timer_list *timer, int cpu)
  }
  EXPORT_SYMBOL_GPL(add_timer_on);
  
@@ -101,7 +106,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /**
   * del_timer - deactive a timer.
   * @timer: the timer to be deactivated
-@@ -1214,7 +1244,7 @@ int try_to_del_timer_sync(struct timer_l
+@@ -1227,7 +1257,7 @@ int try_to_del_timer_sync(struct timer_list *timer)
  }
  EXPORT_SYMBOL(try_to_del_timer_sync);
  
@@ -110,7 +115,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /**
   * del_timer_sync - deactivate a timer and wait for the handler to finish.
   * @timer: the timer to be deactivated
-@@ -1274,7 +1304,7 @@ int del_timer_sync(struct timer_list *ti
+@@ -1287,7 +1317,7 @@ int del_timer_sync(struct timer_list *timer)
  		int ret = try_to_del_timer_sync(timer);
  		if (ret >= 0)
  			return ret;
@@ -119,7 +124,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  }
  EXPORT_SYMBOL(del_timer_sync);
-@@ -1339,13 +1369,16 @@ static void expire_timers(struct timer_b
+@@ -1352,13 +1382,16 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head)
  		fn = timer->function;
  		data = timer->data;
  
@@ -137,7 +142,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			raw_spin_lock_irq(&base->lock);
  		}
  	}
-@@ -1640,8 +1673,8 @@ static inline void __run_timers(struct t
+@@ -1659,8 +1692,8 @@ static inline void __run_timers(struct timer_base *base)
  		while (levels--)
  			expire_timers(base, heads + levels);
  	}
@@ -147,7 +152,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1863,6 +1896,9 @@ static void __init init_timer_cpu(int cp
+@@ -1895,6 +1928,9 @@ static void __init init_timer_cpu(int cpu)
  		base->cpu = cpu;
  		raw_spin_lock_init(&base->lock);
  		base->clk = jiffies;
diff --git a/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch b/debian/patches/features/all/rt/0124-timer-delay-waking-softirqs-from-the-jiffy-tick.patch
similarity index 87%
rename from debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch
rename to debian/patches/features/all/rt/0124-timer-delay-waking-softirqs-from-the-jiffy-tick.patch
index defe14d..1c7ddd5 100644
--- a/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch
+++ b/debian/patches/features/all/rt/0124-timer-delay-waking-softirqs-from-the-jiffy-tick.patch
@@ -1,7 +1,7 @@
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Fri, 21 Aug 2009 11:56:45 +0200
-Subject: timer: delay waking softirqs from the jiffy tick
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 124/332] timer: delay waking softirqs from the jiffy tick
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=740802913682e4de3f9f5e5f05929ab0c5523414
 
 People were complaining about broken balancing with the recent -rt
 series.
@@ -52,14 +52,15 @@ behaviour.
 
 Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- kernel/time/timer.c |    2 +-
+ kernel/time/timer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index 847804e76487..06ccccfd4130 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
-@@ -1641,13 +1641,13 @@ void update_process_times(int user_tick)
+@@ -1660,13 +1660,13 @@ void update_process_times(int user_tick)
  
  	/* Note: this timer irq context must be accounted for as well. */
  	account_process_tick(p, user_tick);
diff --git a/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch b/debian/patches/features/all/rt/0125-hrtimers-Prepare-full-preemption.patch
similarity index 73%
rename from debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch
rename to debian/patches/features/all/rt/0125-hrtimers-Prepare-full-preemption.patch
index 2b18d82..fd7381b 100644
--- a/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch
+++ b/debian/patches/features/all/rt/0125-hrtimers-Prepare-full-preemption.patch
@@ -1,34 +1,35 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:29:34 -0500
-Subject: hrtimers: Prepare full preemption
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 125/332] hrtimers: Prepare full preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ca8e63e25177fe15106e8104dfb5b5275cab3b1b
 
 Make cancellation of a running callback in softirq context safe
 against preemption.
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/hrtimer.h    |   12 +++++++++++-
- kernel/time/hrtimer.c      |   33 ++++++++++++++++++++++++++++++++-
- kernel/time/itimer.c       |    1 +
- kernel/time/posix-timers.c |   33 +++++++++++++++++++++++++++++++++
+ include/linux/hrtimer.h    | 12 +++++++++++-
+ kernel/time/hrtimer.c      | 33 ++++++++++++++++++++++++++++++++-
+ kernel/time/itimer.c       |  1 +
+ kernel/time/posix-timers.c | 33 +++++++++++++++++++++++++++++++++
  4 files changed, 77 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index 3bddb7c8cc93..b71f4b720a03 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
-@@ -207,6 +207,9 @@ struct hrtimer_cpu_base {
+@@ -206,6 +206,9 @@ struct hrtimer_cpu_base {
+ 	unsigned int			nr_retries;
  	unsigned int			nr_hangs;
  	unsigned int			max_hang_time;
- #endif
++#endif
 +#ifdef CONFIG_PREEMPT_RT_BASE
 +	wait_queue_head_t		wait;
-+#endif
+ #endif
  	struct hrtimer_clock_base	clock_base[HRTIMER_MAX_CLOCK_BASES];
  } ____cacheline_aligned;
- 
-@@ -416,6 +419,13 @@ static inline void hrtimer_restart(struc
+@@ -416,6 +419,13 @@ static inline void hrtimer_restart(struct hrtimer *timer)
  	hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
  }
  
@@ -42,7 +43,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /* Query timers: */
  extern ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust);
  
-@@ -440,7 +450,7 @@ static inline int hrtimer_is_queued(stru
+@@ -440,7 +450,7 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
   * Helper function to check, whether the timer is running the callback
   * function
   */
@@ -51,9 +52,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	return timer->base->cpu_base->running == timer;
  }
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index cdb382ab2b1d..552d23264a3d 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
-@@ -856,6 +856,32 @@ u64 hrtimer_forward(struct hrtimer *time
+@@ -856,6 +856,32 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
  }
  EXPORT_SYMBOL_GPL(hrtimer_forward);
  
@@ -86,7 +89,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * enqueue_hrtimer - internal function to (re)start a timer
   *
-@@ -1073,7 +1099,7 @@ int hrtimer_cancel(struct hrtimer *timer
+@@ -1073,7 +1099,7 @@ int hrtimer_cancel(struct hrtimer *timer)
  
  		if (ret >= 0)
  			return ret;
@@ -104,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1623,6 +1651,9 @@ int hrtimers_prepare_cpu(unsigned int cp
+@@ -1623,6 +1651,9 @@ int hrtimers_prepare_cpu(unsigned int cpu)
  
  	cpu_base->cpu = cpu;
  	hrtimer_init_hres(cpu_base);
@@ -114,9 +117,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return 0;
  }
  
+diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c
+index 1d5c7204ddc9..184de6751180 100644
 --- a/kernel/time/itimer.c
 +++ b/kernel/time/itimer.c
-@@ -213,6 +213,7 @@ int do_setitimer(int which, struct itime
+@@ -213,6 +213,7 @@ int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue)
  		/* We are sharing ->siglock with it_real_fn() */
  		if (hrtimer_try_to_cancel(timer) < 0) {
  			spin_unlock_irq(&tsk->sighand->siglock);
@@ -124,9 +129,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			goto again;
  		}
  		expires = timeval_to_ktime(value->it_value);
+diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
+index 81aec84e65e7..464a98155a0e 100644
 --- a/kernel/time/posix-timers.c
 +++ b/kernel/time/posix-timers.c
-@@ -828,6 +828,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_
+@@ -828,6 +828,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)
  	return overrun;
  }
  
@@ -147,7 +154,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /* Set a POSIX.1b interval timer. */
  /* timr->it_lock is taken. */
  static int
-@@ -905,6 +919,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t,
+@@ -905,6 +919,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
  	if (!timr)
  		return -EINVAL;
  
@@ -155,7 +162,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	kc = clockid_to_kclock(timr->it_clock);
  	if (WARN_ON_ONCE(!kc || !kc->timer_set))
  		error = -EINVAL;
-@@ -913,9 +928,12 @@ SYSCALL_DEFINE4(timer_settime, timer_t,
+@@ -913,9 +928,12 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags,
  
  	unlock_timer(timr, flag);
  	if (error == TIMER_RETRY) {
@@ -168,7 +175,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (old_setting && !error &&
  	    copy_to_user(old_setting, &old_spec, sizeof (old_spec)))
-@@ -953,10 +971,15 @@ SYSCALL_DEFINE1(timer_delete, timer_t, t
+@@ -953,10 +971,15 @@ SYSCALL_DEFINE1(timer_delete, timer_t, timer_id)
  	if (!timer)
  		return -EINVAL;
  
@@ -184,7 +191,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	spin_lock(&current->sighand->siglock);
  	list_del(&timer->list);
-@@ -982,8 +1005,18 @@ static void itimer_delete(struct k_itime
+@@ -982,8 +1005,18 @@ static void itimer_delete(struct k_itimer *timer)
  retry_delete:
  	spin_lock_irqsave(&timer->it_lock, flags);
  
diff --git a/debian/patches/features/all/rt/hrtimer-enfore-64byte-alignment.patch b/debian/patches/features/all/rt/0126-hrtimer-enfore-64byte-alignment.patch
similarity index 69%
rename from debian/patches/features/all/rt/hrtimer-enfore-64byte-alignment.patch
rename to debian/patches/features/all/rt/0126-hrtimer-enfore-64byte-alignment.patch
index a3c9d7c..c589b65 100644
--- a/debian/patches/features/all/rt/hrtimer-enfore-64byte-alignment.patch
+++ b/debian/patches/features/all/rt/0126-hrtimer-enfore-64byte-alignment.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 23 Dec 2015 20:57:41 +0100
-Subject: hrtimer: enfore 64byte alignment
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 126/332] hrtimer: enfore 64byte alignment
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=aec02cb2b0ba787aa88c07afa4b8546409548467
 
 The patch "hrtimer: Fixup hrtimer callback changes for preempt-rt" adds
 a list_head expired to struct hrtimer_clock_base and with it we run into
@@ -9,9 +9,11 @@ BUILD_BUG_ON(sizeof(struct hrtimer_clock_base) > HRTIMER_CLOCK_BASE_ALIGN);
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/hrtimer.h |    4 ----
+ include/linux/hrtimer.h | 4 ----
  1 file changed, 4 deletions(-)
 
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index b71f4b720a03..b7c2d54af68e 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
 @@ -127,11 +127,7 @@ struct hrtimer_sleeper {
diff --git a/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch b/debian/patches/features/all/rt/0127-hrtimer-Fixup-hrtimer-callback-changes-for-preempt-r.patch
similarity index 82%
rename from debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch
rename to debian/patches/features/all/rt/0127-hrtimer-Fixup-hrtimer-callback-changes-for-preempt-r.patch
index 31ffc0e..b122887 100644
--- a/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch
+++ b/debian/patches/features/all/rt/0127-hrtimer-Fixup-hrtimer-callback-changes-for-preempt-r.patch
@@ -1,7 +1,8 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 3 Jul 2009 08:44:31 -0500
-Subject: hrtimer: Fixup hrtimer callback changes for preempt-rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 127/332] hrtimer: Fixup hrtimer callback changes for
+ preempt-rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9f70110ada2a5e576c528db75702c888b9a3edf2
 
 In preempt-rt we can not call the callbacks which take sleeping locks
 from the timer interrupt context.
@@ -11,16 +12,17 @@ delivery problem for real.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
-
 ---
- include/linux/hrtimer.h  |    7 ++
- kernel/sched/core.c      |    1 
- kernel/sched/rt.c        |    1 
- kernel/time/hrtimer.c    |  144 ++++++++++++++++++++++++++++++++++++++++++++---
- kernel/time/tick-sched.c |    1 
- kernel/watchdog.c        |    1 
+ include/linux/hrtimer.h  |   7 +++
+ kernel/sched/core.c      |   1 +
+ kernel/sched/rt.c        |   1 +
+ kernel/time/hrtimer.c    | 144 ++++++++++++++++++++++++++++++++++++++++++++---
+ kernel/time/tick-sched.c |   1 +
+ kernel/watchdog.c        |   1 +
  6 files changed, 146 insertions(+), 9 deletions(-)
 
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index b7c2d54af68e..65d0671f20b4 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
 @@ -87,6 +87,8 @@ enum hrtimer_restart {
@@ -65,9 +67,11 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	unsigned int			cpu;
  	unsigned int			active_bases;
  	unsigned int			clock_was_set_seq;
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 0e41f3036a6f..3107020a20d2 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -345,6 +345,7 @@ static void init_rq_hrtick(struct rq *rq
+@@ -345,6 +345,7 @@ static void init_rq_hrtick(struct rq *rq)
  
  	hrtimer_init(&rq->hrtick_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
  	rq->hrtick_timer.function = hrtick;
@@ -75,9 +79,11 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  }
  #else	/* CONFIG_SCHED_HRTICK */
  static inline void hrtick_clear(struct rq *rq)
+diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
+index f139f22ce30d..f5a1132f9014 100644
 --- a/kernel/sched/rt.c
 +++ b/kernel/sched/rt.c
-@@ -47,6 +47,7 @@ void init_rt_bandwidth(struct rt_bandwid
+@@ -47,6 +47,7 @@ void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime)
  
  	hrtimer_init(&rt_b->rt_period_timer,
  			CLOCK_MONOTONIC, HRTIMER_MODE_REL);
@@ -85,9 +91,11 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	rt_b->rt_period_timer.function = sched_rt_period_timer;
  }
  
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index 552d23264a3d..3d3c7c7f93a6 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
-@@ -720,11 +720,8 @@ static inline int hrtimer_is_hres_enable
+@@ -720,11 +720,8 @@ static inline int hrtimer_is_hres_enabled(void) { return 0; }
  static inline void hrtimer_switch_to_hres(void) { }
  static inline void
  hrtimer_force_reprogram(struct hrtimer_cpu_base *base, int skip_equal) { }
@@ -101,7 +109,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) { }
  static inline void retrigger_next_event(void *arg) { }
  
-@@ -873,7 +870,7 @@ void hrtimer_wait_for_timer(const struct
+@@ -873,7 +870,7 @@ void hrtimer_wait_for_timer(const struct hrtimer *timer)
  {
  	struct hrtimer_clock_base *base = timer->base;
  
@@ -110,7 +118,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  		wait_event(base->cpu_base->wait,
  				!(hrtimer_callback_running(timer)));
  }
-@@ -923,6 +920,11 @@ static void __remove_hrtimer(struct hrti
+@@ -923,6 +920,11 @@ static void __remove_hrtimer(struct hrtimer *timer,
  	if (!(state & HRTIMER_STATE_ENQUEUED))
  		return;
  
@@ -122,7 +130,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	if (!timerqueue_del(&base->active, &timer->node))
  		cpu_base->active_bases &= ~(1 << base->index);
  
-@@ -1163,6 +1165,7 @@ static void __hrtimer_init(struct hrtime
+@@ -1163,6 +1165,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
  
  	base = hrtimer_clockid_to_base(clock_id);
  	timer->base = &cpu_base->clock_base[base];
@@ -130,7 +138,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	timerqueue_init(&timer->node);
  
  #ifdef CONFIG_TIMER_STATS
-@@ -1203,6 +1206,7 @@ bool hrtimer_active(const struct hrtimer
+@@ -1203,6 +1206,7 @@ bool hrtimer_active(const struct hrtimer *timer)
  		seq = raw_read_seqcount_begin(&cpu_base->seq);
  
  		if (timer->state != HRTIMER_STATE_INACTIVE ||
@@ -138,7 +146,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  		    cpu_base->running == timer)
  			return true;
  
-@@ -1301,12 +1305,112 @@ static void __run_hrtimer(struct hrtimer
+@@ -1301,12 +1305,112 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
  	cpu_base->running = NULL;
  }
  
@@ -251,7 +259,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  
  	for (; active; base++, active >>= 1) {
  		struct timerqueue_node *node;
-@@ -1346,9 +1450,14 @@ static void __hrtimer_run_queues(struct
+@@ -1346,9 +1450,14 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
  			if (basenow.tv64 < hrtimer_get_softexpires_tv64(timer))
  				break;
  
@@ -276,7 +284,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  }
  
  /*
-@@ -1513,6 +1620,7 @@ static enum hrtimer_restart hrtimer_wake
+@@ -1513,6 +1620,7 @@ static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer)
  void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task)
  {
  	sl->timer.function = hrtimer_wakeup;
@@ -284,7 +292,7 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	sl->task = task;
  }
  EXPORT_SYMBOL_GPL(hrtimer_init_sleeper);
-@@ -1647,6 +1755,7 @@ int hrtimers_prepare_cpu(unsigned int cp
+@@ -1647,6 +1755,7 @@ int hrtimers_prepare_cpu(unsigned int cpu)
  	for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) {
  		cpu_base->clock_base[i].cpu_base = cpu_base;
  		timerqueue_init_head(&cpu_base->clock_base[i].active);
@@ -319,6 +327,8 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  }
  
  /**
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 10cb224cb9d4..14eaf34cbbc9 100644
 --- a/kernel/time/tick-sched.c
 +++ b/kernel/time/tick-sched.c
 @@ -1198,6 +1198,7 @@ void tick_setup_sched_timer(void)
@@ -329,9 +339,11 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
  	ts->sched_timer.function = tick_sched_timer;
  
  	/* Get the next period (per-CPU) */
+diff --git a/kernel/watchdog.c b/kernel/watchdog.c
+index 63177be0159e..59fe007ad496 100644
 --- a/kernel/watchdog.c
 +++ b/kernel/watchdog.c
-@@ -522,6 +522,7 @@ static void watchdog_enable(unsigned int
+@@ -381,6 +381,7 @@ static void watchdog_enable(unsigned int cpu)
  	/* kick off the timer for the hardlockup detector */
  	hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
  	hrtimer->function = watchdog_timer_fn;
diff --git a/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch b/debian/patches/features/all/rt/0128-sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
similarity index 53%
rename from debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
rename to debian/patches/features/all/rt/0128-sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
index 021bd5a..d2919cc 100644
--- a/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
+++ b/debian/patches/features/all/rt/0128-sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
@@ -1,19 +1,21 @@
 From: Juri Lelli <juri.lelli at gmail.com>
 Date: Tue, 13 May 2014 15:30:20 +0200
-Subject: sched/deadline: dl_task_timer has to be irqsafe
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 128/332] sched/deadline: dl_task_timer has to be irqsafe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1ac5803e529156b55fa7d0113961fb029c308831
 
 As for rt_period_timer, dl_task_timer has to be irqsafe.
 
 Signed-off-by: Juri Lelli <juri.lelli at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/sched/deadline.c |    1 +
+ kernel/sched/deadline.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
+index c95c5122b105..e00accf92a4b 100644
 --- a/kernel/sched/deadline.c
 +++ b/kernel/sched/deadline.c
-@@ -687,6 +687,7 @@ void init_dl_task_timer(struct sched_dl_
+@@ -687,6 +687,7 @@ void init_dl_task_timer(struct sched_dl_entity *dl_se)
  
  	hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
  	timer->function = dl_task_timer;
diff --git a/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch b/debian/patches/features/all/rt/0129-timer-fd-Prevent-live-lock.patch
similarity index 66%
rename from debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch
rename to debian/patches/features/all/rt/0129-timer-fd-Prevent-live-lock.patch
index 5ae2694..195bbee 100644
--- a/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch
+++ b/debian/patches/features/all/rt/0129-timer-fd-Prevent-live-lock.patch
@@ -1,7 +1,7 @@
-Subject: timer-fd: Prevent live lock
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 25 Jan 2012 11:08:40 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 129/332] timer-fd: Prevent live lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c7ce270558ebb3fc501dc0737b0dccbf7300f6d5
 
 If hrtimer_try_to_cancel() requires a retry, then depending on the
 priority setting te retry loop might prevent timer callback completion
@@ -10,14 +10,15 @@ non RT kernel.
 
 Reported-by: Sankara Muthukrishnan <sankara.m at gmail.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- fs/timerfd.c |    5 ++++-
+ fs/timerfd.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
+diff --git a/fs/timerfd.c b/fs/timerfd.c
+index ab8dd1538381..5580853f57dd 100644
 --- a/fs/timerfd.c
 +++ b/fs/timerfd.c
-@@ -471,7 +471,10 @@ static int do_timerfd_settime(int ufd, i
+@@ -471,7 +471,10 @@ static int do_timerfd_settime(int ufd, int flags,
  				break;
  		}
  		spin_unlock_irq(&ctx->wqh.lock);
diff --git a/debian/patches/features/all/rt/tick-broadcast--Make-hrtimer-irqsafe.patch b/debian/patches/features/all/rt/0130-tick-broadcast-Make-broadcast-hrtimer-irqsafe.patch
similarity index 86%
rename from debian/patches/features/all/rt/tick-broadcast--Make-hrtimer-irqsafe.patch
rename to debian/patches/features/all/rt/0130-tick-broadcast-Make-broadcast-hrtimer-irqsafe.patch
index ffc1f71..03e657f 100644
--- a/debian/patches/features/all/rt/tick-broadcast--Make-hrtimer-irqsafe.patch
+++ b/debian/patches/features/all/rt/0130-tick-broadcast-Make-broadcast-hrtimer-irqsafe.patch
@@ -1,7 +1,7 @@
-Subject: tick/broadcast: Make broadcast hrtimer irqsafe
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 27 Feb 2016 10:47:10 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 130/332] tick/broadcast: Make broadcast hrtimer irqsafe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cd1f90d78b8bafe8e2b1992cd34c69c50bf2b2e1
 
 Otherwise we end up with the following:
 
@@ -44,9 +44,11 @@ Otherwise we end up with the following:
 Reported-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/time/tick-broadcast-hrtimer.c |    1 +
+ kernel/time/tick-broadcast-hrtimer.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/kernel/time/tick-broadcast-hrtimer.c b/kernel/time/tick-broadcast-hrtimer.c
+index 690b797f522e..fe8ba1619879 100644
 --- a/kernel/time/tick-broadcast-hrtimer.c
 +++ b/kernel/time/tick-broadcast-hrtimer.c
 @@ -107,5 +107,6 @@ void tick_setup_hrtimer_broadcast(void)
diff --git a/debian/patches/features/all/rt/timer-hrtimer-check-properly-for-a-running-timer.patch b/debian/patches/features/all/rt/0131-timer-hrtimer-check-properly-for-a-running-timer.patch
similarity index 69%
rename from debian/patches/features/all/rt/timer-hrtimer-check-properly-for-a-running-timer.patch
rename to debian/patches/features/all/rt/0131-timer-hrtimer-check-properly-for-a-running-timer.patch
index e295d6b..65566a8 100644
--- a/debian/patches/features/all/rt/timer-hrtimer-check-properly-for-a-running-timer.patch
+++ b/debian/patches/features/all/rt/0131-timer-hrtimer-check-properly-for-a-running-timer.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 1 Mar 2017 16:30:49 +0100
-Subject: [PATCH] timer/hrtimer: check properly for a running timer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 131/332] timer/hrtimer: check properly for a running timer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=aabdf793ba2df54423fbbdb7ab24169f97c3bb81
 
 hrtimer_callback_running() checks only whether a timmer is running on a
 CPU in hardirq-context. This is okay for !RT. For RT environment we move
@@ -12,12 +12,14 @@ Cc: stable-rt at vger.kernel.org
 Reported-by: Alexander Gerasiov <gq at cs.msu.su>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/hrtimer.h |    8 +++++++-
+ include/linux/hrtimer.h | 8 +++++++-
  1 file changed, 7 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index 65d0671f20b4..a34e10b55cde 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
-@@ -455,7 +455,13 @@ static inline int hrtimer_is_queued(stru
+@@ -455,7 +455,13 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
   */
  static inline int hrtimer_callback_running(const struct hrtimer *timer)
  {
diff --git a/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch b/debian/patches/features/all/rt/0132-posix-timers-Thread-posix-cpu-timers-on-rt.patch
similarity index 86%
rename from debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch
rename to debian/patches/features/all/rt/0132-posix-timers-Thread-posix-cpu-timers-on-rt.patch
index 91a0f27..09d36f8 100644
--- a/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch
+++ b/debian/patches/features/all/rt/0132-posix-timers-Thread-posix-cpu-timers-on-rt.patch
@@ -1,7 +1,7 @@
 From: John Stultz <johnstul at us.ibm.com>
 Date: Fri, 3 Jul 2009 08:29:58 -0500
-Subject: posix-timers: Thread posix-cpu-timers on -rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 132/332] posix-timers: Thread posix-cpu-timers on -rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3bd3a25de66e201b30d5e72dff53529c31418d7d
 
 posix-cpu-timer code takes non -rt safe locks in hard irq
 context. Move it to a thread.
@@ -10,17 +10,18 @@ context. Move it to a thread.
 
 Signed-off-by: John Stultz <johnstul at us.ibm.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/init_task.h      |    7 +
- include/linux/sched.h          |    3 
- kernel/fork.c                  |    3 
- kernel/time/posix-cpu-timers.c |  193 ++++++++++++++++++++++++++++++++++++++++-
+ include/linux/init_task.h      |   7 ++
+ include/linux/sched.h          |   3 +
+ kernel/fork.c                  |   3 +
+ kernel/time/posix-cpu-timers.c | 193 ++++++++++++++++++++++++++++++++++++++++-
  4 files changed, 202 insertions(+), 4 deletions(-)
 
+diff --git a/include/linux/init_task.h b/include/linux/init_task.h
+index d359b1a71610..a56e263f5005 100644
 --- a/include/linux/init_task.h
 +++ b/include/linux/init_task.h
-@@ -150,6 +150,12 @@ extern struct task_group root_task_group
+@@ -150,6 +150,12 @@ extern struct task_group root_task_group;
  # define INIT_PERF_EVENTS(tsk)
  #endif
  
@@ -33,7 +34,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
  # define INIT_VTIME(tsk)						\
  	.vtime_seqcount = SEQCNT_ZERO(tsk.vtime_seqcount),	\
-@@ -251,6 +257,7 @@ extern struct task_group root_task_group
+@@ -251,6 +257,7 @@ extern struct task_group root_task_group;
  	.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 */		\
@@ -41,9 +42,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	.pids = {							\
  		[PIDTYPE_PID]  = INIT_PID_LINK(PIDTYPE_PID),		\
  		[PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID),		\
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 040ae135ecb0..b6be669490e4 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1664,6 +1664,9 @@ struct task_struct {
+@@ -1674,6 +1674,9 @@ struct task_struct {
  
  	struct task_cputime cputime_expires;
  	struct list_head cpu_timers[3];
@@ -53,9 +56,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /* process credentials */
  	const struct cred __rcu *ptracer_cred; /* Tracer's credentials at attach */
+diff --git a/kernel/fork.c b/kernel/fork.c
+index eb3d7d75576d..bc1d86d61a81 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -1427,6 +1427,9 @@ static void rt_mutex_init_task(struct ta
+@@ -1428,6 +1428,9 @@ static void rt_mutex_init_task(struct task_struct *p)
   */
  static void posix_cpu_timers_init(struct task_struct *tsk)
  {
@@ -65,6 +70,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	tsk->cputime_expires.prof_exp = 0;
  	tsk->cputime_expires.virt_exp = 0;
  	tsk->cputime_expires.sched_exp = 0;
+diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
+index 39008d78927a..633f4eaca9e7 100644
 --- a/kernel/time/posix-cpu-timers.c
 +++ b/kernel/time/posix-cpu-timers.c
 @@ -3,6 +3,7 @@
@@ -75,7 +82,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/posix-timers.h>
  #include <linux/errno.h>
  #include <linux/math64.h>
-@@ -620,7 +621,7 @@ static int posix_cpu_timer_set(struct k_
+@@ -620,7 +621,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
  	/*
  	 * Disarm any old timer after extracting its expiry time.
  	 */
@@ -84,7 +91,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	ret = 0;
  	old_incr = timer->it.cpu.incr;
-@@ -1064,7 +1065,7 @@ void posix_cpu_timer_schedule(struct k_i
+@@ -1064,7 +1065,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer)
  	/*
  	 * Now re-arm for the new expiry time.
  	 */
@@ -93,7 +100,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	arm_timer(timer);
  	unlock_task_sighand(p, &flags);
  
-@@ -1153,13 +1154,13 @@ static inline int fastpath_timer_check(s
+@@ -1153,13 +1154,13 @@ static inline int fastpath_timer_check(struct task_struct *tsk)
   * already updated our counts.  We need to check if any timers fire now.
   * Interrupts are disabled.
   */
@@ -109,7 +116,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * The fast path checks that there are no expired thread or thread
-@@ -1213,6 +1214,190 @@ void run_posix_cpu_timers(struct task_st
+@@ -1213,6 +1214,190 @@ void run_posix_cpu_timers(struct task_struct *tsk)
  	}
  }
  
diff --git a/debian/patches/features/all/rt/sched-delay-put-task.patch b/debian/patches/features/all/rt/0133-sched-Move-task_struct-cleanup-to-RCU.patch
similarity index 70%
rename from debian/patches/features/all/rt/sched-delay-put-task.patch
rename to debian/patches/features/all/rt/0133-sched-Move-task_struct-cleanup-to-RCU.patch
index 36a33b7..1f81a33 100644
--- a/debian/patches/features/all/rt/sched-delay-put-task.patch
+++ b/debian/patches/features/all/rt/0133-sched-Move-task_struct-cleanup-to-RCU.patch
@@ -1,20 +1,22 @@
-Subject: sched: Move task_struct cleanup to RCU
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 31 May 2011 16:59:16 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 133/332] sched: Move task_struct cleanup to RCU
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8f842926292d854f233cf5215b4473e6825bfacd
 
 __put_task_struct() does quite some expensive work. We don't want to
 burden random tasks with that.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/sched.h |   13 +++++++++++++
- kernel/fork.c         |   15 ++++++++++++++-
+ include/linux/sched.h | 13 +++++++++++++
+ kernel/fork.c         | 15 ++++++++++++++-
  2 files changed, 27 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index b6be669490e4..a1363ac435ce 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1968,6 +1968,9 @@ struct task_struct {
+@@ -1978,6 +1978,9 @@ struct task_struct {
  	unsigned int	sequential_io;
  	unsigned int	sequential_io_avg;
  #endif
@@ -24,7 +26,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  	unsigned long	task_state_change;
  #endif
-@@ -2225,6 +2228,15 @@ extern struct pid *cad_pid;
+@@ -2239,6 +2242,15 @@ extern struct pid *cad_pid;
  extern void free_task(struct task_struct *tsk);
  #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
  
@@ -40,7 +42,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern void __put_task_struct(struct task_struct *t);
  
  static inline void put_task_struct(struct task_struct *t)
-@@ -2232,6 +2244,7 @@ static inline void put_task_struct(struc
+@@ -2246,6 +2258,7 @@ static inline void put_task_struct(struct task_struct *t)
  	if (atomic_dec_and_test(&t->usage))
  		__put_task_struct(t);
  }
@@ -48,9 +50,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  struct task_struct *task_rcu_dereference(struct task_struct **ptask);
  struct task_struct *try_get_task_struct(struct task_struct **ptask);
+diff --git a/kernel/fork.c b/kernel/fork.c
+index bc1d86d61a81..49141d789d94 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -376,7 +376,9 @@ static inline void put_signal_struct(str
+@@ -376,7 +376,9 @@ static inline void put_signal_struct(struct signal_struct *sig)
  	if (atomic_dec_and_test(&sig->sigcnt))
  		free_signal_struct(sig);
  }
@@ -61,7 +65,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void __put_task_struct(struct task_struct *tsk)
  {
  	WARN_ON(!tsk->exit_state);
-@@ -393,7 +395,18 @@ void __put_task_struct(struct task_struc
+@@ -393,7 +395,18 @@ void __put_task_struct(struct task_struct *tsk)
  	if (!profile_handoff_task(tsk))
  		free_task(tsk);
  }
diff --git a/debian/patches/features/all/rt/sched-limit-nr-migrate.patch b/debian/patches/features/all/rt/0134-sched-Limit-the-number-of-task-migrations-per-batch.patch
similarity index 59%
rename from debian/patches/features/all/rt/sched-limit-nr-migrate.patch
rename to debian/patches/features/all/rt/0134-sched-Limit-the-number-of-task-migrations-per-batch.patch
index 09a4732..48ea5d5 100644
--- a/debian/patches/features/all/rt/sched-limit-nr-migrate.patch
+++ b/debian/patches/features/all/rt/0134-sched-Limit-the-number-of-task-migrations-per-batch.patch
@@ -1,19 +1,21 @@
-Subject: sched: Limit the number of task migrations per batch
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Mon, 06 Jun 2011 12:12:51 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Mon, 6 Jun 2011 12:12:51 +0200
+Subject: [PATCH 134/332] sched: Limit the number of task migrations per batch
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=14c97806ad504e31b8740e8e4c844654060739e9
 
 Put an upper limit on the number of tasks which are migrated per batch
 to avoid large latencies.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/sched/core.c |    4 ++++
+ kernel/sched/core.c | 4 ++++
  1 file changed, 4 insertions(+)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 3107020a20d2..468d5dda2397 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -129,7 +129,11 @@ const_debug unsigned int sysctl_sched_fe
+@@ -129,7 +129,11 @@ const_debug unsigned int sysctl_sched_features =
   * Number of tasks to iterate in a single balance run.
   * Limited because this is done with IRQs disabled.
   */
diff --git a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch b/debian/patches/features/all/rt/0135-sched-Move-mmdrop-to-RCU-on-RT.patch
similarity index 70%
rename from debian/patches/features/all/rt/sched-mmdrop-delayed.patch
rename to debian/patches/features/all/rt/0135-sched-Move-mmdrop-to-RCU-on-RT.patch
index a13e2ae..0618eaa 100644
--- a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch
+++ b/debian/patches/features/all/rt/0135-sched-Move-mmdrop-to-RCU-on-RT.patch
@@ -1,19 +1,21 @@
-Subject: sched: Move mmdrop to RCU on RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Mon, 06 Jun 2011 12:20:33 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Mon, 6 Jun 2011 12:20:33 +0200
+Subject: [PATCH 135/332] sched: Move mmdrop to RCU on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=476debcd5712ffb13b5f7034bc22bba60c9cf312
 
 Takes sleeping locks and calls into the memory allocator, so nothing
 we want to do in task switch and oder atomic contexts.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/mm_types.h |    4 ++++
- include/linux/sched.h    |   11 +++++++++++
- kernel/fork.c            |   13 +++++++++++++
- kernel/sched/core.c      |   19 +++++++++++++++++--
+ include/linux/mm_types.h |  4 ++++
+ include/linux/sched.h    | 11 +++++++++++
+ kernel/fork.c            | 13 +++++++++++++
+ kernel/sched/core.c      | 19 +++++++++++++++++--
  4 files changed, 45 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
+index e8471c2ca83a..08bde1a7a987 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
 @@ -11,6 +11,7 @@
@@ -24,8 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/page-flags-layout.h>
  #include <linux/workqueue.h>
  #include <asm/page.h>
-@@ -509,6 +510,9 @@ struct mm_struct {
- 	bool tlb_flush_pending;
+@@ -513,6 +514,9 @@ struct mm_struct {
+ 	bool tlb_flush_batched;
  #endif
  	struct uprobes_state uprobes_state;
 +#ifdef CONFIG_PREEMPT_RT_BASE
@@ -34,9 +36,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_X86_INTEL_MPX
  	/* address of the bounds directory */
  	void __user *bd_addr;
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index a1363ac435ce..34c29a31f94b 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -2912,6 +2912,17 @@ static inline void mmdrop(struct mm_stru
+@@ -2926,6 +2926,17 @@ static inline void mmdrop(struct mm_struct *mm)
  		__mmdrop(mm);
  }
  
@@ -54,9 +58,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline void mmdrop_async_fn(struct work_struct *work)
  {
  	struct mm_struct *mm = container_of(work, struct mm_struct, async_put_work);
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 49141d789d94..94e267da449e 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -865,6 +865,19 @@ void __mmdrop(struct mm_struct *mm)
+@@ -866,6 +866,19 @@ void __mmdrop(struct mm_struct *mm)
  }
  EXPORT_SYMBOL_GPL(__mmdrop);
  
@@ -76,9 +82,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline void __mmput(struct mm_struct *mm)
  {
  	VM_BUG_ON(atomic_read(&mm->mm_users));
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 468d5dda2397..ae1ce4eee339 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2785,8 +2785,12 @@ static struct rq *finish_task_switch(str
+@@ -2785,8 +2785,12 @@ static struct rq *finish_task_switch(struct task_struct *prev)
  	finish_arch_post_lock_switch();
  
  	fire_sched_in_preempt_notifiers(current);
@@ -92,7 +100,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (unlikely(prev_state == TASK_DEAD)) {
  		if (prev->sched_class->task_dead)
  			prev->sched_class->task_dead(prev);
-@@ -5587,6 +5591,8 @@ void sched_setnuma(struct task_struct *p
+@@ -5587,6 +5591,8 @@ void sched_setnuma(struct task_struct *p, int nid)
  #endif /* CONFIG_NUMA_BALANCING */
  
  #ifdef CONFIG_HOTPLUG_CPU
@@ -102,7 +110,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * Ensures that the idle task is using init_mm right before its cpu goes
   * offline.
 @@ -5601,7 +5607,12 @@ void idle_task_exit(void)
- 		switch_mm_irqs_off(mm, &init_mm, current);
+ 		switch_mm(mm, &init_mm, current);
  		finish_arch_post_lock_switch();
  	}
 -	mmdrop(mm);
@@ -115,7 +123,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -7547,6 +7558,10 @@ int sched_cpu_dying(unsigned int cpu)
+@@ -7563,6 +7574,10 @@ int sched_cpu_dying(unsigned int cpu)
  	update_max_interval();
  	nohz_balance_exit_idle(cpu);
  	hrtick_clear(rq);
diff --git a/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/debian/patches/features/all/rt/0136-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
similarity index 69%
rename from debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
rename to debian/patches/features/all/rt/0136-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
index ee81c86..acac7c9 100644
--- a/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
+++ b/debian/patches/features/all/rt/0136-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
@@ -1,8 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 21 Nov 2016 19:31:08 +0100
-Subject: [PATCH] kernel/sched: move stack + kprobe clean up to
+Subject: [PATCH 136/332] kernel/sched: move stack + kprobe clean up to
  __put_task_struct()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a1a7adfd170042924c12ac3e82045d060333d56f
 
 There is no need to free the stack before the task struct. This also
 comes handy on -RT because we can't free memory in preempt disabled
@@ -11,10 +11,12 @@ region.
 Cc: stable-rt at vger.kernel.org #for kprobe_flush_task()
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/fork.c       |   10 ++++++++++
- kernel/sched/core.c |    9 ---------
+ kernel/fork.c       | 10 ++++++++++
+ kernel/sched/core.c |  9 ---------
  2 files changed, 10 insertions(+), 9 deletions(-)
 
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 94e267da449e..6bd05d522c04 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
 @@ -76,6 +76,7 @@
@@ -25,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include <asm/pgtable.h>
  #include <asm/pgalloc.h>
-@@ -385,6 +386,15 @@ void __put_task_struct(struct task_struc
+@@ -385,6 +386,15 @@ void __put_task_struct(struct task_struct *tsk)
  	WARN_ON(atomic_read(&tsk->usage));
  	WARN_ON(tsk == current);
  
@@ -41,9 +43,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	cgroup_free(tsk);
  	task_numa_free(tsk);
  	security_task_free(tsk);
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index ae1ce4eee339..1bb37ac31451 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2795,15 +2795,6 @@ static struct rq *finish_task_switch(str
+@@ -2795,15 +2795,6 @@ static struct rq *finish_task_switch(struct task_struct *prev)
  		if (prev->sched_class->task_dead)
  			prev->sched_class->task_dead(prev);
  
diff --git a/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch b/debian/patches/features/all/rt/0137-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch
similarity index 73%
rename from debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch
rename to debian/patches/features/all/rt/0137-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch
index 95ae8e3..7324267 100644
--- a/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch
+++ b/debian/patches/features/all/rt/0137-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch
@@ -1,7 +1,8 @@
-Subject: sched: Add saved_state for tasks blocked on sleeping locks
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 25 Jun 2011 09:21:04 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 137/332] sched: Add saved_state for tasks blocked on sleeping
+ locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cd10b53d54d9f29a810560df3e4511c995ffff34
 
 Spinlocks are state preserving in !RT. RT changes the state when a
 task gets blocked on a lock. So we need to remember the state before
@@ -11,14 +12,16 @@ sleep is done, the saved state is restored.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/sched.h |    2 ++
- kernel/sched/core.c   |   31 ++++++++++++++++++++++++++++++-
- kernel/sched/sched.h  |    1 +
+ include/linux/sched.h |  2 ++
+ kernel/sched/core.c   | 31 ++++++++++++++++++++++++++++++-
+ kernel/sched/sched.h  |  1 +
  3 files changed, 33 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 34c29a31f94b..aa26cea7618f 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1481,6 +1481,7 @@ struct task_struct {
+@@ -1491,6 +1491,7 @@ struct task_struct {
  	struct thread_info thread_info;
  #endif
  	volatile long state;	/* -1 unrunnable, 0 runnable, >0 stopped */
@@ -26,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	void *stack;
  	atomic_t usage;
  	unsigned int flags;	/* per process flags, defined below */
-@@ -2704,6 +2705,7 @@ extern void xtime_update(unsigned long t
+@@ -2718,6 +2719,7 @@ extern void xtime_update(unsigned long ticks);
  
  extern int wake_up_state(struct task_struct *tsk, unsigned int state);
  extern int wake_up_process(struct task_struct *tsk);
@@ -34,9 +37,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern void wake_up_new_task(struct task_struct *tsk);
  #ifdef CONFIG_SMP
   extern void kick_process(struct task_struct *tsk);
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 1bb37ac31451..e86a4540a76b 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2033,8 +2033,25 @@ try_to_wake_up(struct task_struct *p, un
+@@ -2033,8 +2033,25 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
  	 */
  	smp_mb__before_spinlock();
  	raw_spin_lock_irqsave(&p->pi_lock, flags);
@@ -63,7 +68,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	trace_sched_waking(p);
  
-@@ -2181,6 +2198,18 @@ int wake_up_process(struct task_struct *
+@@ -2181,6 +2198,18 @@ int wake_up_process(struct task_struct *p)
  }
  EXPORT_SYMBOL(wake_up_process);
  
@@ -82,9 +87,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  int wake_up_state(struct task_struct *p, unsigned int state)
  {
  	return try_to_wake_up(p, state, 0);
+diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
+index ad77d666583c..662a9e43031c 100644
 --- a/kernel/sched/sched.h
 +++ b/kernel/sched/sched.h
-@@ -1163,6 +1163,7 @@ static inline void finish_lock_switch(st
+@@ -1152,6 +1152,7 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev)
  #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 */
diff --git a/debian/patches/features/all/rt/0138-sched-Prevent-task-state-corruption-by-spurious-lock.patch b/debian/patches/features/all/rt/0138-sched-Prevent-task-state-corruption-by-spurious-lock.patch
new file mode 100644
index 0000000..0b6b3d9
--- /dev/null
+++ b/debian/patches/features/all/rt/0138-sched-Prevent-task-state-corruption-by-spurious-lock.patch
@@ -0,0 +1,81 @@
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Tue, 6 Jun 2017 14:20:37 +0200
+Subject: [PATCH 138/332] sched: Prevent task state corruption by spurious lock
+ wakeup
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4abce8096d5a7cd0d181681eeaed026123d9fde5
+
+Mathias and others reported GDB failures on RT.
+
+The following scenario leads to task state corruption:
+
+CPU0						CPU1
+
+T1->state = TASK_XXX;
+spin_lock(&lock)
+  rt_spin_lock_slowlock(&lock->rtmutex)
+    raw_spin_lock(&rtm->wait_lock);
+    T1->saved_state = current->state;
+    T1->state = TASK_UNINTERRUPTIBLE;
+						spin_unlock(&lock)
+    task_blocks_on_rt_mutex(rtm)  		  rt_spin_lock_slowunlock(&lock->rtmutex)
+      queue_waiter(rtm)				    raw_spin_lock(&rtm->wait_lock);
+      pi_chain_walk(rtm)
+        raw_spin_unlock(&rtm->wait_lock);
+						    wake_top_waiter(T1)
+
+      raw_spin_lock(&rtm->wait_lock);
+
+    for (;;) {
+      if (__try_to_take_rt_mutex())  <- Succeeds
+        break;
+      ...
+    }
+
+    T1->state = T1->saved_state;
+						     try_to_wake_up(T1)
+						       ttwu_do_wakeup(T1)
+						         T1->state = TASK_RUNNING;
+
+In most cases this is harmless because waiting for some event, which is the
+usual reason for TASK_[UN]INTERRUPTIBLE has to be safe against other forms
+of spurious wakeups anyway.
+
+But in case of TASK_TRACED this is actually fatal, because the task loses
+the TASK_TRACED state. In consequence it fails to consume SIGSTOP which was
+sent from the debugger and actually delivers SIGSTOP to the task which
+breaks the ptrace mechanics and brings the debugger into an unexpected
+state.
+
+The TASK_TRACED state should prevent getting there due to the state
+matching logic in try_to_wake_up(). But that's not true because
+wake_up_lock_sleeper() uses TASK_ALL as state mask. That's bogus because
+lock sleepers always use TASK_UNINTERRUPTIBLE, so the wakeup should use
+that as well.
+
+The cure is way simpler as figuring it out:
+
+Change the mask used in wake_up_lock_sleeper() from TASK_ALL to
+TASK_UNINTERRUPTIBLE.
+
+Cc: stable-rt at vger.kernel.org
+Reported-by: Mathias Koehrer <mathias.koehrer at etas.com>
+Reported-by: David Hauck <davidh at netacquire.com>
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+---
+ kernel/sched/core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index e86a4540a76b..ed5e5ae03fdb 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -2207,7 +2207,7 @@ EXPORT_SYMBOL(wake_up_process);
+  */
+ int wake_up_lock_sleeper(struct task_struct *p)
+ {
+-	return try_to_wake_up(p, TASK_ALL, WF_LOCK_SLEEPER);
++	return try_to_wake_up(p, TASK_UNINTERRUPTIBLE, WF_LOCK_SLEEPER);
+ }
+ 
+ int wake_up_state(struct task_struct *p, unsigned int state)
diff --git a/debian/patches/features/all/rt/0139-sched-Remove-TASK_ALL.patch b/debian/patches/features/all/rt/0139-sched-Remove-TASK_ALL.patch
new file mode 100644
index 0000000..4221d60
--- /dev/null
+++ b/debian/patches/features/all/rt/0139-sched-Remove-TASK_ALL.patch
@@ -0,0 +1,32 @@
+From: Peter Zijlstra <peterz at infradead.org>
+Date: Wed, 7 Jun 2017 10:12:45 +0200
+Subject: [PATCH 139/332] sched: Remove TASK_ALL
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2e4d79fd6a43f777a76d51c892394e83979edf1b
+
+It's unused:
+
+$ git grep "\<TASK_ALL\>" | wc -l
+1
+
+And dangerous, kill the bugger.
+
+Cc: stable-rt at vger.kernel.org
+Acked-by: Thomas Gleixner <tglx at linutronix.de>
+Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+---
+ include/linux/sched.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index aa26cea7618f..7deb4bff4e06 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -236,7 +236,6 @@ extern char ___assert_task_state[1 - 2*!!(
+ 
+ /* Convenience macros for the sake of wake_up */
+ #define TASK_NORMAL		(TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE)
+-#define TASK_ALL		(TASK_NORMAL | __TASK_STOPPED | __TASK_TRACED)
+ 
+ /* get_task_state() */
+ #define TASK_REPORT		(TASK_RUNNING | TASK_INTERRUPTIBLE | \
diff --git a/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch b/debian/patches/features/all/rt/0140-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch
similarity index 64%
rename from debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch
rename to debian/patches/features/all/rt/0140-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch
index d715f17..4407448 100644
--- a/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch
+++ b/debian/patches/features/all/rt/0140-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch
@@ -1,17 +1,20 @@
-Subject: sched: Do not account rcu_preempt_depth on RT in might_sleep()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Tue, 07 Jun 2011 09:19:06 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Tue, 7 Jun 2011 09:19:06 +0200
+Subject: [PATCH 140/332] sched: Do not account rcu_preempt_depth on RT in
+ might_sleep()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f9d50a8b7a3c6132d1f23fcbc6ac3cf0d2e0be2f
 
 RT changes the rcu_preempt_depth semantics, so we cannot check for it
 in might_sleep().
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/rcupdate.h |    7 +++++++
- kernel/sched/core.c      |    2 +-
+ include/linux/rcupdate.h | 7 +++++++
+ kernel/sched/core.c      | 2 +-
  2 files changed, 8 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
+index 01f71e1d2e94..00dc4a9474c0 100644
 --- a/include/linux/rcupdate.h
 +++ b/include/linux/rcupdate.h
 @@ -301,6 +301,11 @@ void synchronize_rcu(void);
@@ -26,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #else /* #ifdef CONFIG_PREEMPT_RCU */
  
-@@ -326,6 +331,8 @@ static inline int rcu_preempt_depth(void
+@@ -326,6 +331,8 @@ static inline int rcu_preempt_depth(void)
  	return 0;
  }
  
@@ -35,9 +38,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif /* #else #ifdef CONFIG_PREEMPT_RCU */
  
  /* Internal to kernel */
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index ed5e5ae03fdb..bf586f3c78bf 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -7862,7 +7862,7 @@ void __init sched_init(void)
+@@ -7859,7 +7859,7 @@ void __init sched_init(void)
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  static inline int preempt_count_equals(int preempt_offset)
  {
diff --git a/debian/patches/features/all/rt/cond-resched-softirq-rt.patch b/debian/patches/features/all/rt/0141-sched-Take-RT-softirq-semantics-into-account-in-cond.patch
similarity index 66%
rename from debian/patches/features/all/rt/cond-resched-softirq-rt.patch
rename to debian/patches/features/all/rt/0141-sched-Take-RT-softirq-semantics-into-account-in-cond.patch
index 2329dde..9b02046 100644
--- a/debian/patches/features/all/rt/cond-resched-softirq-rt.patch
+++ b/debian/patches/features/all/rt/0141-sched-Take-RT-softirq-semantics-into-account-in-cond.patch
@@ -1,7 +1,8 @@
-Subject: sched: Take RT softirq semantics into account in cond_resched()
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 14 Jul 2011 09:56:44 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 141/332] sched: Take RT softirq semantics into account in
+ cond_resched()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f6547eeae9bad804d3b4f63722f964c59fb04211
 
 The softirq semantics work different on -RT. There is no SOFTIRQ_MASK in
 the preemption counter which leads to the BUG_ON() statement in
@@ -10,13 +11,15 @@ schedule.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/sched.h |    4 ++++
- kernel/sched/core.c   |    2 ++
+ include/linux/sched.h | 4 ++++
+ kernel/sched/core.c   | 2 ++
  2 files changed, 6 insertions(+)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 7deb4bff4e06..4ffeb8ce1795 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -3373,12 +3373,16 @@ extern int __cond_resched_lock(spinlock_
+@@ -3386,12 +3386,16 @@ extern int __cond_resched_lock(spinlock_t *lock);
  	__cond_resched_lock(lock);				\
  })
  
@@ -33,9 +36,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static inline void cond_resched_rcu(void)
  {
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index bf586f3c78bf..72bc3d98dbc3 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -5092,6 +5092,7 @@ int __cond_resched_lock(spinlock_t *lock
+@@ -5092,6 +5092,7 @@ int __cond_resched_lock(spinlock_t *lock)
  }
  EXPORT_SYMBOL(__cond_resched_lock);
  
diff --git a/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch b/debian/patches/features/all/rt/0142-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch
similarity index 64%
rename from debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch
rename to debian/patches/features/all/rt/0142-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch
index b02e938..614d0cb 100644
--- a/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch
+++ b/debian/patches/features/all/rt/0142-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch
@@ -1,16 +1,18 @@
-Subject: sched: Use the proper LOCK_OFFSET for cond_resched()
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 22:51:33 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 142/332] sched: Use the proper LOCK_OFFSET for cond_resched()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a8c8f68338615fce57f3766b7823f8e39d08ae6b
 
 RT does not increment preempt count when a 'sleeping' spinlock is
 locked. Update PREEMPT_LOCK_OFFSET for that case.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/preempt.h |    4 ++++
+ include/linux/preempt.h | 4 ++++
  1 file changed, 4 insertions(+)
 
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 57c7731bfe04..210bd26b1882 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -91,7 +91,11 @@
diff --git a/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch b/debian/patches/features/all/rt/0143-sched-Disable-TTWU_QUEUE-on-RT.patch
similarity index 69%
rename from debian/patches/features/all/rt/sched-disable-ttwu-queue.patch
rename to debian/patches/features/all/rt/0143-sched-Disable-TTWU_QUEUE-on-RT.patch
index e819d3e..aa3e0e1 100644
--- a/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch
+++ b/debian/patches/features/all/rt/0143-sched-Disable-TTWU_QUEUE-on-RT.patch
@@ -1,16 +1,18 @@
-Subject: sched: Disable TTWU_QUEUE on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 13 Sep 2011 16:42:35 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 143/332] sched: Disable TTWU_QUEUE on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9106793ed0bcecb75965a7df81362aab7e159540
 
 The queued remote wakeup mechanism can introduce rather large
 latencies if the number of migrated tasks is high. Disable it for RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/sched/features.h |    5 +++++
+ kernel/sched/features.h | 5 +++++
  1 file changed, 5 insertions(+)
 
+diff --git a/kernel/sched/features.h b/kernel/sched/features.h
+index 69631fa46c2f..11258a0feae7 100644
 --- a/kernel/sched/features.h
 +++ b/kernel/sched/features.h
 @@ -45,11 +45,16 @@ SCHED_FEAT(LB_BIAS, true)
diff --git a/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch b/debian/patches/features/all/rt/0144-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch
similarity index 72%
rename from debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch
rename to debian/patches/features/all/rt/0144-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch
index 30d07c8..28b1fbb 100644
--- a/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch
+++ b/debian/patches/features/all/rt/0144-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch
@@ -1,7 +1,7 @@
-Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 18 Jul 2011 17:03:52 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 144/332] sched: Disable CONFIG_RT_GROUP_SCHED on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=efa96c8ed19e78a594e501a3b6001a99464a3a9a
 
 Carsten reported problems when running:
 
@@ -14,9 +14,11 @@ shell. Disabling CONFIG_RT_GROUP_SCHED solves that as well.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- init/Kconfig |    1 +
+ init/Kconfig | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index 333d2b269208..1762f2521ebc 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -1051,6 +1051,7 @@ config CFS_BANDWIDTH
diff --git a/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch b/debian/patches/features/all/rt/0145-sched-ttwu-Return-success-when-only-changing-the-sav.patch
similarity index 67%
rename from debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
rename to debian/patches/features/all/rt/0145-sched-ttwu-Return-success-when-only-changing-the-sav.patch
index fdd3f0c..7cc8122 100644
--- a/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
+++ b/debian/patches/features/all/rt/0145-sched-ttwu-Return-success-when-only-changing-the-sav.patch
@@ -1,7 +1,8 @@
-Subject: sched: ttwu: Return success when only changing the saved_state value
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 13 Dec 2011 21:42:19 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 145/332] sched: ttwu: Return success when only changing the
+ saved_state value
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0f34ffd817fbf629a47658e33e1c4671ae200054
 
 When a task blocks on a rt lock, it saves the current state in
 p->saved_state, so a lock related wake up will not destroy the
@@ -14,14 +15,15 @@ code and the task remains in the waitqueue list. Return success in
 that case as well.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- kernel/sched/core.c |    4 +++-
+ kernel/sched/core.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 72bc3d98dbc3..27bc156231c6 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -2040,8 +2040,10 @@ try_to_wake_up(struct task_struct *p, un
+@@ -2040,8 +2040,10 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
  		 * if the wakeup condition is true.
  		 */
  		if (!(wake_flags & WF_LOCK_SLEEPER)) {
diff --git a/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch b/debian/patches/features/all/rt/0146-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
similarity index 75%
rename from debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
rename to debian/patches/features/all/rt/0146-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
index e5d637f..cb91d42 100644
--- a/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
+++ b/debian/patches/features/all/rt/0146-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
@@ -1,7 +1,8 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Mon, 18 Mar 2013 15:12:49 -0400
-Subject: sched/workqueue: Only wake up idle workers if not blocked on sleeping spin lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 146/332] sched/workqueue: Only wake up idle workers if not
+ blocked on sleeping spin lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e55056f5abd1c5a4d8ba93f5d3691151d705eb66
 
 In -rt, most spin_locks() turn into mutexes. One of these spin_lock
 conversions is performed on the workqueue gcwq->lock. When the idle
@@ -19,12 +20,14 @@ Check the saved_state too before waking up new workers.
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/sched/core.c |    4 +++-
+ kernel/sched/core.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 27bc156231c6..a3eded102c43 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3477,8 +3477,10 @@ static void __sched notrace __schedule(b
+@@ -3477,8 +3477,10 @@ static void __sched notrace __schedule(bool preempt)
  			 * If a worker went to sleep, notify and ask workqueue
  			 * whether it wants to wake up a task to maintain
  			 * concurrency.
diff --git a/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch b/debian/patches/features/all/rt/0147-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
similarity index 66%
rename from debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
rename to debian/patches/features/all/rt/0147-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
index d2444fe..9c9012d 100644
--- a/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
+++ b/debian/patches/features/all/rt/0147-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
@@ -1,7 +1,8 @@
 From: Ingo Molnar <mingo at elte.hu>
 Date: Fri, 3 Jul 2009 08:30:27 -0500
-Subject: stop_machine: convert stop_machine_run() to PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 147/332] stop_machine: convert stop_machine_run() to
+ PREEMPT_RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a0c80116682d4c9b033f95ced1f500561ee5e9d1
 
 Instead of playing with non-preemption, introduce explicit
 startup serialization. This is more robust and cleaner as
@@ -11,12 +12,14 @@ Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 [bigeasy: XXX: stopper_lock -> stop_cpus_lock]
 ---
- kernel/stop_machine.c |   10 ++++++++++
+ kernel/stop_machine.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
 
+diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
+index ec9ab2f01489..56d142c31c6e 100644
 --- a/kernel/stop_machine.c
 +++ b/kernel/stop_machine.c
-@@ -475,6 +475,16 @@ static void cpu_stopper_thread(unsigned
+@@ -475,6 +475,16 @@ static void cpu_stopper_thread(unsigned int cpu)
  		struct cpu_stop_done *done = work->done;
  		int ret;
  
diff --git a/debian/patches/features/all/rt/stop-machine-raw-lock.patch b/debian/patches/features/all/rt/0148-stop_machine-Use-raw-spinlocks.patch
similarity index 77%
rename from debian/patches/features/all/rt/stop-machine-raw-lock.patch
rename to debian/patches/features/all/rt/0148-stop_machine-Use-raw-spinlocks.patch
index bf19ce2..e33dbff 100644
--- a/debian/patches/features/all/rt/stop-machine-raw-lock.patch
+++ b/debian/patches/features/all/rt/0148-stop_machine-Use-raw-spinlocks.patch
@@ -1,15 +1,17 @@
-Subject: stop_machine: Use raw spinlocks
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 29 Jun 2011 11:01:51 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 148/332] stop_machine: Use raw spinlocks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cadcf7f3eeb0a3a6a453531bcca6b2e72a21e2b4
 
 Use raw-locks in stomp_machine() to allow locking in irq-off regions.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/stop_machine.c |   34 +++++++++++++---------------------
+ kernel/stop_machine.c | 34 +++++++++++++---------------------
  1 file changed, 13 insertions(+), 21 deletions(-)
 
+diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
+index 56d142c31c6e..8b89dbedeaff 100644
 --- a/kernel/stop_machine.c
 +++ b/kernel/stop_machine.c
 @@ -36,7 +36,7 @@ struct cpu_stop_done {
@@ -21,7 +23,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	bool			enabled;	/* is this stopper enabled? */
  	struct list_head	works;		/* list of pending works */
  
-@@ -78,14 +78,14 @@ static bool cpu_stop_queue_work(unsigned
+@@ -78,14 +78,14 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
  	unsigned long flags;
  	bool enabled;
  
@@ -38,7 +40,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return enabled;
  }
  
-@@ -231,8 +231,8 @@ static int cpu_stop_queue_two_works(int
+@@ -231,8 +231,8 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1,
  	struct cpu_stopper *stopper2 = per_cpu_ptr(&cpu_stopper, cpu2);
  	int err;
  retry:
@@ -49,7 +51,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	err = -ENOENT;
  	if (!stopper1->enabled || !stopper2->enabled)
-@@ -255,8 +255,8 @@ static int cpu_stop_queue_two_works(int
+@@ -255,8 +255,8 @@ static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1,
  	__cpu_stop_queue_work(stopper1, work1);
  	__cpu_stop_queue_work(stopper2, work2);
  unlock:
@@ -60,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (unlikely(err == -EDEADLK)) {
  		while (stop_cpus_in_progress)
-@@ -448,9 +448,9 @@ static int cpu_stop_should_run(unsigned
+@@ -448,9 +448,9 @@ static int cpu_stop_should_run(unsigned int cpu)
  	unsigned long flags;
  	int run;
  
@@ -72,7 +74,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return run;
  }
  
-@@ -461,13 +461,13 @@ static void cpu_stopper_thread(unsigned
+@@ -461,13 +461,13 @@ static void cpu_stopper_thread(unsigned int cpu)
  
  repeat:
  	work = NULL;
@@ -88,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (work) {
  		cpu_stop_fn_t fn = work->fn;
-@@ -475,15 +475,7 @@ static void cpu_stopper_thread(unsigned
+@@ -475,15 +475,7 @@ static void cpu_stopper_thread(unsigned int cpu)
  		struct cpu_stop_done *done = work->done;
  		int ret;
  
diff --git a/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch b/debian/patches/features/all/rt/0149-hotplug-Lightweight-get-online-cpus.patch
similarity index 85%
rename from debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch
rename to debian/patches/features/all/rt/0149-hotplug-Lightweight-get-online-cpus.patch
index 7bee10b..6f1860b 100644
--- a/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch
+++ b/debian/patches/features/all/rt/0149-hotplug-Lightweight-get-online-cpus.patch
@@ -1,7 +1,7 @@
-Subject: hotplug: Lightweight get online cpus
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 15 Jun 2011 12:36:06 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 149/332] hotplug: Lightweight get online cpus
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6bfd06db45b7933313ad9025aacf2cc0c0810912
 
 get_online_cpus() is a heavy weight function which involves a global
 mutex. migrate_disable() wants a simpler construct which prevents only
@@ -13,13 +13,15 @@ tasks on the cpu which should be brought down.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/cpu.h |    7 +--
- kernel/cpu.c        |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/cpu.h |   7 ++--
+ kernel/cpu.c        | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 122 insertions(+), 3 deletions(-)
 
+diff --git a/include/linux/cpu.h b/include/linux/cpu.h
+index dcfcdd563f69..5e52d28c20c1 100644
 --- a/include/linux/cpu.h
 +++ b/include/linux/cpu.h
-@@ -173,9 +173,6 @@ static inline void cpu_notifier_register
+@@ -173,9 +173,6 @@ static inline void cpu_notifier_register_done(void)
  #endif /* CONFIG_SMP */
  extern struct bus_type cpu_subsys;
  
@@ -38,7 +40,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #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)
-@@ -202,6 +201,8 @@ static inline void cpu_hotplug_done(void
+@@ -202,6 +201,8 @@ static inline void cpu_hotplug_done(void) {}
  #define put_online_cpus()	do { } while (0)
  #define cpu_hotplug_disable()	do { } while (0)
  #define cpu_hotplug_enable()	do { } while (0)
@@ -47,6 +49,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #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 --git a/kernel/cpu.c b/kernel/cpu.c
+index 164b86a8b4e2..759dd49b28f6 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -239,6 +239,100 @@ static struct {
@@ -150,7 +154,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  void get_online_cpus(void)
  {
-@@ -877,6 +971,8 @@ static int __ref _cpu_down(unsigned int
+@@ -890,6 +984,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
  	int prev_state, ret = 0;
  	bool hasdied = false;
@@ -159,7 +163,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (num_online_cpus() == 1)
  		return -EBUSY;
-@@ -884,7 +980,27 @@ static int __ref _cpu_down(unsigned int
+@@ -897,7 +993,27 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	if (!cpu_present(cpu))
  		return -EINVAL;
  
@@ -187,7 +191,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	cpuhp_tasks_frozen = tasks_frozen;
  
-@@ -923,6 +1039,8 @@ static int __ref _cpu_down(unsigned int
+@@ -936,6 +1052,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  
  	hasdied = prev_state != st->state && st->state == CPUHP_OFFLINE;
  out:
diff --git a/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch b/debian/patches/features/all/rt/0150-hotplug-sync_unplug-No-n-in-task-name.patch
similarity index 65%
rename from debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch
rename to debian/patches/features/all/rt/0150-hotplug-sync_unplug-No-n-in-task-name.patch
index 5a956d7..4b5d3ae 100644
--- a/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch
+++ b/debian/patches/features/all/rt/0150-hotplug-sync_unplug-No-n-in-task-name.patch
@@ -1,7 +1,7 @@
-Subject: hotplug: sync_unplug: No "\n" in task name
 From: Yong Zhang <yong.zhang0 at gmail.com>
 Date: Sun, 16 Oct 2011 18:56:43 +0800
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 150/332] hotplug: sync_unplug: No "\n" in task name
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a1bbb62457433676d5186b63f13b325adcabf173
 
 Otherwise the output will look a little odd.
 
@@ -9,12 +9,14 @@ Signed-off-by: Yong Zhang <yong.zhang0 at gmail.com>
 Link: http://lkml.kernel.org/r/1318762607-2261-2-git-send-email-yong.zhang0@gmail.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/cpu.c |    2 +-
+ kernel/cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 759dd49b28f6..a5e711089d0a 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -318,7 +318,7 @@ static int cpu_unplug_begin(unsigned int
+@@ -318,7 +318,7 @@ static int cpu_unplug_begin(unsigned int cpu)
  	struct task_struct *tsk;
  
  	init_completion(&hp->synced);
diff --git a/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch b/debian/patches/features/all/rt/0151-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch
similarity index 70%
rename from debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch
rename to debian/patches/features/all/rt/0151-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch
index 1553d20..d29e624 100644
--- a/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch
+++ b/debian/patches/features/all/rt/0151-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch
@@ -1,7 +1,8 @@
 From: Yong Zhang <yong.zhang0 at gmail.com>
 Date: Thu, 28 Jul 2011 11:16:00 +0800
-Subject: hotplug: Reread hotplug_pcp on pin_current_cpu() retry
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 151/332] hotplug: Reread hotplug_pcp on pin_current_cpu()
+ retry
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=00e2bc546485a639d156a9bbc0a4db1e63f19915
 
 When retry happens, it's likely that the task has been migrated to
 another cpu (except unplug failed), but it still derefernces the
@@ -15,12 +16,14 @@ Cc: Peter Zijlstra <a.p.zijlstra at chello.nl>
 Link: http://lkml.kernel.org/r/20110728031600.GA338@windriver.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/cpu.c |    4 +++-
+ kernel/cpu.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index a5e711089d0a..41d6cf1215c7 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -257,9 +257,11 @@ static DEFINE_PER_CPU(struct hotplug_pcp
+@@ -257,9 +257,11 @@ static DEFINE_PER_CPU(struct hotplug_pcp, hotplug_pcp);
   */
  void pin_current_cpu(void)
  {
diff --git a/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch b/debian/patches/features/all/rt/0152-trace-Add-migrate-disabled-counter-to-tracing-output.patch
similarity index 62%
rename from debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch
rename to debian/patches/features/all/rt/0152-trace-Add-migrate-disabled-counter-to-tracing-output.patch
index a87c1f7..dd13f83 100644
--- a/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch
+++ b/debian/patches/features/all/rt/0152-trace-Add-migrate-disabled-counter-to-tracing-output.patch
@@ -1,16 +1,18 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 21:56:42 +0200
-Subject: trace: Add migrate-disabled counter to tracing output
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 152/332] trace: Add migrate-disabled counter to tracing output
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=59058d50ff3c8c09e217d081110282cee2c6fd94
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/trace_events.h |    2 ++
- kernel/trace/trace.c         |    9 ++++++---
- kernel/trace/trace_events.c  |    2 ++
- kernel/trace/trace_output.c  |    5 +++++
+ include/linux/trace_events.h | 2 ++
+ kernel/trace/trace.c         | 9 ++++++---
+ kernel/trace/trace_events.c  | 2 ++
+ kernel/trace/trace_output.c  | 5 +++++
  4 files changed, 15 insertions(+), 3 deletions(-)
 
+diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
+index be007610ceb0..28aa5381878e 100644
 --- a/include/linux/trace_events.h
 +++ b/include/linux/trace_events.h
 @@ -56,6 +56,8 @@ struct trace_entry {
@@ -22,10 +24,12 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  };
  
  #define TRACE_EVENT_TYPE_MAX						\
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index 7379f735a9f4..b2711ef6ed8e 100644
 --- a/kernel/trace/trace.c
 +++ b/kernel/trace/trace.c
-@@ -1909,6 +1909,8 @@ tracing_generic_entry_update(struct trac
- 		((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
+@@ -1909,6 +1909,8 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
+ 		((pc & SOFTIRQ_OFFSET) ? TRACE_FLAG_SOFTIRQ : 0) |
  		(tif_need_resched() ? TRACE_FLAG_NEED_RESCHED : 0) |
  		(test_preempt_need_resched() ? TRACE_FLAG_PREEMPT_RESCHED : 0);
 +
@@ -33,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(tracing_generic_entry_update);
  
-@@ -2897,9 +2899,10 @@ static void print_lat_help_header(struct
+@@ -2897,9 +2899,10 @@ static void print_lat_help_header(struct seq_file *m)
  		    "#                | / _----=> need-resched    \n"
  		    "#                || / _---=> hardirq/softirq \n"
  		    "#                ||| / _--=> preempt-depth   \n"
@@ -47,9 +51,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void print_event_info(struct trace_buffer *buf, struct seq_file *m)
+diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
+index 03c0a48c3ac4..0b85d516b491 100644
 --- a/kernel/trace/trace_events.c
 +++ b/kernel/trace/trace_events.c
-@@ -187,6 +187,8 @@ static int trace_define_common_fields(vo
+@@ -187,6 +187,8 @@ static int trace_define_common_fields(void)
  	__common_field(unsigned char, flags);
  	__common_field(unsigned char, preempt_count);
  	__common_field(int, pid);
@@ -58,9 +64,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
+diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
+index 3fc20422c166..badf130635f1 100644
 --- a/kernel/trace/trace_output.c
 +++ b/kernel/trace/trace_output.c
-@@ -432,6 +432,11 @@ int trace_print_lat_fmt(struct trace_seq
+@@ -432,6 +432,11 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
  	else
  		trace_seq_putc(s, '.');
  
diff --git a/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch b/debian/patches/features/all/rt/0153-hotplug-Use-migrate-disable-on-unplug.patch
similarity index 66%
rename from debian/patches/features/all/rt/hotplug-use-migrate-disable.patch
rename to debian/patches/features/all/rt/0153-hotplug-Use-migrate-disable-on-unplug.patch
index 84c6a61..9c34efe 100644
--- a/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch
+++ b/debian/patches/features/all/rt/0153-hotplug-Use-migrate-disable-on-unplug.patch
@@ -1,19 +1,21 @@
-Subject: hotplug: Use migrate disable on unplug
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 19:35:29 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 153/332] hotplug: Use migrate disable on unplug
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=432cf96903cd107b176df2cabca1a0ff109636f1
 
 Migration needs to be disabled accross the unplug handling to make
 sure that the unplug thread is off the unplugged cpu.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/cpu.c |    6 +++---
+ kernel/cpu.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 41d6cf1215c7..4b8f59bee8d9 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -988,14 +988,13 @@ static int __ref _cpu_down(unsigned int
+@@ -1001,14 +1001,13 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	cpumask_andnot(cpumask, cpu_online_mask, cpumask_of(cpu));
  	set_cpus_allowed_ptr(current, cpumask);
  	free_cpumask_var(cpumask);
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	cpu_hotplug_begin();
  	ret = cpu_unplug_begin(cpu);
-@@ -1044,6 +1043,7 @@ static int __ref _cpu_down(unsigned int
+@@ -1057,6 +1056,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	cpu_unplug_done(cpu);
  out_cancel:
  	cpu_hotplug_done();
diff --git a/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch b/debian/patches/features/all/rt/0154-lockdep-Make-it-RT-aware.patch
similarity index 74%
rename from debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch
rename to debian/patches/features/all/rt/0154-lockdep-Make-it-RT-aware.patch
index 6668702..fc2c72d 100644
--- a/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch
+++ b/debian/patches/features/all/rt/0154-lockdep-Make-it-RT-aware.patch
@@ -1,16 +1,18 @@
-Subject: lockdep: Make it RT aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 18:51:23 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 154/332] lockdep: Make it RT aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=57b7a4c901bee3338f9e6067e013b8618d061344
 
 teach lockdep that we don't really do softirqs on -RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/irqflags.h |   10 +++++++---
- kernel/locking/lockdep.c |    2 ++
+ include/linux/irqflags.h | 10 +++++++---
+ kernel/locking/lockdep.c |  2 ++
  2 files changed, 9 insertions(+), 3 deletions(-)
 
+diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
+index f8f27cc5546f..9b77034f7c5e 100644
 --- a/include/linux/irqflags.h
 +++ b/include/linux/irqflags.h
 @@ -25,8 +25,6 @@
@@ -39,9 +41,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  #if defined(CONFIG_IRQSOFF_TRACER) || \
+diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
+index 8b95ab1bd429..3d157b3128eb 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -3702,6 +3702,7 @@ static void check_flags(unsigned long fl
+@@ -3702,6 +3702,7 @@ static void check_flags(unsigned long flags)
  		}
  	}
  
@@ -49,7 +53,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * We dont accurately track softirq state in e.g.
  	 * hardirq contexts (such as on 4KSTACKS), so only
-@@ -3716,6 +3717,7 @@ static void check_flags(unsigned long fl
+@@ -3716,6 +3717,7 @@ static void check_flags(unsigned long flags)
  			DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled);
  		}
  	}
diff --git a/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch b/debian/patches/features/all/rt/0155-locking-Disable-spin-on-owner-for-RT.patch
similarity index 67%
rename from debian/patches/features/all/rt/mutex-no-spin-on-rt.patch
rename to debian/patches/features/all/rt/0155-locking-Disable-spin-on-owner-for-RT.patch
index e9db74b..3aedcfd 100644
--- a/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch
+++ b/debian/patches/features/all/rt/0155-locking-Disable-spin-on-owner-for-RT.patch
@@ -1,16 +1,21 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 21:51:45 +0200
-Subject: locking: Disable spin on owner for RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 155/332] locking: Disable spin on owner for RT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2710d0b7f8688334d1a6bbbac9ab9667a500d2d5
 
 Drop spin on owner for mutex / rwsem. We are most likely not using it
 but…
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/Kconfig.locks |    4 ++--
+ kernel/Kconfig.locks | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
+index ebdb0043203a..b9e6aa7e5aa6 100644
 --- a/kernel/Kconfig.locks
 +++ b/kernel/Kconfig.locks
 @@ -225,11 +225,11 @@ config ARCH_SUPPORTS_ATOMIC_RMW
diff --git a/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch b/debian/patches/features/all/rt/0156-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch
similarity index 91%
rename from debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch
rename to debian/patches/features/all/rt/0156-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch
index 9e88420..20d9c2b 100644
--- a/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch
+++ b/debian/patches/features/all/rt/0156-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch
@@ -1,7 +1,8 @@
-Subject: tasklet: Prevent tasklets from going into infinite spin in RT
 From: Ingo Molnar <mingo at elte.hu>
-Date: Tue Nov 29 20:18:22 2011 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Tue, 29 Nov 2011 20:18:22 -0500
+Subject: [PATCH 156/332] tasklet: Prevent tasklets from going into infinite
+ spin in RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=50917811e490fb52408942a561a3f22d7102034c
 
 When CONFIG_PREEMPT_RT_FULL is enabled, tasklets run as threads,
 and spinlocks turn are mutexes. But this can cause issues with
@@ -10,21 +11,21 @@ if a tasklets are disabled with tasklet_disable(), the tasklet
 count is increased. When a tasklet runs, it checks this counter
 and if it is set, it adds itself back on the softirq queue and
 returns.
-    
+
 The problem arises in RT because ksoftirq will see that a softirq
 is ready to run (the tasklet softirq just re-armed itself), and will
 not sleep, but instead run the softirqs again. The tasklet softirq
 will still see that the count is non-zero and will not execute
 the tasklet and requeue itself on the softirq again, which will
 cause ksoftirqd to run it again and again and again.
-    
+
 It gets worse because ksoftirqd runs as a real-time thread.
 If it preempted the task that disabled tasklets, and that task
 has migration disabled, or can't run for other reasons, the tasklet
 softirq will never run because the count will never be zero, and
 ksoftirqd will go into an infinite loop. As an RT task, it this
 becomes a big problem.
-    
+
 This is a hack solution to have tasklet_disable stop tasklets, and
 when a tasklet runs, instead of requeueing the tasklet softirqd
 it delays it. When tasklet_enable() is called, and tasklets are
@@ -32,19 +33,20 @@ waiting, then the tasklet_enable() will kick the tasklets to continue.
 This prevents the lock up from ksoftirq going into an infinite loop.
 
 [ rostedt at goodmis.org: ported to 3.0-rt ]
-    
+
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/interrupt.h |   33 ++++---
- kernel/softirq.c          |  201 ++++++++++++++++++++++++++++++++--------------
+ include/linux/interrupt.h |  33 ++++----
+ kernel/softirq.c          | 201 +++++++++++++++++++++++++++++++++-------------
  2 files changed, 162 insertions(+), 72 deletions(-)
 
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 59acc26fa74f..5819d557f5fd 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
-@@ -508,8 +508,9 @@ static inline struct task_struct *this_c
+@@ -508,8 +508,9 @@ static inline struct task_struct *this_cpu_ksoftirqd(void)
       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.
@@ -56,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
     * Tasklet is strictly serialized wrt itself, but not
       wrt another tasklets. If client needs some intertask synchronization,
       he makes it with spinlocks.
-@@ -534,27 +535,36 @@ struct tasklet_struct name = { NULL, 0,
+@@ -534,27 +535,36 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
  enum
  {
  	TASKLET_STATE_SCHED,	/* Tasklet is scheduled for execution */
@@ -99,7 +101,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define tasklet_unlock_wait(t) do { } while (0)
  #define tasklet_unlock(t) do { } while (0)
  #endif
-@@ -603,12 +613,7 @@ static inline void tasklet_disable(struc
+@@ -603,12 +613,7 @@ static inline void tasklet_disable(struct tasklet_struct *t)
  	smp_mb();
  }
  
@@ -113,6 +115,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  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,
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index 744fa611cae0..8669000c2aa3 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -21,6 +21,7 @@
@@ -173,7 +177,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_irq_restore(flags);
  }
  EXPORT_SYMBOL(__tasklet_schedule);
-@@ -478,10 +509,7 @@ void __tasklet_hi_schedule(struct taskle
+@@ -478,10 +509,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t)
  	unsigned long flags;
  
  	local_irq_save(flags);
@@ -185,7 +189,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_irq_restore(flags);
  }
  EXPORT_SYMBOL(__tasklet_hi_schedule);
-@@ -490,82 +518,122 @@ void __tasklet_hi_schedule_first(struct
+@@ -490,82 +518,122 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
  {
  	BUG_ON(!irqs_disabled());
  
@@ -357,7 +361,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void tasklet_init(struct tasklet_struct *t,
-@@ -586,7 +654,7 @@ void tasklet_kill(struct tasklet_struct
+@@ -586,7 +654,7 @@ void tasklet_kill(struct tasklet_struct *t)
  
  	while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) {
  		do {
diff --git a/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch b/debian/patches/features/all/rt/0157-softirq-Check-preemption-after-reenabling-interrupts.patch
similarity index 67%
rename from debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch
rename to debian/patches/features/all/rt/0157-softirq-Check-preemption-after-reenabling-interrupts.patch
index d29afc0..6b430d0 100644
--- a/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch
+++ b/debian/patches/features/all/rt/0157-softirq-Check-preemption-after-reenabling-interrupts.patch
@@ -1,7 +1,7 @@
-Subject: softirq: Check preemption after reenabling interrupts
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET)
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Sun, 13 Nov 2011 17:17:09 +0100
+Subject: [PATCH 157/332] softirq: Check preemption after reenabling interrupts
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=91d77b1f4a0aa2bdc447053e255af8c340ccf37e
 
 raise_softirq_irqoff() disables interrupts and wakes the softirq
 daemon, but after reenabling interrupts there is no preemption check,
@@ -13,14 +13,15 @@ ones which show this behaviour.
 
 Reported-by: Carsten Emde <cbe at osadl.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- block/blk-softirq.c     |    3 +++
- include/linux/preempt.h |    3 +++
- lib/irq_poll.c          |    5 +++++
- net/core/dev.c          |    7 +++++++
+ block/blk-softirq.c     | 3 +++
+ include/linux/preempt.h | 3 +++
+ lib/irq_poll.c          | 5 +++++
+ net/core/dev.c          | 7 +++++++
  4 files changed, 18 insertions(+)
 
+diff --git a/block/blk-softirq.c b/block/blk-softirq.c
+index 06cf9807f49a..c40342643ca0 100644
 --- a/block/blk-softirq.c
 +++ b/block/blk-softirq.c
 @@ -51,6 +51,7 @@ static void trigger_softirq(void *data)
@@ -31,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -89,6 +90,7 @@ static int blk_softirq_cpu_dead(unsigned
+@@ -89,6 +90,7 @@ static int blk_softirq_cpu_dead(unsigned int cpu)
  			 this_cpu_ptr(&blk_cpu_done));
  	raise_softirq_irqoff(BLOCK_SOFTIRQ);
  	local_irq_enable();
@@ -39,7 +40,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return 0;
  }
-@@ -141,6 +143,7 @@ void __blk_complete_request(struct reque
+@@ -141,6 +143,7 @@ void __blk_complete_request(struct request *req)
  		goto do_local;
  
  	local_irq_restore(flags);
@@ -47,6 +48,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 210bd26b1882..2b761d0c89d6 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -160,8 +160,10 @@ do { \
@@ -68,9 +71,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define preemptible()				0
  
  #endif /* CONFIG_PREEMPT_COUNT */
+diff --git a/lib/irq_poll.c b/lib/irq_poll.c
+index 1d6565e81030..b23a79761df7 100644
 --- a/lib/irq_poll.c
 +++ b/lib/irq_poll.c
-@@ -36,6 +36,7 @@ void irq_poll_sched(struct irq_poll *iop
+@@ -36,6 +36,7 @@ void irq_poll_sched(struct irq_poll *iop)
  	list_add_tail(&iop->list, this_cpu_ptr(&blk_cpu_iopoll));
  	__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
  	local_irq_restore(flags);
@@ -78,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(irq_poll_sched);
  
-@@ -71,6 +72,7 @@ void irq_poll_complete(struct irq_poll *
+@@ -71,6 +72,7 @@ void irq_poll_complete(struct irq_poll *iop)
  	local_irq_save(flags);
  	__irq_poll_complete(iop);
  	local_irq_restore(flags);
@@ -86,7 +91,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(irq_poll_complete);
  
-@@ -95,6 +97,7 @@ static void __latent_entropy irq_poll_so
+@@ -95,6 +97,7 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h)
  		}
  
  		local_irq_enable();
@@ -94,7 +99,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		/* Even though interrupts have been re-enabled, this
  		 * access is safe because interrupts can only add new
-@@ -132,6 +135,7 @@ static void __latent_entropy irq_poll_so
+@@ -132,6 +135,7 @@ static void __latent_entropy irq_poll_softirq(struct softirq_action *h)
  		__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
  
  	local_irq_enable();
@@ -102,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -195,6 +199,7 @@ static int irq_poll_cpu_dead(unsigned in
+@@ -195,6 +199,7 @@ static int irq_poll_cpu_dead(unsigned int cpu)
  			 this_cpu_ptr(&blk_cpu_iopoll));
  	__raise_softirq_irqoff(IRQ_POLL_SOFTIRQ);
  	local_irq_enable();
@@ -110,9 +115,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return 0;
  }
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 1d0a7369d5a2..38ee7c420a27 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -2285,6 +2285,7 @@ static void __netif_reschedule(struct Qd
+@@ -2286,6 +2286,7 @@ static void __netif_reschedule(struct Qdisc *q)
  	sd->output_queue_tailp = &q->next_sched;
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_restore(flags);
@@ -120,7 +127,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void __netif_schedule(struct Qdisc *q)
-@@ -2366,6 +2367,7 @@ void __dev_kfree_skb_irq(struct sk_buff
+@@ -2367,6 +2368,7 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason)
  	__this_cpu_write(softnet_data.completion_queue, skb);
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_restore(flags);
@@ -128,7 +135,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(__dev_kfree_skb_irq);
  
-@@ -3785,6 +3787,7 @@ static int enqueue_to_backlog(struct sk_
+@@ -3793,6 +3795,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu,
  	rps_unlock(sd);
  
  	local_irq_restore(flags);
@@ -136,7 +143,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	atomic_long_inc(&skb->dev->rx_dropped);
  	kfree_skb(skb);
-@@ -4831,6 +4834,7 @@ static void net_rps_action_and_irq_enabl
+@@ -4849,6 +4852,7 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd)
  		sd->rps_ipi_list = NULL;
  
  		local_irq_enable();
@@ -144,7 +151,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		/* Send pending IPI's to kick RPS processing on remote cpus. */
  		while (remsd) {
-@@ -4844,6 +4848,7 @@ static void net_rps_action_and_irq_enabl
+@@ -4862,6 +4866,7 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd)
  	} else
  #endif
  		local_irq_enable();
@@ -152,7 +159,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
-@@ -4921,6 +4926,7 @@ void __napi_schedule(struct napi_struct
+@@ -4939,6 +4944,7 @@ void __napi_schedule(struct napi_struct *n)
  	local_irq_save(flags);
  	____napi_schedule(this_cpu_ptr(&softnet_data), n);
  	local_irq_restore(flags);
@@ -160,7 +167,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(__napi_schedule);
  
-@@ -8022,6 +8028,7 @@ static int dev_cpu_callback(struct notif
+@@ -8040,6 +8046,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
  
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
diff --git a/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch b/debian/patches/features/all/rt/0158-softirq-Disable-softirq-stacks-for-RT.patch
similarity index 67%
rename from debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch
rename to debian/patches/features/all/rt/0158-softirq-Disable-softirq-stacks-for-RT.patch
index bddc934..b42270e 100644
--- a/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch
+++ b/debian/patches/features/all/rt/0158-softirq-Disable-softirq-stacks-for-RT.patch
@@ -1,26 +1,28 @@
-Subject: softirq: Disable softirq stacks for RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 18 Jul 2011 13:59:17 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 158/332] softirq: Disable softirq stacks for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6b072c0b9ded3fc2cb46b0cad09aeaf35224ef4e
 
 Disable extra stacks for softirqs. We want to preempt softirqs and
 having them on special IRQ-stack does not make this easier.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/powerpc/kernel/irq.c     |    2 ++
- arch/powerpc/kernel/misc_32.S |    2 ++
- arch/powerpc/kernel/misc_64.S |    2 ++
- arch/sh/kernel/irq.c          |    2 ++
- arch/sparc/kernel/irq_64.c    |    2 ++
- arch/x86/entry/entry_64.S     |    2 ++
- arch/x86/kernel/irq_32.c      |    2 ++
- include/linux/interrupt.h     |    2 +-
+ arch/powerpc/kernel/irq.c     | 2 ++
+ arch/powerpc/kernel/misc_32.S | 2 ++
+ arch/powerpc/kernel/misc_64.S | 2 ++
+ arch/sh/kernel/irq.c          | 2 ++
+ arch/sparc/kernel/irq_64.c    | 2 ++
+ arch/x86/entry/entry_64.S     | 2 ++
+ arch/x86/kernel/irq_32.c      | 2 ++
+ include/linux/interrupt.h     | 2 +-
  8 files changed, 15 insertions(+), 1 deletion(-)
 
+diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
+index 028a22bfa90c..a75e2dd3e71f 100644
 --- a/arch/powerpc/kernel/irq.c
 +++ b/arch/powerpc/kernel/irq.c
-@@ -638,6 +638,7 @@ void irq_ctx_init(void)
+@@ -651,6 +651,7 @@ void irq_ctx_init(void)
  	}
  }
  
@@ -28,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void do_softirq_own_stack(void)
  {
  	struct thread_info *curtp, *irqtp;
-@@ -655,6 +656,7 @@ void do_softirq_own_stack(void)
+@@ -668,6 +669,7 @@ void do_softirq_own_stack(void)
  	if (irqtp->flags)
  		set_bits(irqtp->flags, &curtp->flags);
  }
@@ -36,6 +38,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  irq_hw_number_t virq_to_hw(unsigned int virq)
  {
+diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
+index 030d72df5dd5..b471a709e100 100644
 --- a/arch/powerpc/kernel/misc_32.S
 +++ b/arch/powerpc/kernel/misc_32.S
 @@ -41,6 +41,7 @@
@@ -46,7 +50,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  _GLOBAL(call_do_softirq)
  	mflr	r0
  	stw	r0,4(r1)
-@@ -57,6 +58,7 @@
+@@ -57,6 +58,7 @@ _GLOBAL(call_do_softirq)
  	stw	r10,THREAD+KSP_LIMIT(r2)
  	mtlr	r0
  	blr
@@ -54,6 +58,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * void call_do_irq(struct pt_regs *regs, struct thread_info *irqtp);
+diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
+index 4cefe6888b18..cb2ee4be999a 100644
 --- a/arch/powerpc/kernel/misc_64.S
 +++ b/arch/powerpc/kernel/misc_64.S
 @@ -31,6 +31,7 @@
@@ -64,7 +70,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  _GLOBAL(call_do_softirq)
  	mflr	r0
  	std	r0,16(r1)
-@@ -41,6 +42,7 @@
+@@ -41,6 +42,7 @@ _GLOBAL(call_do_softirq)
  	ld	r0,16(r1)
  	mtlr	r0
  	blr
@@ -72,6 +78,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  _GLOBAL(call_do_irq)
  	mflr	r0
+diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
+index 6c0378c0b8b5..abd58b4dff97 100644
 --- a/arch/sh/kernel/irq.c
 +++ b/arch/sh/kernel/irq.c
 @@ -147,6 +147,7 @@ void irq_ctx_exit(int cpu)
@@ -90,9 +98,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #else
  static inline void handle_one_irq(unsigned int irq)
  {
+diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
+index 5cbf03c14981..6067d9379e5b 100644
 --- a/arch/sparc/kernel/irq_64.c
 +++ b/arch/sparc/kernel/irq_64.c
-@@ -854,6 +854,7 @@ void __irq_entry handler_irq(int pil, st
+@@ -854,6 +854,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs)
  	set_irq_regs(old_regs);
  }
  
@@ -108,6 +118,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_HOTPLUG_CPU
  void fixup_irqs(void)
+diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
+index e7b0e7ff4c58..38dedcf62e01 100644
 --- a/arch/x86/entry/entry_64.S
 +++ b/arch/x86/entry/entry_64.S
 @@ -894,6 +894,7 @@ EXPORT_SYMBOL(native_load_gs_index)
@@ -126,6 +138,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_XEN
  idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
+diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
+index 1f38d9a4d9de..053bf3b2ef39 100644
 --- a/arch/x86/kernel/irq_32.c
 +++ b/arch/x86/kernel/irq_32.c
 @@ -127,6 +127,7 @@ void irq_ctx_init(int cpu)
@@ -144,6 +158,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  bool handle_irq(struct irq_desc *desc, struct pt_regs *regs)
  {
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 5819d557f5fd..c2bcbd41e0ad 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -472,7 +472,7 @@ struct softirq_action
diff --git a/debian/patches/features/all/rt/softirq-split-locks.patch b/debian/patches/features/all/rt/0159-softirq-Split-softirq-locks.patch
similarity index 89%
rename from debian/patches/features/all/rt/softirq-split-locks.patch
rename to debian/patches/features/all/rt/0159-softirq-Split-softirq-locks.patch
index b635255..b657aff 100644
--- a/debian/patches/features/all/rt/softirq-split-locks.patch
+++ b/debian/patches/features/all/rt/0159-softirq-Split-softirq-locks.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Thu, 04 Oct 2012 14:20:47 +0100
-Subject: softirq: Split softirq locks
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Thu, 4 Oct 2012 14:20:47 +0100
+Subject: [PATCH 159/332] softirq: Split softirq locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=28f5cec9402335c56f330b22e76dd6f57dfe398b
 
 The 3.x RT series removed the split softirq implementation in favour
 of pushing softirq processing into the context of the thread which
@@ -25,16 +25,18 @@ threads.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/bottom_half.h |   34 +++
- include/linux/interrupt.h   |   15 +
- include/linux/preempt.h     |   15 +
- include/linux/sched.h       |    3 
- init/main.c                 |    1 
- kernel/softirq.c            |  492 +++++++++++++++++++++++++++++++++++++-------
- kernel/time/tick-sched.c    |    9 
- net/core/dev.c              |    6 
+ include/linux/bottom_half.h |  34 +++
+ include/linux/interrupt.h   |  15 +-
+ include/linux/preempt.h     |  15 +-
+ include/linux/sched.h       |   3 +
+ init/main.c                 |   1 +
+ kernel/softirq.c            | 492 +++++++++++++++++++++++++++++++++++++-------
+ kernel/time/tick-sched.c    |   9 +-
+ net/core/dev.c              |   6 +-
  8 files changed, 480 insertions(+), 95 deletions(-)
 
+diff --git a/include/linux/bottom_half.h b/include/linux/bottom_half.h
+index 8fdcb783197d..d07dbeec7bc1 100644
 --- a/include/linux/bottom_half.h
 +++ b/include/linux/bottom_half.h
 @@ -3,6 +3,39 @@
@@ -84,6 +86,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +#endif
  
  #endif /* _LINUX_BH_H */
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index c2bcbd41e0ad..127cfbd8f129 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -469,10 +469,11 @@ struct softirq_action
@@ -100,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void do_softirq_own_stack(void);
  #else
  static inline void do_softirq_own_stack(void)
-@@ -480,6 +481,9 @@ static inline void do_softirq_own_stack(
+@@ -480,6 +481,9 @@ static inline void do_softirq_own_stack(void)
  	__do_softirq();
  }
  #endif
@@ -110,7 +114,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  extern void open_softirq(int nr, void (*action)(struct softirq_action *));
  extern void softirq_init(void);
-@@ -487,6 +491,7 @@ extern void __raise_softirq_irqoff(unsig
+@@ -487,6 +491,7 @@ extern void __raise_softirq_irqoff(unsigned int nr);
  
  extern void raise_softirq_irqoff(unsigned int nr);
  extern void raise_softirq(unsigned int nr);
@@ -118,7 +122,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  DECLARE_PER_CPU(struct task_struct *, ksoftirqd);
  
-@@ -644,6 +649,12 @@ void tasklet_hrtimer_cancel(struct taskl
+@@ -644,6 +649,12 @@ void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer)
  	tasklet_kill(&ttimer->tasklet);
  }
  
@@ -131,6 +135,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Autoprobing for irqs:
   *
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 2b761d0c89d6..5f733773f54e 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -50,7 +50,11 @@
@@ -171,9 +177,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * Are we in NMI context?
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 4ffeb8ce1795..9aa9fef1d48d 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1971,6 +1971,8 @@ struct task_struct {
+@@ -1980,6 +1980,8 @@ struct task_struct {
  #endif
  #ifdef CONFIG_PREEMPT_RT_BASE
  	struct rcu_head put_rcu;
@@ -182,7 +190,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  	unsigned long	task_state_change;
-@@ -2287,6 +2289,7 @@ extern void thread_group_cputime_adjuste
+@@ -2300,6 +2302,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut,
  /*
   * Per process flags
   */
@@ -190,9 +198,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #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 */
+diff --git a/init/main.c b/init/main.c
+index ae3996ae9bac..6470deef01c9 100644
 --- a/init/main.c
 +++ b/init/main.c
-@@ -507,6 +507,7 @@ asmlinkage __visible void __init start_k
+@@ -507,6 +507,7 @@ asmlinkage __visible void __init start_kernel(void)
  	setup_command_line(command_line);
  	setup_nr_cpu_ids();
  	setup_per_cpu_areas();
@@ -200,6 +210,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	boot_cpu_state_init();
  	smp_prepare_boot_cpu();	/* arch-specific boot-cpu hooks */
  
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index 8669000c2aa3..ec9b3611f886 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -26,6 +26,7 @@
@@ -210,7 +222,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/irq.h>
  
  #define CREATE_TRACE_POINTS
-@@ -63,6 +64,98 @@ const char * const softirq_to_name[NR_SO
+@@ -63,6 +64,98 @@ const char * const softirq_to_name[NR_SOFTIRQS] = {
  	"TASKLET", "SCHED", "HRTIMER", "RCU"
  };
  
@@ -385,7 +397,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * preempt_count and SOFTIRQ_OFFSET usage:
   * - preempt_count is changed by SOFTIRQ_OFFSET on entering or leaving
-@@ -244,10 +399,8 @@ asmlinkage __visible void __softirq_entr
+@@ -244,10 +399,8 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
  	unsigned long end = jiffies + MAX_SOFTIRQ_TIME;
  	unsigned long old_flags = current->flags;
  	int max_restart = MAX_SOFTIRQ_RESTART;
@@ -396,7 +408,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * Mask out PF_MEMALLOC s current task context is borrowed for the
-@@ -266,36 +419,7 @@ asmlinkage __visible void __softirq_entr
+@@ -266,36 +419,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
  	/* Reset the pending bitmask before enabling irqs */
  	set_softirq_pending(0);
  
@@ -434,10 +446,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	pending = local_softirq_pending();
  	if (pending) {
-@@ -332,6 +456,246 @@ asmlinkage __visible void do_softirq(voi
+@@ -331,6 +455,246 @@ asmlinkage __visible void do_softirq(void)
+ 	local_irq_restore(flags);
  }
  
- /*
++/*
 + * This function must run with irqs disabled!
 + */
 +void raise_softirq_irqoff(unsigned int nr)
@@ -677,10 +690,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +
 +#endif /* PREEMPT_RT_FULL */
-+/*
+ /*
   * Enter an interrupt context.
   */
- void irq_enter(void)
 @@ -342,9 +706,9 @@ void irq_enter(void)
  		 * Prevent raise_softirq from needlessly waking up ksoftirqd
  		 * here, as softirq will be serviced on return from interrupt.
@@ -788,7 +800,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  #ifdef CONFIG_HOTPLUG_CPU
-@@ -830,6 +1164,8 @@ static int takeover_tasklets(unsigned in
+@@ -830,6 +1164,8 @@ static int takeover_tasklets(unsigned int cpu)
  
  static struct smp_hotplug_thread softirq_threads = {
  	.store			= &ksoftirqd,
@@ -797,9 +809,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	.thread_should_run	= ksoftirqd_should_run,
  	.thread_fn		= run_ksoftirqd,
  	.thread_comm		= "ksoftirqd/%u",
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 14eaf34cbbc9..4367249e0dde 100644
 --- a/kernel/time/tick-sched.c
 +++ b/kernel/time/tick-sched.c
-@@ -882,14 +882,7 @@ static bool can_stop_idle_tick(int cpu,
+@@ -882,14 +882,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
  		return false;
  
  	if (unlikely(local_softirq_pending() && cpu_online(cpu))) {
@@ -815,9 +829,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		return false;
  	}
  
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 38ee7c420a27..1a663019f600 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3856,11 +3856,9 @@ int netif_rx_ni(struct sk_buff *skb)
+@@ -3864,11 +3864,9 @@ int netif_rx_ni(struct sk_buff *skb)
  
  	trace_netif_rx_ni_entry(skb);
  
diff --git a/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch b/debian/patches/features/all/rt/0160-kernel-softirq-unlock-with-irqs-on.patch
similarity index 69%
rename from debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch
rename to debian/patches/features/all/rt/0160-kernel-softirq-unlock-with-irqs-on.patch
index d5b6eb7..f06cd71 100644
--- a/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch
+++ b/debian/patches/features/all/rt/0160-kernel-softirq-unlock-with-irqs-on.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 9 Feb 2016 18:17:18 +0100
-Subject: kernel: softirq: unlock with irqs on
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 160/332] kernel: softirq: unlock with irqs on
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e14c59d5ab355d4cad630a7555aa8928cb3f7833
 
 We unlock the lock while the interrupts are off. This isn't a problem
 now but will get because the migrate_disable() + enable are not
@@ -9,9 +9,11 @@ symmetrical in regard to the status of interrupts.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/softirq.c |    4 +++-
+ kernel/softirq.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index ec9b3611f886..285a75bd7496 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -560,8 +560,10 @@ static void do_current_softirqs(void)
diff --git a/debian/patches/features/all/rt/kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch b/debian/patches/features/all/rt/0161-kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
similarity index 72%
rename from debian/patches/features/all/rt/kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
rename to debian/patches/features/all/rt/0161-kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
index 8e8e83b..cd2c0f4 100644
--- a/debian/patches/features/all/rt/kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
+++ b/debian/patches/features/all/rt/0161-kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
@@ -1,17 +1,19 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 9 Feb 2016 18:18:01 +0100
-Subject: kernel: migrate_disable() do fastpath in atomic &
+Subject: [PATCH 161/332] kernel: migrate_disable() do fastpath in atomic &
  irqs-off
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4adf0cc0e4f77bcd1d19eeca8ad4c8d617348ba6
 
 With interrupts off it makes no sense to do the long path since we can't
 leave the CPU anyway. Also we might end up in a recursion with lockdep.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/sched/core.c |    4 ++--
+ kernel/sched/core.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index a3eded102c43..0e90644168e0 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
 @@ -3299,7 +3299,7 @@ void migrate_disable(void)
diff --git a/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch b/debian/patches/features/all/rt/0162-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch
similarity index 78%
rename from debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch
rename to debian/patches/features/all/rt/0162-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch
index 690c3aa..4d4e409 100644
--- a/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch
+++ b/debian/patches/features/all/rt/0162-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch
@@ -1,7 +1,8 @@
-Subject: genirq: Allow disabling of softirq processing in irq thread context
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 31 Jan 2012 13:01:27 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 162/332] genirq: Allow disabling of softirq processing in irq
+ thread context
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=26d174f9ee227eacacd4d0283fd411a96c3526b9
 
 The processing of softirqs in irq thread context is a performance gain
 for the non-rt workloads of a system, but it's counterproductive for
@@ -10,15 +11,16 @@ workload. Allow such interrupts to prevent softirq processing in their
 thread context.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/interrupt.h |    2 ++
- include/linux/irq.h       |    4 +++-
- kernel/irq/manage.c       |   13 ++++++++++++-
- kernel/irq/settings.h     |   12 ++++++++++++
- kernel/softirq.c          |    9 +++++++++
+ include/linux/interrupt.h |  2 ++
+ include/linux/irq.h       |  4 +++-
+ kernel/irq/manage.c       | 13 ++++++++++++-
+ kernel/irq/settings.h     | 12 ++++++++++++
+ kernel/softirq.c          |  9 +++++++++
  5 files changed, 38 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 127cfbd8f129..f323a5109987 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -61,6 +61,7 @@
@@ -37,6 +39,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
  
+diff --git a/include/linux/irq.h b/include/linux/irq.h
+index 39e3254e5769..8ebac94fbb9f 100644
 --- a/include/linux/irq.h
 +++ b/include/linux/irq.h
 @@ -72,6 +72,7 @@ enum irqchip_irq_state;
@@ -63,9 +67,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define IRQ_NO_BALANCING_MASK	(IRQ_PER_CPU | IRQ_NO_BALANCING)
  
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index bc1bfce421fd..562df8dc14be 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
-@@ -881,7 +881,15 @@ irq_forced_thread_fn(struct irq_desc *de
+@@ -881,7 +881,15 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)
  	local_bh_disable();
  	ret = action->thread_fn(action->irq, action->dev_id);
  	irq_finalize_oneshot(desc, action);
@@ -82,7 +88,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return ret;
  }
  
-@@ -1338,6 +1346,9 @@ static int
+@@ -1340,6 +1348,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
  			irqd_set(&desc->irq_data, IRQD_NO_BALANCING);
  		}
  
@@ -92,6 +98,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		/* Set default affinity mask once everything is setup */
  		setup_affinity(desc, mask);
  
+diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h
+index 320579d89091..2df2d4445b1e 100644
 --- a/kernel/irq/settings.h
 +++ b/kernel/irq/settings.h
 @@ -16,6 +16,7 @@ enum {
@@ -110,7 +118,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #undef IRQF_MODIFY_MASK
  #define IRQF_MODIFY_MASK	GOT_YOU_MORON
  
-@@ -40,6 +42,16 @@ irq_settings_clr_and_set(struct irq_desc
+@@ -40,6 +42,16 @@ irq_settings_clr_and_set(struct irq_desc *desc, u32 clr, u32 set)
  	desc->status_use_accessors |= (set & _IRQF_MODIFY_MASK);
  }
  
@@ -127,6 +135,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline bool irq_settings_is_per_cpu(struct irq_desc *desc)
  {
  	return desc->status_use_accessors & _IRQ_PER_CPU;
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index 285a75bd7496..a7f83bca653d 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -589,6 +589,15 @@ void __local_bh_enable(void)
diff --git a/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch b/debian/patches/features/all/rt/0163-softirq-split-timer-softirqs-out-of-ksoftirqd.patch
similarity index 90%
rename from debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch
rename to debian/patches/features/all/rt/0163-softirq-split-timer-softirqs-out-of-ksoftirqd.patch
index 4051ee6..fd79fc0 100644
--- a/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch
+++ b/debian/patches/features/all/rt/0163-softirq-split-timer-softirqs-out-of-ksoftirqd.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 20 Jan 2016 16:34:17 +0100
-Subject: softirq: split timer softirqs out of ksoftirqd
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 163/332] softirq: split timer softirqs out of ksoftirqd
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e57a3dc4a6ccfea390994ce5f414afae77a1150e
 
 The softirqd runs in -RT with SCHED_FIFO (prio 1) and deals mostly with
 timer wakeup which can not happen in hardirq context. The prio has been
@@ -23,9 +23,11 @@ SCHED_OTHER priority and it won't defer RCU anymore.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/softirq.c |   85 +++++++++++++++++++++++++++++++++++++++++++++++--------
+ kernel/softirq.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++--------
  1 file changed, 73 insertions(+), 12 deletions(-)
 
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index a7f83bca653d..a481db1a6774 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -58,6 +58,10 @@ EXPORT_SYMBOL(irq_stat);
@@ -57,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static void handle_softirq(unsigned int vec_nr)
  {
  	struct softirq_action *h = softirq_vec + vec_nr;
-@@ -484,7 +499,6 @@ void __raise_softirq_irqoff(unsigned int
+@@ -484,7 +499,6 @@ void __raise_softirq_irqoff(unsigned int nr)
  static inline void local_bh_disable_nort(void) { local_bh_disable(); }
  static inline void _local_bh_enable_nort(void) { _local_bh_enable(); }
  static void ksoftirqd_set_sched_params(unsigned int cpu) { }
@@ -79,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * If we are not in a hard interrupt and inside a bh disabled
-@@ -641,16 +659,29 @@ static void do_raise_softirq_irqoff(unsi
+@@ -641,16 +659,29 @@ static void do_raise_softirq_irqoff(unsigned int nr)
  	 * delegate it to ksoftirqd.
  	 */
  	if (!in_irq() && current->softirq_nestcnt)
@@ -113,7 +115,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -676,7 +707,7 @@ void raise_softirq_irqoff(unsigned int n
+@@ -676,7 +707,7 @@ void raise_softirq_irqoff(unsigned int nr)
  	 * raise a WARN() if the condition is met.
  	 */
  	if (!current->softirq_nestcnt)
@@ -122,10 +124,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static inline int ksoftirqd_softirq_pending(void)
-@@ -689,22 +720,37 @@ static inline void _local_bh_enable_nort
+@@ -688,23 +719,38 @@ static inline void local_bh_disable_nort(void) { }
+ static inline void _local_bh_enable_nort(void) { }
  
  static inline void ksoftirqd_set_sched_params(unsigned int cpu)
- {
++{
 +	/* Take over all but timer pending softirqs when starting */
 +	local_irq_disable();
 +	current->softirqs_raised = local_softirq_pending() & ~TIMER_SOFTIRQS;
@@ -133,7 +136,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +}
 +
 +static inline void ktimer_softirqd_set_sched_params(unsigned int cpu)
-+{
+ {
  	struct sched_param param = { .sched_priority = 1 };
  
  	sched_setscheduler(current, SCHED_FIFO, &param);
@@ -173,7 +176,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	local_irq_restore(flags);
  #endif
  }
-@@ -1176,18 +1225,30 @@ static int takeover_tasklets(unsigned in
+@@ -1176,18 +1225,30 @@ static int takeover_tasklets(unsigned int cpu)
  static struct smp_hotplug_thread softirq_threads = {
  	.store			= &ksoftirqd,
  	.setup			= ksoftirqd_set_sched_params,
diff --git a/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch b/debian/patches/features/all/rt/0164-softirq-wake-the-timer-softirq-if-needed.patch
similarity index 83%
rename from debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch
rename to debian/patches/features/all/rt/0164-softirq-wake-the-timer-softirq-if-needed.patch
index 0afe6c9..ec9c05e 100644
--- a/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch
+++ b/debian/patches/features/all/rt/0164-softirq-wake-the-timer-softirq-if-needed.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <efault at gmx.de>
 Date: Fri, 20 Jan 2017 18:10:20 +0100
-Subject: [PATCH] softirq: wake the timer softirq if needed
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 164/332] softirq: wake the timer softirq if needed
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=613619dae352ccc813dfec8582ab556d66c04c2a
 
 The irq-exit path only checks the "normal"-softirq thread if it is
 running and ignores the state of the "timer"-softirq thread. It is possible
@@ -25,12 +25,14 @@ Cc: stable-rt at vger.kernel.org
 Signed-off-by: Mike Galbraith <efault at gmx.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/softirq.c |   10 ++++------
+ kernel/softirq.c | 10 ++++------
  1 file changed, 4 insertions(+), 6 deletions(-)
 
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index a481db1a6774..af2fd81cb9a5 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
-@@ -206,6 +206,7 @@ static void handle_softirq(unsigned int
+@@ -206,6 +206,7 @@ static void handle_softirq(unsigned int vec_nr)
  	}
  }
  
diff --git a/debian/patches/features/all/rt/timers-Don-t-wake-ktimersoftd-on-every-tick.patch b/debian/patches/features/all/rt/0165-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
similarity index 84%
rename from debian/patches/features/all/rt/timers-Don-t-wake-ktimersoftd-on-every-tick.patch
rename to debian/patches/features/all/rt/0165-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
index b886b1d..6a87519 100644
--- a/debian/patches/features/all/rt/timers-Don-t-wake-ktimersoftd-on-every-tick.patch
+++ b/debian/patches/features/all/rt/0165-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
@@ -1,7 +1,7 @@
 From: Haris Okanovic <haris.okanovic at ni.com>
 Date: Fri, 3 Feb 2017 17:26:44 +0100
-Subject: [PATCH] timers: Don't wake ktimersoftd on every tick
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 165/332] timers: Don't wake ktimersoftd on every tick
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=773562a9244051e326adb299278b2576e167be03
 
 We recently upgraded from 4.1 to 4.6 and noticed a minor latency
 regression caused by an additional thread wakeup (ktimersoftd) in
@@ -30,13 +30,15 @@ updated on each tick. Any addition to the lists wakes ktimersoftd
 Signed-off-by: Haris Okanovic <haris.okanovic at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/timer.c |   96 ++++++++++++++++++++++++++++++++++++----------------
+ kernel/time/timer.c | 96 +++++++++++++++++++++++++++++++++++++----------------
  1 file changed, 67 insertions(+), 29 deletions(-)
 
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index 06ccccfd4130..f20bbcce2178 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
-@@ -206,6 +206,8 @@ struct timer_base {
- 	bool			is_idle;
+@@ -207,6 +207,8 @@ struct timer_base {
+ 	bool			must_forward_clk;
  	DECLARE_BITMAP(pending_map, WHEEL_SIZE);
  	struct hlist_head	vectors[WHEEL_SIZE];
 +	struct hlist_head	expired_lists[LVL_DEPTH];
@@ -44,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  } ____cacheline_aligned;
  
  static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]);
-@@ -1353,7 +1355,8 @@ static void call_timer_fn(struct timer_l
+@@ -1366,7 +1368,8 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long),
  	}
  }
  
@@ -54,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	while (!hlist_empty(head)) {
  		struct timer_list *timer;
-@@ -1384,21 +1387,38 @@ static void expire_timers(struct timer_b
+@@ -1397,21 +1400,38 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head)
  	}
  }
  
@@ -98,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  		/* Is it time to look at the next level? */
  		if (clk & LVL_CLK_MASK)
-@@ -1406,7 +1426,6 @@ static int __collect_expired_timers(stru
+@@ -1419,7 +1439,6 @@ static int __collect_expired_timers(struct timer_base *base,
  		/* Shift clock for the next level granularity */
  		clk >>= LVL_CLK_SHIFT;
  	}
@@ -106,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  #ifdef CONFIG_NO_HZ_COMMON
-@@ -1599,8 +1618,7 @@ void timer_clear_idle(void)
+@@ -1618,8 +1637,7 @@ void timer_clear_idle(void)
  	base->is_idle = false;
  }
  
@@ -116,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	/*
  	 * NOHZ optimization. After a long idle sleep we need to forward the
-@@ -1617,20 +1635,49 @@ static int collect_expired_timers(struct
+@@ -1636,20 +1654,49 @@ static int collect_expired_timers(struct timer_base *base,
  		if (time_after(next, jiffies)) {
  			/* The call site will increment clock! */
  			base->clk = jiffies - 1;
@@ -171,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Called from the timer interrupt handler to charge one tick to the current
   * process.  user_tick is 1 if the tick is user time, 0 for system.
-@@ -1657,22 +1704,11 @@ void update_process_times(int user_tick)
+@@ -1676,22 +1723,11 @@ void update_process_times(int user_tick)
   */
  static inline void __run_timers(struct timer_base *base)
  {
@@ -196,7 +198,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&base->lock);
  	wakeup_timer_waiters(base);
  }
-@@ -1698,12 +1734,12 @@ void run_local_timers(void)
+@@ -1730,12 +1766,12 @@ void run_local_timers(void)
  
  	hrtimer_run_queues();
  	/* Raise the softirq only if required. */
@@ -211,7 +213,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			return;
  	}
  	raise_softirq(TIMER_SOFTIRQ);
-@@ -1873,6 +1909,7 @@ int timers_dead_cpu(unsigned int cpu)
+@@ -1905,6 +1941,7 @@ int timers_dead_cpu(unsigned int cpu)
  		raw_spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);
  
  		BUG_ON(old_base->running_timer);
@@ -219,7 +221,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		for (i = 0; i < WHEEL_SIZE; i++)
  			migrate_timer_list(new_base, old_base->vectors + i);
-@@ -1899,6 +1936,7 @@ static void __init init_timer_cpu(int cp
+@@ -1931,6 +1968,7 @@ static void __init init_timer_cpu(int cpu)
  #ifdef CONFIG_PREEMPT_RT_FULL
  		init_swait_queue_head(&base->wait_for_running_timer);
  #endif
diff --git a/debian/patches/features/all/rt/Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch b/debian/patches/features/all/rt/0166-Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
similarity index 83%
rename from debian/patches/features/all/rt/Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
rename to debian/patches/features/all/rt/0166-Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
index ed7274e..1fcb986 100644
--- a/debian/patches/features/all/rt/Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
+++ b/debian/patches/features/all/rt/0166-Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
@@ -1,8 +1,7 @@
-From 16145f9c01a2e671aceb731050de9fbf977d31d0 Mon Sep 17 00:00:00 2001
 From: Anna-Maria Gleixner <anna-maria at linutronix.de>
 Date: Fri, 26 May 2017 19:16:07 +0200
-Subject: [PATCH] Revert "timers: Don't wake ktimersoftd on every tick"
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 166/332] Revert "timers: Don't wake ktimersoftd on every tick"
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1773651d605951b3ef44422554ff6fc17b727699
 
 This reverts commit 032f93cae150a ("timers: Don't wake ktimersoftd on
 every tick").
@@ -19,13 +18,15 @@ canceled the removal operation will result in a hlist corruption.
 Signed-off-by: Anna-Maria Gleixner <anna-maria at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/timer.c |   96 +++++++++++++++-------------------------------------
+ kernel/time/timer.c | 96 ++++++++++++++++-------------------------------------
  1 file changed, 29 insertions(+), 67 deletions(-)
 
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index f20bbcce2178..06ccccfd4130 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
-@@ -206,8 +206,6 @@ struct timer_base {
- 	bool			is_idle;
+@@ -207,8 +207,6 @@ struct timer_base {
+ 	bool			must_forward_clk;
  	DECLARE_BITMAP(pending_map, WHEEL_SIZE);
  	struct hlist_head	vectors[WHEEL_SIZE];
 -	struct hlist_head	expired_lists[LVL_DEPTH];
@@ -33,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  } ____cacheline_aligned;
  
  static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]);
-@@ -1355,8 +1353,7 @@ static void call_timer_fn(struct timer_l
+@@ -1368,8 +1366,7 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long),
  	}
  }
  
@@ -43,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	while (!hlist_empty(head)) {
  		struct timer_list *timer;
-@@ -1387,38 +1384,21 @@ static inline void __expire_timers(struc
+@@ -1400,38 +1397,21 @@ static inline void __expire_timers(struct timer_base *base,
  	}
  }
  
@@ -87,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  		/* Is it time to look at the next level? */
  		if (clk & LVL_CLK_MASK)
-@@ -1426,6 +1406,7 @@ static void __collect_expired_timers(str
+@@ -1439,6 +1419,7 @@ static void __collect_expired_timers(struct timer_base *base)
  		/* Shift clock for the next level granularity */
  		clk >>= LVL_CLK_SHIFT;
  	}
@@ -95,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  #ifdef CONFIG_NO_HZ_COMMON
-@@ -1618,7 +1599,8 @@ void timer_clear_idle(void)
+@@ -1637,7 +1618,8 @@ void timer_clear_idle(void)
  	base->is_idle = false;
  }
  
@@ -105,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	/*
  	 * NOHZ optimization. After a long idle sleep we need to forward the
-@@ -1635,49 +1617,20 @@ static void collect_expired_timers(struc
+@@ -1654,49 +1636,20 @@ static void collect_expired_timers(struct timer_base *base)
  		if (time_after(next, jiffies)) {
  			/* The call site will increment clock! */
  			base->clk = jiffies - 1;
@@ -160,7 +161,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Called from the timer interrupt handler to charge one tick to the current
   * process.  user_tick is 1 if the tick is user time, 0 for system.
-@@ -1704,11 +1657,22 @@ void update_process_times(int user_tick)
+@@ -1723,11 +1676,22 @@ void update_process_times(int user_tick)
   */
  static inline void __run_timers(struct timer_base *base)
  {
@@ -185,7 +186,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	raw_spin_unlock_irq(&base->lock);
  	wakeup_timer_waiters(base);
  }
-@@ -1734,12 +1698,12 @@ void run_local_timers(void)
+@@ -1766,12 +1730,12 @@ void run_local_timers(void)
  
  	hrtimer_run_queues();
  	/* Raise the softirq only if required. */
@@ -200,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			return;
  	}
  	raise_softirq(TIMER_SOFTIRQ);
-@@ -1909,7 +1873,6 @@ int timers_dead_cpu(unsigned int cpu)
+@@ -1941,7 +1905,6 @@ int timers_dead_cpu(unsigned int cpu)
  		raw_spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING);
  
  		BUG_ON(old_base->running_timer);
@@ -208,7 +209,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		for (i = 0; i < WHEEL_SIZE; i++)
  			migrate_timer_list(new_base, old_base->vectors + i);
-@@ -1936,7 +1899,6 @@ static void __init init_timer_cpu(int cp
+@@ -1968,7 +1931,6 @@ static void __init init_timer_cpu(int cpu)
  #ifdef CONFIG_PREEMPT_RT_FULL
  		init_swait_queue_head(&base->wait_for_running_timer);
  #endif
diff --git a/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch b/debian/patches/features/all/rt/0167-rtmutex-trylock-is-okay-on-RT.patch
similarity index 67%
rename from debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch
rename to debian/patches/features/all/rt/0167-rtmutex-trylock-is-okay-on-RT.patch
index 637a412..efbca2b 100644
--- a/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch
+++ b/debian/patches/features/all/rt/0167-rtmutex-trylock-is-okay-on-RT.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
-Date: Wed 02 Dec 2015 11:34:07 +0100
-Subject: rtmutex: trylock is okay on -RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 2 Dec 2015 11:34:07 +0100
+Subject: [PATCH 167/332] rtmutex: trylock is okay on -RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1302ccf7c6ae5323b617fb7ca147be9bd15c6fee
 
 non-RT kernel could deadlock on rt_mutex_trylock() in softirq context. On
 -RT we don't run softirqs in IRQ context but in thread context so it is
@@ -9,9 +9,11 @@ not a issue here.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c |    4 ++++
+ kernel/locking/rtmutex.c | 4 ++++
  1 file changed, 4 insertions(+)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 5138805ee66c..4b6fdcd827f5 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
 @@ -1545,7 +1545,11 @@ EXPORT_SYMBOL_GPL(rt_mutex_timed_lock);
diff --git a/debian/patches/features/all/rt/gpu_don_t_check_for_the_lock_owner.patch b/debian/patches/features/all/rt/0168-gpu-don-t-check-for-the-lock-owner.patch
similarity index 58%
rename from debian/patches/features/all/rt/gpu_don_t_check_for_the_lock_owner.patch
rename to debian/patches/features/all/rt/0168-gpu-don-t-check-for-the-lock-owner.patch
index 08fd8b2..9ed3a2e 100644
--- a/debian/patches/features/all/rt/gpu_don_t_check_for_the_lock_owner.patch
+++ b/debian/patches/features/all/rt/0168-gpu-don-t-check-for-the-lock-owner.patch
@@ -1,17 +1,19 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: gpu: don't check for the lock owner.
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 168/332] gpu: don't check for the lock owner.
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=13b42f91483445f2df2121f36fff59905254f5e2
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/gpu/drm/i915/i915_gem_shrinker.c |    2 +-
- drivers/gpu/drm/msm/msm_gem_shrinker.c   |    2 +-
+ drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +-
+ drivers/gpu/drm/msm/msm_gem_shrinker.c   | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
+index 755d78832a66..97fb03dc4971 100644
 --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
 +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
-@@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mu
+@@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
  	if (!mutex_is_locked(mutex))
  		return false;
  
@@ -20,9 +22,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return mutex->owner == task;
  #else
  	/* Since UP may be pre-empted, we cannot assume that we own the lock */
+diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
+index 192b2d3a79cb..d5372a207326 100644
 --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
 +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
-@@ -23,7 +23,7 @@ static bool mutex_is_locked_by(struct mu
+@@ -23,7 +23,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
  	if (!mutex_is_locked(mutex))
  		return false;
  
diff --git a/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch b/debian/patches/features/all/rt/0169-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
similarity index 74%
rename from debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
rename to debian/patches/features/all/rt/0169-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
index ddc78f9..d8992c2 100644
--- a/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
+++ b/debian/patches/features/all/rt/0169-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 15 Sep 2016 10:51:27 +0200
-Subject: [PATCH] fs/nfs: turn rmdir_sem into a semaphore
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 169/332] fs/nfs: turn rmdir_sem into a semaphore
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f0a051da3f07c6d51e697793fc74eb6ccfec83e7
 
 The RW semaphore had a reader side which used the _non_owner version
 because it most likely took the reader lock in one thread and released it
@@ -14,15 +14,17 @@ multiple readers anyway so that is not a loss.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/nfs/dir.c           |    8 ++++++++
- fs/nfs/inode.c         |    4 ++++
- fs/nfs/unlink.c        |   31 +++++++++++++++++++++++++++----
- include/linux/nfs_fs.h |    4 ++++
+ fs/nfs/dir.c           |  8 ++++++++
+ fs/nfs/inode.c         |  4 ++++
+ fs/nfs/unlink.c        | 31 +++++++++++++++++++++++++++----
+ include/linux/nfs_fs.h |  4 ++++
  4 files changed, 43 insertions(+), 4 deletions(-)
 
+diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
+index d04ec3814779..63ed5180e544 100644
 --- a/fs/nfs/dir.c
 +++ b/fs/nfs/dir.c
-@@ -1802,7 +1802,11 @@ int nfs_rmdir(struct inode *dir, struct
+@@ -1806,7 +1806,11 @@ int nfs_rmdir(struct inode *dir, struct dentry *dentry)
  
  	trace_nfs_rmdir_enter(dir, dentry);
  	if (d_really_is_positive(dentry)) {
@@ -34,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name);
  		/* Ensure the VFS deletes this inode */
  		switch (error) {
-@@ -1812,7 +1816,11 @@ int nfs_rmdir(struct inode *dir, struct
+@@ -1816,7 +1820,11 @@ int nfs_rmdir(struct inode *dir, struct dentry *dentry)
  		case -ENOENT:
  			nfs_dentry_handle_enoent(dentry);
  		}
@@ -46,6 +48,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	} else
  		error = NFS_PROTO(dir)->rmdir(dir, &dentry->d_name);
  	trace_nfs_rmdir_exit(dir, dentry, error);
+diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
+index 76ae25661d3f..89159d298278 100644
 --- a/fs/nfs/inode.c
 +++ b/fs/nfs/inode.c
 @@ -1957,7 +1957,11 @@ static void init_once(void *foo)
@@ -60,9 +64,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	nfs4_init_once(nfsi);
  }
  
+diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
+index 191aa577dd1f..0165a95823c2 100644
 --- a/fs/nfs/unlink.c
 +++ b/fs/nfs/unlink.c
-@@ -51,6 +51,29 @@ static void nfs_async_unlink_done(struct
+@@ -51,6 +51,29 @@ static void nfs_async_unlink_done(struct rpc_task *task, void *calldata)
  		rpc_restart_call_prepare(task);
  }
  
@@ -92,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * nfs_async_unlink_release - Release the sillydelete data.
   * @task: rpc_task of the sillydelete
-@@ -64,7 +87,7 @@ static void nfs_async_unlink_release(voi
+@@ -64,7 +87,7 @@ static void nfs_async_unlink_release(void *calldata)
  	struct dentry *dentry = data->dentry;
  	struct super_block *sb = dentry->d_sb;
  
@@ -101,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	d_lookup_done(dentry);
  	nfs_free_unlinkdata(data);
  	dput(dentry);
-@@ -117,10 +140,10 @@ static int nfs_call_unlink(struct dentry
+@@ -117,10 +140,10 @@ static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data)
  	struct inode *dir = d_inode(dentry->d_parent);
  	struct dentry *alias;
  
@@ -114,7 +120,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		return 0;
  	}
  	if (!d_in_lookup(alias)) {
-@@ -142,7 +165,7 @@ static int nfs_call_unlink(struct dentry
+@@ -142,7 +165,7 @@ static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data)
  			ret = 0;
  		spin_unlock(&alias->d_lock);
  		dput(alias);
@@ -123,6 +129,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/*
  		 * If we'd displaced old cached devname, free it.  At that
  		 * point dentry is definitely not a root, so we won't need
+diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
+index 810124b33327..d54ca43d571f 100644
 --- a/include/linux/nfs_fs.h
 +++ b/include/linux/nfs_fs.h
 @@ -165,7 +165,11 @@ struct nfs_inode {
diff --git a/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch b/debian/patches/features/all/rt/0170-rtmutex-Handle-the-various-new-futex-race-conditions.patch
similarity index 80%
rename from debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch
rename to debian/patches/features/all/rt/0170-rtmutex-Handle-the-various-new-futex-race-conditions.patch
index 07ab8fd..2feaad8 100644
--- a/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch
+++ b/debian/patches/features/all/rt/0170-rtmutex-Handle-the-various-new-futex-race-conditions.patch
@@ -1,7 +1,7 @@
-Subject: rtmutex: Handle the various new futex race conditions
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 10 Jun 2011 11:04:15 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 170/332] rtmutex: Handle the various new futex race conditions
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=eb4c7cfa24dfa7ae7d2805ca9718678fca9ef998
 
 RT opens a few new interesting race conditions in the rtmutex/futex
 combo due to futex hash bucket lock being a 'sleeping' spinlock and
@@ -9,14 +9,16 @@ therefor not disabling preemption.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/futex.c                  |   77 ++++++++++++++++++++++++++++++++--------
- kernel/locking/rtmutex.c        |   37 ++++++++++++++++---
- kernel/locking/rtmutex_common.h |    2 +
+ kernel/futex.c                  | 77 +++++++++++++++++++++++++++++++++--------
+ kernel/locking/rtmutex.c        | 37 ++++++++++++++++----
+ kernel/locking/rtmutex_common.h |  2 ++
  3 files changed, 95 insertions(+), 21 deletions(-)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index 1ec1a9910beb..a9400070c61c 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -2011,6 +2011,16 @@ static int futex_requeue(u32 __user *uad
+@@ -2012,6 +2012,16 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags,
  				requeue_pi_wake_futex(this, &key2, hb2);
  				drop_count++;
  				continue;
@@ -33,7 +35,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			} else if (ret) {
  				/*
  				 * rt_mutex_start_proxy_lock() detected a
-@@ -2996,7 +3006,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -2997,7 +3007,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  	struct hrtimer_sleeper timeout, *to = NULL;
  	struct futex_pi_state *pi_state = NULL;
  	struct rt_mutex_waiter rt_waiter;
@@ -42,7 +44,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	union futex_key key2 = FUTEX_KEY_INIT;
  	struct futex_q q = futex_q_init;
  	int res, ret;
-@@ -3052,20 +3062,55 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3053,20 +3063,55 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  	/* Queue the futex_q, drop the hb lock, wait for wakeup. */
  	futex_wait_queue_me(hb, &q, to);
  
@@ -109,7 +111,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Check if the requeue code acquired the second futex for us. */
  	if (!q.rt_waiter) {
-@@ -3074,7 +3119,8 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3075,7 +3120,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		 * did a lock-steal - fix up the PI-state in that case.
  		 */
  		if (q.pi_state && (q.pi_state->owner != current)) {
@@ -119,7 +121,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			ret = fixup_pi_state_owner(uaddr2, &q, current);
  			if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) {
  				pi_state = q.pi_state;
-@@ -3085,7 +3131,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3086,7 +3132,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  			 * the requeue_pi() code acquired for us.
  			 */
  			put_pi_state(q.pi_state);
@@ -128,7 +130,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  	} else {
  		struct rt_mutex *pi_mutex;
-@@ -3099,7 +3145,8 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3100,7 +3146,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  		pi_mutex = &q.pi_state->pi_mutex;
  		ret = rt_mutex_wait_proxy_lock(pi_mutex, to, &rt_waiter);
  
@@ -138,9 +140,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, &rt_waiter))
  			ret = 0;
  
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 4b6fdcd827f5..f7c04781cec3 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -133,6 +133,11 @@ static void fixup_rt_mutex_waiters(struc
+@@ -133,6 +133,11 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock)
  		WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS);
  }
  
@@ -162,7 +166,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -525,7 +531,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -525,7 +531,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  	 * reached or the state of the chain has changed while we
  	 * dropped the locks.
  	 */
@@ -171,7 +175,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		goto out_unlock_pi;
  
  	/*
-@@ -961,6 +967,23 @@ static int task_blocks_on_rt_mutex(struc
+@@ -961,6 +967,23 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  		return -EDEADLK;
  
  	raw_spin_lock(&task->pi_lock);
@@ -195,7 +199,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	rt_mutex_adjust_prio(task);
  	waiter->task = task;
  	waiter->lock = lock;
-@@ -985,7 +1008,7 @@ static int task_blocks_on_rt_mutex(struc
+@@ -985,7 +1008,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
  		rt_mutex_enqueue_pi(owner, waiter);
  
  		rt_mutex_adjust_prio(owner);
@@ -204,7 +208,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			chain_walk = 1;
  	} else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) {
  		chain_walk = 1;
-@@ -1081,7 +1104,7 @@ static void remove_waiter(struct rt_mute
+@@ -1081,7 +1104,7 @@ static void remove_waiter(struct rt_mutex *lock,
  {
  	bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock));
  	struct task_struct *owner = rt_mutex_owner(lock);
@@ -213,7 +217,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	lockdep_assert_held(&lock->wait_lock);
  
-@@ -1107,7 +1130,8 @@ static void remove_waiter(struct rt_mute
+@@ -1107,7 +1130,8 @@ static void remove_waiter(struct rt_mutex *lock,
  	rt_mutex_adjust_prio(owner);
  
  	/* Store the lock on which owner is blocked or NULL */
@@ -223,7 +227,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	raw_spin_unlock(&owner->pi_lock);
  
-@@ -1143,7 +1167,8 @@ void rt_mutex_adjust_pi(struct task_stru
+@@ -1143,7 +1167,8 @@ void rt_mutex_adjust_pi(struct task_struct *task)
  	raw_spin_lock_irqsave(&task->pi_lock, flags);
  
  	waiter = task->pi_blocked_on;
@@ -233,6 +237,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		raw_spin_unlock_irqrestore(&task->pi_lock, flags);
  		return;
  	}
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 722e3cf38acf..be1c0171f647 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
 @@ -99,6 +99,8 @@ enum rtmutex_chainwalk {
diff --git a/debian/patches/features/all/rt/futex-requeue-pi-fix.patch b/debian/patches/features/all/rt/0171-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch
similarity index 83%
rename from debian/patches/features/all/rt/futex-requeue-pi-fix.patch
rename to debian/patches/features/all/rt/0171-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch
index ca48902..878423d 100644
--- a/debian/patches/features/all/rt/futex-requeue-pi-fix.patch
+++ b/debian/patches/features/all/rt/0171-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch
@@ -1,7 +1,7 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: futex: Fix bug on when a requeued RT task times out
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 171/332] futex: Fix bug on when a requeued RT task times out
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=856ad3cdaf4142a6ec6c1633c15dd40938e52336
 
 Requeue with timeout causes a bug with PREEMPT_RT_FULL.
 
@@ -17,7 +17,7 @@ The bug comes from a timed out condition.
 					double_lock_hb();
 
 	raw_spin_lock(pi_lock);
-	if (current->pi_blocked_on) { 
+	if (current->pi_blocked_on) {
 	} else {
 	    current->pi_blocked_on = PI_WAKE_INPROGRESS;
 	    run_spin_unlock(pi_lock);
@@ -50,13 +50,15 @@ appropriately.
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/locking/rtmutex.c        |   32 +++++++++++++++++++++++++++++++-
- kernel/locking/rtmutex_common.h |    1 +
+ kernel/locking/rtmutex.c        | 32 +++++++++++++++++++++++++++++++-
+ kernel/locking/rtmutex_common.h |  1 +
  2 files changed, 32 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index f7c04781cec3..eb38fc5f3d49 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -135,7 +135,8 @@ static void fixup_rt_mutex_waiters(struc
+@@ -135,7 +135,8 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock)
  
  static int rt_mutex_real_waiter(struct rt_mutex_waiter *waiter)
  {
@@ -66,7 +68,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1712,6 +1713,35 @@ int __rt_mutex_start_proxy_lock(struct r
+@@ -1712,6 +1713,35 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  	if (try_to_take_rt_mutex(lock, task, NULL))
  		return 1;
  
@@ -102,6 +104,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/* We enforce deadlock detection for futexes */
  	ret = task_blocks_on_rt_mutex(lock, waiter, task,
  				      RT_MUTEX_FULL_CHAINWALK);
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index be1c0171f647..0bb2a07c0566 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
 @@ -100,6 +100,7 @@ enum rtmutex_chainwalk {
diff --git a/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/debian/patches/features/all/rt/0172-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
similarity index 75%
rename from debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
rename to debian/patches/features/all/rt/0172-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
index e6fa03f..cbda04e 100644
--- a/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
+++ b/debian/patches/features/all/rt/0172-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
@@ -1,7 +1,8 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 1 Mar 2013 11:17:42 +0100
-Subject: futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 172/332] futex: Ensure lock/unlock symetry versus pi_lock and
+ hash bucket lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=73575478df5d9eae1154fea61920d976069c137c
 
 In exit_pi_state_list() we have the following locking construct:
 
@@ -26,12 +27,14 @@ Reported-by: Yong Zhang <yong.zhang at windriver.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/futex.c |    2 ++
+ kernel/futex.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/kernel/futex.c b/kernel/futex.c
+index a9400070c61c..b6c06e5886e5 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -909,7 +909,9 @@ void exit_pi_state_list(struct task_stru
+@@ -910,7 +910,9 @@ void exit_pi_state_list(struct task_struct *curr)
  		 * task still owns the PI-state:
  		 */
  		if (head->next != next) {
diff --git a/debian/patches/features/all/rt/pid.h-include-atomic.h.patch b/debian/patches/features/all/rt/0173-pid.h-include-atomic.h.patch
similarity index 75%
rename from debian/patches/features/all/rt/pid.h-include-atomic.h.patch
rename to debian/patches/features/all/rt/0173-pid.h-include-atomic.h.patch
index ae4fd7c..f5b1f99 100644
--- a/debian/patches/features/all/rt/pid.h-include-atomic.h.patch
+++ b/debian/patches/features/all/rt/0173-pid.h-include-atomic.h.patch
@@ -1,7 +1,7 @@
 From: Grygorii Strashko <Grygorii.Strashko at linaro.org>
 Date: Tue, 21 Jul 2015 19:43:56 +0300
-Subject: pid.h: include atomic.h
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 173/332] pid.h: include atomic.h
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cc6007855b2b543f9fa0b2a6b0547ef9130c77e4
 
 This patch fixes build error:
   CC      kernel/pid_namespace.o
@@ -22,9 +22,11 @@ Vanilla gets this via spinlock.h.
 Signed-off-by: Grygorii Strashko <Grygorii.Strashko at linaro.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/pid.h |    1 +
+ include/linux/pid.h | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/include/linux/pid.h b/include/linux/pid.h
+index 97b745ddece5..01a5460a0c85 100644
 --- a/include/linux/pid.h
 +++ b/include/linux/pid.h
 @@ -2,6 +2,7 @@
diff --git a/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch b/debian/patches/features/all/rt/0174-arm-include-definition-for-cpumask_t.patch
similarity index 64%
rename from debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch
rename to debian/patches/features/all/rt/0174-arm-include-definition-for-cpumask_t.patch
index e451b25..b70563d 100644
--- a/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch
+++ b/debian/patches/features/all/rt/0174-arm-include-definition-for-cpumask_t.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 22 Dec 2016 17:28:33 +0100
-Subject: [PATCH] arm: include definition for cpumask_t
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 174/332] arm: include definition for cpumask_t
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4699e9ff440da7ee32efff25e8472f4e93f275a4
 
 This definition gets pulled in by other files. With the (later) split of
 RCU and spinlock.h it won't compile anymore.
@@ -9,9 +9,11 @@ The split is done in ("rbtree: don't include the rcu header").
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/include/asm/irq.h |    2 ++
+ arch/arm/include/asm/irq.h | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
+index e53638c8ed8a..6095a1649865 100644
 --- a/arch/arm/include/asm/irq.h
 +++ b/arch/arm/include/asm/irq.h
 @@ -22,6 +22,8 @@
diff --git a/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch b/debian/patches/features/all/rt/0175-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
similarity index 68%
rename from debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
rename to debian/patches/features/all/rt/0175-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
index 994e906..19f58eb 100644
--- a/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
+++ b/debian/patches/features/all/rt/0175-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
@@ -1,7 +1,8 @@
 From: "Wolfgang M. Reimer" <linuxball at gmail.com>
 Date: Tue, 21 Jul 2015 16:20:07 +0200
-Subject: locking: locktorture: Do NOT include rwlock.h directly
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 175/332] locking: locktorture: Do NOT include rwlock.h
+ directly
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=49e9d9625aedf6196c32f5a2f89fe0535e3111a0
 
 Including rwlock.h directly will cause kernel builds to fail
 if CONFIG_PREEMPT_RT_FULL is defined. The correct header file
@@ -12,9 +13,11 @@ Cc: stable-rt at vger.kernel.org
 Signed-off-by: Wolfgang M. Reimer <linuxball at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/locktorture.c |    1 -
+ kernel/locking/locktorture.c | 1 -
  1 file changed, 1 deletion(-)
 
+diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
+index f8c5af52a131..788068773e61 100644
 --- a/kernel/locking/locktorture.c
 +++ b/kernel/locking/locktorture.c
 @@ -26,7 +26,6 @@
diff --git a/debian/patches/features/all/rt/rtmutex-lock-killable.patch b/debian/patches/features/all/rt/0176-rtmutex-Add-rtmutex_lock_killable.patch
similarity index 64%
rename from debian/patches/features/all/rt/rtmutex-lock-killable.patch
rename to debian/patches/features/all/rt/0176-rtmutex-Add-rtmutex_lock_killable.patch
index 56cf9f6..2bf4c41 100644
--- a/debian/patches/features/all/rt/rtmutex-lock-killable.patch
+++ b/debian/patches/features/all/rt/0176-rtmutex-Add-rtmutex_lock_killable.patch
@@ -1,20 +1,22 @@
-Subject: rtmutex: Add rtmutex_lock_killable()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Thu, 09 Jun 2011 11:43:52 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Thu, 9 Jun 2011 11:43:52 +0200
+Subject: [PATCH 176/332] rtmutex: Add rtmutex_lock_killable()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=eb7d5ae405ab25bbe35dde9b678a017ad44ee640
 
 Add "killable" type to rtmutex. We need this since rtmutex are used as
 "normal" mutexes which do use this type.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/rtmutex.h  |    1 +
- kernel/locking/rtmutex.c |   19 +++++++++++++++++++
+ include/linux/rtmutex.h  |  1 +
+ kernel/locking/rtmutex.c | 19 +++++++++++++++++++
  2 files changed, 20 insertions(+)
 
+diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
+index 1abba5ce2a2f..51dc12e3860c 100644
 --- a/include/linux/rtmutex.h
 +++ b/include/linux/rtmutex.h
-@@ -91,6 +91,7 @@ extern void rt_mutex_destroy(struct rt_m
+@@ -91,6 +91,7 @@ extern void rt_mutex_destroy(struct rt_mutex *lock);
  
  extern void rt_mutex_lock(struct rt_mutex *lock);
  extern int rt_mutex_lock_interruptible(struct rt_mutex *lock);
@@ -22,12 +24,15 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern int rt_mutex_timed_lock(struct rt_mutex *lock,
  			       struct hrtimer_sleeper *timeout);
  
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index eb38fc5f3d49..d2eb3db18563 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1535,6 +1535,25 @@ int __sched rt_mutex_futex_trylock(struc
+@@ -1534,6 +1534,25 @@ int __sched rt_mutex_futex_trylock(struct rt_mutex *lock)
+ 	return rt_mutex_slowtrylock(lock);
  }
  
- /**
++/**
 + * rt_mutex_lock_killable - lock a rt_mutex killable
 + *
 + * @lock:              the rt_mutex to be locked
@@ -46,7 +51,6 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +EXPORT_SYMBOL_GPL(rt_mutex_lock_killable);
 +
-+/**
+ /**
   * rt_mutex_timed_lock - lock a rt_mutex interruptible
   *			the timeout structure is provided
-  *			by the caller
diff --git a/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch b/debian/patches/features/all/rt/0177-rtmutex-Make-lock_killable-work.patch
similarity index 71%
rename from debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch
rename to debian/patches/features/all/rt/0177-rtmutex-Make-lock_killable-work.patch
index 676e9d2..7e1ed97 100644
--- a/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch
+++ b/debian/patches/features/all/rt/0177-rtmutex-Make-lock_killable-work.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 1 Apr 2017 12:50:59 +0200
-Subject: [PATCH] rtmutex: Make lock_killable work
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 177/332] rtmutex: Make lock_killable work
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=535add2005361aaf32f0c006eac0a8925fb79ca3
 
 Locking an rt mutex killable does not work because signal handling is
 restricted to TASK_INTERRUPTIBLE.
@@ -12,12 +12,14 @@ Cc: rt-stable at vger.kernel.org
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   19 +++++++------------
+ kernel/locking/rtmutex.c | 19 +++++++------------
  1 file changed, 7 insertions(+), 12 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index d2eb3db18563..9d664eee062f 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1213,18 +1213,13 @@ static int __sched
+@@ -1213,18 +1213,13 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
  		if (try_to_take_rt_mutex(lock, current, waiter))
  			break;
  
diff --git a/debian/patches/features/all/rt/spinlock-types-separate-raw.patch b/debian/patches/features/all/rt/0178-spinlock-Split-the-lock-types-header.patch
similarity index 82%
rename from debian/patches/features/all/rt/spinlock-types-separate-raw.patch
rename to debian/patches/features/all/rt/0178-spinlock-Split-the-lock-types-header.patch
index d10dd0a..5c7b2eb 100644
--- a/debian/patches/features/all/rt/spinlock-types-separate-raw.patch
+++ b/debian/patches/features/all/rt/0178-spinlock-Split-the-lock-types-header.patch
@@ -1,7 +1,7 @@
-Subject: spinlock: Split the lock types header
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 29 Jun 2011 19:34:01 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 178/332] spinlock: Split the lock types header
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0765c1b3a6a4ae69c9161344bf033983c18143e9
 
 Split raw_spinlock into its own file and the remaining spinlock_t into
 its own non-RT header. The non-RT header will be replaced later by sleeping
@@ -9,12 +9,16 @@ spinlocks.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/rwlock_types.h        |    4 +
- include/linux/spinlock_types.h      |   74 ------------------------------------
- include/linux/spinlock_types_nort.h |   33 ++++++++++++++++
- include/linux/spinlock_types_raw.h  |   56 +++++++++++++++++++++++++++
+ include/linux/rwlock_types.h        |  4 ++
+ include/linux/spinlock_types.h      | 74 +------------------------------------
+ include/linux/spinlock_types_nort.h | 33 +++++++++++++++++
+ include/linux/spinlock_types_raw.h  | 56 ++++++++++++++++++++++++++++
  4 files changed, 95 insertions(+), 72 deletions(-)
+ create mode 100644 include/linux/spinlock_types_nort.h
+ create mode 100644 include/linux/spinlock_types_raw.h
 
+diff --git a/include/linux/rwlock_types.h b/include/linux/rwlock_types.h
+index cc0072e93e36..5317cd957292 100644
 --- a/include/linux/rwlock_types.h
 +++ b/include/linux/rwlock_types.h
 @@ -1,6 +1,10 @@
@@ -28,6 +32,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * include/linux/rwlock_types.h - generic rwlock type definitions
   *				  and initializers
+diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h
+index 73548eb13a5d..5c8664d57fb8 100644
 --- a/include/linux/spinlock_types.h
 +++ b/include/linux/spinlock_types.h
 @@ -9,79 +9,9 @@
@@ -112,6 +118,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #include <linux/rwlock_types.h>
  
+diff --git a/include/linux/spinlock_types_nort.h b/include/linux/spinlock_types_nort.h
+new file mode 100644
+index 000000000000..f1dac1fb1d6a
 --- /dev/null
 +++ b/include/linux/spinlock_types_nort.h
 @@ -0,0 +1,33 @@
@@ -148,6 +157,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +#define DEFINE_SPINLOCK(x)	spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
 +
 +#endif
+diff --git a/include/linux/spinlock_types_raw.h b/include/linux/spinlock_types_raw.h
+new file mode 100644
+index 000000000000..edffc4d53fc9
 --- /dev/null
 +++ b/include/linux/spinlock_types_raw.h
 @@ -0,0 +1,56 @@
diff --git a/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch b/debian/patches/features/all/rt/0179-rtmutex-Avoid-include-hell.patch
similarity index 64%
rename from debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch
rename to debian/patches/features/all/rt/0179-rtmutex-Avoid-include-hell.patch
index e6476be..3b50719 100644
--- a/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch
+++ b/debian/patches/features/all/rt/0179-rtmutex-Avoid-include-hell.patch
@@ -1,16 +1,18 @@
-Subject: rtmutex: Avoid include hell
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 29 Jun 2011 20:06:39 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 179/332] rtmutex: Avoid include hell
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f864bc4ab7e1c4ef4e807793d18887da1ba57152
 
 Include only the required raw types. This avoids pulling in the
 complete spinlock header which in turn requires rtmutex.h at some point.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/rtmutex.h |    2 +-
+ include/linux/rtmutex.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
+index 51dc12e3860c..2ed41c408043 100644
 --- a/include/linux/rtmutex.h
 +++ b/include/linux/rtmutex.h
 @@ -14,7 +14,7 @@
diff --git a/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch b/debian/patches/features/all/rt/0180-rbtree-don-t-include-the-rcu-header.patch
similarity index 85%
rename from debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch
rename to debian/patches/features/all/rt/0180-rbtree-don-t-include-the-rcu-header.patch
index be7709f..6605fd2 100644
--- a/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch
+++ b/debian/patches/features/all/rt/0180-rbtree-don-t-include-the-rcu-header.patch
@@ -1,6 +1,10 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
-Subject: rbtree: don't include the rcu header
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 23 Jun 2017 16:22:02 +0200
+Subject: [PATCH 180/332] rbtree: don't include the rcu header
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0e1f91f026761362bcce6039315a34c8166f20f1
 
 The RCU header pulls in spinlock.h and fails due not yet defined types:
 
@@ -19,11 +23,14 @@ a new header file which can be included by both users.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/rbtree.h             |    2 -
- include/linux/rcu_assign_pointer.h |   54 +++++++++++++++++++++++++++++++++++++
- include/linux/rcupdate.h           |   49 ---------------------------------
+ include/linux/rbtree.h             |  2 +-
+ include/linux/rcu_assign_pointer.h | 54 ++++++++++++++++++++++++++++++++++++++
+ include/linux/rcupdate.h           | 49 +---------------------------------
  3 files changed, 56 insertions(+), 49 deletions(-)
+ create mode 100644 include/linux/rcu_assign_pointer.h
 
+diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
+index e585018498d5..25c64474fc27 100644
 --- a/include/linux/rbtree.h
 +++ b/include/linux/rbtree.h
 @@ -31,7 +31,7 @@
@@ -35,6 +42,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  struct rb_node {
  	unsigned long  __rb_parent_color;
+diff --git a/include/linux/rcu_assign_pointer.h b/include/linux/rcu_assign_pointer.h
+new file mode 100644
+index 000000000000..7066962a4379
 --- /dev/null
 +++ b/include/linux/rcu_assign_pointer.h
 @@ -0,0 +1,54 @@
@@ -92,6 +102,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +})
 +
 +#endif
+diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
+index 00dc4a9474c0..a5b130e22c33 100644
 --- a/include/linux/rcupdate.h
 +++ b/include/linux/rcupdate.h
 @@ -46,6 +46,7 @@
@@ -102,10 +114,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include <asm/barrier.h>
  
-@@ -633,54 +634,6 @@ static inline void rcu_preempt_sleep_che
+@@ -632,54 +633,6 @@ static inline void rcu_preempt_sleep_check(void)
+ 	((typeof(*p) __force __kernel *)(________p1)); \
  })
  
- /**
+-/**
 - * RCU_INITIALIZER() - statically initialize an RCU-protected global variable
 - * @v: The value to statically initialize with.
 - */
@@ -153,7 +166,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -	_r_a_p__v;							      \
 -})
 -
--/**
+ /**
   * rcu_access_pointer() - fetch RCU pointer with no dereferencing
   * @p: The pointer to read
-  *
diff --git a/debian/patches/features/all/rt/rt-add-rt-locks.patch b/debian/patches/features/all/rt/0181-rt-Add-the-preempt-rt-lock-replacement-APIs.patch
similarity index 88%
rename from debian/patches/features/all/rt/rt-add-rt-locks.patch
rename to debian/patches/features/all/rt/0181-rt-Add-the-preempt-rt-lock-replacement-APIs.patch
index d0e1eb2..4f92feb 100644
--- a/debian/patches/features/all/rt/rt-add-rt-locks.patch
+++ b/debian/patches/features/all/rt/0181-rt-Add-the-preempt-rt-lock-replacement-APIs.patch
@@ -1,40 +1,48 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 26 Jul 2009 19:39:56 +0200
-Subject: rt: Add the preempt-rt lock replacement APIs
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 181/332] rt: Add the preempt-rt lock replacement APIs
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=921d099fb1966e762d5bc22b6931eea5453e7996
 
 Map spinlocks, rwlocks, rw_semaphores and semaphores to the rt_mutex
 based locking functions for preempt-rt.
 This also introduces RT's sleeping locks.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/kernel.h            |    4 
- include/linux/locallock.h         |    6 
- include/linux/mutex.h             |   20 -
- include/linux/mutex_rt.h          |   84 ++++++
- include/linux/rtmutex.h           |   29 +-
- include/linux/rwlock_rt.h         |   99 +++++++
- include/linux/rwlock_types_rt.h   |   33 ++
- include/linux/rwsem.h             |    6 
- include/linux/rwsem_rt.h          |  167 ++++++++++++
- include/linux/sched.h             |   19 +
- include/linux/spinlock.h          |   12 
- include/linux/spinlock_api_smp.h  |    4 
- include/linux/spinlock_rt.h       |  162 ++++++++++++
- include/linux/spinlock_types.h    |   11 
- include/linux/spinlock_types_rt.h |   48 +++
- kernel/futex.c                    |   11 
- kernel/locking/Makefile           |    9 
- kernel/locking/rt.c               |  498 ++++++++++++++++++++++++++++++++++++++
- kernel/locking/rtmutex.c          |  479 +++++++++++++++++++++++++++++++++---
- kernel/locking/rtmutex_common.h   |    9 
- kernel/locking/spinlock.c         |    7 
- kernel/locking/spinlock_debug.c   |    5 
- kernel/sched/core.c               |    7 
+ include/linux/kernel.h            |   4 +
+ include/linux/locallock.h         |   6 +
+ include/linux/mutex.h             |  20 +-
+ include/linux/mutex_rt.h          |  84 +++++++
+ include/linux/rtmutex.h           |  29 ++-
+ include/linux/rwlock_rt.h         |  99 ++++++++
+ include/linux/rwlock_types_rt.h   |  33 +++
+ include/linux/rwsem.h             |   6 +
+ include/linux/rwsem_rt.h          | 167 +++++++++++++
+ include/linux/sched.h             |  19 +-
+ include/linux/spinlock.h          |  12 +-
+ include/linux/spinlock_api_smp.h  |   4 +-
+ include/linux/spinlock_rt.h       | 162 +++++++++++++
+ include/linux/spinlock_types.h    |  11 +-
+ include/linux/spinlock_types_rt.h |  48 ++++
+ kernel/futex.c                    |  11 +-
+ kernel/locking/Makefile           |   9 +-
+ kernel/locking/rt.c               | 498 ++++++++++++++++++++++++++++++++++++++
+ kernel/locking/rtmutex.c          | 479 +++++++++++++++++++++++++++++++++---
+ kernel/locking/rtmutex_common.h   |   9 +-
+ kernel/locking/spinlock.c         |   7 +
+ kernel/locking/spinlock_debug.c   |   5 +
+ kernel/sched/core.c               |   7 +-
  23 files changed, 1663 insertions(+), 66 deletions(-)
+ create mode 100644 include/linux/mutex_rt.h
+ create mode 100644 include/linux/rwlock_rt.h
+ create mode 100644 include/linux/rwlock_types_rt.h
+ create mode 100644 include/linux/rwsem_rt.h
+ create mode 100644 include/linux/spinlock_rt.h
+ create mode 100644 include/linux/spinlock_types_rt.h
+ create mode 100644 kernel/locking/rt.c
 
+diff --git a/include/linux/kernel.h b/include/linux/kernel.h
+index cfc57ced1d11..7894d55e4998 100644
 --- a/include/linux/kernel.h
 +++ b/include/linux/kernel.h
 @@ -194,6 +194,9 @@ extern int _cond_resched(void);
@@ -55,6 +63,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  # define sched_annotate_sleep() do { } while (0)
  #endif
  
+diff --git a/include/linux/locallock.h b/include/linux/locallock.h
+index 96f22c568998..845c77f1a5ca 100644
 --- a/include/linux/locallock.h
 +++ b/include/linux/locallock.h
 @@ -42,9 +42,15 @@ struct local_irq_lock {
@@ -73,6 +83,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static inline void __local_lock(struct local_irq_lock *lv)
  {
+diff --git a/include/linux/mutex.h b/include/linux/mutex.h
+index 2cb7531e7d7a..b3fdfc820216 100644
 --- a/include/linux/mutex.h
 +++ b/include/linux/mutex.h
 @@ -19,6 +19,17 @@
@@ -107,7 +119,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define __MUTEX_INITIALIZER(lockname) \
  		{ .count = ATOMIC_INIT(1) \
  		, .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
-@@ -173,6 +177,8 @@ extern int __must_check mutex_lock_killa
+@@ -173,6 +177,8 @@ extern int __must_check mutex_lock_killable(struct mutex *lock);
  extern int mutex_trylock(struct mutex *lock);
  extern void mutex_unlock(struct mutex *lock);
  
@@ -116,6 +128,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
  
  #endif /* __LINUX_MUTEX_H */
+diff --git a/include/linux/mutex_rt.h b/include/linux/mutex_rt.h
+new file mode 100644
+index 000000000000..c38a44b14da5
 --- /dev/null
 +++ b/include/linux/mutex_rt.h
 @@ -0,0 +1,84 @@
@@ -203,6 +218,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +} while (0)
 +
 +#endif
+diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
+index 2ed41c408043..30211c627511 100644
 --- a/include/linux/rtmutex.h
 +++ b/include/linux/rtmutex.h
 @@ -13,11 +13,15 @@
@@ -271,6 +288,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define DEFINE_RT_MUTEX(mutexname) \
  	struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname)
+diff --git a/include/linux/rwlock_rt.h b/include/linux/rwlock_rt.h
+new file mode 100644
+index 000000000000..49ed2d45d3be
 --- /dev/null
 +++ b/include/linux/rwlock_rt.h
 @@ -0,0 +1,99 @@
@@ -373,6 +393,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	} while (0)
 +
 +#endif
+diff --git a/include/linux/rwlock_types_rt.h b/include/linux/rwlock_types_rt.h
+new file mode 100644
+index 000000000000..51b28d775fe1
 --- /dev/null
 +++ b/include/linux/rwlock_types_rt.h
 @@ -0,0 +1,33 @@
@@ -409,6 +432,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	rwlock_t name = __RW_LOCK_UNLOCKED(name)
 +
 +#endif
+diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
+index dd1d14250340..8e1f44ff1f2f 100644
 --- a/include/linux/rwsem.h
 +++ b/include/linux/rwsem.h
 @@ -19,6 +19,10 @@
@@ -422,13 +447,16 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  struct rw_semaphore;
  
  #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
-@@ -184,4 +188,6 @@ extern void up_read_non_owner(struct rw_
+@@ -184,4 +188,6 @@ extern void up_read_non_owner(struct rw_semaphore *sem);
  # define up_read_non_owner(sem)			up_read(sem)
  #endif
  
 +#endif /* !PREEMPT_RT_FULL */
 +
  #endif /* _LINUX_RWSEM_H */
+diff --git a/include/linux/rwsem_rt.h b/include/linux/rwsem_rt.h
+new file mode 100644
+index 000000000000..e26bd95a57c3
 --- /dev/null
 +++ b/include/linux/rwsem_rt.h
 @@ -0,0 +1,167 @@
@@ -599,9 +627,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +#endif
 +#endif
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 9aa9fef1d48d..0fc34f29f28c 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -312,6 +312,11 @@ extern char ___assert_task_state[1 - 2*!
+@@ -311,6 +311,11 @@ extern char ___assert_task_state[1 - 2*!!(
  
  #endif
  
@@ -613,7 +643,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /* Task command name length */
  #define TASK_COMM_LEN 16
  
-@@ -1013,8 +1018,18 @@ struct wake_q_head {
+@@ -1022,8 +1027,18 @@ struct wake_q_head {
  	struct wake_q_head name = { WAKE_Q_TAIL, &name.first }
  
  extern void wake_q_add(struct wake_q_head *head,
@@ -634,9 +664,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * sched-domains (multiprocessor balancing) declarations:
+diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
+index 47dd0cebd204..b241cc044bd3 100644
 --- a/include/linux/spinlock.h
 +++ b/include/linux/spinlock.h
-@@ -271,7 +271,11 @@ static inline void do_raw_spin_unlock(ra
+@@ -271,7 +271,11 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
  #define raw_spin_can_lock(lock)	(!raw_spin_is_locked(lock))
  
  /* Include rwlock functions */
@@ -649,7 +681,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * Pull the _spin_*()/_read_*()/_write_*() functions/declarations:
-@@ -282,6 +286,10 @@ static inline void do_raw_spin_unlock(ra
+@@ -282,6 +286,10 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
  # include <linux/spinlock_api_up.h>
  #endif
  
@@ -660,16 +692,18 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Map the spin_lock functions to the raw variants for PREEMPT_RT=n
   */
-@@ -416,4 +424,6 @@ extern int _atomic_dec_and_lock(atomic_t
+@@ -416,4 +424,6 @@ extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
  #define atomic_dec_and_lock(atomic, lock) \
  		__cond_lock(lock, _atomic_dec_and_lock(atomic, lock))
  
 +#endif /* !PREEMPT_RT_FULL */
 +
  #endif /* __LINUX_SPINLOCK_H */
+diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h
+index 5344268e6e62..043263f30e81 100644
 --- a/include/linux/spinlock_api_smp.h
 +++ b/include/linux/spinlock_api_smp.h
-@@ -189,6 +189,8 @@ static inline int __raw_spin_trylock_bh(
+@@ -189,6 +189,8 @@ static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock)
  	return 0;
  }
  
@@ -679,6 +713,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +#endif
  
  #endif /* __LINUX_SPINLOCK_API_SMP_H */
+diff --git a/include/linux/spinlock_rt.h b/include/linux/spinlock_rt.h
+new file mode 100644
+index 000000000000..43ca841b913a
 --- /dev/null
 +++ b/include/linux/spinlock_rt.h
 @@ -0,0 +1,162 @@
@@ -844,6 +881,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	atomic_dec_and_spin_lock(atomic, lock)
 +
 +#endif
+diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h
+index 5c8664d57fb8..10bac715ea96 100644
 --- a/include/linux/spinlock_types.h
 +++ b/include/linux/spinlock_types.h
 @@ -11,8 +11,13 @@
@@ -863,6 +902,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +#endif
  
  #endif /* __LINUX_SPINLOCK_TYPES_H */
+diff --git a/include/linux/spinlock_types_rt.h b/include/linux/spinlock_types_rt.h
+new file mode 100644
+index 000000000000..3e3d8c5f7a9a
 --- /dev/null
 +++ b/include/linux/spinlock_types_rt.h
 @@ -0,0 +1,48 @@
@@ -914,9 +956,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	spinlock_t name = __SPIN_LOCK_UNLOCKED(name)
 +
 +#endif
+diff --git a/kernel/futex.c b/kernel/futex.c
+index b6c06e5886e5..2e074d63e8fa 100644
 --- a/kernel/futex.c
 +++ b/kernel/futex.c
-@@ -1398,6 +1398,7 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1399,6 +1399,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	struct task_struct *new_owner;
  	bool postunlock = false;
  	WAKE_Q(wake_q);
@@ -924,7 +968,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	int ret = 0;
  
  	new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
-@@ -1459,13 +1460,13 @@ static int wake_futex_pi(u32 __user *uad
+@@ -1460,13 +1461,13 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
  	pi_state->owner = new_owner;
  	raw_spin_unlock(&new_owner->pi_lock);
  
@@ -941,7 +985,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
-@@ -2666,7 +2667,7 @@ static int futex_lock_pi(u32 __user *uad
+@@ -2667,7 +2668,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
  		goto no_block;
  	}
  
@@ -950,7 +994,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * On PREEMPT_RT_FULL, when hb->lock becomes an rt_mutex, we must not
-@@ -3033,7 +3034,7 @@ static int futex_wait_requeue_pi(u32 __u
+@@ -3034,7 +3035,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags,
  	 * The waiter is allocated on our stack, manipulated by the requeue
  	 * code while we sleep on uaddr.
  	 */
@@ -959,6 +1003,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE);
  	if (unlikely(ret != 0))
+diff --git a/kernel/locking/Makefile b/kernel/locking/Makefile
+index 6f88e352cd4f..5e27fb1079e7 100644
 --- a/kernel/locking/Makefile
 +++ b/kernel/locking/Makefile
 @@ -2,7 +2,7 @@
@@ -970,7 +1016,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  ifdef CONFIG_FUNCTION_TRACER
  CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE)
-@@ -11,7 +11,11 @@ CFLAGS_REMOVE_mutex-debug.o = $(CC_FLAGS
+@@ -11,7 +11,11 @@ CFLAGS_REMOVE_mutex-debug.o = $(CC_FLAGS_FTRACE)
  CFLAGS_REMOVE_rtmutex-debug.o = $(CC_FLAGS_FTRACE)
  endif
  
@@ -993,6 +1039,9 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +obj-$(CONFIG_PREEMPT_RT_FULL) += rt.o
  obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o
  obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o
+diff --git a/kernel/locking/rt.c b/kernel/locking/rt.c
+new file mode 100644
+index 000000000000..665754c00e1e
 --- /dev/null
 +++ b/kernel/locking/rt.c
 @@ -0,0 +1,498 @@
@@ -1494,6 +1543,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	return 1;
 +}
 +EXPORT_SYMBOL(atomic_dec_and_mutex_lock);
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 9d664eee062f..b99ddf374df1 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
 @@ -7,6 +7,11 @@
@@ -1508,7 +1559,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   *
   *  See Documentation/locking/rt-mutex-design.txt for details.
   */
-@@ -228,6 +233,8 @@ static inline bool unlock_rt_mutex_safe(
+@@ -228,6 +233,8 @@ static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock,
  }
  #endif
  
@@ -1517,7 +1568,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Only use with rt_mutex_waiter_{less,equal}()
   */
-@@ -236,10 +243,15 @@ static inline bool unlock_rt_mutex_safe(
+@@ -236,10 +243,15 @@ static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock,
  
  static inline int
  rt_mutex_waiter_less(struct rt_mutex_waiter *left,
@@ -1536,7 +1587,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * If both waiters have dl_prio(), we check the deadlines of the
-@@ -283,7 +295,7 @@ rt_mutex_enqueue(struct rt_mutex *lock,
+@@ -283,7 +295,7 @@ rt_mutex_enqueue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter)
  	while (*link) {
  		parent = *link;
  		entry = rb_entry(parent, struct rt_mutex_waiter, tree_entry);
@@ -1545,7 +1596,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			link = &parent->rb_left;
  		} else {
  			link = &parent->rb_right;
-@@ -322,7 +334,7 @@ rt_mutex_enqueue_pi(struct task_struct *
+@@ -322,7 +334,7 @@ rt_mutex_enqueue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter)
  	while (*link) {
  		parent = *link;
  		entry = rb_entry(parent, struct rt_mutex_waiter, pi_tree_entry);
@@ -1554,7 +1605,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			link = &parent->rb_left;
  		} else {
  			link = &parent->rb_right;
-@@ -388,6 +400,14 @@ static bool rt_mutex_cond_detect_deadloc
+@@ -388,6 +400,14 @@ static bool rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter *waiter,
  	return debug_rt_mutex_detect_deadlock(waiter, chwalk);
  }
  
@@ -1569,7 +1620,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Max number of times we'll walk the boosting chain:
   */
-@@ -713,13 +733,16 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -713,13 +733,16 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  	 * follow here. This is the end of the chain we are walking.
  	 */
  	if (!rt_mutex_owner(lock)) {
@@ -1588,7 +1639,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		raw_spin_unlock_irq(&lock->wait_lock);
  		return 0;
  	}
-@@ -812,6 +835,7 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -812,6 +835,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
  	return ret;
  }
  
@@ -1596,7 +1647,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Try to take an rt-mutex
   *
-@@ -822,8 +846,9 @@ static int rt_mutex_adjust_prio_chain(st
+@@ -822,8 +846,9 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
   * @waiter: The waiter that is queued to the lock's wait tree if the
   *	    callsite called task_blocked_on_lock(), otherwise NULL
   */
@@ -1608,7 +1659,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	lockdep_assert_held(&lock->wait_lock);
  
-@@ -862,8 +887,10 @@ static int try_to_take_rt_mutex(struct r
+@@ -862,8 +887,10 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  		 * If waiter is not the highest priority waiter of
  		 * @lock, give up.
  		 */
@@ -1620,7 +1671,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  		/*
  		 * We can acquire the lock. Remove the waiter from the
-@@ -881,15 +908,26 @@ static int try_to_take_rt_mutex(struct r
+@@ -881,15 +908,26 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  		 * not need to be dequeued.
  		 */
  		if (rt_mutex_has_waiters(lock)) {
@@ -1649,7 +1700,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			/*
  			 * The current top waiter stays enqueued. We
  			 * don't have to change anything in the lock
-@@ -936,6 +974,339 @@ static int try_to_take_rt_mutex(struct r
+@@ -936,6 +974,339 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  	return 1;
  }
  
@@ -1989,7 +2040,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Task blocks on lock.
   *
-@@ -1051,6 +1422,7 @@ static int task_blocks_on_rt_mutex(struc
+@@ -1051,6 +1422,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
   * Called with lock->wait_lock held and interrupts disabled.
   */
  static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
@@ -1997,7 +2048,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				    struct rt_mutex *lock)
  {
  	struct rt_mutex_waiter *waiter;
-@@ -1090,7 +1462,10 @@ static void mark_wakeup_next_waiter(stru
+@@ -1090,7 +1462,10 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
  	 * Pairs with preempt_enable() in rt_mutex_postunlock();
  	 */
  	preempt_disable();
@@ -2009,7 +2060,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spin_unlock(&current->pi_lock);
  }
  
-@@ -1174,21 +1549,22 @@ void rt_mutex_adjust_pi(struct task_stru
+@@ -1174,21 +1549,22 @@ void rt_mutex_adjust_pi(struct task_struct *task)
  		return;
  	}
  	next_lock = waiter->lock;
@@ -2034,7 +2085,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -1268,7 +1644,7 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1268,7 +1644,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  	unsigned long flags;
  	int ret = 0;
  
@@ -2043,7 +2094,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * Technically we could use raw_spin_[un]lock_irq() here, but this can
-@@ -1363,7 +1739,8 @@ static inline int rt_mutex_slowtrylock(s
+@@ -1363,7 +1739,8 @@ static inline int rt_mutex_slowtrylock(struct rt_mutex *lock)
   * Return whether the current task needs to call rt_mutex_postunlock().
   */
  static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
@@ -2053,7 +2104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	unsigned long flags;
  
-@@ -1417,7 +1794,7 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1417,7 +1794,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
  	 *
  	 * Queue the next waiter for wakeup once we release the wait_lock.
  	 */
@@ -2062,7 +2113,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  
  	return true; /* call rt_mutex_postunlock() */
-@@ -1469,9 +1846,11 @@ rt_mutex_fasttrylock(struct rt_mutex *lo
+@@ -1469,9 +1846,11 @@ rt_mutex_fasttrylock(struct rt_mutex *lock,
  /*
   * Performs the wakeup of the the top-waiter and re-enables preemption.
   */
@@ -2075,7 +2126,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Pairs with preempt_disable() in rt_mutex_slowunlock() */
  	preempt_enable();
-@@ -1480,15 +1859,17 @@ void rt_mutex_postunlock(struct wake_q_h
+@@ -1480,15 +1859,17 @@ void rt_mutex_postunlock(struct wake_q_head *wake_q)
  static inline void
  rt_mutex_fastunlock(struct rt_mutex *lock,
  		    bool (*slowfn)(struct rt_mutex *lock,
@@ -2096,7 +2147,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -1607,12 +1988,9 @@ void __sched rt_mutex_unlock(struct rt_m
+@@ -1607,12 +1988,9 @@ void __sched rt_mutex_unlock(struct rt_mutex *lock)
  }
  EXPORT_SYMBOL_GPL(rt_mutex_unlock);
  
@@ -2112,7 +2163,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  {
  	lockdep_assert_held(&lock->wait_lock);
  
-@@ -1629,22 +2007,34 @@ bool __sched __rt_mutex_futex_unlock(str
+@@ -1629,22 +2007,34 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
  	 * avoid inversion prior to the wakeup.  preempt_disable()
  	 * therein pairs with rt_mutex_postunlock().
  	 */
@@ -2174,7 +2225,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	debug_rt_mutex_proxy_lock(lock, proxy_owner);
  	rt_mutex_set_owner(lock, proxy_owner);
  }
-@@ -1916,3 +2305,25 @@ bool rt_mutex_cleanup_proxy_lock(struct
+@@ -1916,3 +2305,25 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
  
  	return cleanup;
  }
@@ -2200,6 +2251,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +}
 +EXPORT_SYMBOL_GPL(ww_mutex_unlock);
 +#endif
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 0bb2a07c0566..32ae70f25c08 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
 @@ -27,6 +27,7 @@ struct rt_mutex_waiter {
@@ -2210,7 +2263,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_DEBUG_RT_MUTEXES
  	unsigned long		ip;
  	struct pid		*deadlock_task_pid;
-@@ -107,7 +108,7 @@ extern void rt_mutex_init_proxy_locked(s
+@@ -107,7 +108,7 @@ extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock,
  				       struct task_struct *proxy_owner);
  extern void rt_mutex_proxy_unlock(struct rt_mutex *lock,
  				  struct task_struct *proxy_owner);
@@ -2219,7 +2272,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern int __rt_mutex_start_proxy_lock(struct rt_mutex *lock,
  				     struct rt_mutex_waiter *waiter,
  				     struct task_struct *task);
-@@ -124,9 +125,11 @@ extern int rt_mutex_futex_trylock(struct
+@@ -124,9 +125,11 @@ extern int rt_mutex_futex_trylock(struct rt_mutex *l);
  
  extern void rt_mutex_futex_unlock(struct rt_mutex *lock);
  extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock,
@@ -2233,9 +2286,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_DEBUG_RT_MUTEXES
  # include "rtmutex-debug.h"
+diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c
+index db3ccb1dd614..909779647bd1 100644
 --- a/kernel/locking/spinlock.c
 +++ b/kernel/locking/spinlock.c
-@@ -124,8 +124,11 @@ void __lockfunc __raw_##op##_lock_bh(loc
+@@ -124,8 +124,11 @@ void __lockfunc __raw_##op##_lock_bh(locktype##_t *lock)		\
   *         __[spin|read|write]_lock_bh()
   */
  BUILD_LOCK_OPS(spin, raw_spinlock);
@@ -2247,7 +2302,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #endif
  
-@@ -209,6 +212,8 @@ void __lockfunc _raw_spin_unlock_bh(raw_
+@@ -209,6 +212,8 @@ void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock)
  EXPORT_SYMBOL(_raw_spin_unlock_bh);
  #endif
  
@@ -2256,7 +2311,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifndef CONFIG_INLINE_READ_TRYLOCK
  int __lockfunc _raw_read_trylock(rwlock_t *lock)
  {
-@@ -353,6 +358,8 @@ void __lockfunc _raw_write_unlock_bh(rwl
+@@ -353,6 +358,8 @@ void __lockfunc _raw_write_unlock_bh(rwlock_t *lock)
  EXPORT_SYMBOL(_raw_write_unlock_bh);
  #endif
  
@@ -2265,9 +2320,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_DEBUG_LOCK_ALLOC
  
  void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)
+diff --git a/kernel/locking/spinlock_debug.c b/kernel/locking/spinlock_debug.c
+index 9aa0fccd5d43..76d0b40d9193 100644
 --- a/kernel/locking/spinlock_debug.c
 +++ b/kernel/locking/spinlock_debug.c
-@@ -31,6 +31,7 @@ void __raw_spin_lock_init(raw_spinlock_t
+@@ -31,6 +31,7 @@ void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name,
  
  EXPORT_SYMBOL(__raw_spin_lock_init);
  
@@ -2275,7 +2332,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void __rwlock_init(rwlock_t *lock, const char *name,
  		   struct lock_class_key *key)
  {
-@@ -48,6 +49,7 @@ void __rwlock_init(rwlock_t *lock, const
+@@ -48,6 +49,7 @@ void __rwlock_init(rwlock_t *lock, const char *name,
  }
  
  EXPORT_SYMBOL(__rwlock_init);
@@ -2283,7 +2340,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void spin_dump(raw_spinlock_t *lock, const char *msg)
  {
-@@ -159,6 +161,7 @@ void do_raw_spin_unlock(raw_spinlock_t *
+@@ -135,6 +137,7 @@ void do_raw_spin_unlock(raw_spinlock_t *lock)
  	arch_spin_unlock(&lock->raw_lock);
  }
  
@@ -2291,15 +2348,17 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static void rwlock_bug(rwlock_t *lock, const char *msg)
  {
  	if (!debug_locks_off())
-@@ -300,3 +303,5 @@ void do_raw_write_unlock(rwlock_t *lock)
+@@ -224,3 +227,5 @@ void do_raw_write_unlock(rwlock_t *lock)
  	debug_write_unlock(lock);
  	arch_write_unlock(&lock->raw_lock);
  }
 +
 +#endif
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 0e90644168e0..fa9c0d0ed44c 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -454,7 +454,7 @@ void wake_q_add(struct wake_q_head *head
+@@ -454,7 +454,7 @@ void wake_q_add(struct wake_q_head *head, struct task_struct *task)
  	head->lastp = &node->next;
  }
  
diff --git a/debian/patches/features/all/rt/rt-drop_mutex_disable_on_not_debug.patch b/debian/patches/features/all/rt/0182-rt-Drop-mutex_disable-on-DEBUG-configs-and-the-GPL-s.patch
similarity index 69%
rename from debian/patches/features/all/rt/rt-drop_mutex_disable_on_not_debug.patch
rename to debian/patches/features/all/rt/0182-rt-Drop-mutex_disable-on-DEBUG-configs-and-the-GPL-s.patch
index de86fcb..e342317 100644
--- a/debian/patches/features/all/rt/rt-drop_mutex_disable_on_not_debug.patch
+++ b/debian/patches/features/all/rt/0182-rt-Drop-mutex_disable-on-DEBUG-configs-and-the-GPL-s.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 10 Feb 2017 18:21:04 +0100
-Subject: rt: Drop mutex_disable() on !DEBUG configs and the GPL suffix from export symbol
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 182/332] rt: Drop mutex_disable() on !DEBUG configs and the
+ GPL suffix from export symbol
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=abd0cb0270c20288f29afbdbb76aeda7ed3a2aa1
 
 Alex Goins reported that mutex_destroy() on RT will force a GPL only symbol
 which won't link and therefore fail on a non-GPL kernel module.
@@ -13,12 +14,14 @@ CONFIG_DEBUG_MUTEXES is not enabled.
 Reported-by: Alex Goins <agoins at nvidia.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/mutex_rt.h |    5 +++++
+ include/linux/mutex_rt.h | 5 +++++
  1 file changed, 5 insertions(+)
 
+diff --git a/include/linux/mutex_rt.h b/include/linux/mutex_rt.h
+index c38a44b14da5..e0284edec655 100644
 --- a/include/linux/mutex_rt.h
 +++ b/include/linux/mutex_rt.h
-@@ -43,7 +43,12 @@ extern void __lockfunc _mutex_unlock(str
+@@ -43,7 +43,12 @@ extern void __lockfunc _mutex_unlock(struct mutex *lock);
  #define mutex_lock_killable(l)		_mutex_lock_killable(l)
  #define mutex_trylock(l)		_mutex_trylock(l)
  #define mutex_unlock(l)			_mutex_unlock(l)
diff --git a/debian/patches/features/all/rt/0183-kernel-locking-use-an-exclusive-wait_q-for-sleepers.patch b/debian/patches/features/all/rt/0183-kernel-locking-use-an-exclusive-wait_q-for-sleepers.patch
new file mode 100644
index 0000000..d0fa57d
--- /dev/null
+++ b/debian/patches/features/all/rt/0183-kernel-locking-use-an-exclusive-wait_q-for-sleepers.patch
@@ -0,0 +1,146 @@
+From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+Date: Thu, 22 Jun 2017 17:53:34 +0200
+Subject: [PATCH 183/332] kernel/locking: use an exclusive wait_q for sleepers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=734036723dd48ad6013c01126d7d696091601de1
+
+If a task is queued as a sleeper for a wakeup and never goes to
+schedule() (because it just obtained the lock) then it will receive a
+spurious wake up which is not "bad", it is considered. Until that wake
+up happens this task can no be enqueued for any wake ups handled by the
+WAKE_Q infrastructure (because a task can only be enqueued once). This
+wouldn't be bad if we would use the same wakeup mechanism for the wake
+up of sleepers as we do for "normal" wake ups. But we don't…
+
+So.
+   T1			T2		T3
+   spin_lock(x)				spin_unlock(x);
+   					wake_q_add_sleeper(q1, T1)
+   spin_unlock(x)
+   set_state(TASK_INTERRUPTIBLE)
+   if (!condition)
+	schedule()
+			condition = true
+			wake_q_add(q2, T1)
+	                // T1 not added, still enqueued
+			wake_up_q(q2)
+					wake_up_q_sleeper(q1)
+					// T1 not woken up, wrong task state
+
+In order to solve this race this patch adds a wake_q_node for the
+sleeper case.
+
+Reported-by: Mike Galbraith <efault at gmx.de>
+Cc: stable-rt at vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+---
+ include/linux/sched.h    | 17 +++++++++++++++--
+ kernel/fork.c            |  1 +
+ kernel/locking/rtmutex.c |  2 +-
+ kernel/sched/core.c      | 20 ++++++++++++++++----
+ 4 files changed, 33 insertions(+), 7 deletions(-)
+
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 0fc34f29f28c..7cc3ab932a7e 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -1026,8 +1026,20 @@ struct wake_q_head {
+ #define WAKE_Q(name)					\
+ 	struct wake_q_head name = { WAKE_Q_TAIL, &name.first }
+ 
+-extern void wake_q_add(struct wake_q_head *head,
+-			      struct task_struct *task);
++extern void __wake_q_add(struct wake_q_head *head,
++			 struct task_struct *task, bool sleeper);
++static inline void wake_q_add(struct wake_q_head *head,
++			      struct task_struct *task)
++{
++	__wake_q_add(head, task, false);
++}
++
++static inline void wake_q_add_sleeper(struct wake_q_head *head,
++				      struct task_struct *task)
++{
++	__wake_q_add(head, task, true);
++}
++
+ extern void __wake_up_q(struct wake_q_head *head, bool sleeper);
+ 
+ static inline void wake_up_q(struct wake_q_head *head)
+@@ -1757,6 +1769,7 @@ struct task_struct {
+ 	raw_spinlock_t pi_lock;
+ 
+ 	struct wake_q_node wake_q;
++	struct wake_q_node wake_q_sleeper;
+ 
+ #ifdef CONFIG_RT_MUTEXES
+ 	/* PI waiters blocked on a rt_mutex held by this task */
+diff --git a/kernel/fork.c b/kernel/fork.c
+index 6bd05d522c04..d2759432a50c 100644
+--- a/kernel/fork.c
++++ b/kernel/fork.c
+@@ -558,6 +558,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
+ 	tsk->splice_pipe = NULL;
+ 	tsk->task_frag.page = NULL;
+ 	tsk->wake_q.next = NULL;
++	tsk->wake_q_sleeper.next = NULL;
+ 
+ 	account_kernel_stack(tsk, 1);
+ 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index b99ddf374df1..c1a3b9f099de 100644
+--- a/kernel/locking/rtmutex.c
++++ b/kernel/locking/rtmutex.c
+@@ -1463,7 +1463,7 @@ static void mark_wakeup_next_waiter(struct wake_q_head *wake_q,
+ 	 */
+ 	preempt_disable();
+ 	if (waiter->savestate)
+-		wake_q_add(wake_sleeper_q, waiter->task);
++		wake_q_add_sleeper(wake_sleeper_q, waiter->task);
+ 	else
+ 		wake_q_add(wake_q, waiter->task);
+ 	raw_spin_unlock(&current->pi_lock);
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index fa9c0d0ed44c..e9fecb7b5cfa 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -430,9 +430,15 @@ static bool set_nr_if_polling(struct task_struct *p)
+ #endif
+ #endif
+ 
+-void wake_q_add(struct wake_q_head *head, struct task_struct *task)
++void __wake_q_add(struct wake_q_head *head, struct task_struct *task,
++		  bool sleeper)
+ {
+-	struct wake_q_node *node = &task->wake_q;
++	struct wake_q_node *node;
++
++	if (sleeper)
++		node = &task->wake_q_sleeper;
++	else
++		node = &task->wake_q;
+ 
+ 	/*
+ 	 * Atomically grab the task, if ->wake_q is !nil already it means
+@@ -461,11 +467,17 @@ void __wake_up_q(struct wake_q_head *head, bool sleeper)
+ 	while (node != WAKE_Q_TAIL) {
+ 		struct task_struct *task;
+ 
+-		task = container_of(node, struct task_struct, wake_q);
++		if (sleeper)
++			task = container_of(node, struct task_struct, wake_q_sleeper);
++		else
++			task = container_of(node, struct task_struct, wake_q);
+ 		BUG_ON(!task);
+ 		/* task can safely be re-inserted now */
+ 		node = node->next;
+-		task->wake_q.next = NULL;
++		if (sleeper)
++			task->wake_q_sleeper.next = NULL;
++		else
++			task->wake_q.next = NULL;
+ 
+ 		/*
+ 		 * wake_up_process() implies a wmb() to pair with the queueing
diff --git a/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch b/debian/patches/features/all/rt/0184-rtmutex-Add-RT-aware-ww-locks.patch
similarity index 90%
rename from debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch
rename to debian/patches/features/all/rt/0184-rtmutex-Add-RT-aware-ww-locks.patch
index 51811b7..3be67d3 100644
--- a/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch
+++ b/debian/patches/features/all/rt/0184-rtmutex-Add-RT-aware-ww-locks.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
 Date: Mon, 28 Oct 2013 09:36:37 +0100
-Subject: rtmutex: Add RT aware ww locks
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 184/332] rtmutex: Add RT aware ww locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=428880d9c09df4952ec7cfd4c293a71ee2d07ca0
 
 lockdep says:
 | --------------------------------------------------------------------------
@@ -23,9 +23,11 @@ lockdep says:
 
 Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
 ---
- kernel/locking/rtmutex.c |  248 ++++++++++++++++++++++++++++++++++++++++++-----
+ kernel/locking/rtmutex.c | 248 ++++++++++++++++++++++++++++++++++++++++++-----
  1 file changed, 224 insertions(+), 24 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index c1a3b9f099de..c3756e59fcc5 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
 @@ -21,6 +21,7 @@
@@ -77,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  static inline int
  try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task,
  		     struct rt_mutex_waiter *waiter)
-@@ -1580,7 +1615,8 @@ void rt_mutex_init_waiter(struct rt_mute
+@@ -1580,7 +1615,8 @@ void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter, bool savestate)
  static int __sched
  __rt_mutex_slowlock(struct rt_mutex *lock, int state,
  		    struct hrtimer_sleeper *timeout,
@@ -87,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  {
  	int ret = 0;
  
-@@ -1598,6 +1634,12 @@ static int __sched
+@@ -1598,6 +1634,12 @@ __rt_mutex_slowlock(struct rt_mutex *lock, int state,
  			break;
  		}
  
@@ -100,7 +102,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  		raw_spin_unlock_irq(&lock->wait_lock);
  
  		debug_rt_mutex_print_deadlock(waiter);
-@@ -1632,13 +1674,90 @@ static void rt_mutex_handle_deadlock(int
+@@ -1632,13 +1674,90 @@ static void rt_mutex_handle_deadlock(int res, int detect_deadlock,
  	}
  }
  
@@ -192,7 +194,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  {
  	struct rt_mutex_waiter waiter;
  	unsigned long flags;
-@@ -1658,6 +1777,8 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1658,6 +1777,8 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  
  	/* Try to acquire the lock again: */
  	if (try_to_take_rt_mutex(lock, current, NULL)) {
@@ -201,7 +203,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  		raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  		return 0;
  	}
-@@ -1672,13 +1793,23 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1672,13 +1793,23 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  
  	if (likely(!ret))
  		/* sleep on the mutex */
@@ -227,7 +229,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  	}
  
  	/*
-@@ -1808,29 +1939,33 @@ static bool __sched rt_mutex_slowunlock(
+@@ -1808,29 +1939,33 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
   */
  static inline int
  rt_mutex_fastlock(struct rt_mutex *lock, int state,
@@ -265,7 +267,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  }
  
  static inline int
-@@ -1881,7 +2016,7 @@ void __sched rt_mutex_lock(struct rt_mut
+@@ -1881,7 +2016,7 @@ void __sched rt_mutex_lock(struct rt_mutex *lock)
  {
  	might_sleep();
  
@@ -274,7 +276,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  }
  EXPORT_SYMBOL_GPL(rt_mutex_lock);
  
-@@ -1898,7 +2033,7 @@ int __sched rt_mutex_lock_interruptible(
+@@ -1898,7 +2033,7 @@ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock)
  {
  	might_sleep();
  
@@ -283,7 +285,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  }
  EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible);
  
-@@ -1925,7 +2060,7 @@ int __sched rt_mutex_lock_killable(struc
+@@ -1925,7 +2060,7 @@ int __sched rt_mutex_lock_killable(struct rt_mutex *lock)
  {
  	might_sleep();
  
@@ -292,7 +294,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  }
  EXPORT_SYMBOL_GPL(rt_mutex_lock_killable);
  
-@@ -1949,6 +2084,7 @@ rt_mutex_timed_lock(struct rt_mutex *loc
+@@ -1949,6 +2084,7 @@ rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout)
  
  	return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout,
  				       RT_MUTEX_MIN_CHAINWALK,
@@ -300,7 +302,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  				       rt_mutex_slowlock);
  }
  EXPORT_SYMBOL_GPL(rt_mutex_timed_lock);
-@@ -2239,7 +2375,7 @@ int rt_mutex_wait_proxy_lock(struct rt_m
+@@ -2239,7 +2375,7 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  	raw_spin_lock_irq(&lock->wait_lock);
  	/* sleep on the mutex */
  	set_current_state(TASK_INTERRUPTIBLE);
@@ -309,7 +311,7 @@ Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
  	/*
  	 * try_to_take_rt_mutex() sets the waiter bit unconditionally. We might
  	 * have to fix that up.
-@@ -2306,24 +2442,88 @@ bool rt_mutex_cleanup_proxy_lock(struct
+@@ -2306,24 +2442,88 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
  	return cleanup;
  }
  
diff --git a/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_lock_state.patch b/debian/patches/features/all/rt/0185-rtmutex-Provide-rt_mutex_lock_state.patch
similarity index 78%
rename from debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_lock_state.patch
rename to debian/patches/features/all/rt/0185-rtmutex-Provide-rt_mutex_lock_state.patch
index 126d80f..2719c87 100644
--- a/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_lock_state.patch
+++ b/debian/patches/features/all/rt/0185-rtmutex-Provide-rt_mutex_lock_state.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 1 Apr 2017 12:51:00 +0200
-Subject: [PATCH] rtmutex: Provide rt_mutex_lock_state()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 185/332] rtmutex: Provide rt_mutex_lock_state()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6ee41b29a56dad3e4354705875e69c8acd4e4354
 
 Allow rtmutex to be locked with arbitrary states. Preparatory patch for the
 rt rwsem rework.
@@ -9,13 +9,15 @@ rt rwsem rework.
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/rtmutex.h  |    1 +
- kernel/locking/rtmutex.c |   44 +++++++++++++++++++++++++-------------------
+ include/linux/rtmutex.h  |  1 +
+ kernel/locking/rtmutex.c | 44 +++++++++++++++++++++++++-------------------
  2 files changed, 26 insertions(+), 19 deletions(-)
 
+diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h
+index 30211c627511..294a8b4875f1 100644
 --- a/include/linux/rtmutex.h
 +++ b/include/linux/rtmutex.h
-@@ -105,6 +105,7 @@ extern void __rt_mutex_init(struct rt_mu
+@@ -105,6 +105,7 @@ extern void __rt_mutex_init(struct rt_mutex *lock, const char *name);
  extern void rt_mutex_destroy(struct rt_mutex *lock);
  
  extern void rt_mutex_lock(struct rt_mutex *lock);
@@ -23,12 +25,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  extern int rt_mutex_lock_interruptible(struct rt_mutex *lock);
  extern int rt_mutex_lock_killable(struct rt_mutex *lock);
  extern int rt_mutex_timed_lock(struct rt_mutex *lock,
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index c3756e59fcc5..9076a7470159 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -2008,21 +2008,32 @@ rt_mutex_fastunlock(struct rt_mutex *loc
+@@ -2007,6 +2007,19 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
+ 		rt_mutex_postunlock(&wake_q, &wake_sleeper_q);
  }
  
- /**
++/**
 + * rt_mutex_lock_state - lock a rt_mutex with a given state
 + *
 + * @lock:	The rt_mutex to be locked
@@ -41,10 +46,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	return rt_mutex_fastlock(lock, state, NULL, rt_mutex_slowlock);
 +}
 +
-+/**
+ /**
   * rt_mutex_lock - lock a rt_mutex
   *
-  * @lock: the rt_mutex to be locked
+@@ -2014,15 +2027,13 @@ rt_mutex_fastunlock(struct rt_mutex *lock,
   */
  void __sched rt_mutex_lock(struct rt_mutex *lock)
  {
@@ -84,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * rt_mutex_lock_killable - lock a rt_mutex killable
   *
-@@ -2054,16 +2055,21 @@ int __sched rt_mutex_futex_trylock(struc
+@@ -2054,16 +2055,21 @@ int __sched rt_mutex_futex_trylock(struct rt_mutex *lock)
   * Returns:
   *  0          on success
   * -EINTR      when interrupted by a signal
diff --git a/debian/patches/features/all/rt/rtmutex-Provide-locked-slowpath.patch b/debian/patches/features/all/rt/0186-rtmutex-Provide-locked-slowpath.patch
similarity index 86%
rename from debian/patches/features/all/rt/rtmutex-Provide-locked-slowpath.patch
rename to debian/patches/features/all/rt/0186-rtmutex-Provide-locked-slowpath.patch
index b3cc618..7876bde 100644
--- a/debian/patches/features/all/rt/rtmutex-Provide-locked-slowpath.patch
+++ b/debian/patches/features/all/rt/0186-rtmutex-Provide-locked-slowpath.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 1 Apr 2017 12:51:01 +0200
-Subject: [PATCH] rtmutex: Provide locked slowpath
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 186/332] rtmutex: Provide locked slowpath
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c7527201f5b6f4c514f5324d680f7ffd62b75ee9
 
 The new rt rwsem implementation needs rtmutex::wait_lock to protect struct
 rw_semaphore. Dropping the lock and reaquiring it for locking the rtmutex
@@ -13,13 +13,15 @@ wait_lock held.
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c        |   72 +++++++++++++++++++++++-----------------
- kernel/locking/rtmutex_common.h |    9 +++++
+ kernel/locking/rtmutex.c        | 72 ++++++++++++++++++++++++-----------------
+ kernel/locking/rtmutex_common.h |  9 ++++++
  2 files changed, 51 insertions(+), 30 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 9076a7470159..43f1394aa12d 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -1750,36 +1750,18 @@ static void ww_mutex_account_lock(struct
+@@ -1750,36 +1750,18 @@ static void ww_mutex_account_lock(struct rt_mutex *lock,
  }
  #endif
  
@@ -62,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		return 0;
  	}
  
-@@ -1789,13 +1771,13 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1789,13 +1771,13 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  	if (unlikely(timeout))
  		hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS);
  
@@ -80,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		/* ww_mutex received EDEADLK, let it become EALREADY */
  		ret = __mutex_lock_check_stamp(lock, ww_ctx);
  		BUG_ON(!ret);
-@@ -1804,10 +1786,10 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1804,10 +1786,10 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  	if (unlikely(ret)) {
  		__set_current_state(TASK_RUNNING);
  		if (rt_mutex_has_waiters(lock))
@@ -93,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	} else if (ww_ctx) {
  		ww_mutex_account_lock(lock, ww_ctx);
  	}
-@@ -1817,6 +1799,36 @@ rt_mutex_slowlock(struct rt_mutex *lock,
+@@ -1817,6 +1799,36 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state,
  	 * unconditionally. We might have to fix that up.
  	 */
  	fixup_rt_mutex_waiters(lock);
@@ -130,9 +132,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
  
+diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h
+index 32ae70f25c08..64d89d780059 100644
 --- a/kernel/locking/rtmutex_common.h
 +++ b/kernel/locking/rtmutex_common.h
-@@ -131,6 +131,15 @@ extern bool __rt_mutex_futex_unlock(stru
+@@ -131,6 +131,15 @@ extern bool __rt_mutex_futex_unlock(struct rt_mutex *lock,
  extern void rt_mutex_postunlock(struct wake_q_head *wake_q,
  				struct wake_q_head *wq_sleeper);
  
diff --git a/debian/patches/features/all/rt/futex-rtmutex-Cure-RT-double-blocking-issue.patch b/debian/patches/features/all/rt/0187-futex-rtmutex-Cure-RT-double-blocking-issue.patch
similarity index 79%
rename from debian/patches/features/all/rt/futex-rtmutex-Cure-RT-double-blocking-issue.patch
rename to debian/patches/features/all/rt/0187-futex-rtmutex-Cure-RT-double-blocking-issue.patch
index c87e83b..d2e8b19 100644
--- a/debian/patches/features/all/rt/futex-rtmutex-Cure-RT-double-blocking-issue.patch
+++ b/debian/patches/features/all/rt/0187-futex-rtmutex-Cure-RT-double-blocking-issue.patch
@@ -1,8 +1,7 @@
-From 8a35f416ca9ff27e893cebcbe064a1f3c8e1de57 Mon Sep 17 00:00:00 2001
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 9 May 2017 17:11:10 +0200
-Subject: [PATCH] futex/rtmutex: Cure RT double blocking issue
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 187/332] futex/rtmutex: Cure RT double blocking issue
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b93a91ba38c116e1a3c8a5a60a134c431b2f3107
 
 RT has a problem when the wait on a futex/rtmutex got interrupted by a
 timeout or a signal. task->pi_blocked_on is still set when returning from
@@ -22,12 +21,14 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Reported-by: Engleder Gerhard <eg at keba.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   19 +++++++++++++++++++
+ kernel/locking/rtmutex.c | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 43f1394aa12d..6e52bce66a26 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -2388,6 +2388,7 @@ int rt_mutex_wait_proxy_lock(struct rt_m
+@@ -2388,6 +2388,7 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  			       struct hrtimer_sleeper *to,
  			       struct rt_mutex_waiter *waiter)
  {
@@ -35,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int ret;
  
  	raw_spin_lock_irq(&lock->wait_lock);
-@@ -2399,6 +2400,24 @@ int rt_mutex_wait_proxy_lock(struct rt_m
+@@ -2399,6 +2400,24 @@ int rt_mutex_wait_proxy_lock(struct rt_mutex *lock,
  	 * have to fix that up.
  	 */
  	fixup_rt_mutex_waiters(lock);
diff --git a/debian/patches/features/all/rt/rwsem-rt-Lift-single-reader-restriction.patch b/debian/patches/features/all/rt/0188-rwsem-rt-Lift-single-reader-restriction.patch
similarity index 94%
rename from debian/patches/features/all/rt/rwsem-rt-Lift-single-reader-restriction.patch
rename to debian/patches/features/all/rt/0188-rwsem-rt-Lift-single-reader-restriction.patch
index e1dbc4e..950fe05 100644
--- a/debian/patches/features/all/rt/rwsem-rt-Lift-single-reader-restriction.patch
+++ b/debian/patches/features/all/rt/0188-rwsem-rt-Lift-single-reader-restriction.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 1 Apr 2017 12:51:02 +0200
-Subject: [PATCH] rwsem/rt: Lift single reader restriction
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 188/332] rwsem/rt: Lift single reader restriction
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f9c7af115e698da5718925a929d8f22a57e58e07
 
 The RT specific R/W semaphore implementation restricts the number of readers
 to one because a writer cannot block on multiple readers and inherit its
@@ -42,17 +42,19 @@ the approach.
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/rwsem.h     |    9 +
- include/linux/rwsem_rt.h  |  166 +++++-----------------------
- kernel/locking/Makefile   |    4 
- kernel/locking/rt.c       |  167 ----------------------------
- kernel/locking/rwsem-rt.c |  268 ++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/rwsem.h     |   9 +-
+ include/linux/rwsem_rt.h  | 166 ++++++----------------------
+ kernel/locking/Makefile   |   4 +-
+ kernel/locking/rt.c       | 167 -----------------------------
+ kernel/locking/rwsem-rt.c | 268 ++++++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 310 insertions(+), 304 deletions(-)
  create mode 100644 kernel/locking/rwsem-rt.c
 
+diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
+index 8e1f44ff1f2f..aa2ac1f65c2d 100644
 --- a/include/linux/rwsem.h
 +++ b/include/linux/rwsem.h
-@@ -110,6 +110,13 @@ static inline int rwsem_is_contended(str
+@@ -110,6 +110,13 @@ static inline int rwsem_is_contended(struct rw_semaphore *sem)
  	return !list_empty(&sem->wait_list);
  }
  
@@ -66,13 +68,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * lock for reading
   */
-@@ -188,6 +195,4 @@ extern void up_read_non_owner(struct rw_
+@@ -188,6 +195,4 @@ extern void up_read_non_owner(struct rw_semaphore *sem);
  # define up_read_non_owner(sem)			up_read(sem)
  #endif
  
 -#endif /* !PREEMPT_RT_FULL */
 -
  #endif /* _LINUX_RWSEM_H */
+diff --git a/include/linux/rwsem_rt.h b/include/linux/rwsem_rt.h
+index e26bd95a57c3..2ffbf093ae92 100644
 --- a/include/linux/rwsem_rt.h
 +++ b/include/linux/rwsem_rt.h
 @@ -5,163 +5,63 @@
@@ -272,6 +276,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -}
 -#endif
  #endif
+diff --git a/kernel/locking/Makefile b/kernel/locking/Makefile
+index 5e27fb1079e7..6ff9e8011dd0 100644
 --- a/kernel/locking/Makefile
 +++ b/kernel/locking/Makefile
 @@ -14,8 +14,8 @@ endif
@@ -292,9 +298,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +obj-$(CONFIG_PREEMPT_RT_FULL) += rt.o rwsem-rt.o
  obj-$(CONFIG_QUEUED_RWLOCKS) += qrwlock.o
  obj-$(CONFIG_LOCK_TORTURE_TEST) += locktorture.o
+diff --git a/kernel/locking/rt.c b/kernel/locking/rt.c
+index 665754c00e1e..6284e3b15091 100644
 --- a/kernel/locking/rt.c
 +++ b/kernel/locking/rt.c
-@@ -306,173 +306,6 @@ void __rt_rwlock_init(rwlock_t *rwlock,
+@@ -306,173 +306,6 @@ void __rt_rwlock_init(rwlock_t *rwlock, char *name, struct lock_class_key *key)
  }
  EXPORT_SYMBOL(__rt_rwlock_init);
  
@@ -468,6 +476,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * atomic_dec_and_mutex_lock - return holding mutex if we dec to 0
   * @cnt: the atomic which we are to dec
+diff --git a/kernel/locking/rwsem-rt.c b/kernel/locking/rwsem-rt.c
+new file mode 100644
+index 000000000000..4a708ffcded6
 --- /dev/null
 +++ b/kernel/locking/rwsem-rt.c
 @@ -0,0 +1,268 @@
diff --git a/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches/features/all/rt/0189-ptrace-fix-ptrace-vs-tasklist_lock-race.patch
similarity index 79%
rename from debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch
rename to debian/patches/features/all/rt/0189-ptrace-fix-ptrace-vs-tasklist_lock-race.patch
index 04fb098..92893f0 100644
--- a/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch
+++ b/debian/patches/features/all/rt/0189-ptrace-fix-ptrace-vs-tasklist_lock-race.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 29 Aug 2013 18:21:04 +0200
-Subject: ptrace: fix ptrace vs tasklist_lock race
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 189/332] ptrace: fix ptrace vs tasklist_lock race
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=050c1b58d34ed1448911cffe5c1afa98762f40be
 
 As explained by Alexander Fyodorov <halcy at yandex.ru>:
 
@@ -24,14 +24,16 @@ taken in case the caller is interrupted between looking into ->state and
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/sched.h |   48 +++++++++++++++++++++++++++++++++++++++++++++---
- kernel/ptrace.c       |    9 ++++++++-
- kernel/sched/core.c   |   17 +++++++++++++++--
+ include/linux/sched.h | 48 +++++++++++++++++++++++++++++++++++++++++++++---
+ kernel/ptrace.c       |  9 ++++++++-
+ kernel/sched/core.c   | 17 +++++++++++++++--
  3 files changed, 68 insertions(+), 6 deletions(-)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 7cc3ab932a7e..a1331f77fad3 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -243,10 +243,7 @@ extern char ___assert_task_state[1 - 2*!
+@@ -242,10 +242,7 @@ extern char ___assert_task_state[1 - 2*!!(
  				 TASK_UNINTERRUPTIBLE | __TASK_STOPPED | \
  				 __TASK_TRACED | EXIT_ZOMBIE | EXIT_DEAD)
  
@@ -42,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #define task_contributes_to_load(task)	\
  				((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
  				 (task->flags & PF_FROZEN) == 0 && \
-@@ -3366,6 +3363,51 @@ static inline int signal_pending_state(l
+@@ -3392,6 +3389,51 @@ static inline int signal_pending_state(long state, struct task_struct *p)
  	return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
  }
  
@@ -94,9 +96,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * cond_resched() and cond_resched_lock(): latency reduction via
   * explicit rescheduling in places that are safe. The return
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c
+index f39a7be98fc1..583ce3aad891 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
-@@ -166,7 +166,14 @@ static bool ptrace_freeze_traced(struct
+@@ -172,7 +172,14 @@ static bool ptrace_freeze_traced(struct task_struct *task)
  
  	spin_lock_irq(&task->sighand->siglock);
  	if (task_is_traced(task) && !__fatal_signal_pending(task)) {
@@ -112,9 +116,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		ret = true;
  	}
  	spin_unlock_irq(&task->sighand->siglock);
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index e9fecb7b5cfa..45aa5d4f1485 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -1384,6 +1384,18 @@ int migrate_swap(struct task_struct *cur
+@@ -1396,6 +1396,18 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p)
  	return ret;
  }
  
@@ -133,7 +139,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * wait_task_inactive - wait for a thread to unschedule.
   *
-@@ -1428,7 +1440,7 @@ unsigned long wait_task_inactive(struct
+@@ -1440,7 +1452,7 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
  		 * is actually now running somewhere else!
  		 */
  		while (task_running(rq, p)) {
@@ -142,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				return 0;
  			cpu_relax();
  		}
-@@ -1443,7 +1455,8 @@ unsigned long wait_task_inactive(struct
+@@ -1455,7 +1467,8 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
  		running = task_running(rq, p);
  		queued = task_on_rq_queued(p);
  		ncsw = 0;
diff --git a/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch b/debian/patches/features/all/rt/0190-rcu-Frob-softirq-test.patch
similarity index 92%
rename from debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch
rename to debian/patches/features/all/rt/0190-rcu-Frob-softirq-test.patch
index af2e5e1..8bd7d7f 100644
--- a/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch
+++ b/debian/patches/features/all/rt/0190-rcu-Frob-softirq-test.patch
@@ -1,7 +1,7 @@
-Subject: rcu: Frob softirq test
 From: Peter Zijlstra <a.p.zijlstra at chello.nl>
-Date: Sat Aug 13 00:23:17 CEST 2011
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Sat, 13 Aug 2011 00:23:17 +0200
+Subject: [PATCH 190/332] rcu: Frob softirq test
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=37c3a9fc3d0ea70daf7589f8574bacf6c1a7ccd8
 
 With RT_FULL we get the below wreckage:
 
@@ -11,15 +11,15 @@ With RT_FULL we get the below wreckage:
 [  126.060490] -------------------------------------------------------
 [  126.060492] irq/24-eth0/1235 is trying to acquire lock:
 [  126.060495]  (&(lock)->wait_lock#2){+.+...}, at: [<ffffffff81501c81>] rt_mutex_slowunlock+0x16/0x55
-[  126.060503] 
+[  126.060503]
 [  126.060504] but task is already holding lock:
 [  126.060506]  (&p->pi_lock){-...-.}, at: [<ffffffff81074fdc>] try_to_wake_up+0x35/0x429
-[  126.060511] 
+[  126.060511]
 [  126.060511] which lock already depends on the new lock.
-[  126.060513] 
-[  126.060514] 
+[  126.060513]
+[  126.060514]
 [  126.060514] the existing dependency chain (in reverse order) is:
-[  126.060516] 
+[  126.060516]
 [  126.060516] -> #1 (&p->pi_lock){-...-.}:
 [  126.060519]        [<ffffffff810afe9e>] lock_acquire+0x145/0x18a
 [  126.060524]        [<ffffffff8150291e>] _raw_spin_lock_irqsave+0x4b/0x85
@@ -30,7 +30,7 @@ With RT_FULL we get the below wreckage:
 [  126.060541]        [<ffffffff810d90ce>] rcu_boost_kthread+0x7d/0x9b
 [  126.060544]        [<ffffffff8109a760>] kthread+0x99/0xa1
 [  126.060547]        [<ffffffff81509b14>] kernel_thread_helper+0x4/0x10
-[  126.060551] 
+[  126.060551]
 [  126.060552] -> #0 (&(lock)->wait_lock#2){+.+...}:
 [  126.060555]        [<ffffffff810af1b8>] __lock_acquire+0x1157/0x1816
 [  126.060558]        [<ffffffff810afe9e>] lock_acquire+0x145/0x18a
@@ -50,23 +50,23 @@ With RT_FULL we get the below wreckage:
 [  126.060603]        [<ffffffff810d582c>] irq_thread+0xde/0x1af
 [  126.060606]        [<ffffffff8109a760>] kthread+0x99/0xa1
 [  126.060608]        [<ffffffff81509b14>] kernel_thread_helper+0x4/0x10
-[  126.060611] 
+[  126.060611]
 [  126.060612] other info that might help us debug this:
-[  126.060614] 
+[  126.060614]
 [  126.060615]  Possible unsafe locking scenario:
-[  126.060616] 
+[  126.060616]
 [  126.060617]        CPU0                    CPU1
 [  126.060619]        ----                    ----
 [  126.060620]   lock(&p->pi_lock);
 [  126.060623]                                lock(&(lock)->wait_lock);
 [  126.060625]                                lock(&p->pi_lock);
 [  126.060627]   lock(&(lock)->wait_lock);
-[  126.060629] 
+[  126.060629]
 [  126.060629]  *** DEADLOCK ***
-[  126.060630] 
+[  126.060630]
 [  126.060632] 1 lock held by irq/24-eth0/1235:
 [  126.060633]  #0:  (&p->pi_lock){-...-.}, at: [<ffffffff81074fdc>] try_to_wake_up+0x35/0x429
-[  126.060638] 
+[  126.060638]
 [  126.060638] stack backtrace:
 [  126.060641] Pid: 1235, comm: irq/24-eth0 Not tainted 3.0.1-rt10+ #30
 [  126.060643] Call Trace:
@@ -151,12 +151,14 @@ here... so this is very likely a bandaid and more thought is required.
 Cc: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
 Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
 ---
- kernel/rcu/tree_plugin.h |    2 +-
+ kernel/rcu/tree_plugin.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
+index e3944c4b072d..a95d623a84b9 100644
 --- a/kernel/rcu/tree_plugin.h
 +++ b/kernel/rcu/tree_plugin.h
-@@ -426,7 +426,7 @@ void rcu_read_unlock_special(struct task
+@@ -426,7 +426,7 @@ void rcu_read_unlock_special(struct task_struct *t)
  	}
  
  	/* Hardware IRQ handlers cannot block, complain if they get here. */
diff --git a/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch b/debian/patches/features/all/rt/0191-rcu-Merge-RCU-bh-into-RCU-preempt.patch
similarity index 79%
rename from debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch
rename to debian/patches/features/all/rt/0191-rcu-Merge-RCU-bh-into-RCU-preempt.patch
index 8f5da62..246ad41 100644
--- a/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch
+++ b/debian/patches/features/all/rt/0191-rcu-Merge-RCU-bh-into-RCU-preempt.patch
@@ -1,7 +1,7 @@
-Subject: rcu: Merge RCU-bh into RCU-preempt
-Date: Wed, 5 Oct 2011 11:59:38 -0700
 From: Thomas Gleixner <tglx at linutronix.de>
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 5 Oct 2011 11:59:38 -0700
+Subject: [PATCH 191/332] rcu: Merge RCU-bh into RCU-preempt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=915b977d15546c2d9f29c4817b92214ded003593
 
 The Linux kernel has long RCU-bh read-side critical sections that
 intolerably increase scheduling latency under mainline's RCU-bh rules,
@@ -23,16 +23,17 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
 Link: http://lkml.kernel.org/r/20111005185938.GA20403@linux.vnet.ibm.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/rcupdate.h |   23 +++++++++++++++++++++++
- include/linux/rcutree.h  |   21 ++++++++++++++++++---
- kernel/rcu/rcutorture.c  |    7 +++++++
- kernel/rcu/tree.c        |   24 ++++++++++++++++++++++++
- kernel/rcu/tree.h        |    2 ++
- kernel/rcu/update.c      |    2 ++
+ include/linux/rcupdate.h | 23 +++++++++++++++++++++++
+ include/linux/rcutree.h  | 21 ++++++++++++++++++---
+ kernel/rcu/rcutorture.c  |  7 +++++++
+ kernel/rcu/tree.c        | 24 ++++++++++++++++++++++++
+ kernel/rcu/tree.h        |  2 ++
+ kernel/rcu/update.c      |  2 ++
  6 files changed, 76 insertions(+), 3 deletions(-)
 
+diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
+index a5b130e22c33..c19c71196f71 100644
 --- a/include/linux/rcupdate.h
 +++ b/include/linux/rcupdate.h
 @@ -179,6 +179,9 @@ void call_rcu(struct rcu_head *head,
@@ -53,7 +54,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /**
   * call_rcu_sched() - Queue an RCU for invocation after sched grace period.
-@@ -339,7 +343,11 @@ static inline int rcu_preempt_depth(void
+@@ -339,7 +343,11 @@ static inline int rcu_preempt_depth(void)
  /* Internal to kernel */
  void rcu_init(void);
  void rcu_sched_qs(void);
@@ -65,7 +66,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_check_callbacks(int user);
  void rcu_report_dead(unsigned int cpu);
  void rcu_cpu_starting(unsigned int cpu);
-@@ -513,7 +521,14 @@ extern struct lockdep_map rcu_callback_m
+@@ -513,7 +521,14 @@ extern struct lockdep_map rcu_callback_map;
  int debug_lockdep_rcu_enabled(void);
  
  int rcu_read_lock_held(void);
@@ -95,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -924,10 +943,14 @@ static inline void rcu_read_lock_bh(void
+@@ -924,10 +943,14 @@ static inline void rcu_read_lock_bh(void)
   */
  static inline void rcu_read_unlock_bh(void)
  {
@@ -110,9 +111,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_bh_enable();
  }
  
+diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
+index 63a4e4cf40a5..08ab12df2863 100644
 --- a/include/linux/rcutree.h
 +++ b/include/linux/rcutree.h
-@@ -44,7 +44,11 @@ static inline void rcu_virt_note_context
+@@ -44,7 +44,11 @@ static inline void rcu_virt_note_context_switch(int cpu)
  	rcu_note_context_switch();
  }
  
@@ -124,7 +127,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void synchronize_sched_expedited(void);
  void synchronize_rcu_expedited(void);
  
-@@ -72,7 +76,11 @@ static inline void synchronize_rcu_bh_ex
+@@ -72,7 +76,11 @@ static inline void synchronize_rcu_bh_expedited(void)
  }
  
  void rcu_barrier(void);
@@ -136,7 +139,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_barrier_sched(void);
  unsigned long get_state_synchronize_rcu(void);
  void cond_synchronize_rcu(unsigned long oldstate);
-@@ -82,17 +90,14 @@ void cond_synchronize_sched(unsigned lon
+@@ -82,17 +90,14 @@ void cond_synchronize_sched(unsigned long oldstate);
  extern unsigned long rcutorture_testseq;
  extern unsigned long rcutorture_vernum;
  unsigned long rcu_batches_started(void);
@@ -154,7 +157,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_sched_force_quiescent_state(void);
  
  void rcu_idle_enter(void);
-@@ -109,6 +114,16 @@ extern int rcu_scheduler_active __read_m
+@@ -109,6 +114,16 @@ extern int rcu_scheduler_active __read_mostly;
  
  bool rcu_is_watching(void);
  
@@ -171,9 +174,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_all_qs(void);
  
  /* RCUtree hotplug events */
+diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
+index bf08fee53dc7..eeb8ce4ad7b6 100644
 --- a/kernel/rcu/rcutorture.c
 +++ b/kernel/rcu/rcutorture.c
-@@ -404,6 +404,7 @@ static struct rcu_torture_ops rcu_ops =
+@@ -404,6 +404,7 @@ static struct rcu_torture_ops rcu_ops = {
  	.name		= "rcu"
  };
  
@@ -181,7 +186,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Definitions for rcu_bh torture testing.
   */
-@@ -443,6 +444,12 @@ static struct rcu_torture_ops rcu_bh_ops
+@@ -443,6 +444,12 @@ static struct rcu_torture_ops rcu_bh_ops = {
  	.name		= "rcu_bh"
  };
  
@@ -194,6 +199,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Don't even think about trying any of these in real life!!!
   * The names includes "busted", and they really means it!
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
+index 10f62c6f48e7..2cb41686a4b8 100644
 --- a/kernel/rcu/tree.c
 +++ b/kernel/rcu/tree.c
 @@ -260,6 +260,7 @@ void rcu_sched_qs(void)
@@ -212,7 +219,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static DEFINE_PER_CPU(int, rcu_sched_qs_mask);
  
-@@ -449,11 +451,13 @@ EXPORT_SYMBOL_GPL(rcu_batches_started_sc
+@@ -449,11 +451,13 @@ EXPORT_SYMBOL_GPL(rcu_batches_started_sched);
  /*
   * Return the number of RCU BH batches started thus far for debug & stats.
   */
@@ -226,7 +233,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * Return the number of RCU batches completed thus far for debug & stats.
-@@ -473,6 +477,7 @@ unsigned long rcu_batches_completed_sche
+@@ -473,6 +477,7 @@ unsigned long rcu_batches_completed_sched(void)
  }
  EXPORT_SYMBOL_GPL(rcu_batches_completed_sched);
  
@@ -234,7 +241,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Return the number of RCU BH batches completed thus far for debug & stats.
   */
-@@ -481,6 +486,7 @@ unsigned long rcu_batches_completed_bh(v
+@@ -481,6 +486,7 @@ unsigned long rcu_batches_completed_bh(void)
  	return rcu_bh_state.completed;
  }
  EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
@@ -242,7 +249,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * Return the number of RCU expedited batches completed thus far for
-@@ -504,6 +510,7 @@ unsigned long rcu_exp_batches_completed_
+@@ -504,6 +510,7 @@ unsigned long rcu_exp_batches_completed_sched(void)
  }
  EXPORT_SYMBOL_GPL(rcu_exp_batches_completed_sched);
  
@@ -264,7 +271,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Force a quiescent state for RCU-sched.
   */
-@@ -572,9 +586,11 @@ void rcutorture_get_gp_data(enum rcutort
+@@ -572,9 +586,11 @@ void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
  	case RCU_FLAVOR:
  		rsp = rcu_state_p;
  		break;
@@ -276,7 +283,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	case RCU_SCHED_FLAVOR:
  		rsp = &rcu_sched_state;
  		break;
-@@ -3195,6 +3211,7 @@ void call_rcu_sched(struct rcu_head *hea
+@@ -3195,6 +3211,7 @@ void call_rcu_sched(struct rcu_head *head, rcu_callback_t func)
  }
  EXPORT_SYMBOL_GPL(call_rcu_sched);
  
@@ -284,7 +291,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Queue an RCU callback for invocation after a quicker grace period.
   */
-@@ -3203,6 +3220,7 @@ void call_rcu_bh(struct rcu_head *head,
+@@ -3203,6 +3220,7 @@ void call_rcu_bh(struct rcu_head *head, rcu_callback_t func)
  	__call_rcu(head, func, &rcu_bh_state, -1, 0);
  }
  EXPORT_SYMBOL_GPL(call_rcu_bh);
@@ -308,7 +315,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /**
   * get_state_synchronize_rcu - Snapshot current RCU state
-@@ -3698,6 +3718,7 @@ static void _rcu_barrier(struct rcu_stat
+@@ -3698,6 +3718,7 @@ static void _rcu_barrier(struct rcu_state *rsp)
  	mutex_unlock(&rsp->barrier_mutex);
  }
  
@@ -334,9 +341,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	rcu_init_one(&rcu_sched_state);
  	if (dump_tree)
  		rcu_dump_rcu_node_tree(&rcu_sched_state);
+diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
+index e99a5234d9ed..e8032555649e 100644
 --- a/kernel/rcu/tree.h
 +++ b/kernel/rcu/tree.h
-@@ -588,7 +588,9 @@ extern struct list_head rcu_struct_flavo
+@@ -588,7 +588,9 @@ extern struct list_head rcu_struct_flavors;
   */
  extern struct rcu_state rcu_sched_state;
  
@@ -346,6 +355,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_PREEMPT_RCU
  extern struct rcu_state rcu_preempt_state;
+diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
+index 019b4708c9fa..949714f485ee 100644
 --- a/kernel/rcu/update.c
 +++ b/kernel/rcu/update.c
 @@ -296,6 +296,7 @@ int rcu_read_lock_held(void)
diff --git a/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch b/debian/patches/features/all/rt/0192-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch
similarity index 77%
rename from debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
rename to debian/patches/features/all/rt/0192-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch
index 991f13c..d44b69d 100644
--- a/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
+++ b/debian/patches/features/all/rt/0192-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch
@@ -1,7 +1,7 @@
-Subject: rcu: Make ksoftirqd do RCU quiescent states
 From: "Paul E. McKenney" <paulmck at linux.vnet.ibm.com>
 Date: Wed, 5 Oct 2011 11:45:18 -0700
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 192/332] rcu: Make ksoftirqd do RCU quiescent states
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3d558d8ee4bc48c4805e23d1eca22a0e3158f4ef
 
 Implementing RCU-bh in terms of RCU-preempt makes the system vulnerable
 to network-based denial-of-service attacks.  This patch therefore
@@ -22,16 +22,17 @@ in cases where __do_softirq() is invoked directly from ksoftirqd.
 Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
 Link: http://lkml.kernel.org/r/20111005184518.GA21601@linux.vnet.ibm.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/rcupdate.h |    4 ----
- kernel/rcu/tree.c        |    9 ++++++++-
- kernel/rcu/tree_plugin.h |    8 +++++++-
+ include/linux/rcupdate.h | 4 ----
+ kernel/rcu/tree.c        | 9 ++++++++-
+ kernel/rcu/tree_plugin.h | 8 +++++++-
  3 files changed, 15 insertions(+), 6 deletions(-)
 
+diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
+index c19c71196f71..30cc001d0d5a 100644
 --- a/include/linux/rcupdate.h
 +++ b/include/linux/rcupdate.h
-@@ -343,11 +343,7 @@ static inline int rcu_preempt_depth(void
+@@ -343,11 +343,7 @@ static inline int rcu_preempt_depth(void)
  /* Internal to kernel */
  void rcu_init(void);
  void rcu_sched_qs(void);
@@ -43,6 +44,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_check_callbacks(int user);
  void rcu_report_dead(unsigned int cpu);
  void rcu_cpu_starting(unsigned int cpu);
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
+index 2cb41686a4b8..984ecb7a83e0 100644
 --- a/kernel/rcu/tree.c
 +++ b/kernel/rcu/tree.c
 @@ -260,7 +260,14 @@ void rcu_sched_qs(void)
@@ -61,6 +64,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void rcu_bh_qs(void)
  {
  	if (__this_cpu_read(rcu_bh_data.cpu_no_qs.s)) {
+diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
+index a95d623a84b9..a375276227a8 100644
 --- a/kernel/rcu/tree_plugin.h
 +++ b/kernel/rcu/tree_plugin.h
 @@ -28,6 +28,7 @@
@@ -71,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include "../time/tick-internal.h"
  
  #ifdef CONFIG_RCU_BOOST
-@@ -1244,7 +1245,7 @@ static void rcu_prepare_kthreads(int cpu
+@@ -1244,7 +1245,7 @@ static void rcu_prepare_kthreads(int cpu)
  
  #endif /* #else #ifdef CONFIG_RCU_BOOST */
  
@@ -80,7 +85,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /*
   * Check to see if any future RCU-related work will need to be done
-@@ -1261,7 +1262,9 @@ int rcu_needs_cpu(u64 basemono, u64 *nex
+@@ -1261,7 +1262,9 @@ int rcu_needs_cpu(u64 basemono, u64 *nextevt)
  	return IS_ENABLED(CONFIG_RCU_NOCB_CPU_ALL)
  	       ? 0 : rcu_cpu_has_callbacks(NULL);
  }
@@ -90,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Because we do not have RCU_FAST_NO_HZ, don't bother cleaning up
   * after it.
-@@ -1357,6 +1360,8 @@ static bool __maybe_unused rcu_try_advan
+@@ -1357,6 +1360,8 @@ static bool __maybe_unused rcu_try_advance_all_cbs(void)
  	return cbs_ready;
  }
  
@@ -99,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Allow the CPU to enter dyntick-idle mode unless it has callbacks ready
   * to invoke.  If the CPU has callbacks, try to advance them.  Tell the
-@@ -1402,6 +1407,7 @@ int rcu_needs_cpu(u64 basemono, u64 *nex
+@@ -1402,6 +1407,7 @@ int rcu_needs_cpu(u64 basemono, u64 *nextevt)
  	*nextevt = basemono + dj * TICK_NSEC;
  	return 0;
  }
diff --git a/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch b/debian/patches/features/all/rt/0193-rcutree-rcu_bh_qs-Disable-irq-while-calling-rcu_pree.patch
similarity index 79%
rename from debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch
rename to debian/patches/features/all/rt/0193-rcutree-rcu_bh_qs-Disable-irq-while-calling-rcu_pree.patch
index 9e7d2fc..d8f695f 100644
--- a/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch
+++ b/debian/patches/features/all/rt/0193-rcutree-rcu_bh_qs-Disable-irq-while-calling-rcu_pree.patch
@@ -1,7 +1,8 @@
 From: Tiejun Chen <tiejun.chen at windriver.com>
 Date: Wed, 18 Dec 2013 17:51:49 +0800
-Subject: rcutree/rcu_bh_qs: Disable irq while calling rcu_preempt_qs()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 193/332] rcutree/rcu_bh_qs: Disable irq while calling
+ rcu_preempt_qs()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cd489c7c2acca7adafcc38b79e6837061b90d077
 
 Any callers to the function rcu_preempt_qs() must disable irqs in
 order to protect the assignment to ->rcu_read_unlock_special. In
@@ -29,9 +30,11 @@ Signed-off-by: Tiejun Chen <tiejun.chen at windriver.com>
 Signed-off-by: Bin Jiang <bin.jiang at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/rcu/tree.c |    5 +++++
+ kernel/rcu/tree.c | 5 +++++
  1 file changed, 5 insertions(+)
 
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
+index 984ecb7a83e0..7e423f05056f 100644
 --- a/kernel/rcu/tree.c
 +++ b/kernel/rcu/tree.c
 @@ -265,7 +265,12 @@ static void rcu_preempt_qs(void);
diff --git a/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches/features/all/rt/0194-tty-serial-omap-Make-the-locking-RT-aware.patch
similarity index 69%
rename from debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch
rename to debian/patches/features/all/rt/0194-tty-serial-omap-Make-the-locking-RT-aware.patch
index 126dfcf..702dd44 100644
--- a/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch
+++ b/debian/patches/features/all/rt/0194-tty-serial-omap-Make-the-locking-RT-aware.patch
@@ -1,7 +1,7 @@
-Subject: tty/serial/omap: Make the locking RT aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 28 Jul 2011 13:32:57 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 194/332] tty/serial/omap: Make the locking RT aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=261e3612d7c52bade0e80f375bb77b694710ef36
 
 The lock is a sleeping lock and local_irq_save() is not the
 optimsation we are looking for. Redo it to make it work on -RT and
@@ -9,12 +9,14 @@ non-RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/tty/serial/omap-serial.c |   12 ++++--------
+ drivers/tty/serial/omap-serial.c | 12 ++++--------
  1 file changed, 4 insertions(+), 8 deletions(-)
 
+diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
+index 44e5b5bf713b..400140d1dfff 100644
 --- a/drivers/tty/serial/omap-serial.c
 +++ b/drivers/tty/serial/omap-serial.c
-@@ -1257,13 +1257,10 @@ serial_omap_console_write(struct console
+@@ -1257,13 +1257,10 @@ serial_omap_console_write(struct console *co, const char *s,
  
  	pm_runtime_get_sync(up->dev);
  
@@ -31,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 * First save the IER then disable the interrupts
-@@ -1292,8 +1289,7 @@ serial_omap_console_write(struct console
+@@ -1292,8 +1289,7 @@ serial_omap_console_write(struct console *co, const char *s,
  	pm_runtime_mark_last_busy(up->dev);
  	pm_runtime_put_autosuspend(up->dev);
  	if (locked)
diff --git a/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch b/debian/patches/features/all/rt/0195-tty-serial-pl011-Make-the-locking-work-on-RT.patch
similarity index 65%
rename from debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch
rename to debian/patches/features/all/rt/0195-tty-serial-pl011-Make-the-locking-work-on-RT.patch
index 4b2b43f..2ff8e1a 100644
--- a/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch
+++ b/debian/patches/features/all/rt/0195-tty-serial-pl011-Make-the-locking-work-on-RT.patch
@@ -1,19 +1,21 @@
-Subject: tty/serial/pl011: Make the locking work on RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Tue, 08 Jan 2013 21:36:51 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Tue, 8 Jan 2013 21:36:51 +0100
+Subject: [PATCH 195/332] tty/serial/pl011: Make the locking work on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c2b92d74e6e160ebdbb77768e88ae70982609af1
 
 The lock is a sleeping lock and local_irq_save() is not the optimsation
 we are looking for. Redo it to make it work on -RT and non-RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/tty/serial/amba-pl011.c |   15 ++++++++++-----
+ drivers/tty/serial/amba-pl011.c | 15 ++++++++++-----
  1 file changed, 10 insertions(+), 5 deletions(-)
 
+diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
+index e2c33b9528d8..53af53c43e8c 100644
 --- a/drivers/tty/serial/amba-pl011.c
 +++ b/drivers/tty/serial/amba-pl011.c
-@@ -2194,13 +2194,19 @@ pl011_console_write(struct console *co,
+@@ -2194,13 +2194,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
  
  	clk_enable(uap->clk);
  
@@ -36,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/*
  	 *	First save the CR then disable the interrupts
-@@ -2224,8 +2230,7 @@ pl011_console_write(struct console *co,
+@@ -2224,8 +2230,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
  		pl011_write(old_cr, uap, REG_CR);
  
  	if (locked)
diff --git a/debian/patches/features/all/rt/rt-serial-warn-fix.patch b/debian/patches/features/all/rt/0196-rt-Improve-the-serial-console-PASS_LIMIT.patch
similarity index 61%
rename from debian/patches/features/all/rt/rt-serial-warn-fix.patch
rename to debian/patches/features/all/rt/0196-rt-Improve-the-serial-console-PASS_LIMIT.patch
index e9a9431..87ef3a4 100644
--- a/debian/patches/features/all/rt/rt-serial-warn-fix.patch
+++ b/debian/patches/features/all/rt/0196-rt-Improve-the-serial-console-PASS_LIMIT.patch
@@ -1,7 +1,10 @@
-Subject: rt: Improve the serial console PASS_LIMIT
 From: Ingo Molnar <mingo at elte.hu>
-Date: Wed Dec 14 13:05:54 CET 2011
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 14 Dec 2011 13:05:54 +0100
+Subject: [PATCH 196/332] rt: Improve the serial console PASS_LIMIT
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a6296fa72040073a00d958d25f2d3f97ee27f0a6
 
 Beyond the warning:
 
@@ -13,12 +16,14 @@ give it a chance to continue in some really ugly situation.
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/tty/serial/8250/8250_core.c |   11 ++++++++++-
+ drivers/tty/serial/8250/8250_core.c | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)
 
+diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
+index e8819aa20415..dd7f9bf45d6c 100644
 --- a/drivers/tty/serial/8250/8250_core.c
 +++ b/drivers/tty/serial/8250/8250_core.c
-@@ -58,7 +58,16 @@ static struct uart_driver serial8250_reg
+@@ -58,7 +58,16 @@ static struct uart_driver serial8250_reg;
  
  static unsigned int skip_txen_test; /* force skip of txen test at init time */
  
diff --git a/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch b/debian/patches/features/all/rt/0197-tty-serial-8250-don-t-take-the-trylock-during-oops.patch
similarity index 60%
rename from debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch
rename to debian/patches/features/all/rt/0197-tty-serial-8250-don-t-take-the-trylock-during-oops.patch
index 3a702d0..a3015f2 100644
--- a/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch
+++ b/debian/patches/features/all/rt/0197-tty-serial-8250-don-t-take-the-trylock-during-oops.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 11 Apr 2016 16:55:02 +0200
-Subject: [PATCH] tty: serial: 8250: don't take the trylock during oops
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 197/332] tty: serial: 8250: don't take the trylock during oops
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a4f1ceda69ee0639af4d28187b3d755c7724710b
 
 An oops with irqs off (panic() from irqsafe hrtimer like the watchdog
 timer) will lead to a lockdep warning on each invocation and as such
@@ -10,12 +10,14 @@ Therefore we skip the trylock in the oops case.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/tty/serial/8250/8250_port.c |    4 +---
+ drivers/tty/serial/8250/8250_port.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
 
+diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
+index f24d3030b98c..679d08bc6d25 100644
 --- a/drivers/tty/serial/8250/8250_port.c
 +++ b/drivers/tty/serial/8250/8250_port.c
-@@ -3144,10 +3144,8 @@ void serial8250_console_write(struct uar
+@@ -3144,10 +3144,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
  
  	serial8250_rpm_get(up);
  
diff --git a/debian/patches/features/all/rt/wait.h-include-atomic.h.patch b/debian/patches/features/all/rt/0198-wait.h-include-atomic.h.patch
similarity index 73%
rename from debian/patches/features/all/rt/wait.h-include-atomic.h.patch
rename to debian/patches/features/all/rt/0198-wait.h-include-atomic.h.patch
index 64d2354..f080978 100644
--- a/debian/patches/features/all/rt/wait.h-include-atomic.h.patch
+++ b/debian/patches/features/all/rt/0198-wait.h-include-atomic.h.patch
@@ -1,7 +1,10 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 28 Oct 2013 12:19:57 +0100
-Subject: wait.h: include atomic.h
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 198/332] wait.h: include atomic.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=60d6490aa422aa70f70ed8a2e74ed7941483953c
 
 |  CC      init/main.o
 |In file included from include/linux/mmzone.h:9:0,
@@ -18,9 +21,11 @@ This pops up on ARM. Non-RT gets its atomic.h include from spinlock.h
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/wait.h |    1 +
+ include/linux/wait.h | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/include/linux/wait.h b/include/linux/wait.h
+index 2408e8d5c05c..db50d6609195 100644
 --- a/include/linux/wait.h
 +++ b/include/linux/wait.h
 @@ -8,6 +8,7 @@
diff --git a/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch b/debian/patches/features/all/rt/0199-work-simple-Simple-work-queue-implemenation.patch
similarity index 87%
rename from debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch
rename to debian/patches/features/all/rt/0199-work-simple-Simple-work-queue-implemenation.patch
index 18136bd..e9937a4 100644
--- a/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch
+++ b/debian/patches/features/all/rt/0199-work-simple-Simple-work-queue-implemenation.patch
@@ -1,7 +1,7 @@
 From: Daniel Wagner <daniel.wagner at bmw-carit.de>
 Date: Fri, 11 Jul 2014 15:26:11 +0200
-Subject: work-simple: Simple work queue implemenation
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 199/332] work-simple: Simple work queue implemenation
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=26247500ebabfcfea1f2ed60b0138b3a369eb07d
 
 Provides a framework for enqueuing callbacks from irq context
 PREEMPT_RT_FULL safe. The callbacks are executed in kthread context.
@@ -11,11 +11,16 @@ Bases on wait-simple.
 Cc: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
 ---
- include/linux/swork.h |   24 ++++++
- kernel/sched/Makefile |    2 
- kernel/sched/swork.c  |  173 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/swork.h |  24 +++++++
+ kernel/sched/Makefile |   2 +-
+ kernel/sched/swork.c  | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 198 insertions(+), 1 deletion(-)
+ create mode 100644 include/linux/swork.h
+ create mode 100644 kernel/sched/swork.c
 
+diff --git a/include/linux/swork.h b/include/linux/swork.h
+new file mode 100644
+index 000000000000..f175fa9a6016
 --- /dev/null
 +++ b/include/linux/swork.h
 @@ -0,0 +1,24 @@
@@ -43,6 +48,8 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
 +void swork_put(void);
 +
 +#endif /* _LINUX_SWORK_H */
+diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
+index 5e59b832ae2b..7337a7f60e3f 100644
 --- a/kernel/sched/Makefile
 +++ b/kernel/sched/Makefile
 @@ -17,7 +17,7 @@ endif
@@ -54,6 +61,9 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
  obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o
  obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
  obj-$(CONFIG_SCHEDSTATS) += stats.o
+diff --git a/kernel/sched/swork.c b/kernel/sched/swork.c
+new file mode 100644
+index 000000000000..1950f40ca725
 --- /dev/null
 +++ b/kernel/sched/swork.c
 @@ -0,0 +1,173 @@
diff --git a/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch b/debian/patches/features/all/rt/0200-completion-Use-simple-wait-queues.patch
similarity index 73%
rename from debian/patches/features/all/rt/completion-use-simple-wait-queues.patch
rename to debian/patches/features/all/rt/0200-completion-Use-simple-wait-queues.patch
index 1f7fe06..fd7a865 100644
--- a/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch
+++ b/debian/patches/features/all/rt/0200-completion-Use-simple-wait-queues.patch
@@ -1,7 +1,7 @@
-Subject: completion: Use simple wait queues
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 11 Jan 2013 11:23:51 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 200/332] completion: Use simple wait queues
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=084a9f8570f41b28d514a55b73e526923342fd8e
 
 Completions have no long lasting callbacks and therefor do not need
 the complex waitqueue variant. Use simple waitqueues which reduces the
@@ -9,23 +9,25 @@ contention on the waitqueue lock.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/net/wireless/intersil/orinoco/orinoco_usb.c |    2 -
- drivers/usb/gadget/function/f_fs.c                  |    2 -
- drivers/usb/gadget/legacy/inode.c                   |    4 +-
- include/linux/completion.h                          |    9 ++---
- include/linux/suspend.h                             |    6 +++
- include/linux/swait.h                               |    1 
- include/linux/uprobes.h                             |    1 
- kernel/power/hibernate.c                            |    7 ++++
- kernel/power/suspend.c                              |    5 +++
- kernel/sched/completion.c                           |   32 ++++++++++----------
- kernel/sched/core.c                                 |   10 +++++-
- kernel/sched/swait.c                                |   20 ++++++++++++
+ .../net/wireless/intersil/orinoco/orinoco_usb.c    |  2 +-
+ drivers/usb/gadget/function/f_fs.c                 |  2 +-
+ drivers/usb/gadget/legacy/inode.c                  |  4 +--
+ include/linux/completion.h                         |  9 +++---
+ include/linux/suspend.h                            |  6 ++++
+ include/linux/swait.h                              |  1 +
+ include/linux/uprobes.h                            |  1 +
+ kernel/power/hibernate.c                           |  7 +++++
+ kernel/power/suspend.c                             |  5 ++++
+ kernel/sched/completion.c                          | 32 +++++++++++-----------
+ kernel/sched/core.c                                | 10 +++++--
+ kernel/sched/swait.c                               | 20 ++++++++++++++
  12 files changed, 72 insertions(+), 27 deletions(-)
 
+diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+index bca6935a94db..d7a35ee34d03 100644
 --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
 +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
-@@ -697,7 +697,7 @@ static void ezusb_req_ctx_wait(struct ez
+@@ -697,7 +697,7 @@ static void ezusb_req_ctx_wait(struct ezusb_priv *upriv,
  			while (!ctx->done.done && msecs--)
  				udelay(1000);
  		} else {
@@ -34,9 +36,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  						 ctx->done.done);
  		}
  		break;
+diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
+index f9c99803a43d..e7adb023b921 100644
 --- a/drivers/usb/gadget/function/f_fs.c
 +++ b/drivers/usb/gadget/function/f_fs.c
-@@ -1593,7 +1593,7 @@ static void ffs_data_put(struct ffs_data
+@@ -1593,7 +1593,7 @@ static void ffs_data_put(struct ffs_data *ffs)
  		pr_info("%s(): freeing\n", __func__);
  		ffs_data_clear(ffs);
  		BUG_ON(waitqueue_active(&ffs->ev.waitq) ||
@@ -45,9 +49,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		kfree(ffs->dev_name);
  		kfree(ffs);
  	}
+diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
+index f959c42ecace..65cced5e01da 100644
 --- a/drivers/usb/gadget/legacy/inode.c
 +++ b/drivers/usb/gadget/legacy/inode.c
-@@ -346,7 +346,7 @@ ep_io (struct ep_data *epdata, void *buf
+@@ -346,7 +346,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
  	spin_unlock_irq (&epdata->dev->lock);
  
  	if (likely (value == 0)) {
@@ -56,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (value != 0) {
  			spin_lock_irq (&epdata->dev->lock);
  			if (likely (epdata->ep != NULL)) {
-@@ -355,7 +355,7 @@ ep_io (struct ep_data *epdata, void *buf
+@@ -355,7 +355,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
  				usb_ep_dequeue (epdata->ep, epdata->req);
  				spin_unlock_irq (&epdata->dev->lock);
  
@@ -65,6 +71,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				if (epdata->status == -ECONNRESET)
  					epdata->status = -EINTR;
  			} else {
+diff --git a/include/linux/completion.h b/include/linux/completion.h
+index 5d5aaae3af43..3bca1590e29f 100644
 --- a/include/linux/completion.h
 +++ b/include/linux/completion.h
 @@ -7,8 +7,7 @@
@@ -100,6 +108,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
+diff --git a/include/linux/suspend.h b/include/linux/suspend.h
+index d9718378a8be..e81e6dc7dcb1 100644
 --- a/include/linux/suspend.h
 +++ b/include/linux/suspend.h
 @@ -193,6 +193,12 @@ struct platform_freeze_ops {
@@ -115,9 +125,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_SUSPEND
  /**
   * suspend_set_ops - set platform dependent suspend operations
+diff --git a/include/linux/swait.h b/include/linux/swait.h
+index c1f9c62a8a50..83f004a72320 100644
 --- a/include/linux/swait.h
 +++ b/include/linux/swait.h
-@@ -87,6 +87,7 @@ static inline int swait_active(struct sw
+@@ -87,6 +87,7 @@ static inline int swait_active(struct swait_queue_head *q)
  extern void swake_up(struct swait_queue_head *q);
  extern void swake_up_all(struct swait_queue_head *q);
  extern void swake_up_locked(struct swait_queue_head *q);
@@ -125,6 +137,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  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 --git a/include/linux/uprobes.h b/include/linux/uprobes.h
+index 4a29c75b146e..0a294e950df8 100644
 --- a/include/linux/uprobes.h
 +++ b/include/linux/uprobes.h
 @@ -27,6 +27,7 @@
@@ -135,6 +149,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  struct vm_area_struct;
  struct mm_struct;
+diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
+index 72d2d26b5ce8..968255f27a33 100644
 --- a/kernel/power/hibernate.c
 +++ b/kernel/power/hibernate.c
 @@ -683,6 +683,10 @@ static int load_image_and_restore(void)
@@ -165,9 +181,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return error;
  }
  
+diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
+index 40f8332ec170..c8cbb5ed2fe3 100644
 --- a/kernel/power/suspend.c
 +++ b/kernel/power/suspend.c
-@@ -531,6 +531,8 @@ static int enter_state(suspend_state_t s
+@@ -531,6 +531,8 @@ static int enter_state(suspend_state_t state)
  	return error;
  }
  
@@ -193,6 +211,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return error;
  }
  EXPORT_SYMBOL(pm_suspend);
+diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
+index 8d0f35debf35..b62cf6400fe0 100644
 --- a/kernel/sched/completion.c
 +++ b/kernel/sched/completion.c
 @@ -30,10 +30,10 @@ void complete(struct completion *x)
@@ -249,7 +269,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (!x->done)
  			return timeout;
  	}
-@@ -89,9 +89,9 @@ static inline long __sched
+@@ -89,9 +89,9 @@ __wait_for_common(struct completion *x,
  {
  	might_sleep();
  
@@ -261,7 +281,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return timeout;
  }
  
-@@ -277,12 +277,12 @@ bool try_wait_for_completion(struct comp
+@@ -277,12 +277,12 @@ bool try_wait_for_completion(struct completion *x)
  	if (!READ_ONCE(x->done))
  		return 0;
  
@@ -276,7 +296,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return ret;
  }
  EXPORT_SYMBOL(try_wait_for_completion);
-@@ -311,7 +311,7 @@ bool completion_done(struct completion *
+@@ -311,7 +311,7 @@ bool completion_done(struct completion *x)
  	 * after it's acquired the lock.
  	 */
  	smp_rmb();
@@ -285,9 +305,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return true;
  }
  EXPORT_SYMBOL(completion_done);
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 45aa5d4f1485..c4dc9671d777 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3323,7 +3323,10 @@ void migrate_disable(void)
+@@ -3335,7 +3335,10 @@ void migrate_disable(void)
  	}
  
  #ifdef CONFIG_SCHED_DEBUG
@@ -299,7 +321,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  	if (p->migrate_disable) {
-@@ -3350,7 +3353,10 @@ void migrate_enable(void)
+@@ -3362,7 +3365,10 @@ void migrate_enable(void)
  	}
  
  #ifdef CONFIG_SCHED_DEBUG
@@ -311,6 +333,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  	WARN_ON_ONCE(p->migrate_disable <= 0);
  
+diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c
+index 82f0dff90030..e2e224c59c0a 100644
 --- a/kernel/sched/swait.c
 +++ b/kernel/sched/swait.c
 @@ -1,5 +1,6 @@
@@ -320,7 +344,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  void __init_swait_queue_head(struct swait_queue_head *q, const char *name,
  			     struct lock_class_key *key)
-@@ -29,6 +30,25 @@ void swake_up_locked(struct swait_queue_
+@@ -29,6 +30,25 @@ void swake_up_locked(struct swait_queue_head *q)
  }
  EXPORT_SYMBOL(swake_up_locked);
  
diff --git a/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch b/debian/patches/features/all/rt/0201-fs-aio-simple-simple-work.patch
similarity index 84%
rename from debian/patches/features/all/rt/fs-aio-simple-simple-work.patch
rename to debian/patches/features/all/rt/0201-fs-aio-simple-simple-work.patch
index be5d78e..0e8dc3a 100644
--- a/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch
+++ b/debian/patches/features/all/rt/0201-fs-aio-simple-simple-work.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 16 Feb 2015 18:49:10 +0100
-Subject: fs/aio: simple simple work
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 201/332] fs/aio: simple simple work
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f3891fddc3118b9d9c2ec9e17c726a2820ab738f
 
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768
 |in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2
@@ -25,9 +25,11 @@ Reported-By: Mike Galbraith <umgwanakikbuti at gmail.com>
 Suggested-by: Benjamin LaHaise <bcrl at kvack.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/aio.c |   24 +++++++++++++++++-------
+ fs/aio.c | 24 +++++++++++++++++-------
  1 file changed, 17 insertions(+), 7 deletions(-)
 
+diff --git a/fs/aio.c b/fs/aio.c
+index 0fcb49ad67d4..211ebc21e4db 100644
 --- a/fs/aio.c
 +++ b/fs/aio.c
 @@ -40,6 +40,7 @@
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	aio_mnt = kern_mount(&aio_fs);
  	if (IS_ERR(aio_mnt))
  		panic("Failed to create aio fs mount.");
-@@ -581,9 +583,9 @@ static int kiocb_cancel(struct aio_kiocb
+@@ -581,9 +583,9 @@ static int kiocb_cancel(struct aio_kiocb *kiocb)
  	return cancel(&kiocb->common);
  }
  
@@ -67,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	pr_debug("freeing %p\n", ctx);
  
-@@ -602,8 +604,8 @@ static void free_ioctx_reqs(struct percp
+@@ -602,8 +604,8 @@ static void free_ioctx_reqs(struct percpu_ref *ref)
  	if (ctx->rq_wait && atomic_dec_and_test(&ctx->rq_wait->count))
  		complete(&ctx->rq_wait->comp);
  
@@ -78,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -611,9 +613,9 @@ static void free_ioctx_reqs(struct percp
+@@ -611,9 +613,9 @@ static void free_ioctx_reqs(struct percpu_ref *ref)
   * 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.
   */
@@ -90,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct aio_kiocb *req;
  
  	spin_lock_irq(&ctx->ctx_lock);
-@@ -632,6 +634,14 @@ static void free_ioctx_users(struct perc
+@@ -632,6 +634,14 @@ static void free_ioctx_users(struct percpu_ref *ref)
  	percpu_ref_put(&ctx->reqs);
  }
  
diff --git a/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch b/debian/patches/features/all/rt/0202-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch
similarity index 74%
rename from debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch
rename to debian/patches/features/all/rt/0202-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch
index e8b0570..7ed718b 100644
--- a/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch
+++ b/debian/patches/features/all/rt/0202-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 21 Aug 2013 17:48:46 +0200
-Subject: genirq: Do not invoke the affinity callback via a workqueue on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 202/332] genirq: Do not invoke the affinity callback via a
+ workqueue on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=73a0f888cb2e1e940adcbc4a5448f978bdcfd39c
 
 Joe Korty reported, that __irq_set_affinity_locked() schedules a
 workqueue while holding a rawlock which results in a might_sleep()
@@ -10,14 +11,16 @@ This patch uses swork_queue() instead.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/scsi/qla2xxx/qla_isr.c |    4 +++
- include/linux/interrupt.h      |    6 +++++
- kernel/irq/manage.c            |   43 ++++++++++++++++++++++++++++++++++++++---
+ drivers/scsi/qla2xxx/qla_isr.c |  4 ++++
+ include/linux/interrupt.h      |  6 ++++++
+ kernel/irq/manage.c            | 43 +++++++++++++++++++++++++++++++++++++++---
  3 files changed, 50 insertions(+), 3 deletions(-)
 
+diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
+index bddaabb288d4..8de0ec4222fe 100644
 --- a/drivers/scsi/qla2xxx/qla_isr.c
 +++ b/drivers/scsi/qla2xxx/qla_isr.c
-@@ -3125,7 +3125,11 @@ qla24xx_enable_msix(struct qla_hw_data *
+@@ -3129,7 +3129,11 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
  		* kref_put().
  		*/
  		kref_get(&qentry->irq_notify.kref);
@@ -29,6 +32,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	/*
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index f323a5109987..6ea17576aa59 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -14,6 +14,7 @@
@@ -59,9 +64,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
  	void (*release)(struct kref *ref);
  };
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index 562df8dc14be..5f14e0d7c0c7 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
-@@ -235,7 +235,12 @@ int irq_set_affinity_locked(struct irq_d
+@@ -235,7 +235,12 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,
  
  	if (desc->affinity_notify) {
  		kref_get(&desc->affinity_notify->kref);
@@ -74,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  	irqd_set(data, IRQD_AFFINITY_SET);
  
-@@ -273,10 +278,8 @@ int irq_set_affinity_hint(unsigned int i
+@@ -273,10 +278,8 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
  }
  EXPORT_SYMBOL_GPL(irq_set_affinity_hint);
  
@@ -86,7 +93,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct irq_desc *desc = irq_to_desc(notify->irq);
  	cpumask_var_t cpumask;
  	unsigned long flags;
-@@ -298,6 +301,35 @@ static void irq_affinity_notify(struct w
+@@ -298,6 +301,35 @@ static void irq_affinity_notify(struct work_struct *work)
  	kref_put(&notify->kref, notify->release);
  }
  
@@ -122,7 +129,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   *	irq_set_affinity_notifier - control notification of IRQ affinity changes
   *	@irq:		Interrupt for which to enable/disable notification
-@@ -326,7 +358,12 @@ irq_set_affinity_notifier(unsigned int i
+@@ -326,7 +358,12 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
  	if (notify) {
  		notify->irq = irq;
  		kref_init(&notify->kref);
diff --git a/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch b/debian/patches/features/all/rt/0203-hrtimer-Move-schedule_work-call-to-helper-thread.patch
similarity index 89%
rename from debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch
rename to debian/patches/features/all/rt/0203-hrtimer-Move-schedule_work-call-to-helper-thread.patch
index 55d94db..3553a00 100644
--- a/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch
+++ b/debian/patches/features/all/rt/0203-hrtimer-Move-schedule_work-call-to-helper-thread.patch
@@ -1,7 +1,7 @@
 From: Yang Shi <yang.shi at windriver.com>
 Date: Mon, 16 Sep 2013 14:09:19 -0700
-Subject: hrtimer: Move schedule_work call to helper thread
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 203/332] hrtimer: Move schedule_work call to helper thread
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e0c544411846e84dd5acbdd47afa4f9d7041a221
 
 When run ltp leapsec_timer test, the following call trace is caught:
 
@@ -47,9 +47,11 @@ Signed-off-by: Yang Shi <yang.shi at windriver.com>
 [bigeasy: use swork_queue() instead a helper thread]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/hrtimer.c |   24 ++++++++++++++++++++++++
+ kernel/time/hrtimer.c | 24 ++++++++++++++++++++++++
  1 file changed, 24 insertions(+)
 
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index 3d3c7c7f93a6..8d406733108a 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
 @@ -696,6 +696,29 @@ static void hrtimer_switch_to_hres(void)
diff --git a/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch b/debian/patches/features/all/rt/0204-locking-percpu-rwsem-Remove-preempt_disable-variants.patch
similarity index 74%
rename from debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch
rename to debian/patches/features/all/rt/0204-locking-percpu-rwsem-Remove-preempt_disable-variants.patch
index d872b13..da092e1 100644
--- a/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch
+++ b/debian/patches/features/all/rt/0204-locking-percpu-rwsem-Remove-preempt_disable-variants.patch
@@ -1,7 +1,7 @@
-Subject: locking/percpu-rwsem: Remove preempt_disable variants
 From: Peter Zijlstra <peterz at infradead.org>
-Date: Wed Nov 23 16:29:32 CET 2016
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 23 Nov 2016 16:29:32 +0100
+Subject: [PATCH 204/332] locking/percpu-rwsem: Remove preempt_disable variants
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0b18e96707d53b05f2d7884db953f603bdb6fdd6
 
 Effective revert commit:
 
@@ -12,14 +12,15 @@ performance issue for PREEMPT=y.
 
 Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
 ---
----
- fs/locks.c                   |   32 ++++++++++++++++----------------
- include/linux/percpu-rwsem.h |   24 ++++--------------------
+ fs/locks.c                   | 32 ++++++++++++++++----------------
+ include/linux/percpu-rwsem.h | 24 ++++--------------------
  2 files changed, 20 insertions(+), 36 deletions(-)
 
+diff --git a/fs/locks.c b/fs/locks.c
+index 22c5b4aa4961..269c6a44449a 100644
 --- a/fs/locks.c
 +++ b/fs/locks.c
-@@ -935,7 +935,7 @@ static int flock_lock_inode(struct inode
+@@ -935,7 +935,7 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request)
  			return -ENOMEM;
  	}
  
@@ -28,7 +29,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  	if (request->fl_flags & FL_ACCESS)
  		goto find_conflict;
-@@ -976,7 +976,7 @@ static int flock_lock_inode(struct inode
+@@ -976,7 +976,7 @@ static int flock_lock_inode(struct inode *inode, struct file_lock *request)
  
  out:
  	spin_unlock(&ctx->flc_lock);
@@ -37,7 +38,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	if (new_fl)
  		locks_free_lock(new_fl);
  	locks_dispose_list(&dispose);
-@@ -1013,7 +1013,7 @@ static int posix_lock_inode(struct inode
+@@ -1013,7 +1013,7 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request,
  		new_fl2 = locks_alloc_lock();
  	}
  
@@ -46,7 +47,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  	/*
  	 * New lock request. Walk all POSIX locks and look for conflicts. If
-@@ -1185,7 +1185,7 @@ static int posix_lock_inode(struct inode
+@@ -1185,7 +1185,7 @@ static int posix_lock_inode(struct inode *inode, struct file_lock *request,
  	}
   out:
  	spin_unlock(&ctx->flc_lock);
@@ -55,7 +56,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	/*
  	 * Free any unused locks.
  	 */
-@@ -1460,7 +1460,7 @@ int __break_lease(struct inode *inode, u
+@@ -1460,7 +1460,7 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
  		return error;
  	}
  
@@ -64,7 +65,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  
  	time_out_leases(inode, &dispose);
-@@ -1512,13 +1512,13 @@ int __break_lease(struct inode *inode, u
+@@ -1512,13 +1512,13 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
  	locks_insert_block(fl, new_fl);
  	trace_break_lease_block(inode, new_fl);
  	spin_unlock(&ctx->flc_lock);
@@ -80,7 +81,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  	trace_break_lease_unblock(inode, new_fl);
  	locks_delete_block(new_fl);
-@@ -1535,7 +1535,7 @@ int __break_lease(struct inode *inode, u
+@@ -1535,7 +1535,7 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
  	}
  out:
  	spin_unlock(&ctx->flc_lock);
@@ -107,7 +108,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  
  		locks_dispose_list(&dispose);
  	}
-@@ -1694,7 +1694,7 @@ generic_add_lease(struct file *filp, lon
+@@ -1694,7 +1694,7 @@ generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **pr
  		return -EINVAL;
  	}
  
@@ -116,7 +117,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  	time_out_leases(inode, &dispose);
  	error = check_conflicting_open(dentry, arg, lease->fl_flags);
-@@ -1765,7 +1765,7 @@ generic_add_lease(struct file *filp, lon
+@@ -1765,7 +1765,7 @@ generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **pr
  		lease->fl_lmops->lm_setup(lease, priv);
  out:
  	spin_unlock(&ctx->flc_lock);
@@ -125,7 +126,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	locks_dispose_list(&dispose);
  	if (is_deleg)
  		inode_unlock(inode);
-@@ -1788,7 +1788,7 @@ static int generic_delete_lease(struct f
+@@ -1788,7 +1788,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
  		return error;
  	}
  
@@ -134,7 +135,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	spin_lock(&ctx->flc_lock);
  	list_for_each_entry(fl, &ctx->flc_lease, fl_list) {
  		if (fl->fl_file == filp &&
-@@ -1801,7 +1801,7 @@ static int generic_delete_lease(struct f
+@@ -1801,7 +1801,7 @@ static int generic_delete_lease(struct file *filp, void *owner)
  	if (victim)
  		error = fl->fl_lmops->lm_change(victim, F_UNLCK, &dispose);
  	spin_unlock(&ctx->flc_lock);
@@ -143,7 +144,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	locks_dispose_list(&dispose);
  	return error;
  }
-@@ -2532,13 +2532,13 @@ locks_remove_lease(struct file *filp, st
+@@ -2532,13 +2532,13 @@ locks_remove_lease(struct file *filp, struct file_lock_context *ctx)
  	if (list_empty(&ctx->flc_lease))
  		return;
  
@@ -159,9 +160,11 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  
  	locks_dispose_list(&dispose);
  }
+diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h
+index 82d54a4b9988..ea940f451606 100644
 --- a/include/linux/percpu-rwsem.h
 +++ b/include/linux/percpu-rwsem.h
-@@ -28,7 +28,7 @@ static struct percpu_rw_semaphore name =
+@@ -28,7 +28,7 @@ static struct percpu_rw_semaphore name = {				\
  extern int __percpu_down_read(struct percpu_rw_semaphore *, int);
  extern void __percpu_up_read(struct percpu_rw_semaphore *);
  
@@ -170,7 +173,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  {
  	might_sleep();
  
-@@ -46,16 +46,10 @@ static inline void percpu_down_read_pree
+@@ -46,16 +46,10 @@ static inline void percpu_down_read_preempt_disable(struct percpu_rw_semaphore *
  	__this_cpu_inc(*sem->read_count);
  	if (unlikely(!rcu_sync_is_idle(&sem->rss)))
  		__percpu_down_read(sem, false); /* Unconditional memory barrier */
@@ -188,7 +191,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	preempt_enable();
  }
  
-@@ -82,13 +76,9 @@ static inline int percpu_down_read_trylo
+@@ -82,13 +76,9 @@ static inline int percpu_down_read_trylock(struct percpu_rw_semaphore *sem)
  	return ret;
  }
  
@@ -204,7 +207,7 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
  	/*
  	 * Same as in percpu_down_read().
  	 */
-@@ -101,12 +91,6 @@ static inline void percpu_up_read_preemp
+@@ -101,12 +91,6 @@ static inline void percpu_up_read_preempt_enable(struct percpu_rw_semaphore *sem
  	rwsem_release(&sem->rw_sem.dep_map, 1, _RET_IP_);
  }
  
diff --git a/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch b/debian/patches/features/all/rt/0205-fs-namespace-preemption-fix.patch
similarity index 70%
rename from debian/patches/features/all/rt/fs-namespace-preemption-fix.patch
rename to debian/patches/features/all/rt/0205-fs-namespace-preemption-fix.patch
index b91177c..ed502aa 100644
--- a/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch
+++ b/debian/patches/features/all/rt/0205-fs-namespace-preemption-fix.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 19 Jul 2009 08:44:27 -0500
-Subject: fs: namespace preemption fix
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 205/332] fs: namespace preemption fix
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=52cf51c039829aadecab2392f3cc51877b734aa6
 
 On RT we cannot loop with preemption disabled here as
 mnt_make_readonly() might have been preempted. We can safely enable
@@ -9,14 +9,15 @@ preemption while waiting for MNT_WRITE_HOLD to be cleared. Safe on !RT
 as well.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- fs/namespace.c |    5 ++++-
+ fs/namespace.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
+diff --git a/fs/namespace.c b/fs/namespace.c
+index d7360f9897b4..295b02091d1f 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -356,8 +356,11 @@ int __mnt_want_write(struct vfsmount *m)
+@@ -357,8 +357,11 @@ int __mnt_want_write(struct vfsmount *m)
  	 * incremented count after it has set MNT_WRITE_HOLD.
  	 */
  	smp_mb();
diff --git a/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch b/debian/patches/features/all/rt/0206-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch
similarity index 84%
rename from debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch
rename to debian/patches/features/all/rt/0206-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch
index daa6d92..a578f13 100644
--- a/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch
+++ b/debian/patches/features/all/rt/0206-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch
@@ -1,7 +1,8 @@
 From: Yong Zhang <yong.zhang0 at gmail.com>
 Date: Tue, 15 May 2012 13:53:56 +0800
-Subject: mm: Protect activate_mm() by preempt_[disable&enable]_rt()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 206/332] mm: Protect activate_mm() by
+ preempt_[disable&enable]_rt()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=854686b765ea2a530b0e9d965afa87ee7ec88bf5
 
 User preempt_*_rt instead of local_irq_*_rt or otherwise there will be
 warning on ARM like below:
@@ -31,13 +32,15 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
 Link: http://lkml.kernel.org/r/1337061236-1766-1-git-send-email-yong.zhang0@gmail.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- fs/exec.c        |    2 ++
- mm/mmu_context.c |    2 ++
+ fs/exec.c        | 2 ++
+ mm/mmu_context.c | 2 ++
  2 files changed, 4 insertions(+)
 
+diff --git a/fs/exec.c b/fs/exec.c
+index b8c43be24751..71f4c6ec2bb8 100644
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -1017,12 +1017,14 @@ static int exec_mmap(struct mm_struct *m
+@@ -1038,12 +1038,14 @@ static int exec_mmap(struct mm_struct *mm)
  		}
  	}
  	task_lock(tsk);
@@ -52,6 +55,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	task_unlock(tsk);
  	if (old_mm) {
  		up_read(&old_mm->mmap_sem);
+diff --git a/mm/mmu_context.c b/mm/mmu_context.c
+index 6f4d27c5bb32..5cd25c745a8f 100644
 --- a/mm/mmu_context.c
 +++ b/mm/mmu_context.c
 @@ -23,6 +23,7 @@ void use_mm(struct mm_struct *mm)
diff --git a/debian/patches/features/all/rt/fs-block-rt-support.patch b/debian/patches/features/all/rt/0207-block-Turn-off-warning-which-is-bogus-on-RT.patch
similarity index 64%
rename from debian/patches/features/all/rt/fs-block-rt-support.patch
rename to debian/patches/features/all/rt/0207-block-Turn-off-warning-which-is-bogus-on-RT.patch
index 750bf27..ed7ba77 100644
--- a/debian/patches/features/all/rt/fs-block-rt-support.patch
+++ b/debian/patches/features/all/rt/0207-block-Turn-off-warning-which-is-bogus-on-RT.patch
@@ -1,15 +1,17 @@
-Subject: block: Turn off warning which is bogus on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 14 Jun 2011 17:05:09 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 207/332] block: Turn off warning which is bogus on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7504c7a2e0d7d82968bedb8c7d0d42c7ebf80550
 
 On -RT the context is always with IRQs enabled. Ignore this warning on -RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- block/blk-core.c |    2 +-
+ block/blk-core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 5174ef3d7580..320f60bd8e5d 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
 @@ -233,7 +233,7 @@ EXPORT_SYMBOL(blk_start_queue_async);
diff --git a/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch b/debian/patches/features/all/rt/0208-fs-ntfs-disable-interrupt-only-on-RT.patch
similarity index 83%
rename from debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch
rename to debian/patches/features/all/rt/0208-fs-ntfs-disable-interrupt-only-on-RT.patch
index 2e02e85..30c7880 100644
--- a/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch
+++ b/debian/patches/features/all/rt/0208-fs-ntfs-disable-interrupt-only-on-RT.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <efault at gmx.de>
 Date: Fri, 3 Jul 2009 08:44:12 -0500
-Subject: fs: ntfs: disable interrupt only on !RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 208/332] fs: ntfs: disable interrupt only on !RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8789cff19bb69ebf50b1e98c407739a856629648
 
 On Sat, 2007-10-27 at 11:44 +0200, Ingo Molnar wrote:
 > * Nick Piggin <nickpiggin at yahoo.com.au> wrote:
@@ -35,14 +35,15 @@ instead?
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- fs/ntfs/aops.c |    8 ++++----
+ fs/ntfs/aops.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
+index 8bb79f5fda59..e89da4fb14c2 100644
 --- a/fs/ntfs/aops.c
 +++ b/fs/ntfs/aops.c
-@@ -92,13 +92,13 @@ static void ntfs_end_buffer_async_read(s
+@@ -92,13 +92,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
  			ofs = 0;
  			if (file_ofs < init_size)
  				ofs = init_size - file_ofs;
@@ -58,7 +59,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  	} else {
  		clear_buffer_uptodate(bh);
-@@ -143,13 +143,13 @@ static void ntfs_end_buffer_async_read(s
+@@ -143,13 +143,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
  		recs = PAGE_SIZE / rec_size;
  		/* Should have been verified before we got here... */
  		BUG_ON(!recs);
diff --git a/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch b/debian/patches/features/all/rt/0209-fs-jbd2-pull-your-plug-when-waiting-for-space.patch
similarity index 69%
rename from debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch
rename to debian/patches/features/all/rt/0209-fs-jbd2-pull-your-plug-when-waiting-for-space.patch
index ab35872..a02929f 100644
--- a/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch
+++ b/debian/patches/features/all/rt/0209-fs-jbd2-pull-your-plug-when-waiting-for-space.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 17 Feb 2014 17:30:03 +0100
-Subject: fs: jbd2: pull your plug when waiting for space
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 209/332] fs: jbd2: pull your plug when waiting for space
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b2b313a474dfd35f5b5b0e033f2650e43aade78f
 
 Two cps in parallel managed to stall the the ext4 fs. It seems that
 journal code is either waiting for locks or sleeping waiting for
@@ -16,12 +16,14 @@ here is his description:
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/jbd2/checkpoint.c |    2 ++
+ fs/jbd2/checkpoint.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
+index 684996c8a3a4..6e18a06aaabe 100644
 --- a/fs/jbd2/checkpoint.c
 +++ b/fs/jbd2/checkpoint.c
-@@ -116,6 +116,8 @@ void __jbd2_log_wait_for_space(journal_t
+@@ -116,6 +116,8 @@ void __jbd2_log_wait_for_space(journal_t *journal)
  	nblocks = jbd2_space_needed(journal);
  	while (jbd2_log_space_left(journal) < nblocks) {
  		write_unlock(&journal->j_state_lock);
diff --git a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch b/debian/patches/features/all/rt/0210-x86-Convert-mce-timer-to-hrtimer.patch
similarity index 79%
rename from debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch
rename to debian/patches/features/all/rt/0210-x86-Convert-mce-timer-to-hrtimer.patch
index 5a16bb9..73738a8 100644
--- a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch
+++ b/debian/patches/features/all/rt/0210-x86-Convert-mce-timer-to-hrtimer.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 13 Dec 2010 16:33:39 +0100
-Subject: x86: Convert mce timer to hrtimer
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 210/332] x86: Convert mce timer to hrtimer
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=aff42d573b24cc8a108827fe0626db247660d633
 
 mce_timer is started in atomic contexts of cpu bringup. This results
 in might_sleep() warnings on RT. Convert mce_timer to a hrtimer to
@@ -22,9 +22,11 @@ fold in:
 |[bigeasy: use ULL instead of u64 cast]
 |Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/kernel/cpu/mcheck/mce.c |   52 +++++++++++++++------------------------
+ arch/x86/kernel/cpu/mcheck/mce.c | 52 ++++++++++++++++------------------------
  1 file changed, 20 insertions(+), 32 deletions(-)
 
+diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
+index 8ca5f8ad008e..d9fab6408357 100644
 --- a/arch/x86/kernel/cpu/mcheck/mce.c
 +++ b/arch/x86/kernel/cpu/mcheck/mce.c
 @@ -41,6 +41,7 @@
@@ -35,7 +37,7 @@ fold in:
  #include <linux/jump_label.h>
  
  #include <asm/processor.h>
-@@ -1307,7 +1308,7 @@ void mce_log_therm_throt_event(__u64 sta
+@@ -1306,7 +1307,7 @@ void mce_log_therm_throt_event(__u64 status)
  static unsigned long check_interval = INITIAL_CHECK_INTERVAL;
  
  static DEFINE_PER_CPU(unsigned long, mce_next_interval); /* in jiffies */
@@ -44,7 +46,7 @@ fold in:
  
  static unsigned long mce_adjust_timer_default(unsigned long interval)
  {
-@@ -1316,32 +1317,18 @@ static unsigned long mce_adjust_timer_de
+@@ -1315,32 +1316,18 @@ static unsigned long mce_adjust_timer_default(unsigned long interval)
  
  static unsigned long (*mce_adjust_timer)(unsigned long interval) = mce_adjust_timer_default;
  
@@ -83,7 +85,7 @@ fold in:
  	iv = __this_cpu_read(mce_next_interval);
  
  	if (mce_available(this_cpu_ptr(&cpu_info))) {
-@@ -1364,7 +1351,7 @@ static void mce_timer_fn(unsigned long d
+@@ -1363,7 +1350,7 @@ static void mce_timer_fn(unsigned long data)
  
  done:
  	__this_cpu_write(mce_next_interval, iv);
@@ -92,7 +94,7 @@ fold in:
  }
  
  /*
-@@ -1372,7 +1359,7 @@ static void mce_timer_fn(unsigned long d
+@@ -1371,7 +1358,7 @@ static void mce_timer_fn(unsigned long data)
   */
  void mce_timer_kick(unsigned long interval)
  {
@@ -101,7 +103,7 @@ fold in:
  	unsigned long iv = __this_cpu_read(mce_next_interval);
  
  	__restart_timer(t, interval);
-@@ -1387,7 +1374,7 @@ static void mce_timer_delete_all(void)
+@@ -1386,7 +1373,7 @@ static void mce_timer_delete_all(void)
  	int cpu;
  
  	for_each_online_cpu(cpu)
@@ -110,7 +112,7 @@ fold in:
  }
  
  static void mce_do_trigger(struct work_struct *work)
-@@ -1722,7 +1709,7 @@ static void __mcheck_cpu_clear_vendor(st
+@@ -1721,7 +1708,7 @@ static void __mcheck_cpu_clear_vendor(struct cpuinfo_x86 *c)
  	}
  }
  
@@ -119,7 +121,7 @@ fold in:
  {
  	unsigned long iv = check_interval * HZ;
  
-@@ -1731,16 +1718,17 @@ static void mce_start_timer(unsigned int
+@@ -1730,16 +1717,17 @@ static void mce_start_timer(unsigned int cpu, struct timer_list *t)
  
  	per_cpu(mce_next_interval, cpu) = iv;
  
@@ -141,7 +143,7 @@ fold in:
  	mce_start_timer(cpu, t);
  }
  
-@@ -2465,6 +2453,8 @@ static void mce_disable_cpu(void *h)
+@@ -2464,6 +2452,8 @@ static void mce_disable_cpu(void *h)
  	if (!mce_available(raw_cpu_ptr(&cpu_info)))
  		return;
  
@@ -150,7 +152,7 @@ fold in:
  	if (!(action & CPU_TASKS_FROZEN))
  		cmci_clear();
  
-@@ -2487,6 +2477,7 @@ static void mce_reenable_cpu(void *h)
+@@ -2486,6 +2476,7 @@ static void mce_reenable_cpu(void *h)
  		if (b->init)
  			wrmsrl(msr_ops.ctl(i), b->ctl);
  	}
@@ -158,7 +160,7 @@ fold in:
  }
  
  /* Get notified when a cpu comes on/off. Be hotplug friendly. */
-@@ -2494,7 +2485,6 @@ static int
+@@ -2493,7 +2484,6 @@ static int
  mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
  {
  	unsigned int cpu = (unsigned long)hcpu;
@@ -166,7 +168,7 @@ fold in:
  
  	switch (action & ~CPU_TASKS_FROZEN) {
  	case CPU_ONLINE:
-@@ -2514,11 +2504,9 @@ mce_cpu_callback(struct notifier_block *
+@@ -2513,11 +2503,9 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
  		break;
  	case CPU_DOWN_PREPARE:
  		smp_call_function_single(cpu, mce_disable_cpu, &action, 1);
diff --git a/debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch b/debian/patches/features/all/rt/0211-x86-mce-use-swait-queue-for-mce-wakeups.patch
similarity index 88%
rename from debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch
rename to debian/patches/features/all/rt/0211-x86-mce-use-swait-queue-for-mce-wakeups.patch
index f3d0cba..0ee1ec8 100644
--- a/debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch
+++ b/debian/patches/features/all/rt/0211-x86-mce-use-swait-queue-for-mce-wakeups.patch
@@ -1,7 +1,7 @@
-Subject: x86/mce: use swait queue for mce wakeups
 From: Steven Rostedt <rostedt at goodmis.org>
-Date:	Fri, 27 Feb 2015 15:20:37 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 27 Feb 2015 15:20:37 +0100
+Subject: [PATCH 211/332] x86/mce: use swait queue for mce wakeups
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4228f9e9ed4f9d94728a45a838d17e46108fa767
 
 We had a customer report a lockup on a 3.0-rt kernel that had the
 following backtrace:
@@ -56,9 +56,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 [wagi: use work-simple framework to defer work to a kthread]
 Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
 ---
- arch/x86/kernel/cpu/mcheck/mce.c |   68 ++++++++++++++++++++++++++++++++-------
+ arch/x86/kernel/cpu/mcheck/mce.c | 68 +++++++++++++++++++++++++++++++++-------
  1 file changed, 56 insertions(+), 12 deletions(-)
 
+diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
+index d9fab6408357..edcbd18b3189 100644
 --- a/arch/x86/kernel/cpu/mcheck/mce.c
 +++ b/arch/x86/kernel/cpu/mcheck/mce.c
 @@ -42,6 +42,7 @@
@@ -69,7 +71,7 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
  #include <linux/jump_label.h>
  
  #include <asm/processor.h>
-@@ -1384,6 +1385,56 @@ static void mce_do_trigger(struct work_s
+@@ -1383,6 +1384,56 @@ static void mce_do_trigger(struct work_struct *work)
  
  static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
  
@@ -126,7 +128,7 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
  /*
   * Notify the user(s) about new machine check events.
   * Can be called from interrupt context, but not from machine check/NMI
-@@ -1391,19 +1442,8 @@ static DECLARE_WORK(mce_trigger_work, mc
+@@ -1390,19 +1441,8 @@ static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
   */
  int mce_notify_irq(void)
  {
@@ -147,7 +149,7 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
  		return 1;
  	}
  	return 0;
-@@ -2545,6 +2585,10 @@ static __init int mcheck_init_device(voi
+@@ -2544,6 +2584,10 @@ static __init int mcheck_init_device(void)
  		goto err_out;
  	}
  
diff --git a/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch b/debian/patches/features/all/rt/0212-x86-stackprotector-Avoid-random-pool-on-rt.patch
similarity index 76%
rename from debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch
rename to debian/patches/features/all/rt/0212-x86-stackprotector-Avoid-random-pool-on-rt.patch
index ef5c799..334ede0 100644
--- a/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch
+++ b/debian/patches/features/all/rt/0212-x86-stackprotector-Avoid-random-pool-on-rt.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 16 Dec 2010 14:25:18 +0100
-Subject: x86: stackprotector: Avoid random pool on rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 212/332] x86: stackprotector: Avoid random pool on rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0265f5eab9814257930f841768f824a09cc67076
 
 CPU bringup calls into the random pool to initialize the stack
 canary. During boot that works nicely even on RT as the might sleep
@@ -13,11 +13,12 @@ entropy and we rely on the TSC randomnness.
 
 Reported-by: Carsten Emde <carsten.emde at osadl.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- arch/x86/include/asm/stackprotector.h |    9 ++++++++-
+ arch/x86/include/asm/stackprotector.h | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
 
+diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
+index 58505f01962f..02fa39652cd6 100644
 --- a/arch/x86/include/asm/stackprotector.h
 +++ b/arch/x86/include/asm/stackprotector.h
 @@ -59,7 +59,7 @@
@@ -29,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	u64 tsc;
  
  #ifdef CONFIG_X86_64
-@@ -70,8 +70,15 @@ static __always_inline void boot_init_st
+@@ -70,8 +70,15 @@ static __always_inline void boot_init_stack_canary(void)
  	 * of randomness. The TSC only matters for very early init,
  	 * there it already has some randomness on most systems. Later
  	 * on during the bootup the random pool has true entropy too.
diff --git a/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch b/debian/patches/features/all/rt/0213-x86-Use-generic-rwsem_spinlocks-on-rt.patch
similarity index 66%
rename from debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch
rename to debian/patches/features/all/rt/0213-x86-Use-generic-rwsem_spinlocks-on-rt.patch
index b753c58..8558e66 100644
--- a/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch
+++ b/debian/patches/features/all/rt/0213-x86-Use-generic-rwsem_spinlocks-on-rt.patch
@@ -1,17 +1,18 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 26 Jul 2009 02:21:32 +0200
-Subject: x86: Use generic rwsem_spinlocks on -rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 213/332] x86: Use generic rwsem_spinlocks on -rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d47c1877c4967961a9ef4cc3aceb16a1e1b1a16e
 
 Simplifies the separation of anon_rw_semaphores and rw_semaphores for
 -rt.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- arch/x86/Kconfig |    5 ++++-
+ arch/x86/Kconfig | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index bada636d1065..935b5fbacd85 100644
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
 @@ -232,8 +232,11 @@ config ARCH_MAY_HAVE_PC_FDC
diff --git a/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch b/debian/patches/features/all/rt/0214-x86-UV-raw_spinlock-conversion.patch
similarity index 73%
rename from debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch
rename to debian/patches/features/all/rt/0214-x86-UV-raw_spinlock-conversion.patch
index 5563990..84058b8 100644
--- a/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch
+++ b/debian/patches/features/all/rt/0214-x86-UV-raw_spinlock-conversion.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sun, 2 Nov 2014 08:31:37 +0100
-Subject: x86: UV: raw_spinlock conversion
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 214/332] x86: UV: raw_spinlock conversion
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=068b277285a64610d37b448e8f908b8f8a36f84c
 
 Shrug.  Lots of hobbyists have a beast in their basement, right?
 
@@ -9,11 +9,13 @@ Shrug.  Lots of hobbyists have a beast in their basement, right?
 Signed-off-by: Mike Galbraith <mgalbraith at suse.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/include/asm/uv/uv_bau.h |   14 +++++++-------
- arch/x86/platform/uv/tlb_uv.c    |   26 +++++++++++++-------------
- arch/x86/platform/uv/uv_time.c   |   21 +++++++++++++--------
+ arch/x86/include/asm/uv/uv_bau.h | 14 +++++++-------
+ arch/x86/platform/uv/tlb_uv.c    | 26 +++++++++++++-------------
+ arch/x86/platform/uv/uv_time.c   | 21 +++++++++++++--------
  3 files changed, 33 insertions(+), 28 deletions(-)
 
+diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
+index 57ab86d94d64..35d25e27180f 100644
 --- a/arch/x86/include/asm/uv/uv_bau.h
 +++ b/arch/x86/include/asm/uv/uv_bau.h
 @@ -624,9 +624,9 @@ struct bau_control {
@@ -29,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* tunables */
  	int			max_concurr;
  	int			max_concurr_const;
-@@ -815,15 +815,15 @@ static inline int atom_asr(short i, stru
+@@ -815,15 +815,15 @@ static inline int atom_asr(short i, struct atomic_short *v)
   * to be lowered below the current 'v'.  atomic_add_unless can only stop
   * on equal.
   */
@@ -49,9 +51,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 1;
  }
  
+diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
+index 9e42842e924a..5398f97172f9 100644
 --- a/arch/x86/platform/uv/tlb_uv.c
 +++ b/arch/x86/platform/uv/tlb_uv.c
-@@ -748,9 +748,9 @@ static void destination_plugged(struct b
+@@ -748,9 +748,9 @@ static void destination_plugged(struct bau_desc *bau_desc,
  
  		quiesce_local_uvhub(hmaster);
  
@@ -63,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		end_uvhub_quiesce(hmaster);
  
-@@ -770,9 +770,9 @@ static void destination_timeout(struct b
+@@ -770,9 +770,9 @@ static void destination_timeout(struct bau_desc *bau_desc,
  
  		quiesce_local_uvhub(hmaster);
  
@@ -75,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		end_uvhub_quiesce(hmaster);
  
-@@ -793,7 +793,7 @@ static void disable_for_period(struct ba
+@@ -793,7 +793,7 @@ static void disable_for_period(struct bau_control *bcp, struct ptc_stats *stat)
  	cycles_t tm1;
  
  	hmaster = bcp->uvhub_master;
@@ -84,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (!bcp->baudisabled) {
  		stat->s_bau_disabled++;
  		tm1 = get_cycles();
-@@ -806,7 +806,7 @@ static void disable_for_period(struct ba
+@@ -806,7 +806,7 @@ static void disable_for_period(struct bau_control *bcp, struct ptc_stats *stat)
  			}
  		}
  	}
@@ -93,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void count_max_concurr(int stat, struct bau_control *bcp,
-@@ -869,7 +869,7 @@ static void record_send_stats(cycles_t t
+@@ -869,7 +869,7 @@ static void record_send_stats(cycles_t time1, cycles_t time2,
   */
  static void uv1_throttle(struct bau_control *hmaster, struct ptc_stats *stat)
  {
@@ -102,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	atomic_t *v;
  
  	v = &hmaster->active_descriptor_count;
-@@ -1002,7 +1002,7 @@ static int check_enable(struct bau_contr
+@@ -1002,7 +1002,7 @@ static int check_enable(struct bau_control *bcp, struct ptc_stats *stat)
  	struct bau_control *hmaster;
  
  	hmaster = bcp->uvhub_master;
@@ -111,7 +115,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (bcp->baudisabled && (get_cycles() >= bcp->set_bau_on_time)) {
  		stat->s_bau_reenabled++;
  		for_each_present_cpu(tcpu) {
-@@ -1014,10 +1014,10 @@ static int check_enable(struct bau_contr
+@@ -1014,10 +1014,10 @@ static int check_enable(struct bau_control *bcp, struct ptc_stats *stat)
  				tbcp->period_giveups = 0;
  			}
  		}
@@ -124,7 +128,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return -1;
  }
  
-@@ -1940,9 +1940,9 @@ static void __init init_per_cpu_tunables
+@@ -1940,9 +1940,9 @@ static void __init init_per_cpu_tunables(void)
  		bcp->cong_reps			= congested_reps;
  		bcp->disabled_period		= sec_2_cycles(disabled_period);
  		bcp->giveup_limit		= giveup_limit;
@@ -137,9 +141,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  }
  
+diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
+index b333fc45f9ec..8b85916e6986 100644
 --- a/arch/x86/platform/uv/uv_time.c
 +++ b/arch/x86/platform/uv/uv_time.c
-@@ -57,7 +57,7 @@ static DEFINE_PER_CPU(struct clock_event
+@@ -57,7 +57,7 @@ static DEFINE_PER_CPU(struct clock_event_device, cpu_ced);
  
  /* There is one of these allocated per node */
  struct uv_rtc_timer_head {
@@ -148,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* next cpu waiting for timer, local node relative: */
  	int		next_cpu;
  	/* number of cpus on this node: */
-@@ -177,7 +177,7 @@ static __init int uv_rtc_allocate_timers
+@@ -177,7 +177,7 @@ static __init int uv_rtc_allocate_timers(void)
  				uv_rtc_deallocate_timers();
  				return -ENOMEM;
  			}
@@ -157,7 +163,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			head->ncpus = uv_blade_nr_possible_cpus(bid);
  			head->next_cpu = -1;
  			blade_info[bid] = head;
-@@ -231,7 +231,7 @@ static int uv_rtc_set_timer(int cpu, u64
+@@ -231,7 +231,7 @@ static int uv_rtc_set_timer(int cpu, u64 expires)
  	unsigned long flags;
  	int next_cpu;
  
@@ -166,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	next_cpu = head->next_cpu;
  	*t = expires;
-@@ -243,12 +243,12 @@ static int uv_rtc_set_timer(int cpu, u64
+@@ -243,12 +243,12 @@ static int uv_rtc_set_timer(int cpu, u64 expires)
  		if (uv_setup_intr(cpu, expires)) {
  			*t = ULLONG_MAX;
  			uv_rtc_find_next_timer(head, pnode);
@@ -181,7 +187,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 0;
  }
  
-@@ -267,7 +267,7 @@ static int uv_rtc_unset_timer(int cpu, i
+@@ -267,7 +267,7 @@ static int uv_rtc_unset_timer(int cpu, int force)
  	unsigned long flags;
  	int rc = 0;
  
@@ -190,7 +196,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if ((head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t) || force)
  		rc = 1;
-@@ -279,7 +279,7 @@ static int uv_rtc_unset_timer(int cpu, i
+@@ -279,7 +279,7 @@ static int uv_rtc_unset_timer(int cpu, int force)
  			uv_rtc_find_next_timer(head, pnode);
  	}
  
@@ -199,7 +205,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return rc;
  }
-@@ -299,13 +299,18 @@ static int uv_rtc_unset_timer(int cpu, i
+@@ -299,13 +299,18 @@ static int uv_rtc_unset_timer(int cpu, int force)
  static cycle_t uv_read_rtc(struct clocksource *cs)
  {
  	unsigned long offset;
diff --git a/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch b/debian/patches/features/all/rt/0215-thermal-Defer-thermal-wakups-to-threads.patch
similarity index 79%
rename from debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch
rename to debian/patches/features/all/rt/0215-thermal-Defer-thermal-wakups-to-threads.patch
index 4827b5e..db7d09f 100644
--- a/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch
+++ b/debian/patches/features/all/rt/0215-thermal-Defer-thermal-wakups-to-threads.patch
@@ -1,7 +1,7 @@
 From: Daniel Wagner <wagi at monom.org>
 Date: Tue, 17 Feb 2015 09:37:44 +0100
-Subject: thermal: Defer thermal wakups to threads
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 215/332] thermal: Defer thermal wakups to threads
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6772d596049fa4702d84826a5ab94bde370914c5
 
 On RT the spin lock in pkg_temp_thermal_platfrom_thermal_notify will
 call schedule while we run in irq context.
@@ -24,9 +24,11 @@ Signed-off-by: Daniel Wagner <daniel.wagner at bmw-carit.de>
 [bigeasy: reoder init/denit position. TODO: flush swork on exit]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/thermal/x86_pkg_temp_thermal.c |   50 +++++++++++++++++++++++++++++++--
+ drivers/thermal/x86_pkg_temp_thermal.c | 50 ++++++++++++++++++++++++++++++++--
  1 file changed, 47 insertions(+), 3 deletions(-)
 
+diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c
+index 95f4c1bcdb4c..0be934799bff 100644
 --- a/drivers/thermal/x86_pkg_temp_thermal.c
 +++ b/drivers/thermal/x86_pkg_temp_thermal.c
 @@ -29,6 +29,7 @@
@@ -37,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include <asm/cpu_device_id.h>
  #include <asm/mce.h>
  
-@@ -353,7 +354,7 @@ static void pkg_temp_thermal_threshold_w
+@@ -353,7 +354,7 @@ static void pkg_temp_thermal_threshold_work_fn(struct work_struct *work)
  	}
  }
  
@@ -46,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	unsigned long flags;
  	int cpu = smp_processor_id();
-@@ -370,7 +371,7 @@ static int pkg_temp_thermal_platform_the
+@@ -370,7 +371,7 @@ static int pkg_temp_thermal_platform_thermal_notify(__u64 msr_val)
  			pkg_work_scheduled[phy_id]) {
  		disable_pkg_thres_interrupt();
  		spin_unlock_irqrestore(&pkg_work_lock, flags);
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  	pkg_work_scheduled[phy_id] = 1;
  	spin_unlock_irqrestore(&pkg_work_lock, flags);
-@@ -379,9 +380,48 @@ static int pkg_temp_thermal_platform_the
+@@ -379,9 +380,48 @@ static int pkg_temp_thermal_platform_thermal_notify(__u64 msr_val)
  	schedule_delayed_work_on(cpu,
  				&per_cpu(pkg_temp_thermal_threshold_work, cpu),
  				msecs_to_jiffies(notify_delay_ms));
@@ -104,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static int find_siblings_cpu(int cpu)
  {
  	int i;
-@@ -585,6 +625,9 @@ static int __init pkg_temp_thermal_init(
+@@ -585,6 +625,9 @@ static int __init pkg_temp_thermal_init(void)
  	if (!x86_match_cpu(pkg_temp_thermal_ids))
  		return -ENODEV;
  
@@ -114,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_lock_init(&pkg_work_lock);
  	platform_thermal_package_notify =
  			pkg_temp_thermal_platform_thermal_notify;
-@@ -609,7 +652,7 @@ static int __init pkg_temp_thermal_init(
+@@ -609,7 +652,7 @@ static int __init pkg_temp_thermal_init(void)
  	kfree(pkg_work_scheduled);
  	platform_thermal_package_notify = NULL;
  	platform_thermal_package_rate_control = NULL;
@@ -123,7 +125,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return -ENODEV;
  }
  
-@@ -634,6 +677,7 @@ static void __exit pkg_temp_thermal_exit
+@@ -634,6 +677,7 @@ static void __exit pkg_temp_thermal_exit(void)
  	mutex_unlock(&phy_dev_list_mutex);
  	platform_thermal_package_notify = NULL;
  	platform_thermal_package_rate_control = NULL;
diff --git a/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch b/debian/patches/features/all/rt/0216-fs-epoll-Do-not-disable-preemption-on-RT.patch
similarity index 62%
rename from debian/patches/features/all/rt/epoll-use-get-cpu-light.patch
rename to debian/patches/features/all/rt/0216-fs-epoll-Do-not-disable-preemption-on-RT.patch
index 38dc76e..f618ff5 100644
--- a/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch
+++ b/debian/patches/features/all/rt/0216-fs-epoll-Do-not-disable-preemption-on-RT.patch
@@ -1,7 +1,7 @@
-Subject: fs/epoll: Do not disable preemption on RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Fri, 08 Jul 2011 16:35:35 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 8 Jul 2011 16:35:35 +0200
+Subject: [PATCH 216/332] fs/epoll: Do not disable preemption on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ec0c01b42424aa138f5ec3ad576e449880aa7ec0
 
 ep_call_nested() takes a sleeping lock so we can't disable preemption.
 The light version is enough since ep_call_nested() doesn't mind beeing
@@ -9,12 +9,14 @@ invoked twice on the same CPU.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- fs/eventpoll.c |    4 ++--
+ fs/eventpoll.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/fs/eventpoll.c b/fs/eventpoll.c
+index 10db91218933..42af0a06f657 100644
 --- a/fs/eventpoll.c
 +++ b/fs/eventpoll.c
-@@ -510,12 +510,12 @@ static int ep_poll_wakeup_proc(void *pri
+@@ -510,12 +510,12 @@ static int ep_poll_wakeup_proc(void *priv, void *cookie, int call_nests)
   */
  static void ep_poll_safewake(wait_queue_head_t *wq)
  {
diff --git a/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch b/debian/patches/features/all/rt/0217-mm-vmalloc-Another-preempt-disable-region-which-suck.patch
similarity index 64%
rename from debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch
rename to debian/patches/features/all/rt/0217-mm-vmalloc-Another-preempt-disable-region-which-suck.patch
index a41bd7b..4fe79c0 100644
--- a/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch
+++ b/debian/patches/features/all/rt/0217-mm-vmalloc-Another-preempt-disable-region-which-suck.patch
@@ -1,19 +1,22 @@
-Subject: mm/vmalloc: Another preempt disable region which sucks
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 12 Jul 2011 11:39:36 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 217/332] mm/vmalloc: Another preempt disable region which
+ sucks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e7a13b263f0e79d07ae6e20138ea0dc79a94839b
 
 Avoid the preempt disable version of get_cpu_var(). The inner-lock should
 provide enough serialisation.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- mm/vmalloc.c |   13 ++++++++-----
+ mm/vmalloc.c | 13 ++++++++-----
  1 file changed, 8 insertions(+), 5 deletions(-)
 
+diff --git a/mm/vmalloc.c b/mm/vmalloc.c
+index 195de42bea1f..b46cb686fde7 100644
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
-@@ -845,7 +845,7 @@ static void *new_vmap_block(unsigned int
+@@ -855,7 +855,7 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
  	struct vmap_block *vb;
  	struct vmap_area *va;
  	unsigned long vb_idx;
@@ -22,7 +25,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	void *vaddr;
  
  	node = numa_node_id();
-@@ -888,11 +888,12 @@ static void *new_vmap_block(unsigned int
+@@ -898,11 +898,12 @@ static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
  	BUG_ON(err);
  	radix_tree_preload_end();
  
@@ -37,7 +40,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return vaddr;
  }
-@@ -961,6 +962,7 @@ static void *vb_alloc(unsigned long size
+@@ -971,6 +972,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
  	struct vmap_block *vb;
  	void *vaddr = NULL;
  	unsigned int order;
@@ -45,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	BUG_ON(offset_in_page(size));
  	BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC);
-@@ -975,7 +977,8 @@ static void *vb_alloc(unsigned long size
+@@ -985,7 +987,8 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
  	order = get_order(size);
  
  	rcu_read_lock();
@@ -55,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	list_for_each_entry_rcu(vb, &vbq->free, free_list) {
  		unsigned long pages_off;
  
-@@ -998,7 +1001,7 @@ static void *vb_alloc(unsigned long size
+@@ -1008,7 +1011,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
  		break;
  	}
  
diff --git a/debian/patches/features/all/rt/block-mq-use-cpu_light.patch b/debian/patches/features/all/rt/0218-block-mq-use-cpu_light.patch
similarity index 64%
rename from debian/patches/features/all/rt/block-mq-use-cpu_light.patch
rename to debian/patches/features/all/rt/0218-block-mq-use-cpu_light.patch
index eb4d61d..fd0ca6c 100644
--- a/debian/patches/features/all/rt/block-mq-use-cpu_light.patch
+++ b/debian/patches/features/all/rt/0218-block-mq-use-cpu_light.patch
@@ -1,19 +1,21 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 9 Apr 2014 10:37:23 +0200
-Subject: block: mq: use cpu_light()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 218/332] block: mq: use cpu_light()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3b21e6b4ebb3d6de04f84365fc3f79d010f16a95
 
 there is a might sleep splat because get_cpu() disables preemption and
 later we grab a lock. As a workaround for this we use get_cpu_light().
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- block/blk-mq.h |    4 ++--
+ block/blk-mq.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/block/blk-mq.h b/block/blk-mq.h
+index e5d25249028c..1e846b842eab 100644
 --- a/block/blk-mq.h
 +++ b/block/blk-mq.h
-@@ -72,12 +72,12 @@ static inline struct blk_mq_ctx *__blk_m
+@@ -72,12 +72,12 @@ static inline struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *q,
   */
  static inline struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q)
  {
diff --git a/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch b/debian/patches/features/all/rt/0219-block-mq-do-not-invoke-preempt_disable.patch
similarity index 66%
rename from debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch
rename to debian/patches/features/all/rt/0219-block-mq-do-not-invoke-preempt_disable.patch
index 7add8b9..b6e3f76 100644
--- a/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch
+++ b/debian/patches/features/all/rt/0219-block-mq-do-not-invoke-preempt_disable.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: block/mq: do not invoke preempt_disable()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 219/332] block/mq: do not invoke preempt_disable()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5874a585c7450e9967ea47299265c974cdf32967
 
 preempt_disable() and get_cpu() don't play well together with the sleeping
 locks it tries to allocate later.
@@ -9,12 +9,14 @@ It seems to be enough to replace it with get_cpu_light() and migrate_disable().
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- block/blk-mq.c |   10 +++++-----
+ block/blk-mq.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
 
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index 7b597ec4e9c5..1be09013d7ff 100644
 --- a/block/blk-mq.c
 +++ b/block/blk-mq.c
-@@ -363,7 +363,7 @@ static void blk_mq_ipi_complete_request(
+@@ -363,7 +363,7 @@ static void blk_mq_ipi_complete_request(struct request *rq)
  		return;
  	}
  
@@ -23,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags))
  		shared = cpus_share_cache(cpu, ctx->cpu);
  
-@@ -375,7 +375,7 @@ static void blk_mq_ipi_complete_request(
+@@ -375,7 +375,7 @@ static void blk_mq_ipi_complete_request(struct request *rq)
  	} else {
  		rq->q->softirq_done_fn(rq);
  	}
@@ -32,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void __blk_mq_complete_request(struct request *rq)
-@@ -906,14 +906,14 @@ void blk_mq_run_hw_queue(struct blk_mq_h
+@@ -906,14 +906,14 @@ void blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx, bool async)
  		return;
  
  	if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) {
diff --git a/debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch b/debian/patches/features/all/rt/0220-block-mq-don-t-complete-requests-via-IPI.patch
similarity index 65%
rename from debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch
rename to debian/patches/features/all/rt/0220-block-mq-don-t-complete-requests-via-IPI.patch
index 072355d..aa8cc05 100644
--- a/debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch
+++ b/debian/patches/features/all/rt/0220-block-mq-don-t-complete-requests-via-IPI.patch
@@ -1,22 +1,24 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 29 Jan 2015 15:10:08 +0100
-Subject: block/mq: don't complete requests via IPI
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 220/332] block/mq: don't complete requests via IPI
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b1196d444d5c74c29b3b899c1139b765fa83ff92
 
 The IPI runs in hardirq context and there are sleeping locks. This patch
 moves the completion into a workqueue.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- block/blk-core.c       |    3 +++
- block/blk-mq.c         |   20 ++++++++++++++++++++
- include/linux/blk-mq.h |    2 +-
- include/linux/blkdev.h |    1 +
+ block/blk-core.c       |  3 +++
+ block/blk-mq.c         | 20 ++++++++++++++++++++
+ include/linux/blk-mq.h |  2 +-
+ include/linux/blkdev.h |  1 +
  4 files changed, 25 insertions(+), 1 deletion(-)
 
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 320f60bd8e5d..4334a5f8ae79 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
-@@ -125,6 +125,9 @@ void blk_rq_init(struct request_queue *q
+@@ -125,6 +125,9 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
  
  	INIT_LIST_HEAD(&rq->queuelist);
  	INIT_LIST_HEAD(&rq->timeout_list);
@@ -26,9 +28,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	rq->cpu = -1;
  	rq->q = q;
  	rq->__sector = (sector_t) -1;
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index 1be09013d7ff..c7bc5e66330d 100644
 --- a/block/blk-mq.c
 +++ b/block/blk-mq.c
-@@ -177,6 +177,9 @@ static void blk_mq_rq_ctx_init(struct re
+@@ -177,6 +177,9 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx,
  	rq->resid_len = 0;
  	rq->sense = NULL;
  
@@ -38,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	INIT_LIST_HEAD(&rq->timeout_list);
  	rq->timeout = 0;
  
-@@ -345,6 +348,17 @@ void blk_mq_end_request(struct request *
+@@ -345,6 +348,17 @@ void blk_mq_end_request(struct request *rq, int error)
  }
  EXPORT_SYMBOL(blk_mq_end_request);
  
@@ -56,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static void __blk_mq_complete_request_remote(void *data)
  {
  	struct request *rq = data;
-@@ -352,6 +366,8 @@ static void __blk_mq_complete_request_re
+@@ -352,6 +366,8 @@ static void __blk_mq_complete_request_remote(void *data)
  	rq->q->softirq_done_fn(rq);
  }
  
@@ -65,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static void blk_mq_ipi_complete_request(struct request *rq)
  {
  	struct blk_mq_ctx *ctx = rq->mq_ctx;
-@@ -368,10 +384,14 @@ static void blk_mq_ipi_complete_request(
+@@ -368,10 +384,14 @@ static void blk_mq_ipi_complete_request(struct request *rq)
  		shared = cpus_share_cache(cpu, ctx->cpu);
  
  	if (cpu != ctx->cpu && !shared && cpu_online(ctx->cpu)) {
@@ -80,9 +84,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	} else {
  		rq->q->softirq_done_fn(rq);
  	}
+diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
+index 535ab2e13d2e..cfc246899473 100644
 --- a/include/linux/blk-mq.h
 +++ b/include/linux/blk-mq.h
-@@ -209,7 +209,7 @@ static inline u16 blk_mq_unique_tag_to_t
+@@ -209,7 +209,7 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag)
  	return unique_tag & BLK_MQ_UNIQUE_TAG_MASK;
  }
  
@@ -91,6 +97,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  int blk_mq_request_started(struct request *rq);
  void blk_mq_start_request(struct request *rq);
  void blk_mq_end_request(struct request *rq, int error);
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index f6a816129856..3b519c3a498e 100644
 --- a/include/linux/blkdev.h
 +++ b/include/linux/blkdev.h
 @@ -89,6 +89,7 @@ struct request {
diff --git a/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch b/debian/patches/features/all/rt/0221-md-raid5-Make-raid5_percpu-handling-RT-aware.patch
similarity index 69%
rename from debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch
rename to debian/patches/features/all/rt/0221-md-raid5-Make-raid5_percpu-handling-RT-aware.patch
index 17a9071..ba03504 100644
--- a/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch
+++ b/debian/patches/features/all/rt/0221-md-raid5-Make-raid5_percpu-handling-RT-aware.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 6 Apr 2010 16:51:31 +0200
-Subject: md: raid5: Make raid5_percpu handling RT aware
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 221/332] md: raid5: Make raid5_percpu handling RT aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5a0992e34205d4d04ebe71534c0021a5892afab8
 
 __raid_run_ops() disables preemption with get_cpu() around the access
 to the raid5_percpu variables. That causes scheduling while atomic
@@ -13,15 +13,16 @@ preemptible.
 Reported-by: Udo van den Heuvel <udovdh at xs4all.nl>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Tested-by: Udo van den Heuvel <udovdh at xs4all.nl>
-
 ---
- drivers/md/raid5.c |    8 +++++---
- drivers/md/raid5.h |    1 +
+ drivers/md/raid5.c | 8 +++++---
+ drivers/md/raid5.h | 1 +
  2 files changed, 6 insertions(+), 3 deletions(-)
 
+diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
+index 383f19c6bf24..82235409176c 100644
 --- a/drivers/md/raid5.c
 +++ b/drivers/md/raid5.c
-@@ -1928,8 +1928,9 @@ static void raid_run_ops(struct stripe_h
+@@ -1928,8 +1928,9 @@ static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
  	struct raid5_percpu *percpu;
  	unsigned long cpu;
  
@@ -32,7 +33,7 @@ Tested-by: Udo van den Heuvel <udovdh at xs4all.nl>
  	if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) {
  		ops_run_biofill(sh);
  		overlap_clear++;
-@@ -1985,7 +1986,8 @@ static void raid_run_ops(struct stripe_h
+@@ -1985,7 +1986,8 @@ static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
  			if (test_and_clear_bit(R5_Overlap, &dev->flags))
  				wake_up(&sh->raid_conf->wait_for_overlap);
  		}
@@ -42,7 +43,7 @@ Tested-by: Udo van den Heuvel <udovdh at xs4all.nl>
  }
  
  static struct stripe_head *alloc_stripe(struct kmem_cache *sc, gfp_t gfp,
-@@ -6393,6 +6395,7 @@ static int raid456_cpu_up_prepare(unsign
+@@ -6398,6 +6400,7 @@ static int raid456_cpu_up_prepare(unsigned int cpu, struct hlist_node *node)
  		       __func__, cpu);
  		return -ENOMEM;
  	}
@@ -50,7 +51,7 @@ Tested-by: Udo van den Heuvel <udovdh at xs4all.nl>
  	return 0;
  }
  
-@@ -6403,7 +6406,6 @@ static int raid5_alloc_percpu(struct r5c
+@@ -6408,7 +6411,6 @@ static int raid5_alloc_percpu(struct r5conf *conf)
  	conf->percpu = alloc_percpu(struct raid5_percpu);
  	if (!conf->percpu)
  		return -ENOMEM;
@@ -58,6 +59,8 @@ Tested-by: Udo van den Heuvel <udovdh at xs4all.nl>
  	err = cpuhp_state_add_instance(CPUHP_MD_RAID5_PREPARE, &conf->node);
  	if (!err) {
  		conf->scribble_disks = max(conf->raid_disks,
+diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
+index 57ec49f0839e..0739604990b7 100644
 --- a/drivers/md/raid5.h
 +++ b/drivers/md/raid5.h
 @@ -504,6 +504,7 @@ struct r5conf {
diff --git a/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch b/debian/patches/features/all/rt/0222-rt-Introduce-cpu_chill.patch
similarity index 88%
rename from debian/patches/features/all/rt/rt-introduce-cpu-chill.patch
rename to debian/patches/features/all/rt/0222-rt-Introduce-cpu_chill.patch
index eb05f88..6e04d8f 100644
--- a/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch
+++ b/debian/patches/features/all/rt/0222-rt-Introduce-cpu_chill.patch
@@ -1,7 +1,7 @@
-Subject: rt: Introduce cpu_chill()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 07 Mar 2012 20:51:03 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 7 Mar 2012 20:51:03 +0100
+Subject: [PATCH 222/332] rt: Introduce cpu_chill()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dce81c7e29bbb820bfd2dbbfbca636f5ce78c0ab
 
 Retry loops on RT might loop forever when the modifying side was
 preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill()
@@ -82,13 +82,15 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/delay.h |    6 ++++++
- kernel/time/hrtimer.c |   19 +++++++++++++++++++
+ include/linux/delay.h |  6 ++++++
+ kernel/time/hrtimer.c | 19 +++++++++++++++++++
  2 files changed, 25 insertions(+)
 
+diff --git a/include/linux/delay.h b/include/linux/delay.h
+index a6ecb34cf547..37caab306336 100644
 --- a/include/linux/delay.h
 +++ b/include/linux/delay.h
-@@ -52,4 +52,10 @@ static inline void ssleep(unsigned int s
+@@ -52,4 +52,10 @@ static inline void ssleep(unsigned int seconds)
  	msleep(seconds * 1000);
  }
  
@@ -99,9 +101,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +#endif
 +
  #endif /* defined(_LINUX_DELAY_H) */
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index 8d406733108a..bd54f1c56dc0 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
-@@ -1768,6 +1768,25 @@ SYSCALL_DEFINE2(nanosleep, struct timesp
+@@ -1768,6 +1768,25 @@ SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp,
  	return hrtimer_nanosleep(&tu, rmtp, HRTIMER_MODE_REL, CLOCK_MONOTONIC);
  }
  
diff --git a/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch b/debian/patches/features/all/rt/0223-cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
similarity index 82%
rename from debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
rename to debian/patches/features/all/rt/0223-cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
index a4c164f..3cdadf3 100644
--- a/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
+++ b/debian/patches/features/all/rt/0223-cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
@@ -1,7 +1,7 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Tue, 4 Mar 2014 12:28:32 -0500
-Subject: cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 223/332] cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=aa1d6f73a65438668bc4eeb0b20568c8aae406e1
 
 We hit another bug that was caused by switching cpu_chill() from
 msleep() to hrtimer_nanosleep().
@@ -29,12 +29,14 @@ Reported-by: Ulrich Obergfell <uobergfe at redhat.com>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/hrtimer.c |   25 ++++++++++++++++++-------
+ kernel/time/hrtimer.c | 25 ++++++++++++++++++-------
  1 file changed, 18 insertions(+), 7 deletions(-)
 
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index bd54f1c56dc0..8338b14ed3a3 100644
 --- a/kernel/time/hrtimer.c
 +++ b/kernel/time/hrtimer.c
-@@ -1649,12 +1649,13 @@ void hrtimer_init_sleeper(struct hrtimer
+@@ -1649,12 +1649,13 @@ void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task)
  }
  EXPORT_SYMBOL_GPL(hrtimer_init_sleeper);
  
@@ -50,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		hrtimer_start_expires(&t->timer, mode);
  
  		if (likely(t->task))
-@@ -1696,7 +1697,8 @@ long __sched hrtimer_nanosleep_restart(s
+@@ -1696,7 +1697,8 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
  				HRTIMER_MODE_ABS);
  	hrtimer_set_expires_tv64(&t.timer, restart->nanosleep.expires);
  
@@ -60,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		goto out;
  
  	rmtp = restart->nanosleep.rmtp;
-@@ -1713,8 +1715,10 @@ long __sched hrtimer_nanosleep_restart(s
+@@ -1713,8 +1715,10 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
  	return ret;
  }
  
@@ -73,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct restart_block *restart;
  	struct hrtimer_sleeper t;
-@@ -1727,7 +1731,7 @@ long hrtimer_nanosleep(struct timespec *
+@@ -1727,7 +1731,7 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
  
  	hrtimer_init_on_stack(&t.timer, clockid, mode);
  	hrtimer_set_expires_range_ns(&t.timer, timespec_to_ktime(*rqtp), slack);
@@ -82,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		goto out;
  
  	/* Absolute timers do not update the rmtp value and restart: */
-@@ -1754,6 +1758,12 @@ long hrtimer_nanosleep(struct timespec *
+@@ -1754,6 +1758,12 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
  	return ret;
  }
  
diff --git a/debian/patches/features/all/rt/block-blk-mq-use-swait.patch b/debian/patches/features/all/rt/0224-block-blk-mq-Use-swait.patch
similarity index 79%
rename from debian/patches/features/all/rt/block-blk-mq-use-swait.patch
rename to debian/patches/features/all/rt/0224-block-blk-mq-Use-swait.patch
index 91e601a..1af3c61 100644
--- a/debian/patches/features/all/rt/block-blk-mq-use-swait.patch
+++ b/debian/patches/features/all/rt/0224-block-blk-mq-Use-swait.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 13 Feb 2015 11:01:26 +0100
-Subject: block: blk-mq: Use swait
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 224/332] block: blk-mq: Use swait
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=402151f37e9b4e6bdab8ead2a8cef7e66eb768e8
 
 | BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
 | in_atomic(): 1, irqs_disabled(): 0, pid: 255, name: kworker/u257:6
@@ -39,14 +39,16 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- block/blk-core.c       |    6 +++---
- block/blk-mq.c         |    6 +++---
- include/linux/blkdev.h |    2 +-
+ block/blk-core.c       | 6 +++---
+ block/blk-mq.c         | 6 +++---
+ include/linux/blkdev.h | 2 +-
  3 files changed, 7 insertions(+), 7 deletions(-)
 
+diff --git a/block/blk-core.c b/block/blk-core.c
+index 4334a5f8ae79..6f945bb0fa1a 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
-@@ -662,7 +662,7 @@ int blk_queue_enter(struct request_queue
+@@ -662,7 +662,7 @@ int blk_queue_enter(struct request_queue *q, bool nowait)
  		if (nowait)
  			return -EBUSY;
  
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				!atomic_read(&q->mq_freeze_depth) ||
  				blk_queue_dying(q));
  		if (blk_queue_dying(q))
-@@ -682,7 +682,7 @@ static void blk_queue_usage_counter_rele
+@@ -682,7 +682,7 @@ static void blk_queue_usage_counter_release(struct percpu_ref *ref)
  	struct request_queue *q =
  		container_of(ref, struct request_queue, q_usage_counter);
  
@@ -64,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void blk_rq_timed_out_timer(unsigned long data)
-@@ -751,7 +751,7 @@ struct request_queue *blk_alloc_queue_no
+@@ -751,7 +751,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
  	q->bypass_depth = 1;
  	__set_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
  
@@ -73,9 +75,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * Init percpu_ref in atomic mode so that it's faster to shutdown.
+diff --git a/block/blk-mq.c b/block/blk-mq.c
+index c7bc5e66330d..48c9652a701c 100644
 --- a/block/blk-mq.c
 +++ b/block/blk-mq.c
-@@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_st
+@@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start);
  
  static void blk_mq_freeze_queue_wait(struct request_queue *q)
  {
@@ -84,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -110,7 +110,7 @@ void blk_mq_unfreeze_queue(struct reques
+@@ -110,7 +110,7 @@ void blk_mq_unfreeze_queue(struct request_queue *q)
  	WARN_ON_ONCE(freeze_depth < 0);
  	if (!freeze_depth) {
  		percpu_ref_reinit(&q->q_usage_counter);
@@ -93,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  }
  EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue);
-@@ -129,7 +129,7 @@ void blk_mq_wake_waiters(struct request_
+@@ -129,7 +129,7 @@ void blk_mq_wake_waiters(struct request_queue *q)
  	 * dying, we need to ensure that processes currently waiting on
  	 * the queue are notified as well.
  	 */
@@ -102,6 +106,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx)
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index 3b519c3a498e..ec7a4676f8a8 100644
 --- a/include/linux/blkdev.h
 +++ b/include/linux/blkdev.h
 @@ -468,7 +468,7 @@ struct request_queue {
diff --git a/debian/patches/features/all/rt/block-use-cpu-chill.patch b/debian/patches/features/all/rt/0225-block-Use-cpu_chill-for-retry-loops.patch
similarity index 67%
rename from debian/patches/features/all/rt/block-use-cpu-chill.patch
rename to debian/patches/features/all/rt/0225-block-Use-cpu_chill-for-retry-loops.patch
index 87b029a..b354eaa 100644
--- a/debian/patches/features/all/rt/block-use-cpu-chill.patch
+++ b/debian/patches/features/all/rt/0225-block-Use-cpu_chill-for-retry-loops.patch
@@ -1,7 +1,7 @@
-Subject: block: Use cpu_chill() for retry loops
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 20 Dec 2012 18:28:26 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 225/332] block: Use cpu_chill() for retry loops
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7b4d32275edc10fcbf092816a9af37e25a561594
 
 Retry loops on RT might loop forever when the modifying side was
 preempted. Steven also observed a live lock when there was a
@@ -11,11 +11,12 @@ Use cpu_chill() instead of cpu_relax() to let the system
 make progress.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- block/blk-ioc.c |    5 +++--
+ block/blk-ioc.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
+diff --git a/block/blk-ioc.c b/block/blk-ioc.c
+index 381cb50a673c..dc8785233d94 100644
 --- a/block/blk-ioc.c
 +++ b/block/blk-ioc.c
 @@ -7,6 +7,7 @@
@@ -26,7 +27,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #include "blk.h"
  
-@@ -109,7 +110,7 @@ static void ioc_release_fn(struct work_s
+@@ -109,7 +110,7 @@ static void ioc_release_fn(struct work_struct *work)
  			spin_unlock(q->queue_lock);
  		} else {
  			spin_unlock_irqrestore(&ioc->lock, flags);
@@ -35,7 +36,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			spin_lock_irqsave_nested(&ioc->lock, flags, 1);
  		}
  	}
-@@ -187,7 +188,7 @@ void put_io_context_active(struct io_con
+@@ -187,7 +188,7 @@ void put_io_context_active(struct io_context *ioc)
  			spin_unlock(icq->q->queue_lock);
  		} else {
  			spin_unlock_irqrestore(&ioc->lock, flags);
diff --git a/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch b/debian/patches/features/all/rt/0226-fs-dcache-Use-cpu_chill-in-trylock-loops.patch
similarity index 66%
rename from debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
rename to debian/patches/features/all/rt/0226-fs-dcache-Use-cpu_chill-in-trylock-loops.patch
index 529d963..ab77b7a 100644
--- a/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
+++ b/debian/patches/features/all/rt/0226-fs-dcache-Use-cpu_chill-in-trylock-loops.patch
@@ -1,21 +1,22 @@
-Subject: fs: dcache: Use cpu_chill() in trylock loops
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 07 Mar 2012 21:00:34 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 7 Mar 2012 21:00:34 +0100
+Subject: [PATCH 226/332] fs: dcache: Use cpu_chill() in trylock loops
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e533f5b85eaa53386683386be0b2dfce3ee8d227
 
 Retry loops on RT might loop forever when the modifying side was
 preempted. Use cpu_chill() instead of cpu_relax() to let the system
 make progress.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- fs/autofs4/autofs_i.h |    1 +
- fs/autofs4/expire.c   |    2 +-
- fs/dcache.c           |   20 ++++++++++++++++----
- fs/namespace.c        |    3 ++-
+ fs/autofs4/autofs_i.h |  1 +
+ fs/autofs4/expire.c   |  2 +-
+ fs/dcache.c           | 20 ++++++++++++++++----
+ fs/namespace.c        |  3 ++-
  4 files changed, 20 insertions(+), 6 deletions(-)
 
+diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
+index a1fba4285277..3796769b4cd1 100644
 --- a/fs/autofs4/autofs_i.h
 +++ b/fs/autofs4/autofs_i.h
 @@ -31,6 +31,7 @@
@@ -26,9 +27,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <asm/current.h>
  #include <linux/uaccess.h>
  
+diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
+index d8e6d421c27f..2e689ab1306b 100644
 --- a/fs/autofs4/expire.c
 +++ b/fs/autofs4/expire.c
-@@ -148,7 +148,7 @@ static struct dentry *get_next_positive_
+@@ -148,7 +148,7 @@ static struct dentry *get_next_positive_dentry(struct dentry *prev,
  			parent = p->d_parent;
  			if (!spin_trylock(&parent->d_lock)) {
  				spin_unlock(&p->d_lock);
@@ -37,6 +40,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  				goto relock;
  			}
  			spin_unlock(&p->d_lock);
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 10f848262852..112ef2773fe3 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
 @@ -19,6 +19,7 @@
@@ -47,7 +52,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/slab.h>
  #include <linux/init.h>
  #include <linux/hash.h>
-@@ -750,6 +751,8 @@ static inline bool fast_dput(struct dent
+@@ -777,6 +778,8 @@ static inline bool fast_dput(struct dentry *dentry)
   */
  void dput(struct dentry *dentry)
  {
@@ -56,7 +61,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (unlikely(!dentry))
  		return;
  
-@@ -788,9 +791,18 @@ void dput(struct dentry *dentry)
+@@ -815,9 +818,18 @@ void dput(struct dentry *dentry)
  	return;
  
  kill_it:
@@ -78,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		goto repeat;
  	}
  }
-@@ -2324,7 +2336,7 @@ void d_delete(struct dentry * dentry)
+@@ -2352,7 +2364,7 @@ void d_delete(struct dentry * dentry)
  	if (dentry->d_lockref.count == 1) {
  		if (!spin_trylock(&inode->i_lock)) {
  			spin_unlock(&dentry->d_lock);
@@ -87,6 +92,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			goto again;
  		}
  		dentry->d_flags &= ~DCACHE_CANT_MOUNT;
+diff --git a/fs/namespace.c b/fs/namespace.c
+index 295b02091d1f..da188c6966a3 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -14,6 +14,7 @@
@@ -97,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/security.h>
  #include <linux/idr.h>
  #include <linux/init.h>		/* init_rootfs */
-@@ -358,7 +359,7 @@ int __mnt_want_write(struct vfsmount *m)
+@@ -359,7 +360,7 @@ int __mnt_want_write(struct vfsmount *m)
  	smp_mb();
  	while (ACCESS_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD) {
  		preempt_enable();
diff --git a/debian/patches/features/all/rt/net-use-cpu-chill.patch b/debian/patches/features/all/rt/0227-net-Use-cpu_chill-instead-of-cpu_relax.patch
similarity index 64%
rename from debian/patches/features/all/rt/net-use-cpu-chill.patch
rename to debian/patches/features/all/rt/0227-net-Use-cpu_chill-instead-of-cpu_relax.patch
index 4608db7..17ed834 100644
--- a/debian/patches/features/all/rt/net-use-cpu-chill.patch
+++ b/debian/patches/features/all/rt/0227-net-Use-cpu_chill-instead-of-cpu_relax.patch
@@ -1,19 +1,20 @@
-Subject: net: Use cpu_chill() instead of cpu_relax()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 07 Mar 2012 21:10:04 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 7 Mar 2012 21:10:04 +0100
+Subject: [PATCH 227/332] net: Use cpu_chill() instead of cpu_relax()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ff531476a7770f23b349c0db0418365514bb7c42
 
 Retry loops on RT might loop forever when the modifying side was
 preempted. Use cpu_chill() instead of cpu_relax() to let the system
 make progress.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- net/packet/af_packet.c |    5 +++--
- net/rds/ib_rdma.c      |    3 ++-
+ net/packet/af_packet.c | 5 +++--
+ net/rds/ib_rdma.c      | 3 ++-
  2 files changed, 5 insertions(+), 3 deletions(-)
 
+diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
+index ae7bfd26cd91..c223bdea0222 100644
 --- a/net/packet/af_packet.c
 +++ b/net/packet/af_packet.c
 @@ -63,6 +63,7 @@
@@ -24,7 +25,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <linux/kmod.h>
  #include <linux/slab.h>
  #include <linux/vmalloc.h>
-@@ -694,7 +695,7 @@ static void prb_retire_rx_blk_timer_expi
+@@ -694,7 +695,7 @@ static void prb_retire_rx_blk_timer_expired(unsigned long data)
  	if (BLOCK_NUM_PKTS(pbd)) {
  		while (atomic_read(&pkc->blk_fill_in_prog)) {
  			/* Waiting for skb_copy_bits to finish... */
@@ -33,7 +34,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		}
  	}
  
-@@ -956,7 +957,7 @@ static void prb_retire_current_block(str
+@@ -956,7 +957,7 @@ static void prb_retire_current_block(struct tpacket_kbdq_core *pkc,
  		if (!(status & TP_STATUS_BLK_TMO)) {
  			while (atomic_read(&pkc->blk_fill_in_prog)) {
  				/* Waiting for skb_copy_bits to finish... */
@@ -42,6 +43,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			}
  		}
  		prb_close_block(pkc, pbd, po, status);
+diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
+index 977f69886c00..f3e7a36b0396 100644
 --- a/net/rds/ib_rdma.c
 +++ b/net/rds/ib_rdma.c
 @@ -34,6 +34,7 @@
@@ -52,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #include "rds_single_path.h"
  #include "ib_mr.h"
-@@ -210,7 +211,7 @@ static inline void wait_clean_list_grace
+@@ -210,7 +211,7 @@ static inline void wait_clean_list_grace(void)
  	for_each_online_cpu(cpu) {
  		flag = &per_cpu(clean_list_grace, cpu);
  		while (test_bit(CLEAN_LIST_BUSY_BIT, flag))
diff --git a/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/debian/patches/features/all/rt/0228-fs-dcache-use-swait_queue-instead-of-waitqueue.patch
similarity index 69%
rename from debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch
rename to debian/patches/features/all/rt/0228-fs-dcache-use-swait_queue-instead-of-waitqueue.patch
index a0458dc..93f82e3 100644
--- a/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch
+++ b/debian/patches/features/all/rt/0228-fs-dcache-use-swait_queue-instead-of-waitqueue.patch
@@ -1,29 +1,31 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 14 Sep 2016 14:35:49 +0200
-Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 228/332] fs/dcache: use swait_queue instead of waitqueue
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dda774431277ba5b3c286b4f0969ee540f6c6e55
 
 __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock()
 which disables preemption. As a workaround convert it to swait.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- fs/cifs/readdir.c       |    2 +-
- fs/dcache.c             |   27 +++++++++++++++------------
- fs/fuse/dir.c           |    2 +-
- fs/namei.c              |    4 ++--
- fs/nfs/dir.c            |    4 ++--
- fs/nfs/unlink.c         |    4 ++--
- fs/proc/base.c          |    2 +-
- fs/proc/proc_sysctl.c   |    2 +-
- include/linux/dcache.h  |    4 ++--
- include/linux/nfs_xdr.h |    2 +-
- kernel/sched/swait.c    |    1 +
+ fs/cifs/readdir.c       |  2 +-
+ fs/dcache.c             | 27 +++++++++++++++------------
+ fs/fuse/dir.c           |  2 +-
+ fs/namei.c              |  4 ++--
+ fs/nfs/dir.c            |  4 ++--
+ fs/nfs/unlink.c         |  4 ++--
+ fs/proc/base.c          |  2 +-
+ fs/proc/proc_sysctl.c   |  2 +-
+ include/linux/dcache.h  |  4 ++--
+ include/linux/nfs_xdr.h |  2 +-
+ kernel/sched/swait.c    |  1 +
  11 files changed, 29 insertions(+), 25 deletions(-)
 
+diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
+index a27fc8791551..791aecb7c1ac 100644
 --- a/fs/cifs/readdir.c
 +++ b/fs/cifs/readdir.c
-@@ -80,7 +80,7 @@ cifs_prime_dcache(struct dentry *parent,
+@@ -80,7 +80,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,
  	struct inode *inode;
  	struct super_block *sb = parent->d_sb;
  	struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
@@ -32,9 +34,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	cifs_dbg(FYI, "%s: for %s\n", __func__, name->name);
  
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 112ef2773fe3..37948da28742 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -2396,21 +2396,24 @@ static inline void end_dir_add(struct in
+@@ -2424,21 +2424,24 @@ static inline void end_dir_add(struct inode *dir, unsigned n)
  
  static void d_wait_lookup(struct dentry *dentry)
  {
@@ -70,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	unsigned int hash = name->hash;
  	struct hlist_bl_head *b = in_lookup_hash(parent, hash);
-@@ -2519,7 +2522,7 @@ void __d_lookup_done(struct dentry *dent
+@@ -2547,7 +2550,7 @@ void __d_lookup_done(struct dentry *dentry)
  	hlist_bl_lock(b);
  	dentry->d_flags &= ~DCACHE_PAR_LOOKUP;
  	__hlist_bl_del(&dentry->d_u.d_in_lookup_hash);
@@ -79,9 +83,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	dentry->d_wait = NULL;
  	hlist_bl_unlock(b);
  	INIT_HLIST_NODE(&dentry->d_u.d_alias);
+diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
+index 642c57b8de7b..8494b9308333 100644
 --- a/fs/fuse/dir.c
 +++ b/fs/fuse/dir.c
-@@ -1191,7 +1191,7 @@ static int fuse_direntplus_link(struct f
+@@ -1191,7 +1191,7 @@ static int fuse_direntplus_link(struct file *file,
  	struct inode *dir = d_inode(parent);
  	struct fuse_conn *fc;
  	struct inode *inode;
@@ -90,9 +96,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (!o->nodeid) {
  		/*
+diff --git a/fs/namei.c b/fs/namei.c
+index 66209f720146..cc5320e29fc1 100644
 --- a/fs/namei.c
 +++ b/fs/namei.c
-@@ -1626,7 +1626,7 @@ static struct dentry *lookup_slow(const
+@@ -1626,7 +1626,7 @@ static struct dentry *lookup_slow(const struct qstr *name,
  {
  	struct dentry *dentry = ERR_PTR(-ENOENT), *old;
  	struct inode *inode = dir->d_inode;
@@ -101,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	inode_lock_shared(inode);
  	/* Don't go there if it's already dead */
-@@ -3083,7 +3083,7 @@ static int lookup_open(struct nameidata
+@@ -3083,7 +3083,7 @@ static int lookup_open(struct nameidata *nd, struct path *path,
  	struct dentry *dentry;
  	int error, create_error = 0;
  	umode_t mode = op->mode;
@@ -110,6 +118,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (unlikely(IS_DEADDIR(dir_inode)))
  		return -ENOENT;
+diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
+index 63ed5180e544..ba90d41d3c34 100644
 --- a/fs/nfs/dir.c
 +++ b/fs/nfs/dir.c
 @@ -485,7 +485,7 @@ static
@@ -121,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct dentry *dentry;
  	struct dentry *alias;
  	struct inode *dir = d_inode(parent);
-@@ -1487,7 +1487,7 @@ int nfs_atomic_open(struct inode *dir, s
+@@ -1491,7 +1491,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
  		    struct file *file, unsigned open_flags,
  		    umode_t mode, int *opened)
  {
@@ -130,6 +140,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct nfs_open_context *ctx;
  	struct dentry *res;
  	struct iattr attr = { .ia_valid = ATTR_OPEN };
+diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
+index 0165a95823c2..58990c8f52e0 100644
 --- a/fs/nfs/unlink.c
 +++ b/fs/nfs/unlink.c
 @@ -12,7 +12,7 @@
@@ -141,7 +153,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include <linux/namei.h>
  #include <linux/fsnotify.h>
  
-@@ -205,7 +205,7 @@ nfs_async_unlink(struct dentry *dentry,
+@@ -205,7 +205,7 @@ nfs_async_unlink(struct dentry *dentry, const struct qstr *name)
  		goto out_free_name;
  	}
  	data->res.dir_attr = &data->dir_attr;
@@ -150,9 +162,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	status = -EBUSY;
  	spin_lock(&dentry->d_lock);
+diff --git a/fs/proc/base.c b/fs/proc/base.c
+index e67fec3c9856..0edc16f95596 100644
 --- a/fs/proc/base.c
 +++ b/fs/proc/base.c
-@@ -1834,7 +1834,7 @@ bool proc_fill_cache(struct file *file,
+@@ -1834,7 +1834,7 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
  
  	child = d_hash_and_lookup(dir, &qname);
  	if (!child) {
@@ -161,9 +175,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		child = d_alloc_parallel(dir, &qname, &wq);
  		if (IS_ERR(child))
  			goto end_instantiate;
+diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
+index d4e37acd4821..000cea46434a 100644
 --- a/fs/proc/proc_sysctl.c
 +++ b/fs/proc/proc_sysctl.c
-@@ -632,7 +632,7 @@ static bool proc_sys_fill_cache(struct f
+@@ -632,7 +632,7 @@ static bool proc_sys_fill_cache(struct file *file,
  
  	child = d_lookup(dir, &qname);
  	if (!child) {
@@ -172,6 +188,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		child = d_alloc_parallel(dir, &qname, &wq);
  		if (IS_ERR(child))
  			return false;
+diff --git a/include/linux/dcache.h b/include/linux/dcache.h
+index 8b10a30f5087..d532c60f3fb5 100644
 --- a/include/linux/dcache.h
 +++ b/include/linux/dcache.h
 @@ -101,7 +101,7 @@ struct dentry {
@@ -183,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	};
  	struct list_head d_child;	/* child of parent list */
  	struct list_head d_subdirs;	/* our children */
-@@ -231,7 +231,7 @@ extern void d_set_d_op(struct dentry *de
+@@ -231,7 +231,7 @@ extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op
  extern struct dentry * d_alloc(struct dentry *, const struct qstr *);
  extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *);
  extern struct dentry * d_alloc_parallel(struct dentry *, const struct qstr *,
@@ -192,6 +210,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  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 --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
+index 3bf867a0c3b3..71c6bdd14c8a 100644
 --- a/include/linux/nfs_xdr.h
 +++ b/include/linux/nfs_xdr.h
 @@ -1490,7 +1490,7 @@ struct nfs_unlinkdata {
@@ -203,9 +223,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct rpc_cred	*cred;
  	struct nfs_fattr dir_attr;
  	long timeout;
+diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c
+index e2e224c59c0a..ef027ff3250a 100644
 --- a/kernel/sched/swait.c
 +++ b/kernel/sched/swait.c
-@@ -74,6 +74,7 @@ void swake_up_all(struct swait_queue_hea
+@@ -74,6 +74,7 @@ void swake_up_all(struct swait_queue_head *q)
  	if (!swait_active(q))
  		return;
  
diff --git a/debian/patches/features/all/rt/workqueue-use-rcu.patch b/debian/patches/features/all/rt/0229-workqueue-Use-normal-rcu.patch
similarity index 82%
rename from debian/patches/features/all/rt/workqueue-use-rcu.patch
rename to debian/patches/features/all/rt/0229-workqueue-Use-normal-rcu.patch
index eab4783..f04dda92 100644
--- a/debian/patches/features/all/rt/workqueue-use-rcu.patch
+++ b/debian/patches/features/all/rt/0229-workqueue-Use-normal-rcu.patch
@@ -1,7 +1,7 @@
-Subject: workqueue: Use normal rcu
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 24 Jul 2013 15:26:54 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 229/332] workqueue: Use normal rcu
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f655ed905044ee38ac8dc6bfb895d9cc14a156cb
 
 There is no need for sched_rcu. The undocumented reason why sched_rcu
 is used is to avoid a few explicit rcu_read_lock()/unlock() pairs by
@@ -10,9 +10,11 @@ protected by preempt or irq disabled regions.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/workqueue.c |   95 +++++++++++++++++++++++++++++------------------------
+ kernel/workqueue.c | 95 ++++++++++++++++++++++++++++++------------------------
  1 file changed, 52 insertions(+), 43 deletions(-)
 
+diff --git a/kernel/workqueue.c b/kernel/workqueue.c
+index 776dda02e751..718c0cbdd8e5 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -125,7 +125,7 @@ enum {
@@ -51,7 +53,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	 * determined without grabbing wq->mutex.
  	 */
  	struct work_struct	unbound_release_work;
-@@ -355,20 +355,20 @@ static void workqueue_sysfs_unregister(s
+@@ -355,20 +355,20 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq);
  #include <trace/events/workqueue.h>
  
  #define assert_rcu_or_pool_mutex()					\
@@ -78,7 +80,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define for_each_cpu_worker_pool(pool, cpu)				\
  	for ((pool) = &per_cpu(cpu_worker_pools, cpu)[0];		\
-@@ -380,7 +380,7 @@ static void workqueue_sysfs_unregister(s
+@@ -380,7 +380,7 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq);
   * @pool: iteration cursor
   * @pi: integer used for iteration
   *
@@ -87,7 +89,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * locked.  If the pool needs to be used beyond the locking in effect, the
   * caller is responsible for guaranteeing that the pool stays online.
   *
-@@ -412,7 +412,7 @@ static void workqueue_sysfs_unregister(s
+@@ -412,7 +412,7 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq);
   * @pwq: iteration cursor
   * @wq: the target workqueue
   *
@@ -96,7 +98,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * If the pwq needs to be used beyond the locking in effect, the caller is
   * responsible for guaranteeing that the pwq stays online.
   *
-@@ -548,7 +548,7 @@ static int worker_pool_assign_id(struct
+@@ -548,7 +548,7 @@ static int worker_pool_assign_id(struct worker_pool *pool)
   * @wq: the target workqueue
   * @node: the node ID
   *
@@ -105,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * read locked.
   * If the pwq needs to be used beyond the locking in effect, the caller is
   * responsible for guaranteeing that the pwq stays online.
-@@ -692,8 +692,8 @@ static struct pool_workqueue *get_work_p
+@@ -692,8 +692,8 @@ static struct pool_workqueue *get_work_pwq(struct work_struct *work)
   * @work: the work item of interest
   *
   * Pools are created and destroyed under wq_pool_mutex, and allows read
@@ -116,7 +118,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   *
   * All fields of the returned pool are accessible as long as the above
   * mentioned locking is in effect.  If the returned pool needs to be used
-@@ -1098,7 +1098,7 @@ static void put_pwq_unlocked(struct pool
+@@ -1098,7 +1098,7 @@ static void put_pwq_unlocked(struct pool_workqueue *pwq)
  {
  	if (pwq) {
  		/*
@@ -125,7 +127,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		 * following lock operations are safe.
  		 */
  		spin_lock_irq(&pwq->pool->lock);
-@@ -1226,6 +1226,7 @@ static int try_to_grab_pending(struct wo
+@@ -1226,6 +1226,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
  	if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)))
  		return 0;
  
@@ -133,7 +135,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * The queueing is in progress, or it is already queued. Try to
  	 * steal it from ->worklist without clearing WORK_STRUCT_PENDING.
-@@ -1264,10 +1265,12 @@ static int try_to_grab_pending(struct wo
+@@ -1264,10 +1265,12 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
  		set_work_pool_and_keep_pending(work, pool->id);
  
  		spin_unlock(&pool->lock);
@@ -146,7 +148,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	local_irq_restore(*flags);
  	if (work_is_canceling(work))
  		return -ENOENT;
-@@ -1381,6 +1384,7 @@ static void __queue_work(int cpu, struct
+@@ -1381,6 +1384,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
  	if (unlikely(wq->flags & __WQ_DRAINING) &&
  	    WARN_ON_ONCE(!is_chained_work(wq)))
  		return;
@@ -154,7 +156,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  retry:
  	if (req_cpu == WORK_CPU_UNBOUND)
  		cpu = wq_select_unbound_cpu(raw_smp_processor_id());
-@@ -1437,10 +1441,8 @@ static void __queue_work(int cpu, struct
+@@ -1437,10 +1441,8 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
  	/* pwq determined, queue */
  	trace_workqueue_queue_work(req_cpu, pwq, work);
  
@@ -167,7 +169,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	pwq->nr_in_flight[pwq->work_color]++;
  	work_flags = work_color_to_flags(pwq->work_color);
-@@ -1458,7 +1460,9 @@ static void __queue_work(int cpu, struct
+@@ -1458,7 +1460,9 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
  
  	insert_work(pwq, work, worklist, work_flags);
  
@@ -177,7 +179,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -2785,14 +2789,14 @@ static bool start_flush_work(struct work
+@@ -2785,14 +2789,14 @@ static bool start_flush_work(struct work_struct *work, struct wq_barrier *barr)
  
  	might_sleep();
  
@@ -195,7 +197,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/* see the comment in try_to_grab_pending() with the same code */
  	pwq = get_work_pwq(work);
  	if (pwq) {
-@@ -2821,10 +2825,11 @@ static bool start_flush_work(struct work
+@@ -2821,10 +2825,11 @@ static bool start_flush_work(struct work_struct *work, struct wq_barrier *barr)
  	else
  		lock_map_acquire_read(&pwq->wq->lockdep_map);
  	lock_map_release(&pwq->wq->lockdep_map);
@@ -208,7 +210,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return false;
  }
  
-@@ -3245,7 +3250,7 @@ static void rcu_free_pool(struct rcu_hea
+@@ -3245,7 +3250,7 @@ static void rcu_free_pool(struct rcu_head *rcu)
   * put_unbound_pool - put a worker_pool
   * @pool: worker_pool to put
   *
@@ -217,7 +219,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   * 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().
-@@ -3299,8 +3304,8 @@ static void put_unbound_pool(struct work
+@@ -3299,8 +3304,8 @@ static void put_unbound_pool(struct worker_pool *pool)
  	del_timer_sync(&pool->idle_timer);
  	del_timer_sync(&pool->mayday_timer);
  
@@ -228,7 +230,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -3407,14 +3412,14 @@ static void pwq_unbound_release_workfn(s
+@@ -3407,14 +3412,14 @@ static void pwq_unbound_release_workfn(struct work_struct *work)
  	put_unbound_pool(pool);
  	mutex_unlock(&wq_pool_mutex);
  
@@ -245,7 +247,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -4064,7 +4069,7 @@ void destroy_workqueue(struct workqueue_
+@@ -4078,7 +4083,7 @@ void destroy_workqueue(struct workqueue_struct *wq)
  		 * The base ref is never dropped on per-cpu pwqs.  Directly
  		 * schedule RCU free.
  		 */
@@ -254,7 +256,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else {
  		/*
  		 * We're the sole accessor of @wq at this point.  Directly
-@@ -4157,7 +4162,8 @@ bool workqueue_congested(int cpu, struct
+@@ -4172,7 +4177,8 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
  	struct pool_workqueue *pwq;
  	bool ret;
  
@@ -264,7 +266,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (cpu == WORK_CPU_UNBOUND)
  		cpu = smp_processor_id();
-@@ -4168,7 +4174,8 @@ bool workqueue_congested(int cpu, struct
+@@ -4183,7 +4189,8 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
  		pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu));
  
  	ret = !list_empty(&pwq->delayed_works);
@@ -274,7 +276,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
-@@ -4194,15 +4201,15 @@ unsigned int work_busy(struct work_struc
+@@ -4209,15 +4216,15 @@ unsigned int work_busy(struct work_struct *work)
  	if (work_pending(work))
  		ret |= WORK_BUSY_PENDING;
  
@@ -294,7 +296,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return ret;
  }
-@@ -4391,7 +4398,7 @@ void show_workqueue_state(void)
+@@ -4406,7 +4413,7 @@ void show_workqueue_state(void)
  	unsigned long flags;
  	int pi;
  
@@ -303,7 +305,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	pr_info("Showing busy workqueues and worker pools:\n");
  
-@@ -4444,7 +4451,7 @@ void show_workqueue_state(void)
+@@ -4459,7 +4466,7 @@ void show_workqueue_state(void)
  		spin_unlock_irqrestore(&pool->lock, flags);
  	}
  
@@ -312,7 +314,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -4782,16 +4789,16 @@ bool freeze_workqueues_busy(void)
+@@ -4797,16 +4804,16 @@ bool freeze_workqueues_busy(void)
  		 * nr_active is monotonically decreasing.  It's safe
  		 * to peek without lock.
  		 */
@@ -332,7 +334,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  out_unlock:
  	mutex_unlock(&wq_pool_mutex);
-@@ -4981,7 +4988,8 @@ static ssize_t wq_pool_ids_show(struct d
+@@ -4996,7 +5003,8 @@ static ssize_t wq_pool_ids_show(struct device *dev,
  	const char *delim = "";
  	int node, written = 0;
  
@@ -342,7 +344,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	for_each_node(node) {
  		written += scnprintf(buf + written, PAGE_SIZE - written,
  				     "%s%d:%d", delim, node,
-@@ -4989,7 +4997,8 @@ static ssize_t wq_pool_ids_show(struct d
+@@ -5004,7 +5012,8 @@ static ssize_t wq_pool_ids_show(struct device *dev,
  		delim = " ";
  	}
  	written += scnprintf(buf + written, PAGE_SIZE - written, "\n");
diff --git a/debian/patches/features/all/rt/workqueue-use-locallock.patch b/debian/patches/features/all/rt/0230-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch
similarity index 77%
rename from debian/patches/features/all/rt/workqueue-use-locallock.patch
rename to debian/patches/features/all/rt/0230-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch
index e4410f9..4127ba8 100644
--- a/debian/patches/features/all/rt/workqueue-use-locallock.patch
+++ b/debian/patches/features/all/rt/0230-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch
@@ -1,16 +1,19 @@
-Subject: workqueue: Use local irq lock instead of irq disable regions
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 21:42:26 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 230/332] workqueue: Use local irq lock instead of irq disable
+ regions
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0c7561c7ba9f3c0b91530a594acd88646cf2e11b
 
 Use a local_irq_lock as a replacement for irq off regions. We keep the
 semantic of irq-off in regard to the pool->lock and remain preemptible.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/workqueue.c |   33 +++++++++++++++++++--------------
+ kernel/workqueue.c | 33 +++++++++++++++++++--------------
  1 file changed, 19 insertions(+), 14 deletions(-)
 
+diff --git a/kernel/workqueue.c b/kernel/workqueue.c
+index 718c0cbdd8e5..0143449bca42 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -48,6 +48,7 @@
@@ -21,7 +24,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #include "workqueue_internal.h"
  
-@@ -348,6 +349,8 @@ EXPORT_SYMBOL_GPL(system_power_efficient
+@@ -348,6 +349,8 @@ EXPORT_SYMBOL_GPL(system_power_efficient_wq);
  struct workqueue_struct *system_freezable_power_efficient_wq __read_mostly;
  EXPORT_SYMBOL_GPL(system_freezable_power_efficient_wq);
  
@@ -30,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static int worker_thread(void *__worker);
  static void workqueue_sysfs_unregister(struct workqueue_struct *wq);
  
-@@ -1101,9 +1104,11 @@ static void put_pwq_unlocked(struct pool
+@@ -1101,9 +1104,11 @@ static void put_pwq_unlocked(struct pool_workqueue *pwq)
  		 * As both pwqs and pools are RCU protected, the
  		 * following lock operations are safe.
  		 */
@@ -44,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  }
  
-@@ -1207,7 +1212,7 @@ static int try_to_grab_pending(struct wo
+@@ -1207,7 +1212,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
  	struct worker_pool *pool;
  	struct pool_workqueue *pwq;
  
@@ -53,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* try to steal the timer if it exists */
  	if (is_dwork) {
-@@ -1271,7 +1276,7 @@ static int try_to_grab_pending(struct wo
+@@ -1271,7 +1276,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
  	spin_unlock(&pool->lock);
  fail:
  	rcu_read_unlock();
@@ -62,7 +65,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (work_is_canceling(work))
  		return -ENOENT;
  	cpu_relax();
-@@ -1376,7 +1381,7 @@ static void __queue_work(int cpu, struct
+@@ -1376,7 +1381,7 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
  	 * queued or lose PENDING.  Grabbing PENDING and queueing should
  	 * happen with IRQ disabled.
  	 */
@@ -71,7 +74,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	debug_work_activate(work);
  
-@@ -1482,14 +1487,14 @@ bool queue_work_on(int cpu, struct workq
+@@ -1482,14 +1487,14 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq,
  	bool ret = false;
  	unsigned long flags;
  
@@ -88,7 +91,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return ret;
  }
  EXPORT_SYMBOL(queue_work_on);
-@@ -1556,14 +1561,14 @@ bool queue_delayed_work_on(int cpu, stru
+@@ -1556,14 +1561,14 @@ bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
  	unsigned long flags;
  
  	/* read the comment in __queue_work() */
@@ -105,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return ret;
  }
  EXPORT_SYMBOL(queue_delayed_work_on);
-@@ -1598,7 +1603,7 @@ bool mod_delayed_work_on(int cpu, struct
+@@ -1598,7 +1603,7 @@ bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq,
  
  	if (likely(ret >= 0)) {
  		__queue_delayed_work(cpu, wq, dwork, delay);
@@ -114,7 +117,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  
  	/* -ENOENT from try_to_grab_pending() becomes %true */
-@@ -2916,7 +2921,7 @@ static bool __cancel_work_timer(struct w
+@@ -2916,7 +2921,7 @@ static bool __cancel_work_timer(struct work_struct *work, bool is_dwork)
  
  	/* tell other tasks trying to grab @work to back off */
  	mark_work_canceling(work);
@@ -136,7 +139,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return flush_work(&dwork->work);
  }
  EXPORT_SYMBOL(flush_delayed_work);
-@@ -2992,7 +2997,7 @@ static bool __cancel_work(struct work_st
+@@ -2992,7 +2997,7 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork)
  		return false;
  
  	set_work_pool_and_clear_pending(work, get_work_pool_id(work));
diff --git a/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch b/debian/patches/features/all/rt/0231-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch
similarity index 92%
rename from debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch
rename to debian/patches/features/all/rt/0231-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch
index 6883546..442dd88 100644
--- a/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch
+++ b/debian/patches/features/all/rt/0231-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Mon, 01 Jul 2013 11:02:42 +0200
-Subject: workqueue: Prevent workqueue versus ata-piix livelock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Mon, 1 Jul 2013 11:02:42 +0200
+Subject: [PATCH 231/332] workqueue: Prevent workqueue versus ata-piix livelock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4df541da374d22047457a34860ea176b53fceda2
 
 An Intel i7 system regularly detected rcu_preempt stalls after the kernel
 was upgraded from 3.6-rt to 3.8-rt. When the stall happened, disk I/O was no
@@ -109,9 +109,11 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/workqueue.c |    3 ++-
+ kernel/workqueue.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/workqueue.c b/kernel/workqueue.c
+index 0143449bca42..5237ef8d2134 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -49,6 +49,7 @@
@@ -122,7 +124,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include "workqueue_internal.h"
  
-@@ -1279,7 +1280,7 @@ static int try_to_grab_pending(struct wo
+@@ -1279,7 +1280,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
  	local_unlock_irqrestore(pendingb_lock, *flags);
  	if (work_is_canceling(work))
  		return -ENOENT;
diff --git a/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch b/debian/patches/features/all/rt/0232-sched-Distangle-worker-accounting-from-rqlock.patch
similarity index 81%
rename from debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch
rename to debian/patches/features/all/rt/0232-sched-Distangle-worker-accounting-from-rqlock.patch
index 383a9f2..8917564 100644
--- a/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch
+++ b/debian/patches/features/all/rt/0232-sched-Distangle-worker-accounting-from-rqlock.patch
@@ -1,12 +1,13 @@
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed Jun 22 19:47:03 2011 +0200
-Subject: sched: Distangle worker accounting from rqlock
-    
+Date: Wed, 22 Jun 2011 19:47:03 +0200
+Subject: [PATCH 232/332] sched: Distangle worker accounting from rqlock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c3452d2a5c81e2a1c36e8dae3e4e066f06fa51c8
+
 The worker accounting for cpu bound workers is plugged into the core
 scheduler code and the wakeup code. This is not a hard requirement and
 can be avoided by keeping track of the state in the workqueue code
 itself.
-    
+
 Keep track of the sleeping state in the worker itself and call the
 notifier before entering the core scheduler. There might be false
 positives when the task is woken between that call and actually
@@ -14,7 +15,7 @@ scheduling, but that's not really different from scheduling and being
 woken immediately after switching away. There is also no harm from
 updating nr_running when the task returns from scheduling instead of
 accounting it in the wakeup code.
-    
+
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Cc: Peter Zijlstra <peterz at infradead.org>
 Cc: Tejun Heo <tj at kernel.org>
@@ -22,17 +23,17 @@ Cc: Jens Axboe <axboe at kernel.dk>
 Cc: Linus Torvalds <torvalds at linux-foundation.org>
 Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
-
 ---
- kernel/sched/core.c         |   81 ++++++++------------------------------------
- kernel/workqueue.c          |   52 ++++++++++++----------------
- kernel/workqueue_internal.h |    5 +-
+ kernel/sched/core.c         | 81 +++++++++------------------------------------
+ kernel/workqueue.c          | 52 +++++++++++++----------------
+ kernel/workqueue_internal.h |  5 +--
  3 files changed, 41 insertions(+), 97 deletions(-)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index c4dc9671d777..54b8a2344de1 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -1711,10 +1711,6 @@ static inline void ttwu_activate(struct
+@@ -1723,10 +1723,6 @@ static inline void ttwu_activate(struct rq *rq, struct task_struct *p, int en_fl
  {
  	activate_task(rq, p, en_flags);
  	p->on_rq = TASK_ON_RQ_QUEUED;
@@ -43,10 +44,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  }
  
  /*
-@@ -2152,53 +2148,6 @@ try_to_wake_up(struct task_struct *p, un
+@@ -2163,53 +2159,6 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
+ 	return success;
  }
  
- /**
+-/**
 - * 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
@@ -93,11 +95,10 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
 -	raw_spin_unlock(&p->pi_lock);
 -}
 -
--/**
+ /**
   * wake_up_process - Wake up a specific process
   * @p: The process to be woken up.
-  *
-@@ -3494,21 +3443,6 @@ static void __sched notrace __schedule(b
+@@ -3506,21 +3455,6 @@ static void __sched notrace __schedule(bool preempt)
  		} else {
  			deactivate_task(rq, prev, DEQUEUE_SLEEP);
  			prev->on_rq = 0;
@@ -119,7 +120,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  		}
  		switch_count = &prev->nvcsw;
  	}
-@@ -3567,6 +3501,14 @@ static inline void sched_submit_work(str
+@@ -3579,6 +3513,14 @@ static inline void sched_submit_work(struct task_struct *tsk)
  {
  	if (!tsk->state || tsk_is_pi_blocked(tsk))
  		return;
@@ -134,7 +135,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  	/*
  	 * If we are going to sleep and we have plugged IO queued,
  	 * make sure to submit it to avoid deadlocks.
-@@ -3575,6 +3517,12 @@ static inline void sched_submit_work(str
+@@ -3587,6 +3529,12 @@ static inline void sched_submit_work(struct task_struct *tsk)
  		blk_schedule_flush_plug(tsk);
  }
  
@@ -147,7 +148,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  asmlinkage __visible void __sched schedule(void)
  {
  	struct task_struct *tsk = current;
-@@ -3585,6 +3533,7 @@ asmlinkage __visible void __sched schedu
+@@ -3597,6 +3545,7 @@ asmlinkage __visible void __sched schedule(void)
  		__schedule(false);
  		sched_preempt_enable_no_resched();
  	} while (need_resched());
@@ -155,9 +156,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  }
  EXPORT_SYMBOL(schedule);
  
+diff --git a/kernel/workqueue.c b/kernel/workqueue.c
+index 5237ef8d2134..7649d8181b21 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
-@@ -841,43 +841,32 @@ static void wake_up_worker(struct worker
+@@ -841,43 +841,32 @@ static void wake_up_worker(struct worker_pool *pool)
  }
  
  /**
@@ -212,7 +215,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  	struct worker_pool *pool;
  
  	/*
-@@ -886,13 +875,15 @@ struct task_struct *wq_worker_sleeping(s
+@@ -886,13 +875,15 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task)
  	 * checking NOT_RUNNING.
  	 */
  	if (worker->flags & WORKER_NOT_RUNNING)
@@ -232,7 +235,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  
  	/*
  	 * The counterpart of the following dec_and_test, implied mb,
-@@ -906,9 +897,12 @@ struct task_struct *wq_worker_sleeping(s
+@@ -906,9 +897,12 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task)
  	 * lock is safe.
  	 */
  	if (atomic_dec_and_test(&pool->nr_running) &&
@@ -248,6 +251,8 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  }
  
  /**
+diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h
+index 8635417c587b..f000c4d6917e 100644
 --- a/kernel/workqueue_internal.h
 +++ b/kernel/workqueue_internal.h
 @@ -43,6 +43,7 @@ struct worker {
@@ -258,7 +263,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
  
  	/*
  	 * Opaque string set with work_set_desc().  Printed out with task
-@@ -68,7 +69,7 @@ static inline struct worker *current_wq_
+@@ -68,7 +69,7 @@ static inline struct worker *current_wq_worker(void)
   * Scheduler hooks for concurrency managed workqueue.  Only to be used from
   * sched/core.c and workqueue.c.
   */
diff --git a/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch b/debian/patches/features/all/rt/0233-idr-Use-local-lock-instead-of-preempt-enable-disable.patch
similarity index 78%
rename from debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch
rename to debian/patches/features/all/rt/0233-idr-Use-local-lock-instead-of-preempt-enable-disable.patch
index 0686a35..e178a2a 100644
--- a/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch
+++ b/debian/patches/features/all/rt/0233-idr-Use-local-lock-instead-of-preempt-enable-disable.patch
@@ -1,16 +1,18 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: idr: Use local lock instead of preempt enable/disable
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 233/332] idr: Use local lock instead of preempt enable/disable
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7a200cfe5cffe71dbe1ef1bba42631c7895ba326
 
 We need to protect the per cpu variable and prevent migration.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/idr.h |    4 ++++
- lib/idr.c           |   43 +++++++++++++++++++++++++++++++++++++------
+ include/linux/idr.h |  4 ++++
+ lib/idr.c           | 43 +++++++++++++++++++++++++++++++++++++------
  2 files changed, 41 insertions(+), 6 deletions(-)
 
+diff --git a/include/linux/idr.h b/include/linux/idr.h
+index 083d61e92706..5899796f50cb 100644
 --- a/include/linux/idr.h
 +++ b/include/linux/idr.h
 @@ -95,10 +95,14 @@ bool idr_is_empty(struct idr *idp);
@@ -28,6 +30,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /**
   * idr_find - return pointer for given id
+diff --git a/lib/idr.c b/lib/idr.c
+index 6098336df267..9decbe914595 100644
 --- a/lib/idr.c
 +++ b/lib/idr.c
 @@ -30,6 +30,7 @@
@@ -38,7 +42,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define MAX_IDR_SHIFT		(sizeof(int) * 8 - 1)
  #define MAX_IDR_BIT		(1U << MAX_IDR_SHIFT)
-@@ -45,6 +46,37 @@ static DEFINE_PER_CPU(struct idr_layer *
+@@ -45,6 +46,37 @@ static DEFINE_PER_CPU(struct idr_layer *, idr_preload_head);
  static DEFINE_PER_CPU(int, idr_preload_cnt);
  static DEFINE_SPINLOCK(simple_ida_lock);
  
@@ -76,7 +80,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /* the maximum ID which can be allocated given idr->layers */
  static int idr_max(int layers)
  {
-@@ -115,14 +147,14 @@ static struct idr_layer *idr_layer_alloc
+@@ -115,14 +147,14 @@ static struct idr_layer *idr_layer_alloc(gfp_t gfp_mask, struct idr *layer_idr)
  	 * context.  See idr_preload() for details.
  	 */
  	if (!in_interrupt()) {
@@ -93,7 +97,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		if (new)
  			return new;
  	}
-@@ -366,7 +398,6 @@ static void idr_fill_slot(struct idr *id
+@@ -366,7 +398,6 @@ static void idr_fill_slot(struct idr *idr, void *ptr, int id,
  	idr_mark_full(pa, id);
  }
  
diff --git a/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch b/debian/patches/features/all/rt/0234-percpu_ida-Use-local-locks.patch
similarity index 67%
rename from debian/patches/features/all/rt/percpu_ida-use-locklocks.patch
rename to debian/patches/features/all/rt/0234-percpu_ida-Use-local-locks.patch
index 1a97494..fbcc015 100644
--- a/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch
+++ b/debian/patches/features/all/rt/0234-percpu_ida-Use-local-locks.patch
@@ -1,15 +1,17 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 9 Apr 2014 11:58:17 +0200
-Subject: percpu_ida: Use local locks
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 234/332] percpu_ida: Use local locks
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7d1cd8b69e9e6a125de1b3a109f02956e1ce7905
 
 the local_irq_save() + spin_lock() does not work that well on -RT
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- lib/percpu_ida.c |   20 ++++++++++++--------
+ lib/percpu_ida.c | 20 ++++++++++++--------
  1 file changed, 12 insertions(+), 8 deletions(-)
 
+diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c
+index 6d40944960de..822a2c027e72 100644
 --- a/lib/percpu_ida.c
 +++ b/lib/percpu_ida.c
 @@ -26,6 +26,9 @@
@@ -22,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  struct percpu_ida_cpu {
  	/*
-@@ -148,13 +151,13 @@ int percpu_ida_alloc(struct percpu_ida *
+@@ -148,13 +151,13 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state)
  	unsigned long flags;
  	int tag;
  
@@ -38,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		return tag;
  	}
  
-@@ -173,6 +176,7 @@ int percpu_ida_alloc(struct percpu_ida *
+@@ -173,6 +176,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state)
  
  		if (!tags->nr_free)
  			alloc_global_tags(pool, tags);
@@ -46,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		if (!tags->nr_free)
  			steal_tags(pool, tags);
  
-@@ -184,7 +188,7 @@ int percpu_ida_alloc(struct percpu_ida *
+@@ -184,7 +188,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state)
  		}
  
  		spin_unlock(&pool->lock);
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		if (tag >= 0 || state == TASK_RUNNING)
  			break;
-@@ -196,7 +200,7 @@ int percpu_ida_alloc(struct percpu_ida *
+@@ -196,7 +200,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state)
  
  		schedule();
  
@@ -64,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		tags = this_cpu_ptr(pool->tag_cpu);
  	}
  	if (state != TASK_RUNNING)
-@@ -221,7 +225,7 @@ void percpu_ida_free(struct percpu_ida *
+@@ -221,7 +225,7 @@ void percpu_ida_free(struct percpu_ida *pool, unsigned tag)
  
  	BUG_ON(tag >= pool->nr_tags);
  
@@ -73,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	tags = this_cpu_ptr(pool->tag_cpu);
  
  	spin_lock(&tags->lock);
-@@ -253,7 +257,7 @@ void percpu_ida_free(struct percpu_ida *
+@@ -253,7 +257,7 @@ void percpu_ida_free(struct percpu_ida *pool, unsigned tag)
  		spin_unlock(&pool->lock);
  	}
  
@@ -82,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(percpu_ida_free);
  
-@@ -345,7 +349,7 @@ int percpu_ida_for_each_free(struct perc
+@@ -345,7 +349,7 @@ int percpu_ida_for_each_free(struct percpu_ida *pool, percpu_ida_cb fn,
  	struct percpu_ida_cpu *remote;
  	unsigned cpu, i, err = 0;
  
@@ -91,7 +93,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	for_each_possible_cpu(cpu) {
  		remote = per_cpu_ptr(pool->tag_cpu, cpu);
  		spin_lock(&remote->lock);
-@@ -367,7 +371,7 @@ int percpu_ida_for_each_free(struct perc
+@@ -367,7 +371,7 @@ int percpu_ida_for_each_free(struct percpu_ida *pool, percpu_ida_cb fn,
  	}
  	spin_unlock(&pool->lock);
  out:
diff --git a/debian/patches/features/all/rt/debugobjects-rt.patch b/debian/patches/features/all/rt/0235-debugobjects-Make-RT-aware.patch
similarity index 56%
rename from debian/patches/features/all/rt/debugobjects-rt.patch
rename to debian/patches/features/all/rt/0235-debugobjects-Make-RT-aware.patch
index f507ccc..aab35c2 100644
--- a/debian/patches/features/all/rt/debugobjects-rt.patch
+++ b/debian/patches/features/all/rt/0235-debugobjects-Make-RT-aware.patch
@@ -1,18 +1,20 @@
-Subject: debugobjects: Make RT aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 17 Jul 2011 21:41:35 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 235/332] debugobjects: Make RT aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7fab1d0822f2b2e424ef312d6952150a0dd152f2
 
 Avoid filling the pool / allocating memory with irqs off().
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- lib/debugobjects.c |    5 ++++-
+ lib/debugobjects.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
 
+diff --git a/lib/debugobjects.c b/lib/debugobjects.c
+index 056052dc8e91..d8494e126de8 100644
 --- a/lib/debugobjects.c
 +++ b/lib/debugobjects.c
-@@ -308,7 +308,10 @@ static void
+@@ -308,7 +308,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
  	struct debug_obj *obj;
  	unsigned long flags;
  
diff --git a/debian/patches/features/all/rt/jump-label-rt.patch b/debian/patches/features/all/rt/0236-jump-label-disable-if-stop_machine-is-used.patch
similarity index 75%
rename from debian/patches/features/all/rt/jump-label-rt.patch
rename to debian/patches/features/all/rt/0236-jump-label-disable-if-stop_machine-is-used.patch
index 0169af8..a49edcf 100644
--- a/debian/patches/features/all/rt/jump-label-rt.patch
+++ b/debian/patches/features/all/rt/0236-jump-label-disable-if-stop_machine-is-used.patch
@@ -1,7 +1,7 @@
-Subject: jump-label: disable if stop_machine() is used
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 08 Jul 2015 17:14:48 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 8 Jul 2015 17:14:48 +0200
+Subject: [PATCH 236/332] jump-label: disable if stop_machine() is used
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=42c7b25f213e3d2c641f021965f6c3d0b4dbcd6b
 
 Some architectures are using stop_machine() while switching the opcode which
 leads to latency spikes.
@@ -20,9 +20,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 [bigeasy: only ARM for now]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/Kconfig |    2 +-
+ arch/arm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index b5d529fdffab..1703d4162857 100644
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
 @@ -36,7 +36,7 @@ config ARM
diff --git a/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch b/debian/patches/features/all/rt/0237-seqlock-Prevent-rt-starvation.patch
similarity index 79%
rename from debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch
rename to debian/patches/features/all/rt/0237-seqlock-Prevent-rt-starvation.patch
index 56cb803..761c8d0 100644
--- a/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch
+++ b/debian/patches/features/all/rt/0237-seqlock-Prevent-rt-starvation.patch
@@ -1,7 +1,7 @@
-Subject: seqlock: Prevent rt starvation
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 22 Feb 2012 12:03:30 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 237/332] seqlock: Prevent rt starvation
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ee41b58931ffd94b1723fda15aa2ae58e43e35ab
 
 If a low prio writer gets preempted while holding the seqlock write
 locked, a high prio reader spins forever on RT.
@@ -19,17 +19,17 @@ Nicholas Mc Guire:
 - __write_seqcount_begin => __raw_write_seqcount_begin
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
-
 ---
- include/linux/seqlock.h |   56 +++++++++++++++++++++++++++++++++++++-----------
- include/net/dst.h       |    2 -
- include/net/neighbour.h |    4 +--
+ include/linux/seqlock.h | 56 ++++++++++++++++++++++++++++++++++++++-----------
+ include/net/dst.h       |  2 +-
+ include/net/neighbour.h |  4 ++--
  3 files changed, 47 insertions(+), 15 deletions(-)
 
+diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
+index ead97654c4e9..17a872117585 100644
 --- a/include/linux/seqlock.h
 +++ b/include/linux/seqlock.h
-@@ -220,20 +220,30 @@ static inline int read_seqcount_retry(co
+@@ -220,20 +220,30 @@ static inline int read_seqcount_retry(const seqcount_t *s, unsigned start)
  	return __read_seqcount_retry(s, start);
  }
  
@@ -97,7 +97,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start)
  {
-@@ -446,36 +478,36 @@ static inline unsigned read_seqretry(con
+@@ -446,36 +478,36 @@ static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start)
  static inline void write_seqlock(seqlock_t *sl)
  {
  	spin_lock(&sl->lock);
@@ -140,7 +140,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	spin_unlock_irq(&sl->lock);
  }
  
-@@ -484,7 +516,7 @@ static inline unsigned long __write_seql
+@@ -484,7 +516,7 @@ static inline unsigned long __write_seqlock_irqsave(seqlock_t *sl)
  	unsigned long flags;
  
  	spin_lock_irqsave(&sl->lock, flags);
@@ -149,7 +149,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return flags;
  }
  
-@@ -494,7 +526,7 @@ static inline unsigned long __write_seql
+@@ -494,7 +526,7 @@ static inline unsigned long __write_seqlock_irqsave(seqlock_t *sl)
  static inline void
  write_sequnlock_irqrestore(seqlock_t *sl, unsigned long flags)
  {
@@ -158,9 +158,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	spin_unlock_irqrestore(&sl->lock, flags);
  }
  
+diff --git a/include/net/dst.h b/include/net/dst.h
+index ddcff17615da..a1fc787b1a8c 100644
 --- a/include/net/dst.h
 +++ b/include/net/dst.h
-@@ -446,7 +446,7 @@ static inline void dst_confirm(struct ds
+@@ -452,7 +452,7 @@ static inline void dst_confirm(struct dst_entry *dst)
  static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,
  				   struct sk_buff *skb)
  {
@@ -169,9 +171,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (dst->pending_confirm) {
  		unsigned long now = jiffies;
+diff --git a/include/net/neighbour.h b/include/net/neighbour.h
+index 8b683841e574..bf656008f6e7 100644
 --- a/include/net/neighbour.h
 +++ b/include/net/neighbour.h
-@@ -446,7 +446,7 @@ static inline int neigh_hh_bridge(struct
+@@ -446,7 +446,7 @@ static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb)
  }
  #endif
  
diff --git a/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches/features/all/rt/0238-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch
similarity index 78%
rename from debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch
rename to debian/patches/features/all/rt/0238-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch
index 8ee1922..cd0baa7 100644
--- a/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch
+++ b/debian/patches/features/all/rt/0238-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch
@@ -1,7 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Wed, 18 Feb 2015 16:05:28 +0100
-Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 238/332] sunrpc: Make svc_xprt_do_enqueue() use
+ get_cpu_light()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=50d20de679f098dcf71cb3c54765982562cf61fd
 
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915
 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd
@@ -29,12 +30,14 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.
 Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/sunrpc/svc_xprt.c |    6 +++---
+ net/sunrpc/svc_xprt.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
+index 9c9db55a0c1e..e6583b018a72 100644
 --- a/net/sunrpc/svc_xprt.c
 +++ b/net/sunrpc/svc_xprt.c
-@@ -396,7 +396,7 @@ void svc_xprt_do_enqueue(struct svc_xprt
+@@ -396,7 +396,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt)
  		goto out;
  	}
  
@@ -43,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	pool = svc_pool_for_cpu(xprt->xpt_server, cpu);
  
  	atomic_long_inc(&pool->sp_stats.packets);
-@@ -432,7 +432,7 @@ void svc_xprt_do_enqueue(struct svc_xprt
+@@ -432,7 +432,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt)
  
  		atomic_long_inc(&pool->sp_stats.threads_woken);
  		wake_up_process(rqstp->rq_task);
@@ -52,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		goto out;
  	}
  	rcu_read_unlock();
-@@ -453,7 +453,7 @@ void svc_xprt_do_enqueue(struct svc_xprt
+@@ -453,7 +453,7 @@ void svc_xprt_do_enqueue(struct svc_xprt *xprt)
  		goto redo_search;
  	}
  	rqstp = NULL;
diff --git a/debian/patches/features/all/rt/skbufhead-raw-lock.patch b/debian/patches/features/all/rt/0239-net-Use-skbufhead-with-raw-lock.patch
similarity index 72%
rename from debian/patches/features/all/rt/skbufhead-raw-lock.patch
rename to debian/patches/features/all/rt/0239-net-Use-skbufhead-with-raw-lock.patch
index a14afde..c5dd156 100644
--- a/debian/patches/features/all/rt/skbufhead-raw-lock.patch
+++ b/debian/patches/features/all/rt/0239-net-Use-skbufhead-with-raw-lock.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 12 Jul 2011 15:38:34 +0200
-Subject: net: Use skbufhead with raw lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 239/332] net: Use skbufhead with raw lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b0019c39695693374c1c7f604c0caf34a409bad6
 
 Use the rps lock as rawlock so we can keep irq-off regions. It looks low
 latency. However we can't kfree() from this context therefore we defer this
@@ -9,14 +9,16 @@ to the softirq and use the tofree_queue list for it (similar to process_queue).
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/netdevice.h |    1 +
- include/linux/skbuff.h    |    7 +++++++
- net/core/dev.c            |   31 ++++++++++++++++++++++++-------
+ include/linux/netdevice.h |  1 +
+ include/linux/skbuff.h    |  7 +++++++
+ net/core/dev.c            | 31 ++++++++++++++++++++++++-------
  3 files changed, 32 insertions(+), 7 deletions(-)
 
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index 780e7171f548..2bb937ca567f 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -2855,6 +2855,7 @@ struct softnet_data {
+@@ -2856,6 +2856,7 @@ struct softnet_data {
  	unsigned int		dropped;
  	struct sk_buff_head	input_pkt_queue;
  	struct napi_struct	backlog;
@@ -24,6 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  };
  
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
+index 32810f279f8e..0db6e31161f6 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
 @@ -284,6 +284,7 @@ struct sk_buff_head {
@@ -34,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  };
  
  struct sk_buff;
-@@ -1573,6 +1574,12 @@ static inline void skb_queue_head_init(s
+@@ -1573,6 +1574,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list)
  	__skb_queue_head_init(list);
  }
  
@@ -47,9 +51,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline void skb_queue_head_init_class(struct sk_buff_head *list,
  		struct lock_class_key *class)
  {
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 1a663019f600..aa19e874f011 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -211,14 +211,14 @@ static inline struct hlist_head *dev_ind
+@@ -211,14 +211,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)
  static inline void rps_lock(struct softnet_data *sd)
  {
  #ifdef CONFIG_RPS
@@ -66,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  }
  
-@@ -4337,7 +4337,7 @@ static void flush_backlog(struct work_st
+@@ -4345,7 +4345,7 @@ static void flush_backlog(struct work_struct *work)
  	skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
  		if (skb->dev->reg_state == NETREG_UNREGISTERING) {
  			__skb_unlink(skb, &sd->input_pkt_queue);
@@ -75,7 +81,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			input_queue_head_incr(sd);
  		}
  	}
-@@ -4347,11 +4347,14 @@ static void flush_backlog(struct work_st
+@@ -4355,11 +4355,14 @@ static void flush_backlog(struct work_struct *work)
  	skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
  		if (skb->dev->reg_state == NETREG_UNREGISTERING) {
  			__skb_unlink(skb, &sd->process_queue);
@@ -91,7 +97,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void flush_all_backlogs(void)
-@@ -4876,7 +4879,9 @@ static int process_backlog(struct napi_s
+@@ -4894,7 +4897,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
  	while (again) {
  		struct sk_buff *skb;
  
@@ -101,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			rcu_read_lock();
  			__netif_receive_skb(skb);
  			rcu_read_unlock();
-@@ -4884,9 +4889,9 @@ static int process_backlog(struct napi_s
+@@ -4902,9 +4907,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
  			if (++work >= quota)
  				return work;
  
@@ -112,7 +118,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		rps_lock(sd);
  		if (skb_queue_empty(&sd->input_pkt_queue)) {
  			/*
-@@ -5228,13 +5233,21 @@ static __latent_entropy void net_rx_acti
+@@ -5246,13 +5251,21 @@ static __latent_entropy void net_rx_action(struct softirq_action *h)
  	struct softnet_data *sd = this_cpu_ptr(&softnet_data);
  	unsigned long time_limit = jiffies + 2;
  	int budget = netdev_budget;
@@ -134,7 +140,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	for (;;) {
  		struct napi_struct *n;
  
-@@ -8037,6 +8050,9 @@ static int dev_cpu_callback(struct notif
+@@ -8055,6 +8068,9 @@ static int dev_cpu_callback(struct notifier_block *nfb,
  		netif_rx_ni(skb);
  		input_queue_head_incr(oldsd);
  	}
@@ -144,7 +150,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return NOTIFY_OK;
  }
-@@ -8341,8 +8357,9 @@ static int __init net_dev_init(void)
+@@ -8359,8 +8375,9 @@ static int __init net_dev_init(void)
  
  		INIT_WORK(flush, flush_backlog);
  
diff --git a/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch b/debian/patches/features/all/rt/0240-net-core-cpuhotplug-Drain-input_pkt_queue-lockless.patch
similarity index 84%
rename from debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch
rename to debian/patches/features/all/rt/0240-net-core-cpuhotplug-Drain-input_pkt_queue-lockless.patch
index 963fea9..780a3e2 100644
--- a/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch
+++ b/debian/patches/features/all/rt/0240-net-core-cpuhotplug-Drain-input_pkt_queue-lockless.patch
@@ -1,9 +1,9 @@
-Subject: net/core/cpuhotplug: Drain input_pkt_queue lockless
 From: Grygorii Strashko <grygorii.strashko at ti.com>
 Date: Fri, 9 Oct 2015 09:25:49 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 240/332] net/core/cpuhotplug: Drain input_pkt_queue lockless
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=950a1a904a082ab845c4898fb566dc40e8a3eea9
 
-I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm 
+I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm
 if I'm trying to unplug cpu1:
 
 [   57.737589] CPU1: shutdown
@@ -31,12 +31,14 @@ Fixes: 91df05da13a6 'net: Use skbufhead with raw lock'
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Cc: stable-rt at vger.kernel.org
 ---
- net/core/dev.c |    2 +-
+ net/core/dev.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/net/core/dev.c b/net/core/dev.c
+index aa19e874f011..37c56cdcbace 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -8046,7 +8046,7 @@ static int dev_cpu_callback(struct notif
+@@ -8064,7 +8064,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
  		netif_rx_ni(skb);
  		input_queue_head_incr(oldsd);
  	}
diff --git a/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch b/debian/patches/features/all/rt/0241-net-move-xmit_recursion-to-per-task-variable-on-RT.patch
similarity index 72%
rename from debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch
rename to debian/patches/features/all/rt/0241-net-move-xmit_recursion-to-per-task-variable-on-RT.patch
index 678b0fc..081d7eb 100644
--- a/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch
+++ b/debian/patches/features/all/rt/0241-net-move-xmit_recursion-to-per-task-variable-on-RT.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 13 Jan 2016 15:55:02 +0100
-Subject: net: move xmit_recursion to per-task variable on -RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 241/332] net: move xmit_recursion to per-task variable on -RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4107410805c270fc63e75050d6ac4546f77e7dff
 
 A softirq on -RT can be preempted. That means one task is in
 __dev_queue_xmit(), gets preempted and another task may enter
@@ -16,15 +16,17 @@ the recursion properly on -RT.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/netdevice.h |   41 ++++++++++++++++++++++++++++++++++++++++-
- include/linux/sched.h     |    3 +++
- net/core/dev.c            |    9 +++++----
- net/core/filter.c         |    6 +++---
+ include/linux/netdevice.h | 41 ++++++++++++++++++++++++++++++++++++++++-
+ include/linux/sched.h     |  3 +++
+ net/core/dev.c            |  9 +++++----
+ net/core/filter.c         |  6 +++---
  4 files changed, 51 insertions(+), 8 deletions(-)
 
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index 2bb937ca567f..c550f7db1fd2 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -2463,14 +2463,53 @@ void netdev_freemem(struct net_device *d
+@@ -2464,14 +2464,53 @@ void netdev_freemem(struct net_device *dev);
  void synchronize_net(void);
  int init_dummy_netdev(struct net_device *dev);
  
@@ -79,21 +81,25 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  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);
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index a1331f77fad3..bdf040606769 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -1989,6 +1989,9 @@ struct task_struct {
+@@ -2010,6 +2010,9 @@ struct task_struct {
+ #endif
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  	unsigned long	task_state_change;
- #endif
++#endif
 +#ifdef CONFIG_PREEMPT_RT_FULL
 +	int xmit_recursion;
-+#endif
+ #endif
  	int pagefault_disabled;
  #ifdef CONFIG_MMU
- 	struct task_struct *oom_reaper_list;
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 37c56cdcbace..47c08c1f5d37 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3165,8 +3165,10 @@ static void skb_update_prio(struct sk_bu
+@@ -3173,8 +3173,10 @@ static void skb_update_prio(struct sk_buff *skb)
  #define skb_update_prio(skb)
  #endif
  
@@ -104,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  /**
   *	dev_loopback_xmit - loop back @skb
-@@ -3400,8 +3402,7 @@ static int __dev_queue_xmit(struct sk_bu
+@@ -3408,8 +3410,7 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv)
  		int cpu = smp_processor_id(); /* ok because BHs are off */
  
  		if (txq->xmit_lock_owner != cpu) {
@@ -114,7 +120,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				goto recursion_alert;
  
  			skb = validate_xmit_skb(skb, dev);
-@@ -3411,9 +3412,9 @@ static int __dev_queue_xmit(struct sk_bu
+@@ -3419,9 +3420,9 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv)
  			HARD_TX_LOCK(dev, txq, cpu);
  
  			if (!netif_xmit_stopped(txq)) {
@@ -126,9 +132,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  				if (dev_xmit_complete(rc)) {
  					HARD_TX_UNLOCK(dev, txq);
  					goto out;
+diff --git a/net/core/filter.c b/net/core/filter.c
+index 4eb4ce0aeef4..4f09d6a57217 100644
 --- a/net/core/filter.c
 +++ b/net/core/filter.c
-@@ -1645,7 +1645,7 @@ static inline int __bpf_tx_skb(struct ne
+@@ -1645,7 +1645,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)
  {
  	int ret;
  
@@ -137,7 +145,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		net_crit_ratelimited("bpf: recursion limit reached on datapath, buggy bpf program?\n");
  		kfree_skb(skb);
  		return -ENETDOWN;
-@@ -1653,9 +1653,9 @@ static inline int __bpf_tx_skb(struct ne
+@@ -1653,9 +1653,9 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb)
  
  	skb->dev = dev;
  
diff --git a/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch b/debian/patches/features/all/rt/0242-net-provide-a-way-to-delegate-processing-a-softirq-t.patch
similarity index 71%
rename from debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch
rename to debian/patches/features/all/rt/0242-net-provide-a-way-to-delegate-processing-a-softirq-t.patch
index dac816e..a14e2ca 100644
--- a/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch
+++ b/debian/patches/features/all/rt/0242-net-provide-a-way-to-delegate-processing-a-softirq-t.patch
@@ -1,8 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 20 Jan 2016 15:39:05 +0100
-Subject: net: provide a way to delegate processing a softirq to
- ksoftirqd
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 242/332] net: provide a way to delegate processing a softirq
+ to ksoftirqd
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d0512cd28f573db1f999b6a55292ed794b626a3c
 
 If the NET_RX uses up all of his budget it moves the following NAPI
 invocations into the `ksoftirqd`. On -RT it does not do so. Instead it
@@ -14,11 +14,13 @@ __raise_softirq_irqoff_ksoft() which raises the softirq in the ksoftird.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/interrupt.h |    8 ++++++++
- kernel/softirq.c          |   21 +++++++++++++++++++++
- net/core/dev.c            |    2 +-
+ include/linux/interrupt.h |  8 ++++++++
+ kernel/softirq.c          | 21 +++++++++++++++++++++
+ net/core/dev.c            |  2 +-
  3 files changed, 30 insertions(+), 1 deletion(-)
 
+diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
+index 6ea17576aa59..480972ae47d3 100644
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -496,6 +496,14 @@ extern void thread_do_softirq(void);
@@ -36,12 +38,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  extern void raise_softirq_irqoff(unsigned int nr);
  extern void raise_softirq(unsigned int nr);
+diff --git a/kernel/softirq.c b/kernel/softirq.c
+index af2fd81cb9a5..819bd7cf5ad0 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
-@@ -685,6 +685,27 @@ void __raise_softirq_irqoff(unsigned int
+@@ -684,6 +684,27 @@ void __raise_softirq_irqoff(unsigned int nr)
+ 		wakeup_proper_softirq(nr);
  }
  
- /*
++/*
 + * Same as __raise_softirq_irqoff() but will process them in ksoftirqd
 + */
 +void __raise_softirq_irqoff_ksoft(unsigned int nr)
@@ -62,13 +67,14 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	wakeup_proper_softirq(nr);
 +}
 +
-+/*
+ /*
   * This function must run with irqs disabled!
   */
- void raise_softirq_irqoff(unsigned int nr)
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 47c08c1f5d37..f45443d5ab1a 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -5279,7 +5279,7 @@ static __latent_entropy void net_rx_acti
+@@ -5297,7 +5297,7 @@ static __latent_entropy void net_rx_action(struct softirq_action *h)
  	list_splice_tail(&repoll, &list);
  	list_splice(&list, &sd->poll_list);
  	if (!list_empty(&sd->poll_list))
diff --git a/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/debian/patches/features/all/rt/0243-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
similarity index 72%
rename from debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
rename to debian/patches/features/all/rt/0243-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
index 23a4a6e..23806ce 100644
--- a/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
+++ b/debian/patches/features/all/rt/0243-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 30 Mar 2016 13:36:29 +0200
-Subject: [PATCH] net: dev: always take qdisc's busylock in __dev_xmit_skb()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 243/332] net: dev: always take qdisc's busylock in
+ __dev_xmit_skb()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=adc6a48723194f2dfb377aeeb7b646f1e7e300de
 
 The root-lock is dropped before dev_hard_start_xmit() is invoked and after
 setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away
@@ -16,12 +17,14 @@ low-prio task and submit the packet.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/core/dev.c |    4 ++++
+ net/core/dev.c | 4 ++++
  1 file changed, 4 insertions(+)
 
+diff --git a/net/core/dev.c b/net/core/dev.c
+index f45443d5ab1a..445ad0e62550 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3102,7 +3102,11 @@ static inline int __dev_xmit_skb(struct
+@@ -3110,7 +3110,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
  	 * This permits qdisc->running owner to get the lock more
  	 * often and dequeue packets faster.
  	 */
diff --git a/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches/features/all/rt/0244-net-Qdisc-use-a-seqlock-instead-seqcount.patch
similarity index 77%
rename from debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch
rename to debian/patches/features/all/rt/0244-net-Qdisc-use-a-seqlock-instead-seqcount.patch
index 7d54f13..94c302d 100644
--- a/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch
+++ b/debian/patches/features/all/rt/0244-net-Qdisc-use-a-seqlock-instead-seqcount.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 14 Sep 2016 17:36:35 +0200
-Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 244/332] net/Qdisc: use a seqlock instead seqcount
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ee74462142989005792f9dc217272ca37783a718
 
 The seqcount disables preemption on -RT while it is held which can't
 remove. Also we don't want the reader to spin for ages if the writer is
@@ -10,20 +10,22 @@ the lock while writer is active.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/seqlock.h    |    9 +++++++++
- include/net/gen_stats.h    |    9 +++++----
- include/net/net_seq_lock.h |   15 +++++++++++++++
- include/net/sch_generic.h  |   21 ++++++++++++++++++---
- net/core/gen_estimator.c   |    6 +++---
- net/core/gen_stats.c       |    8 ++++----
- net/sched/sch_api.c        |    2 +-
- net/sched/sch_generic.c    |   12 ++++++++++++
+ include/linux/seqlock.h    |  9 +++++++++
+ include/net/gen_stats.h    |  9 +++++----
+ include/net/net_seq_lock.h | 15 +++++++++++++++
+ include/net/sch_generic.h  | 21 ++++++++++++++++++---
+ net/core/gen_estimator.c   |  6 +++---
+ net/core/gen_stats.c       |  8 ++++----
+ net/sched/sch_api.c        |  2 +-
+ net/sched/sch_generic.c    | 12 ++++++++++++
  8 files changed, 67 insertions(+), 15 deletions(-)
  create mode 100644 include/net/net_seq_lock.h
 
+diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
+index 17a872117585..3d7223ffdd3b 100644
 --- a/include/linux/seqlock.h
 +++ b/include/linux/seqlock.h
-@@ -481,6 +481,15 @@ static inline void write_seqlock(seqlock
+@@ -481,6 +481,15 @@ static inline void write_seqlock(seqlock_t *sl)
  	__raw_write_seqcount_begin(&sl->seqcount);
  }
  
@@ -39,6 +41,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static inline void write_sequnlock(seqlock_t *sl)
  {
  	__raw_write_seqcount_end(&sl->seqcount);
+diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
+index 231e121cc7d9..d125222b979d 100644
 --- a/include/net/gen_stats.h
 +++ b/include/net/gen_stats.h
 @@ -5,6 +5,7 @@
@@ -49,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  struct gnet_stats_basic_cpu {
  	struct gnet_stats_basic_packed bstats;
-@@ -33,11 +34,11 @@ int gnet_stats_start_copy_compat(struct
+@@ -33,11 +34,11 @@ int gnet_stats_start_copy_compat(struct sk_buff *skb, int type,
  				 spinlock_t *lock, struct gnet_dump *d,
  				 int padattr);
  
@@ -63,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			     struct gnet_stats_basic_packed *bstats,
  			     struct gnet_stats_basic_cpu __percpu *cpu,
  			     struct gnet_stats_basic_packed *b);
-@@ -55,14 +56,14 @@ int gen_new_estimator(struct gnet_stats_
+@@ -55,14 +56,14 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
  		      struct gnet_stats_basic_cpu __percpu *cpu_bstats,
  		      struct gnet_stats_rate_est64 *rate_est,
  		      spinlock_t *stats_lock,
@@ -80,6 +84,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats,
  			  const struct gnet_stats_rate_est64 *rate_est);
  #endif
+diff --git a/include/net/net_seq_lock.h b/include/net/net_seq_lock.h
+new file mode 100644
+index 000000000000..a7034298a82a
 --- /dev/null
 +++ b/include/net/net_seq_lock.h
 @@ -0,0 +1,15 @@
@@ -98,6 +105,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +#endif
 +
 +#endif
+diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
+index f18fc1a0321f..5d2c9b89c168 100644
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
 @@ -10,6 +10,7 @@
@@ -141,7 +150,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (qdisc_is_running(qdisc))
  		return false;
  	/* Variant of write_seqcount_begin() telling lockdep a trylock
-@@ -113,11 +123,16 @@ static inline bool qdisc_run_begin(struc
+@@ -113,11 +123,16 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
  	raw_write_seqcount_begin(&qdisc->running);
  	seqcount_acquire(&qdisc->running.dep_map, 0, 1, _RET_IP_);
  	return true;
@@ -158,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static inline bool qdisc_may_bulk(const struct Qdisc *qdisc)
-@@ -308,7 +323,7 @@ static inline spinlock_t *qdisc_root_sle
+@@ -308,7 +323,7 @@ static inline spinlock_t *qdisc_root_sleeping_lock(const struct Qdisc *qdisc)
  	return qdisc_lock(root);
  }
  
@@ -167,6 +176,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct Qdisc *root = qdisc_root_sleeping(qdisc);
  
+diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
+index cad8e791f28e..2a9364fe62a5 100644
 --- a/net/core/gen_estimator.c
 +++ b/net/core/gen_estimator.c
 @@ -84,7 +84,7 @@ struct gen_estimator
@@ -178,7 +189,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int			ewma_log;
  	u32			last_packets;
  	unsigned long		avpps;
-@@ -213,7 +213,7 @@ int gen_new_estimator(struct gnet_stats_
+@@ -213,7 +213,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
  		      struct gnet_stats_basic_cpu __percpu *cpu_bstats,
  		      struct gnet_stats_rate_est64 *rate_est,
  		      spinlock_t *stats_lock,
@@ -187,7 +198,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		      struct nlattr *opt)
  {
  	struct gen_estimator *est;
-@@ -309,7 +309,7 @@ int gen_replace_estimator(struct gnet_st
+@@ -309,7 +309,7 @@ int gen_replace_estimator(struct gnet_stats_basic_packed *bstats,
  			  struct gnet_stats_basic_cpu __percpu *cpu_bstats,
  			  struct gnet_stats_rate_est64 *rate_est,
  			  spinlock_t *stats_lock,
@@ -196,9 +207,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	gen_kill_estimator(bstats, rate_est);
  	return gen_new_estimator(bstats, cpu_bstats, rate_est, stats_lock, running, opt);
+diff --git a/net/core/gen_stats.c b/net/core/gen_stats.c
+index 508e051304fb..bc3b17b78c94 100644
 --- a/net/core/gen_stats.c
 +++ b/net/core/gen_stats.c
-@@ -130,7 +130,7 @@ static void
+@@ -130,7 +130,7 @@ __gnet_stats_copy_basic_cpu(struct gnet_stats_basic_packed *bstats,
  }
  
  void
@@ -207,7 +220,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			struct gnet_stats_basic_packed *bstats,
  			struct gnet_stats_basic_cpu __percpu *cpu,
  			struct gnet_stats_basic_packed *b)
-@@ -143,10 +143,10 @@ void
+@@ -143,10 +143,10 @@ __gnet_stats_copy_basic(const seqcount_t *running,
  	}
  	do {
  		if (running)
@@ -229,9 +242,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		      struct gnet_dump *d,
  		      struct gnet_stats_basic_cpu __percpu *cpu,
  		      struct gnet_stats_basic_packed *b)
+diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
+index 195a3b2d9afc..7bf29e3fd71c 100644
 --- a/net/sched/sch_api.c
 +++ b/net/sched/sch_api.c
-@@ -981,7 +981,7 @@ static struct Qdisc *qdisc_create(struct
+@@ -978,7 +978,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,
  			rcu_assign_pointer(sch->stab, stab);
  		}
  		if (tca[TCA_RATE]) {
@@ -240,6 +255,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  			err = -EOPNOTSUPP;
  			if (sch->flags & TCQ_F_MQROOT)
+diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
+index e57aa7293f86..20727e1347de 100644
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
 @@ -425,7 +425,11 @@ struct Qdisc noop_qdisc = {
@@ -254,7 +271,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	.busylock	=	__SPIN_LOCK_UNLOCKED(noop_qdisc.busylock),
  };
  EXPORT_SYMBOL(noop_qdisc);
-@@ -624,9 +628,17 @@ struct Qdisc *qdisc_alloc(struct netdev_
+@@ -624,9 +628,17 @@ struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
  	lockdep_set_class(&sch->busylock,
  			  dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
  
diff --git a/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch b/debian/patches/features/all/rt/0245-net-add-back-the-missing-serialization-in-ip_send_un.patch
similarity index 81%
rename from debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch
rename to debian/patches/features/all/rt/0245-net-add-back-the-missing-serialization-in-ip_send_un.patch
index 0770712..a336a24 100644
--- a/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch
+++ b/debian/patches/features/all/rt/0245-net-add-back-the-missing-serialization-in-ip_send_un.patch
@@ -1,11 +1,11 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 31 Aug 2016 17:21:56 +0200
-Subject: [PATCH] net: add back the missing serialization in
+Subject: [PATCH 245/332] net: add back the missing serialization in
  ip_send_unicast_reply()
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=bee69d43914ea773b6b39dacd1ea062e40006760
 
 Some time ago Sami Pietikäinen reported a crash on -RT in
 ip_send_unicast_reply() which was later fixed by Nicholas Mc Guire
@@ -38,9 +38,11 @@ This is brings back the old locks.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/ipv4/tcp_ipv4.c |    7 +++++++
+ net/ipv4/tcp_ipv4.c | 7 +++++++
  1 file changed, 7 insertions(+)
 
+diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
+index 6988566dc72f..672fffcde28c 100644
 --- a/net/ipv4/tcp_ipv4.c
 +++ b/net/ipv4/tcp_ipv4.c
 @@ -62,6 +62,7 @@
@@ -51,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include <net/net_namespace.h>
  #include <net/icmp.h>
-@@ -568,6 +569,7 @@ void tcp_v4_send_check(struct sock *sk,
+@@ -568,6 +569,7 @@ void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb)
  }
  EXPORT_SYMBOL(tcp_v4_send_check);
  
@@ -59,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   *	This routine will send an RST to the other tcp.
   *
-@@ -695,6 +697,8 @@ static void tcp_v4_send_reset(const stru
+@@ -695,6 +697,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
  		     offsetof(struct inet_timewait_sock, tw_bound_dev_if));
  
  	arg.tos = ip_hdr(skb)->tos;
@@ -68,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	local_bh_disable();
  	ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
  			      skb, &TCP_SKB_CB(skb)->header.h4.opt,
-@@ -704,6 +708,7 @@ static void tcp_v4_send_reset(const stru
+@@ -704,6 +708,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
  	__TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
  	__TCP_INC_STATS(net, TCP_MIB_OUTRSTS);
  	local_bh_enable();
@@ -76,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #ifdef CONFIG_TCP_MD5SIG
  out:
-@@ -779,6 +784,7 @@ static void tcp_v4_send_ack(struct net *
+@@ -779,6 +784,7 @@ static void tcp_v4_send_ack(struct net *net,
  	if (oif)
  		arg.bound_dev_if = oif;
  	arg.tos = tos;
@@ -84,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	local_bh_disable();
  	ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
  			      skb, &TCP_SKB_CB(skb)->header.h4.opt,
-@@ -787,6 +793,7 @@ static void tcp_v4_send_ack(struct net *
+@@ -787,6 +793,7 @@ static void tcp_v4_send_ack(struct net *net,
  
  	__TCP_INC_STATS(net, TCP_MIB_OUTSEGS);
  	local_bh_enable();
diff --git a/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch b/debian/patches/features/all/rt/0246-net-add-a-lock-around-icmp_sk.patch
similarity index 70%
rename from debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch
rename to debian/patches/features/all/rt/0246-net-add-a-lock-around-icmp_sk.patch
index e36982e..d152be0 100644
--- a/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch
+++ b/debian/patches/features/all/rt/0246-net-add-a-lock-around-icmp_sk.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 31 Aug 2016 17:54:09 +0200
-Subject: [PATCH] net: add a lock around icmp_sk()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 246/332] net: add a lock around icmp_sk()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f298c3fb33718247b3d74541125b6b612ceb2bdf
 
 It looks like the this_cpu_ptr() access in icmp_sk() is protected with
 local_bh_disable(). To avoid missing serialization in -RT I am adding
@@ -10,9 +10,11 @@ here a local lock. No crash has been observed, this is just precaution.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/ipv4/icmp.c |    8 ++++++++
+ net/ipv4/icmp.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
+diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
+index 48734ee6293f..dc915cc96981 100644
 --- a/net/ipv4/icmp.c
 +++ b/net/ipv4/icmp.c
 @@ -77,6 +77,7 @@
@@ -23,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include <net/snmp.h>
  #include <net/ip.h>
  #include <net/route.h>
-@@ -204,6 +205,8 @@ static const struct icmp_control icmp_po
+@@ -204,6 +205,8 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
   *
   *	On SMP we have one ICMP socket per-cpu.
   */
@@ -32,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static struct sock *icmp_sk(struct net *net)
  {
  	return *this_cpu_ptr(net->ipv4.icmp_sk);
-@@ -215,12 +218,14 @@ static inline struct sock *icmp_xmit_loc
+@@ -215,12 +218,14 @@ static inline struct sock *icmp_xmit_lock(struct net *net)
  
  	local_bh_disable();
  
@@ -47,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		local_bh_enable();
  		return NULL;
  	}
-@@ -230,6 +235,7 @@ static inline struct sock *icmp_xmit_loc
+@@ -230,6 +235,7 @@ static inline struct sock *icmp_xmit_lock(struct net *net)
  static inline void icmp_xmit_unlock(struct sock *sk)
  {
  	spin_unlock_bh(&sk->sk_lock.slock);
@@ -55,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  int sysctl_icmp_msgs_per_sec __read_mostly = 1000;
-@@ -358,6 +364,7 @@ static void icmp_push_reply(struct icmp_
+@@ -358,6 +364,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param,
  	struct sock *sk;
  	struct sk_buff *skb;
  
@@ -63,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	sk = icmp_sk(dev_net((*rt)->dst.dev));
  	if (ip_append_data(sk, fl4, icmp_glue_bits, icmp_param,
  			   icmp_param->data_len+icmp_param->head_len,
-@@ -380,6 +387,7 @@ static void icmp_push_reply(struct icmp_
+@@ -380,6 +387,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param,
  		skb->ip_summed = CHECKSUM_NONE;
  		ip_push_pending_frames(sk, fl4);
  	}
diff --git a/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch b/debian/patches/features/all/rt/0247-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
similarity index 75%
rename from debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
rename to debian/patches/features/all/rt/0247-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
index ee63189..9c970a9 100644
--- a/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
+++ b/debian/patches/features/all/rt/0247-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
@@ -1,8 +1,8 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Tue, 6 Dec 2016 17:50:30 -0500
-Subject: [PATCH] net: Have __napi_schedule_irqoff() disable interrupts on
- RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 247/332] net: Have __napi_schedule_irqoff() disable interrupts
+ on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=454837b43aad89564f86f93bab7be2ab1d6e0214
 
 A customer hit a crash where the napi sd->poll_list became corrupted.
 The customer had the bnx2x driver, which does a
@@ -23,13 +23,15 @@ Cc: stable-rt at vger.kernel.org
 Signed-off-by: Steven Rostedt (Red Hat) <rostedt at goodmis.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/netdevice.h |   12 ++++++++++++
- net/core/dev.c            |    2 ++
+ include/linux/netdevice.h | 12 ++++++++++++
+ net/core/dev.c            |  2 ++
  2 files changed, 14 insertions(+)
 
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index c550f7db1fd2..249cab661ad0 100644
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -396,7 +396,19 @@ typedef enum rx_handler_result rx_handle
+@@ -396,7 +396,19 @@ typedef enum rx_handler_result rx_handler_result_t;
  typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **pskb);
  
  void __napi_schedule(struct napi_struct *n);
@@ -49,9 +51,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static inline bool napi_disable_pending(struct napi_struct *n)
  {
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 445ad0e62550..ea1af7131ef4 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4938,6 +4938,7 @@ void __napi_schedule(struct napi_struct
+@@ -4956,6 +4956,7 @@ void __napi_schedule(struct napi_struct *n)
  }
  EXPORT_SYMBOL(__napi_schedule);
  
@@ -59,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /**
   * __napi_schedule_irqoff - schedule for receive
   * @n: entry to schedule
-@@ -4949,6 +4950,7 @@ void __napi_schedule_irqoff(struct napi_
+@@ -4967,6 +4968,7 @@ void __napi_schedule_irqoff(struct napi_struct *n)
  	____napi_schedule(this_cpu_ptr(&softnet_data), n);
  }
  EXPORT_SYMBOL(__napi_schedule_irqoff);
diff --git a/debian/patches/features/all/rt/ping-sysrq.patch b/debian/patches/features/all/rt/0248-net-sysrq-via-icmp.patch
similarity index 75%
rename from debian/patches/features/all/rt/ping-sysrq.patch
rename to debian/patches/features/all/rt/0248-net-sysrq-via-icmp.patch
index 60f6f7a..a0e549a 100644
--- a/debian/patches/features/all/rt/ping-sysrq.patch
+++ b/debian/patches/features/all/rt/0248-net-sysrq-via-icmp.patch
@@ -1,7 +1,7 @@
-Subject: net: sysrq via icmp
 From: Carsten Emde <C.Emde at osadl.org>
 Date: Tue, 19 Jul 2011 13:51:17 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 248/332] net: sysrq via icmp
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d1cee5d368393ed5facba42d58c6da0d148faf08
 
 There are (probably rare) situations when a system crashed and the system
 console becomes unresponsive but the network icmp layer still is alive.
@@ -11,17 +11,18 @@ This patch provides this facility. Please consult the updated documentation
 Documentation/sysrq.txt for details.
 
 Signed-off-by: Carsten Emde <C.Emde at osadl.org>
-
 ---
- Documentation/sysrq.txt    |   11 +++++++++--
- include/net/netns/ipv4.h   |    1 +
- net/ipv4/icmp.c            |   30 ++++++++++++++++++++++++++++++
- net/ipv4/sysctl_net_ipv4.c |    7 +++++++
+ Documentation/sysrq.txt    | 11 +++++++++--
+ include/net/netns/ipv4.h   |  1 +
+ net/ipv4/icmp.c            | 30 ++++++++++++++++++++++++++++++
+ net/ipv4/sysctl_net_ipv4.c |  7 +++++++
  4 files changed, 47 insertions(+), 2 deletions(-)
 
+diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
+index 3a3b30ac2a75..9e0745cafbd8 100644
 --- a/Documentation/sysrq.txt
 +++ b/Documentation/sysrq.txt
-@@ -59,10 +59,17 @@ On PowerPC - Press 'ALT - Print Screen (
+@@ -59,10 +59,17 @@ On PowerPC - Press 'ALT - Print Screen (or F13) - <command key>,
  On other - If you know of the key combos for other architectures, please
             let me know so I can add them to this section.
  
@@ -41,6 +42,8 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
  *  What are the 'command' keys?
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  'b'     - Will immediately reboot the system without syncing or unmounting
+diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
+index 7adf4386ac8f..d3fd5c357268 100644
 --- a/include/net/netns/ipv4.h
 +++ b/include/net/netns/ipv4.h
 @@ -69,6 +69,7 @@ struct netns_ipv4 {
@@ -51,6 +54,8 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
  	int sysctl_icmp_ignore_bogus_error_responses;
  	int sysctl_icmp_ratelimit;
  	int sysctl_icmp_ratemask;
+diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
+index dc915cc96981..e6864ff11352 100644
 --- a/net/ipv4/icmp.c
 +++ b/net/ipv4/icmp.c
 @@ -69,6 +69,7 @@
@@ -61,10 +66,11 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
  #include <linux/socket.h>
  #include <linux/in.h>
  #include <linux/inet.h>
-@@ -899,6 +900,30 @@ static bool icmp_redirect(struct sk_buff
+@@ -898,6 +899,30 @@ static bool icmp_redirect(struct sk_buff *skb)
+ 	return true;
  }
  
- /*
++/*
 + * 32bit and 64bit have different timestamp length, so we check for
 + * the cookie at offset 20 and verify it is repeated at offset 50
 + */
@@ -88,11 +94,10 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
 +		handle_sysrq(p[CO_POS0 + CO_SIZE]);
 +}
 +
-+/*
+ /*
   *	Handle ICMP_ECHO ("ping") requests.
   *
-  *	RFC 1122: 3.2.2.6 MUST have an echo server that answers ICMP echo
-@@ -925,6 +950,11 @@ static bool icmp_echo(struct sk_buff *sk
+@@ -925,6 +950,11 @@ static bool icmp_echo(struct sk_buff *skb)
  		icmp_param.data_len	   = skb->len;
  		icmp_param.head_len	   = sizeof(struct icmphdr);
  		icmp_reply(&icmp_param, skb);
@@ -104,19 +109,21 @@ Signed-off-by: Carsten Emde <C.Emde at osadl.org>
  	}
  	/* should there be an ICMP stat for ignored echos? */
  	return true;
+diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
+index 566cfc50f7cf..4b8551d78a3b 100644
 --- a/net/ipv4/sysctl_net_ipv4.c
 +++ b/net/ipv4/sysctl_net_ipv4.c
-@@ -681,6 +681,13 @@ static struct ctl_table ipv4_net_table[]
+@@ -680,6 +680,13 @@ static struct ctl_table ipv4_net_table[] = {
+ 		.mode		= 0644,
  		.proc_handler	= proc_dointvec
  	},
- 	{
++	{
 +		.procname	= "icmp_echo_sysrq",
 +		.data		= &init_net.ipv4.sysctl_icmp_echo_sysrq,
 +		.maxlen		= sizeof(int),
 +		.mode		= 0644,
 +		.proc_handler	= proc_dointvec
 +	},
-+	{
+ 	{
  		.procname	= "icmp_ignore_bogus_error_responses",
  		.data		= &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses,
- 		.maxlen		= sizeof(int),
diff --git a/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch b/debian/patches/features/all/rt/0249-irqwork-push-most-work-into-softirq-context.patch
similarity index 78%
rename from debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch
rename to debian/patches/features/all/rt/0249-irqwork-push-most-work-into-softirq-context.patch
index 1a233be..5e5b9fd 100644
--- a/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch
+++ b/debian/patches/features/all/rt/0249-irqwork-push-most-work-into-softirq-context.patch
@@ -1,7 +1,7 @@
-Subject: irqwork: push most work into softirq context
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Tue, 23 Jun 2015 15:32:51 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 249/332] irqwork: push most work into softirq context
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5b5159d455f086a63d04e190d076691b896150e4
 
 Initially we defered all irqwork into softirq because we didn't want the
 latency spikes if perf or another user was busy and delayed the RT task.
@@ -20,13 +20,15 @@ Mike Galbraith,
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/irq_work.h |    1 +
- kernel/irq_work.c        |   47 ++++++++++++++++++++++++++++++++++-------------
- kernel/sched/rt.c        |    1 +
- kernel/time/tick-sched.c |    1 +
- kernel/time/timer.c      |    6 +++++-
+ include/linux/irq_work.h |  1 +
+ kernel/irq_work.c        | 47 ++++++++++++++++++++++++++++++++++-------------
+ kernel/sched/rt.c        |  1 +
+ kernel/time/tick-sched.c |  1 +
+ kernel/time/timer.c      |  6 +++++-
  5 files changed, 42 insertions(+), 14 deletions(-)
 
+diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
+index 47b9ebd4a74f..0e427a9997f3 100644
 --- a/include/linux/irq_work.h
 +++ b/include/linux/irq_work.h
 @@ -16,6 +16,7 @@
@@ -37,6 +39,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  struct irq_work {
  	unsigned long flags;
+diff --git a/kernel/irq_work.c b/kernel/irq_work.c
+index bcf107ce0854..0ddaf1e66d8c 100644
 --- a/kernel/irq_work.c
 +++ b/kernel/irq_work.c
 @@ -17,6 +17,7 @@
@@ -56,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* All work should have been flushed before going offline */
  	WARN_ON_ONCE(cpu_is_offline(cpu));
  
-@@ -75,7 +78,12 @@ bool irq_work_queue_on(struct irq_work *
+@@ -75,7 +78,12 @@ bool irq_work_queue_on(struct irq_work *work, int cpu)
  	if (!irq_work_claim(work))
  		return false;
  
@@ -80,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* Only queue if not already pending */
  	if (!irq_work_claim(work))
  		return false;
-@@ -93,13 +104,15 @@ bool irq_work_queue(struct irq_work *wor
+@@ -93,13 +104,15 @@ bool irq_work_queue(struct irq_work *work)
  	/* Queue the entry and raise the IPI if needed. */
  	preempt_disable();
  
@@ -115,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* All work should have been flushed before going offline */
  	WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
-@@ -132,7 +144,7 @@ static void irq_work_run_list(struct lli
+@@ -132,7 +144,7 @@ static void irq_work_run_list(struct llist_head *list)
  	struct irq_work *work;
  	struct llist_node *llnode;
  
@@ -124,7 +128,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (llist_empty(list))
  		return;
-@@ -169,7 +181,16 @@ static void irq_work_run_list(struct lli
+@@ -169,7 +181,16 @@ static void irq_work_run_list(struct llist_head *list)
  void irq_work_run(void)
  {
  	irq_work_run_list(this_cpu_ptr(&raised_list));
@@ -142,6 +146,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(irq_work_run);
  
+diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
+index f5a1132f9014..b0691f4e7d49 100644
 --- a/kernel/sched/rt.c
 +++ b/kernel/sched/rt.c
 @@ -102,6 +102,7 @@ void init_rt_rq(struct rt_rq *rt_rq)
@@ -152,9 +158,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #endif
  #endif /* CONFIG_SMP */
  	/* We start is dequeued state, because no RT tasks are queued */
+diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
+index 4367249e0dde..66d85482a96e 100644
 --- a/kernel/time/tick-sched.c
 +++ b/kernel/time/tick-sched.c
-@@ -220,6 +220,7 @@ static void nohz_full_kick_func(struct i
+@@ -220,6 +220,7 @@ static void nohz_full_kick_func(struct irq_work *work)
  
  static DEFINE_PER_CPU(struct irq_work, nohz_full_kick_work) = {
  	.func = nohz_full_kick_func,
@@ -162,9 +170,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  };
  
  /*
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index 06ccccfd4130..ff99d246bfee 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
-@@ -1644,7 +1644,7 @@ void update_process_times(int user_tick)
+@@ -1663,7 +1663,7 @@ void update_process_times(int user_tick)
  	scheduler_tick();
  	run_local_timers();
  	rcu_check_callbacks(user_tick);
@@ -173,9 +183,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (in_irq())
  		irq_work_tick();
  #endif
-@@ -1684,6 +1684,10 @@ static __latent_entropy void run_timer_s
- {
- 	struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]);
+@@ -1716,6 +1716,10 @@ static __latent_entropy void run_timer_softirq(struct softirq_action *h)
+ 	 */
+ 	base->must_forward_clk = false;
  
 +#if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL)
 +	irq_work_tick();
diff --git a/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch b/debian/patches/features/all/rt/0250-irqwork-Move-irq-safe-work-to-irq-context.patch
similarity index 69%
rename from debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch
rename to debian/patches/features/all/rt/0250-irqwork-Move-irq-safe-work-to-irq-context.patch
index cae7511..79527e7 100644
--- a/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch
+++ b/debian/patches/features/all/rt/0250-irqwork-Move-irq-safe-work-to-irq-context.patch
@@ -1,7 +1,7 @@
-Subject: irqwork: Move irq safe work to irq context
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 15 Nov 2015 18:40:17 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 250/332] irqwork: Move irq safe work to irq context
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=03dfa3ebb991deb982457e5f625517a572efca28
 
 On architectures where arch_irq_work_has_interrupt() returns false, we
 end up running the irq safe work from the softirq context. That
@@ -16,14 +16,16 @@ Reported-and-tested-by: Yanjiang Jin <yanjiang.jin at windriver.com>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Cc: stable-rt at vger.kernel.org
 ---
- include/linux/irq_work.h |    6 ++++++
- kernel/irq_work.c        |    9 +++++++++
- kernel/time/timer.c      |    6 ++----
+ include/linux/irq_work.h | 6 ++++++
+ kernel/irq_work.c        | 9 +++++++++
+ kernel/time/timer.c      | 6 ++----
  3 files changed, 17 insertions(+), 4 deletions(-)
 
+diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
+index 0e427a9997f3..2543aab05daa 100644
 --- a/include/linux/irq_work.h
 +++ b/include/linux/irq_work.h
-@@ -52,4 +52,10 @@ static inline bool irq_work_needs_cpu(vo
+@@ -52,4 +52,10 @@ static inline bool irq_work_needs_cpu(void) { return false; }
  static inline void irq_work_run(void) { }
  #endif
  
@@ -34,6 +36,8 @@ Cc: stable-rt at vger.kernel.org
 +#endif
 +
  #endif /* _LINUX_IRQ_WORK_H */
+diff --git a/kernel/irq_work.c b/kernel/irq_work.c
+index 0ddaf1e66d8c..2899ba0d23d1 100644
 --- a/kernel/irq_work.c
 +++ b/kernel/irq_work.c
 @@ -200,8 +200,17 @@ void irq_work_tick(void)
@@ -54,9 +58,11 @@ Cc: stable-rt at vger.kernel.org
  
  /*
   * Synchronize against the irq_work @entry, ensures the entry is not
+diff --git a/kernel/time/timer.c b/kernel/time/timer.c
+index ff99d246bfee..a4e44fc39b25 100644
 --- a/kernel/time/timer.c
 +++ b/kernel/time/timer.c
-@@ -1644,7 +1644,7 @@ void update_process_times(int user_tick)
+@@ -1663,7 +1663,7 @@ void update_process_times(int user_tick)
  	scheduler_tick();
  	run_local_timers();
  	rcu_check_callbacks(user_tick);
@@ -65,9 +71,9 @@ Cc: stable-rt at vger.kernel.org
  	if (in_irq())
  		irq_work_tick();
  #endif
-@@ -1684,9 +1684,7 @@ static __latent_entropy void run_timer_s
- {
- 	struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]);
+@@ -1716,9 +1716,7 @@ static __latent_entropy void run_timer_softirq(struct softirq_action *h)
+ 	 */
+ 	base->must_forward_clk = false;
  
 -#if defined(CONFIG_IRQ_WORK) && defined(CONFIG_PREEMPT_RT_FULL)
 -	irq_work_tick();
diff --git a/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch b/debian/patches/features/all/rt/0251-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
similarity index 76%
rename from debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
rename to debian/patches/features/all/rt/0251-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
index 63167b1..0b0ef13 100644
--- a/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
+++ b/debian/patches/features/all/rt/0251-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
@@ -1,7 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Wed, 18 Feb 2015 15:09:23 +0100
-Subject: snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled() splats
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 251/332] snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled()
+ splats
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7e2a0cc7827843b59e2761c3d65630b6cb0d4570
 
 Locking functions previously using read_lock_irq()/read_lock_irqsave() were
 changed to local_irq_disable/save(), leading to gripes.  Use nort variants.
@@ -27,12 +28,14 @@ changed to local_irq_disable/save(), leading to gripes.  Use nort variants.
 Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- sound/core/pcm_native.c |    8 ++++----
+ sound/core/pcm_native.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
+index 9d33c1e85c79..3d307bda86f9 100644
 --- a/sound/core/pcm_native.c
 +++ b/sound/core/pcm_native.c
-@@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock)
+@@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock);
  void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
  {
  	if (!substream->pcm->nonatomic)
@@ -41,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	snd_pcm_stream_lock(substream);
  }
  EXPORT_SYMBOL_GPL(snd_pcm_stream_lock_irq);
-@@ -150,7 +150,7 @@ void snd_pcm_stream_unlock_irq(struct sn
+@@ -150,7 +150,7 @@ void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
  {
  	snd_pcm_stream_unlock(substream);
  	if (!substream->pcm->nonatomic)
@@ -50,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irq);
  
-@@ -158,7 +158,7 @@ unsigned long _snd_pcm_stream_lock_irqsa
+@@ -158,7 +158,7 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream)
  {
  	unsigned long flags = 0;
  	if (!substream->pcm->nonatomic)
@@ -59,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	snd_pcm_stream_lock(substream);
  	return flags;
  }
-@@ -176,7 +176,7 @@ void snd_pcm_stream_unlock_irqrestore(st
+@@ -176,7 +176,7 @@ void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
  {
  	snd_pcm_stream_unlock(substream);
  	if (!substream->pcm->nonatomic)
diff --git a/debian/patches/features/all/rt/printk-rt-aware.patch b/debian/patches/features/all/rt/0252-printk-Make-rt-aware.patch
similarity index 82%
rename from debian/patches/features/all/rt/printk-rt-aware.patch
rename to debian/patches/features/all/rt/0252-printk-Make-rt-aware.patch
index 2649909..bcea012 100644
--- a/debian/patches/features/all/rt/printk-rt-aware.patch
+++ b/debian/patches/features/all/rt/0252-printk-Make-rt-aware.patch
@@ -1,19 +1,21 @@
-Subject: printk: Make rt aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 19 Sep 2012 14:50:37 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 252/332] printk: Make rt aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4903a12c104e4e5d65958980893a42ae33609ed2
 
 Drop the lock before calling the console driver and do not disable
 interrupts while printing to a serial console.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/printk/printk.c |   25 +++++++++++++++++++++++--
+ kernel/printk/printk.c | 25 +++++++++++++++++++++++--
  1 file changed, 23 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
+index 35fb8be3e811..b0fd37e9ebac 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
-@@ -1628,6 +1628,7 @@ static void call_console_drivers(int lev
+@@ -1628,6 +1628,7 @@ static void call_console_drivers(int level,
  	if (!console_drivers)
  		return;
  
@@ -21,7 +23,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	for_each_console(con) {
  		if (exclusive_console && con != exclusive_console)
  			continue;
-@@ -1643,6 +1644,7 @@ static void call_console_drivers(int lev
+@@ -1643,6 +1644,7 @@ static void call_console_drivers(int level,
  		else
  			con->write(con, text, len);
  	}
@@ -29,7 +31,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
-@@ -1951,13 +1953,23 @@ asmlinkage int vprintk_emit(int facility
+@@ -1951,13 +1953,23 @@ asmlinkage int vprintk_emit(int facility, int level,
  
  	/* If called from the scheduler, we can not call up(). */
  	if (!in_sched) {
@@ -54,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			console_unlock();
  		lockdep_on();
  	}
-@@ -2349,11 +2361,16 @@ static void console_cont_flush(char *tex
+@@ -2349,11 +2361,16 @@ static void console_cont_flush(char *text, size_t size)
  		goto out;
  
  	len = cont_print_text(text, size);
diff --git a/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch b/debian/patches/features/all/rt/0253-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
similarity index 71%
rename from debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
rename to debian/patches/features/all/rt/0253-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
index c35bec7..437b5a9 100644
--- a/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
+++ b/debian/patches/features/all/rt/0253-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 19 May 2016 17:45:27 +0200
-Subject: [PATCH] kernel/printk: Don't try to print from IRQ/NMI region
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 253/332] kernel/printk: Don't try to print from IRQ/NMI region
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d833f56e65c994db375f86a8b167136f91b94dc4
 
 On -RT we try to acquire sleeping locks which might lead to warnings
 from lockdep or a warn_on() from spin_try_lock() (which is a rtmutex on
@@ -11,12 +11,14 @@ this via console_unblank() / bust_spinlocks() as well.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/printk/printk.c |   10 ++++++++++
+ kernel/printk/printk.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
 
+diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
+index b0fd37e9ebac..a5d6b6cd9ac0 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
-@@ -1628,6 +1628,11 @@ static void call_console_drivers(int lev
+@@ -1628,6 +1628,11 @@ static void call_console_drivers(int level,
  	if (!console_drivers)
  		return;
  
diff --git a/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch b/debian/patches/features/all/rt/0254-printk-Drop-the-logbuf_lock-more-often.patch
similarity index 65%
rename from debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch
rename to debian/patches/features/all/rt/0254-printk-Drop-the-logbuf_lock-more-often.patch
index f9b3eff..a67e2aa 100644
--- a/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch
+++ b/debian/patches/features/all/rt/0254-printk-Drop-the-logbuf_lock-more-often.patch
@@ -1,19 +1,21 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 21 Mar 2013 19:01:05 +0100
-Subject: printk: Drop the logbuf_lock more often
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 254/332] printk: Drop the logbuf_lock more often
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e37baa3b704b524cc34c8344d340f7680ecbf7cb
 
 The lock is hold with irgs off. The latency drops 500us+ on my arm bugs
 with a "full" buffer after executing "dmesg" on the shell.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/printk/printk.c |   26 ++++++++++++++++++++++++++
+ kernel/printk/printk.c | 26 ++++++++++++++++++++++++++
  1 file changed, 26 insertions(+)
 
+diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
+index a5d6b6cd9ac0..cf15bdb6855b 100644
 --- a/kernel/printk/printk.c
 +++ b/kernel/printk/printk.c
-@@ -1396,6 +1396,7 @@ static int syslog_print_all(char __user
+@@ -1396,6 +1396,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
  {
  	char *text;
  	int len = 0;
@@ -21,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	text = kmalloc(LOG_LINE_MAX + PREFIX_MAX, GFP_KERNEL);
  	if (!text)
-@@ -1407,6 +1408,14 @@ static int syslog_print_all(char __user
+@@ -1407,6 +1408,14 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
  		u64 seq;
  		u32 idx;
  		enum log_flags prev;
@@ -36,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		/*
  		 * Find first record that fits, including all following records,
-@@ -1422,6 +1431,14 @@ static int syslog_print_all(char __user
+@@ -1422,6 +1431,14 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
  			prev = msg->flags;
  			idx = log_next(idx);
  			seq++;
@@ -51,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  
  		/* move first record forward until length fits into the buffer */
-@@ -1435,6 +1452,14 @@ static int syslog_print_all(char __user
+@@ -1435,6 +1452,14 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
  			prev = msg->flags;
  			idx = log_next(idx);
  			seq++;
@@ -66,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		}
  
  		/* last message fitting into this dump */
-@@ -1475,6 +1500,7 @@ static int syslog_print_all(char __user
+@@ -1475,6 +1500,7 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
  		clear_seq = log_next_seq;
  		clear_idx = log_next_idx;
  	}
diff --git a/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch b/debian/patches/features/all/rt/0255-powerpc-Use-generic-rwsem-on-RT.patch
similarity index 62%
rename from debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch
rename to debian/patches/features/all/rt/0255-powerpc-Use-generic-rwsem-on-RT.patch
index b159179..4f9ca0f 100644
--- a/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch
+++ b/debian/patches/features/all/rt/0255-powerpc-Use-generic-rwsem-on-RT.patch
@@ -1,15 +1,17 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 14 Jul 2015 14:26:34 +0200
-Subject: powerpc: Use generic rwsem on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 255/332] powerpc: Use generic rwsem on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d4ffef36c7d5a99b5ccc7d73c0a2f1e12134ceaa
 
 Use generic code which uses rtmutex
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/powerpc/Kconfig |    3 ++-
+ arch/powerpc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index 8f01f21e78f1..e66bc552ef48 100644
 --- a/arch/powerpc/Kconfig
 +++ b/arch/powerpc/Kconfig
 @@ -52,10 +52,11 @@ config LOCKDEP_SUPPORT
diff --git a/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches/features/all/rt/0256-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
similarity index 81%
rename from debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
rename to debian/patches/features/all/rt/0256-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
index 6650349..66a83b5 100644
--- a/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
+++ b/debian/patches/features/all/rt/0256-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
@@ -1,7 +1,8 @@
 From: Bogdan Purcareata <bogdan.purcareata at freescale.com>
 Date: Fri, 24 Apr 2015 15:53:13 +0000
-Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 256/332] powerpc/kvm: Disable in-kernel MPIC emulation for
+ PREEMPT_RT_FULL
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4b177b6d0c531a9c1aa36c978590a93fcc32a700
 
 While converting the openpic emulation code to use a raw_spinlock_t enables
 guests to run on RT, there's still a performance issue. For interrupts sent in
@@ -23,9 +24,11 @@ Acked-by: Scott Wood <scottwood at freescale.com>
 Signed-off-by: Bogdan Purcareata <bogdan.purcareata at freescale.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/powerpc/kvm/Kconfig |    1 +
+ arch/powerpc/kvm/Kconfig | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
+index 029be26b5a17..9528089ea142 100644
 --- a/arch/powerpc/kvm/Kconfig
 +++ b/arch/powerpc/kvm/Kconfig
 @@ -175,6 +175,7 @@ config KVM_E500MC
diff --git a/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch b/debian/patches/features/all/rt/0257-powerpc-ps3-device-init.c-adapt-to-completions-using.patch
similarity index 71%
rename from debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch
rename to debian/patches/features/all/rt/0257-powerpc-ps3-device-init.c-adapt-to-completions-using.patch
index 61930db..6998977 100644
--- a/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch
+++ b/debian/patches/features/all/rt/0257-powerpc-ps3-device-init.c-adapt-to-completions-using.patch
@@ -1,7 +1,8 @@
 From: Paul Gortmaker <paul.gortmaker at windriver.com>
 Date: Sun, 31 May 2015 14:44:42 -0400
-Subject: powerpc: ps3/device-init.c - adapt to completions using swait vs wait
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 257/332] powerpc: ps3/device-init.c - adapt to completions
+ using swait vs wait
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a8997e85ceedd5859ee310bab3f7a22784927d45
 
 To fix:
 
@@ -16,12 +17,14 @@ To fix:
 Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/powerpc/platforms/ps3/device-init.c |    2 +-
+ arch/powerpc/platforms/ps3/device-init.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
+index e48462447ff0..2670cee66064 100644
 --- a/arch/powerpc/platforms/ps3/device-init.c
 +++ b/arch/powerpc/platforms/ps3/device-init.c
-@@ -752,7 +752,7 @@ static int ps3_notification_read_write(s
+@@ -752,7 +752,7 @@ static int ps3_notification_read_write(struct ps3_notification_device *dev,
  	}
  	pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
  
diff --git a/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch b/debian/patches/features/all/rt/0258-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch
similarity index 74%
rename from debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch
rename to debian/patches/features/all/rt/0258-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch
index 48369dc..5b0cbe5 100644
--- a/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch
+++ b/debian/patches/features/all/rt/0258-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch
@@ -1,17 +1,18 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 1 May 2010 18:29:35 +0200
-Subject: ARM: at91: tclib: Default to tclib timer for RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 258/332] ARM: at91: tclib: Default to tclib timer for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=a423bbc77bea86f2162a023da8359faa61aa59d9
 
 RT is not too happy about the shared timer interrupt in AT91
 devices. Default to tclib timer for RT.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/misc/Kconfig |    3 ++-
+ drivers/misc/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
+index 9a6d60d57ec5..215e91e36198 100644
 --- a/drivers/misc/Kconfig
 +++ b/drivers/misc/Kconfig
 @@ -54,6 +54,7 @@ config AD525X_DPOT_SPI
diff --git a/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch b/debian/patches/features/all/rt/0259-arm-unwind-use-a-raw_spin_lock.patch
similarity index 74%
rename from debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch
rename to debian/patches/features/all/rt/0259-arm-unwind-use-a-raw_spin_lock.patch
index 47b8b1d..7bd83d7 100644
--- a/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch
+++ b/debian/patches/features/all/rt/0259-arm-unwind-use-a-raw_spin_lock.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 20 Sep 2013 14:31:54 +0200
-Subject: arm/unwind: use a raw_spin_lock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 259/332] arm/unwind: use a raw_spin_lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3ac538a8f1241c8b95d7c07b9b144c2000826fb3
 
 Mostly unwind is done with irqs enabled however SLUB may call it with
 irqs disabled while creating a new SLUB cache.
@@ -26,12 +26,14 @@ interrupts and then
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/kernel/unwind.c |   14 +++++++-------
+ arch/arm/kernel/unwind.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)
 
+diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c
+index 0bee233fef9a..314cfb232a63 100644
 --- a/arch/arm/kernel/unwind.c
 +++ b/arch/arm/kernel/unwind.c
-@@ -93,7 +93,7 @@ extern const struct unwind_idx __start_u
+@@ -93,7 +93,7 @@ extern const struct unwind_idx __start_unwind_idx[];
  static const struct unwind_idx *__origin_unwind_idx;
  extern const struct unwind_idx __stop_unwind_idx[];
  
@@ -40,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static LIST_HEAD(unwind_tables);
  
  /* Convert a prel31 symbol to an absolute address */
-@@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_f
+@@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
  		/* module unwind tables */
  		struct unwind_table *table;
  
@@ -49,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		list_for_each_entry(table, &unwind_tables, list) {
  			if (addr >= table->begin_addr &&
  			    addr < table->end_addr) {
-@@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_f
+@@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
  				break;
  			}
  		}
@@ -58,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	pr_debug("%s: idx = %p\n", __func__, idx);
-@@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(un
+@@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
  	tab->begin_addr = text_addr;
  	tab->end_addr = text_addr + text_size;
  
@@ -70,7 +72,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return tab;
  }
-@@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_tabl
+@@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_table *tab)
  	if (!tab)
  		return;
  
diff --git a/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches/features/all/rt/0260-ARM-enable-irq-in-translation-section-permission-fau.patch
similarity index 83%
rename from debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch
rename to debian/patches/features/all/rt/0260-ARM-enable-irq-in-translation-section-permission-fau.patch
index fa9d875..1edca6a 100644
--- a/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch
+++ b/debian/patches/features/all/rt/0260-ARM-enable-irq-in-translation-section-permission-fau.patch
@@ -1,7 +1,11 @@
 From: "Yadi.hu" <yadi.hu at windriver.com>
 Date: Wed, 10 Dec 2014 10:32:09 +0800
-Subject: ARM: enable irq in translation/section permission fault handlers
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 260/332] ARM: enable irq in translation/section permission
+ fault handlers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=72938417e84226a7c5b59985d4cdb1b75639e14e
 
 Probably happens on all ARM, with
 CONFIG_PREEMPT_RT_FULL
@@ -59,12 +63,14 @@ permission exception.
 Signed-off-by: Yadi.hu <yadi.hu at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/mm/fault.c |    6 ++++++
+ arch/arm/mm/fault.c | 6 ++++++
  1 file changed, 6 insertions(+)
 
+diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
+index 0122ad1a6027..926b1be48043 100644
 --- a/arch/arm/mm/fault.c
 +++ b/arch/arm/mm/fault.c
-@@ -430,6 +430,9 @@ do_translation_fault(unsigned long addr,
+@@ -430,6 +430,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
  	if (addr < TASK_SIZE)
  		return do_page_fault(addr, fsr, regs);
  
@@ -74,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (user_mode(regs))
  		goto bad_area;
  
-@@ -497,6 +500,9 @@ do_translation_fault(unsigned long addr,
+@@ -497,6 +500,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
  static int
  do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
  {
diff --git a/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch b/debian/patches/features/all/rt/0261-genirq-update-irq_set_irqchip_state-documentation.patch
similarity index 68%
rename from debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch
rename to debian/patches/features/all/rt/0261-genirq-update-irq_set_irqchip_state-documentation.patch
index 13ce7da..19a2e8d 100644
--- a/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch
+++ b/debian/patches/features/all/rt/0261-genirq-update-irq_set_irqchip_state-documentation.patch
@@ -1,7 +1,7 @@
 From: Josh Cartwright <joshc at ni.com>
 Date: Thu, 11 Feb 2016 11:54:00 -0600
-Subject: genirq: update irq_set_irqchip_state documentation
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 261/332] genirq: update irq_set_irqchip_state documentation
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f1cf9f63c31b2106d1795c4f8d1395d37b6a68f8
 
 On -rt kernels, the use of migrate_disable()/migrate_enable() is
 sufficient to guarantee a task isn't moved to another CPU.  Update the
@@ -10,12 +10,14 @@ irq_set_irqchip_state() documentation to reflect this.
 Signed-off-by: Josh Cartwright <joshc at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/irq/manage.c |    2 +-
+ kernel/irq/manage.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index 5f14e0d7c0c7..6b075cc0603a 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
-@@ -2111,7 +2111,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state)
+@@ -2113,7 +2113,7 @@ EXPORT_SYMBOL_GPL(irq_get_irqchip_state);
   *	This call sets the internal irqchip state of an interrupt,
   *	depending on the value of @which.
   *
diff --git a/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches/features/all/rt/0262-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
similarity index 69%
rename from debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
rename to debian/patches/features/all/rt/0262-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
index 6fc13de..eb3542a 100644
--- a/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
+++ b/debian/patches/features/all/rt/0262-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
@@ -1,7 +1,8 @@
 From: Josh Cartwright <joshc at ni.com>
 Date: Thu, 11 Feb 2016 11:54:01 -0600
-Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 262/332] KVM: arm/arm64: downgrade preempt_disable()d region
+ to migrate_disable()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=29dd48260f2c2c84d36c005bf16bcbb6fb603f50
 
 kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating
 the vgic and timer states to prevent the calling task from migrating to
@@ -18,12 +19,14 @@ Reported-by: Manish Jaggi <Manish.Jaggi at caviumnetworks.com>
 Signed-off-by: Josh Cartwright <joshc at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/kvm/arm.c |    6 +++---
+ arch/arm/kvm/arm.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
+index 19b5f5c1c0ff..82aa639e6737 100644
 --- a/arch/arm/kvm/arm.c
 +++ b/arch/arm/kvm/arm.c
-@@ -619,7 +619,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
+@@ -619,7 +619,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
  		 * involves poking the GIC, which must be done in a
  		 * non-preemptible context.
  		 */
@@ -32,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		kvm_pmu_flush_hwstate(vcpu);
  		kvm_timer_flush_hwstate(vcpu);
  		kvm_vgic_flush_hwstate(vcpu);
-@@ -640,7 +640,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
+@@ -640,7 +640,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
  			kvm_pmu_sync_hwstate(vcpu);
  			kvm_timer_sync_hwstate(vcpu);
  			kvm_vgic_sync_hwstate(vcpu);
@@ -41,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  			continue;
  		}
  
-@@ -696,7 +696,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
+@@ -696,7 +696,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
  
  		kvm_vgic_sync_hwstate(vcpu);
  
diff --git a/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch b/debian/patches/features/all/rt/0263-arm64-xen-Make-XEN-depend-on-RT.patch
similarity index 62%
rename from debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch
rename to debian/patches/features/all/rt/0263-arm64-xen-Make-XEN-depend-on-RT.patch
index 0ff187b..0bb6ec1 100644
--- a/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch
+++ b/debian/patches/features/all/rt/0263-arm64-xen-Make-XEN-depend-on-RT.patch
@@ -1,16 +1,18 @@
-Subject: arm64/xen: Make XEN depend on !RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 12 Oct 2015 11:18:40 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 263/332] arm64/xen: Make XEN depend on !RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=7883cab3ab909af626ca66d89ec8f22459552daa
 
 It's not ready and probably never will be, unless xen folks have a
 look at it.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/arm64/Kconfig |    2 +-
+ arch/arm64/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index cf57a7799a0f..9984f654c000 100644
 --- a/arch/arm64/Kconfig
 +++ b/arch/arm64/Kconfig
 @@ -704,7 +704,7 @@ config XEN_DOM0
diff --git a/debian/patches/features/all/rt/kgb-serial-hackaround.patch b/debian/patches/features/all/rt/0264-kgdb-serial-Short-term-workaround.patch
similarity index 68%
rename from debian/patches/features/all/rt/kgb-serial-hackaround.patch
rename to debian/patches/features/all/rt/0264-kgdb-serial-Short-term-workaround.patch
index c1db5f1..882086c 100644
--- a/debian/patches/features/all/rt/kgb-serial-hackaround.patch
+++ b/debian/patches/features/all/rt/0264-kgdb-serial-Short-term-workaround.patch
@@ -1,7 +1,7 @@
 From: Jason Wessel <jason.wessel at windriver.com>
 Date: Thu, 28 Jul 2011 12:42:23 -0500
-Subject: kgdb/serial: Short term workaround
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 264/332] kgdb/serial: Short term workaround
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5e5d8e37ef2b0f45d8ceeb16324a7693c238ba1c
 
 On 07/27/2011 04:37 PM, Thomas Gleixner wrote:
 >  - KGDB (not yet disabled) is reportedly unusable on -rt right now due
@@ -17,13 +17,14 @@ change separation between the console and the HW to have a polled mode
 
 Thanks,
 Jason.
-
 ---
- drivers/tty/serial/8250/8250_port.c |    3 +++
- include/linux/kdb.h                 |    2 ++
- kernel/debug/kdb/kdb_io.c           |    6 ++----
+ drivers/tty/serial/8250/8250_port.c | 3 +++
+ include/linux/kdb.h                 | 2 ++
+ kernel/debug/kdb/kdb_io.c           | 6 ++----
  3 files changed, 7 insertions(+), 4 deletions(-)
 
+diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
+index 679d08bc6d25..0b242c66f0bb 100644
 --- a/drivers/tty/serial/8250/8250_port.c
 +++ b/drivers/tty/serial/8250/8250_port.c
 @@ -35,6 +35,7 @@
@@ -34,7 +35,7 @@ Jason.
  #include <linux/uaccess.h>
  #include <linux/pm_runtime.h>
  #include <linux/timer.h>
-@@ -3146,6 +3147,8 @@ void serial8250_console_write(struct uar
+@@ -3146,6 +3147,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
  
  	if (port->sysrq || oops_in_progress)
  		locked = 0;
@@ -43,9 +44,11 @@ Jason.
  	else
  		spin_lock_irqsave(&port->lock, flags);
  
+diff --git a/include/linux/kdb.h b/include/linux/kdb.h
+index 410decacff8f..0861bebfc188 100644
 --- a/include/linux/kdb.h
 +++ b/include/linux/kdb.h
-@@ -167,6 +167,7 @@ extern __printf(2, 0) int vkdb_printf(en
+@@ -167,6 +167,7 @@ extern __printf(2, 0) int vkdb_printf(enum kdb_msgsrc src, const char *fmt,
  extern __printf(1, 2) int kdb_printf(const char *, ...);
  typedef __printf(1, 2) int (*kdb_printf_t)(const char *, ...);
  
@@ -53,7 +56,7 @@ Jason.
  extern void kdb_init(int level);
  
  /* Access to kdb specific polling devices */
-@@ -201,6 +202,7 @@ extern int kdb_register_flags(char *, kd
+@@ -201,6 +202,7 @@ extern int kdb_register_flags(char *, kdb_func_t, char *, char *,
  extern int kdb_unregister(char *);
  #else /* ! CONFIG_KGDB_KDB */
  static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; }
@@ -61,9 +64,11 @@ Jason.
  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 --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
+index fc1ef736253c..83c666537a7a 100644
 --- a/kernel/debug/kdb/kdb_io.c
 +++ b/kernel/debug/kdb/kdb_io.c
-@@ -554,7 +554,6 @@ int vkdb_printf(enum kdb_msgsrc src, con
+@@ -554,7 +554,6 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
  	int linecount;
  	int colcount;
  	int logging, saved_loglevel = 0;
@@ -71,7 +76,7 @@ Jason.
  	int got_printf_lock = 0;
  	int retlen = 0;
  	int fnd, len;
-@@ -565,8 +564,6 @@ int vkdb_printf(enum kdb_msgsrc src, con
+@@ -565,8 +564,6 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
  	unsigned long uninitialized_var(flags);
  
  	preempt_disable();
@@ -80,7 +85,7 @@ Jason.
  
  	/* Serialize kdb_printf if multiple cpus try to write at once.
  	 * But if any cpu goes recursive in kdb, just print the output,
-@@ -855,7 +852,6 @@ int vkdb_printf(enum kdb_msgsrc src, con
+@@ -855,7 +852,6 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
  	} else {
  		__release(kdb_printf_lock);
  	}
diff --git a/debian/patches/features/all/rt/sysfs-realtime-entry.patch b/debian/patches/features/all/rt/0265-sysfs-Add-sys-kernel-realtime-entry.patch
similarity index 71%
rename from debian/patches/features/all/rt/sysfs-realtime-entry.patch
rename to debian/patches/features/all/rt/0265-sysfs-Add-sys-kernel-realtime-entry.patch
index ffb42b3..7c5980e 100644
--- a/debian/patches/features/all/rt/sysfs-realtime-entry.patch
+++ b/debian/patches/features/all/rt/0265-sysfs-Add-sys-kernel-realtime-entry.patch
@@ -1,7 +1,7 @@
-Subject: sysfs: Add /sys/kernel/realtime entry
 From: Clark Williams <williams at redhat.com>
-Date: Sat Jul 30 21:55:53 2011 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Sat, 30 Jul 2011 21:55:53 -0500
+Subject: [PATCH 265/332] sysfs: Add /sys/kernel/realtime entry
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=74952612044bbc459884c83bcfe6526908c2ef11
 
 Add a /sys/kernel entry to indicate that the kernel is a
 realtime kernel.
@@ -15,9 +15,11 @@ Are there better solutions? Should it exist and return 0 on !-rt?
 Signed-off-by: Clark Williams <williams at redhat.com>
 Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
 ---
- kernel/ksysfs.c |   12 ++++++++++++
+ kernel/ksysfs.c | 12 ++++++++++++
  1 file changed, 12 insertions(+)
 
+diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
+index ee1bc1bb8feb..ddef07958840 100644
 --- a/kernel/ksysfs.c
 +++ b/kernel/ksysfs.c
 @@ -136,6 +136,15 @@ KERNEL_ATTR_RO(vmcoreinfo);
@@ -36,13 +38,13 @@ Signed-off-by: Peter Zijlstra <a.p.zijlstra at chello.nl>
  /* whether file capabilities are enabled */
  static ssize_t fscaps_show(struct kobject *kobj,
  				  struct kobj_attribute *attr, char *buf)
-@@ -225,6 +234,9 @@ static struct attribute * kernel_attrs[]
+@@ -224,6 +233,9 @@ static struct attribute * kernel_attrs[] = {
+ #ifndef CONFIG_TINY_RCU
  	&rcu_expedited_attr.attr,
  	&rcu_normal_attr.attr,
- #endif
++#endif
 +#ifdef CONFIG_PREEMPT_RT_FULL
 +	&realtime_attr.attr,
-+#endif
+ #endif
  	NULL
  };
- 
diff --git a/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch b/debian/patches/features/all/rt/0266-powerpc-Disable-highmem-on-RT.patch
similarity index 62%
rename from debian/patches/features/all/rt/power-disable-highmem-on-rt.patch
rename to debian/patches/features/all/rt/0266-powerpc-Disable-highmem-on-RT.patch
index 45b1b47..86fe584 100644
--- a/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch
+++ b/debian/patches/features/all/rt/0266-powerpc-Disable-highmem-on-RT.patch
@@ -1,15 +1,17 @@
-Subject: powerpc: Disable highmem on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 18 Jul 2011 17:08:34 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 266/332] powerpc: Disable highmem on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=bdeab8ed38c8e990839380fd983e14e2c5ed979b
 
 The current highmem handling on -RT is not compatible and needs fixups.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/powerpc/Kconfig |    2 +-
+ arch/powerpc/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index e66bc552ef48..7b9f0a58ffb6 100644
 --- a/arch/powerpc/Kconfig
 +++ b/arch/powerpc/Kconfig
 @@ -322,7 +322,7 @@ menu "Kernel options"
diff --git a/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch b/debian/patches/features/all/rt/0267-mips-Disable-highmem-on-RT.patch
similarity index 68%
rename from debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch
rename to debian/patches/features/all/rt/0267-mips-Disable-highmem-on-RT.patch
index dd3d779..06450a6 100644
--- a/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch
+++ b/debian/patches/features/all/rt/0267-mips-Disable-highmem-on-RT.patch
@@ -1,15 +1,17 @@
-Subject: mips: Disable highmem on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 18 Jul 2011 17:10:12 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 267/332] mips: Disable highmem on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=aaeb940c4f8ebc26f88f44cccfe8d2bf1369fe3d
 
 The current highmem handling on -RT is not compatible and needs fixups.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/mips/Kconfig |    2 +-
+ arch/mips/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index 5e844f68e847..dc613cc10f54 100644
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
 @@ -2516,7 +2516,7 @@ config MIPS_ASID_BITS_VARIABLE
diff --git a/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch b/debian/patches/features/all/rt/0268-mm-rt-kmap_atomic-scheduling.patch
similarity index 78%
rename from debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch
rename to debian/patches/features/all/rt/0268-mm-rt-kmap_atomic-scheduling.patch
index 09bdb60..86d1990 100644
--- a/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch
+++ b/debian/patches/features/all/rt/0268-mm-rt-kmap_atomic-scheduling.patch
@@ -1,7 +1,7 @@
-Subject: mm, rt: kmap_atomic scheduling
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Thu, 28 Jul 2011 10:43:51 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 268/332] mm, rt: kmap_atomic scheduling
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8b4e5431cdf64faab87b212396d125c798f89800
 
 In fact, with migrate_disable() existing one could play games with
 kmap_atomic. You could save/restore the kmap_atomic slots on context
@@ -20,15 +20,17 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
 		     and the pte content right away in the task struct.
 		     Shortens the context switch code. ]
 ---
- arch/x86/kernel/process_32.c |   32 ++++++++++++++++++++++++++++++++
- arch/x86/mm/highmem_32.c     |   13 ++++++++++---
- arch/x86/mm/iomap_32.c       |    9 ++++++++-
- include/linux/highmem.h      |   27 +++++++++++++++++++++++----
- include/linux/sched.h        |    7 +++++++
- include/linux/uaccess.h      |    2 ++
- mm/highmem.c                 |    6 ++++--
+ arch/x86/kernel/process_32.c | 32 ++++++++++++++++++++++++++++++++
+ arch/x86/mm/highmem_32.c     | 13 ++++++++++---
+ arch/x86/mm/iomap_32.c       |  9 ++++++++-
+ include/linux/highmem.h      | 27 +++++++++++++++++++++++----
+ include/linux/sched.h        |  7 +++++++
+ include/linux/uaccess.h      |  2 ++
+ mm/highmem.c                 |  6 ++++--
  7 files changed, 86 insertions(+), 10 deletions(-)
 
+diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
+index bd7be8efdc4c..b3b0a7f7b1ca 100644
 --- a/arch/x86/kernel/process_32.c
 +++ b/arch/x86/kernel/process_32.c
 @@ -35,6 +35,7 @@
@@ -39,7 +41,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  
  #include <asm/pgtable.h>
  #include <asm/ldt.h>
-@@ -195,6 +196,35 @@ start_thread(struct pt_regs *regs, unsig
+@@ -195,6 +196,35 @@ start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
  }
  EXPORT_SYMBOL_GPL(start_thread);
  
@@ -75,7 +77,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  
  /*
   *	switch_to(x,y) should switch tasks from x to y.
-@@ -271,6 +301,8 @@ EXPORT_SYMBOL_GPL(start_thread);
+@@ -271,6 +301,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  		     task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT))
  		__switch_to_xtra(prev_p, next_p, tss);
  
@@ -84,6 +86,8 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  	/*
  	 * Leave lazy mode, flushing any hypercalls made here.
  	 * This must be done before restoring TLS segments so
+diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
+index 6d18b70ed5a9..f752724c22e8 100644
 --- a/arch/x86/mm/highmem_32.c
 +++ b/arch/x86/mm/highmem_32.c
 @@ -32,10 +32,11 @@ EXPORT_SYMBOL(kunmap);
@@ -99,7 +103,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  	pagefault_disable();
  
  	if (!PageHighMem(page))
-@@ -45,7 +46,10 @@ void *kmap_atomic_prot(struct page *page
+@@ -45,7 +46,10 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot)
  	idx = type + KM_TYPE_NR*smp_processor_id();
  	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
  	BUG_ON(!pte_none(*(kmap_pte-idx)));
@@ -130,6 +134,8 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  }
  EXPORT_SYMBOL(__kunmap_atomic);
  
+diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
+index ada98b39b8ad..2620fb55ece1 100644
 --- a/arch/x86/mm/iomap_32.c
 +++ b/arch/x86/mm/iomap_32.c
 @@ -56,6 +56,7 @@ EXPORT_SYMBOL_GPL(iomap_free);
@@ -140,7 +146,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  	unsigned long vaddr;
  	int idx, type;
  
-@@ -65,7 +66,10 @@ void *kmap_atomic_prot_pfn(unsigned long
+@@ -65,7 +66,10 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
  	type = kmap_atomic_idx_push();
  	idx = type + KM_TYPE_NR * smp_processor_id();
  	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
@@ -162,9 +168,11 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  		kpte_clear_flush(kmap_pte-idx, vaddr);
  		kmap_atomic_idx_pop();
  	}
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index bb3f3297062a..1a8a811ae882 100644
 --- a/include/linux/highmem.h
 +++ b/include/linux/highmem.h
-@@ -86,32 +86,51 @@ static inline void __kunmap_atomic(void
+@@ -86,32 +86,51 @@ static inline void __kunmap_atomic(void *addr)
  
  #if defined(CONFIG_HIGHMEM) || defined(CONFIG_X86_32)
  
@@ -220,6 +228,8 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  #endif
  }
  
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index bdf040606769..f49f4970ce30 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
 @@ -26,6 +26,7 @@ struct sched_param {
@@ -230,7 +240,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  
  #include <asm/page.h>
  #include <asm/ptrace.h>
-@@ -1986,6 +1987,12 @@ struct task_struct {
+@@ -2008,6 +2009,12 @@ struct task_struct {
  	int softirq_nestcnt;
  	unsigned int softirqs_raised;
  #endif
@@ -243,9 +253,11 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
  	unsigned long	task_state_change;
  #endif
+diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
+index f30c187ed785..83bf0f798426 100644
 --- a/include/linux/uaccess.h
 +++ b/include/linux/uaccess.h
-@@ -24,6 +24,7 @@ static __always_inline void pagefault_di
+@@ -24,6 +24,7 @@ static __always_inline void pagefault_disabled_dec(void)
   */
  static inline void pagefault_disable(void)
  {
@@ -253,7 +265,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  	pagefault_disabled_inc();
  	/*
  	 * make sure to have issued the store before a pagefault
-@@ -40,6 +41,7 @@ static inline void pagefault_enable(void
+@@ -40,6 +41,7 @@ static inline void pagefault_enable(void)
  	 */
  	barrier();
  	pagefault_disabled_dec();
@@ -261,6 +273,8 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  }
  
  /*
+diff --git a/mm/highmem.c b/mm/highmem.c
+index 50b4ca6787f0..77518a3b35a1 100644
 --- a/mm/highmem.c
 +++ b/mm/highmem.c
 @@ -29,10 +29,11 @@
@@ -276,7 +290,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins
  
  /*
   * Virtual_count is not a pure "count".
-@@ -107,8 +108,9 @@ static inline wait_queue_head_t *get_pkm
+@@ -107,8 +108,9 @@ static inline wait_queue_head_t *get_pkmap_wait_queue_head(unsigned int color)
  unsigned long totalhigh_pages __read_mostly;
  EXPORT_SYMBOL(totalhigh_pages);
  
diff --git a/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch b/debian/patches/features/all/rt/0269-mm-rt-Fix-generic-kmap_atomic-for-RT.patch
similarity index 69%
rename from debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch
rename to debian/patches/features/all/rt/0269-mm-rt-Fix-generic-kmap_atomic-for-RT.patch
index afba622..3080e28 100644
--- a/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch
+++ b/debian/patches/features/all/rt/0269-mm-rt-Fix-generic-kmap_atomic-for-RT.patch
@@ -1,7 +1,7 @@
-Subject: mm: rt: Fix generic kmap_atomic for RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 19 Sep 2015 10:15:00 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 269/332] mm: rt: Fix generic kmap_atomic for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=346fdb5d4a4392193492cdfd0a244c1633d02f45
 
 The update to 4.1 brought in the mainline variant of the pagefault
 disable distangling from preempt count. That introduced a
@@ -16,12 +16,14 @@ Fix that up.
 Reported-and-tested-by: Juergen Borleis <jbe at pengutronix.de>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/highmem.h |    4 ++--
+ include/linux/highmem.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index 1a8a811ae882..04ec5c35c2d5 100644
 --- a/include/linux/highmem.h
 +++ b/include/linux/highmem.h
-@@ -65,7 +65,7 @@ static inline void kunmap(struct page *p
+@@ -65,7 +65,7 @@ static inline void kunmap(struct page *page)
  
  static inline void *kmap_atomic(struct page *page)
  {
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	pagefault_disable();
  	return page_address(page);
  }
-@@ -74,7 +74,7 @@ static inline void *kmap_atomic(struct p
+@@ -74,7 +74,7 @@ static inline void *kmap_atomic(struct page *page)
  static inline void __kunmap_atomic(void *addr)
  {
  	pagefault_enable();
diff --git a/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch b/debian/patches/features/all/rt/0270-x86-highmem-Add-a-already-used-pte-check.patch
similarity index 57%
rename from debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch
rename to debian/patches/features/all/rt/0270-x86-highmem-Add-a-already-used-pte-check.patch
index 7718665..196f693 100644
--- a/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch
+++ b/debian/patches/features/all/rt/0270-x86-highmem-Add-a-already-used-pte-check.patch
@@ -1,18 +1,20 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 11 Mar 2013 17:09:55 +0100
-Subject: x86/highmem: Add a "already used pte" check
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 270/332] x86/highmem: Add a "already used pte" check
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=6ec1175799294235538ae73fd4fbbe57731a8771
 
 This is a copy from kmap_atomic_prot().
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/mm/iomap_32.c |    2 ++
+ arch/x86/mm/iomap_32.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
+index 2620fb55ece1..585f6829653b 100644
 --- a/arch/x86/mm/iomap_32.c
 +++ b/arch/x86/mm/iomap_32.c
-@@ -66,6 +66,8 @@ void *kmap_atomic_prot_pfn(unsigned long
+@@ -66,6 +66,8 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
  	type = kmap_atomic_idx_push();
  	idx = type + KM_TYPE_NR * smp_processor_id();
  	vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
diff --git a/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch b/debian/patches/features/all/rt/0271-arm-highmem-Flush-tlb-on-unmap.patch
similarity index 73%
rename from debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch
rename to debian/patches/features/all/rt/0271-arm-highmem-Flush-tlb-on-unmap.patch
index 33ee4a4..b1a8117 100644
--- a/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch
+++ b/debian/patches/features/all/rt/0271-arm-highmem-Flush-tlb-on-unmap.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Mon, 11 Mar 2013 21:37:27 +0100
-Subject: arm/highmem: Flush tlb on unmap
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 271/332] arm/highmem: Flush tlb on unmap
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=69db6e3d1cc5ede50b1a32f10da7b152fccc18c3
 
 The tlb should be flushed on unmap and thus make the mapping entry
 invalid. This is only done in the non-debug case which does not look
@@ -9,9 +9,11 @@ right.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/arm/mm/highmem.c |    2 +-
+ arch/arm/mm/highmem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
+index d02f8187b1cc..eb4b225d28c9 100644
 --- a/arch/arm/mm/highmem.c
 +++ b/arch/arm/mm/highmem.c
 @@ -112,10 +112,10 @@ void __kunmap_atomic(void *kvaddr)
diff --git a/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch b/debian/patches/features/all/rt/0272-arm-Enable-highmem-for-rt.patch
similarity index 83%
rename from debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch
rename to debian/patches/features/all/rt/0272-arm-Enable-highmem-for-rt.patch
index 2cfebeb..9fe906b 100644
--- a/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch
+++ b/debian/patches/features/all/rt/0272-arm-Enable-highmem-for-rt.patch
@@ -1,17 +1,19 @@
-Subject: arm: Enable highmem for rt
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 13 Feb 2013 11:03:11 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 272/332] arm: Enable highmem for rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8f8b1db52dec44ff1125e0869ad42233a8481da4
 
 fixup highmem for ARM.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/arm/include/asm/switch_to.h |    8 +++++
- arch/arm/mm/highmem.c            |   56 +++++++++++++++++++++++++++++++++------
- include/linux/highmem.h          |    1 
+ arch/arm/include/asm/switch_to.h |  8 ++++++
+ arch/arm/mm/highmem.c            | 56 ++++++++++++++++++++++++++++++++++------
+ include/linux/highmem.h          |  1 +
  3 files changed, 57 insertions(+), 8 deletions(-)
 
+diff --git a/arch/arm/include/asm/switch_to.h b/arch/arm/include/asm/switch_to.h
+index 12ebfcc1d539..c962084605bc 100644
 --- a/arch/arm/include/asm/switch_to.h
 +++ b/arch/arm/include/asm/switch_to.h
 @@ -3,6 +3,13 @@
@@ -28,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * For v7 SMP cores running a preemptible kernel we may be pre-empted
   * during a TLB maintenance operation, so execute an inner-shareable dsb
-@@ -25,6 +32,7 @@ extern struct task_struct *__switch_to(s
+@@ -25,6 +32,7 @@ extern struct task_struct *__switch_to(struct task_struct *, struct thread_info
  #define switch_to(prev,next,last)					\
  do {									\
  	__complete_pending_tlbi();					\
@@ -36,9 +38,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	last = __switch_to(prev,task_thread_info(prev), task_thread_info(next));	\
  } while (0)
  
+diff --git a/arch/arm/mm/highmem.c b/arch/arm/mm/highmem.c
+index eb4b225d28c9..542692dbd40a 100644
 --- a/arch/arm/mm/highmem.c
 +++ b/arch/arm/mm/highmem.c
-@@ -34,6 +34,11 @@ static inline pte_t get_fixmap_pte(unsig
+@@ -34,6 +34,11 @@ static inline pte_t get_fixmap_pte(unsigned long vaddr)
  	return *ptep;
  }
  
@@ -162,6 +166,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 +	}
 +}
 +#endif
+diff --git a/include/linux/highmem.h b/include/linux/highmem.h
+index 04ec5c35c2d5..a117a33ef72c 100644
 --- a/include/linux/highmem.h
 +++ b/include/linux/highmem.h
 @@ -7,6 +7,7 @@
diff --git a/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch b/debian/patches/features/all/rt/0273-ipc-sem-Rework-semaphore-wakeups.patch
similarity index 71%
rename from debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch
rename to debian/patches/features/all/rt/0273-ipc-sem-Rework-semaphore-wakeups.patch
index 0a9f209..a92d78f 100644
--- a/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch
+++ b/debian/patches/features/all/rt/0273-ipc-sem-Rework-semaphore-wakeups.patch
@@ -1,7 +1,7 @@
-Subject: ipc/sem: Rework semaphore wakeups
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Wed, 14 Sep 2011 11:57:04 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 273/332] ipc/sem: Rework semaphore wakeups
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=152dc75cdcf407bb84bf17109e250f980f0d57cd
 
 Current sysv sems have a weird ass wakeup scheme that involves keeping
 preemption disabled over a potential O(n^2) loop and busy waiting on
@@ -25,12 +25,14 @@ Cc: Manfred Spraul <manfred at colorfullife.com>
 Link: http://lkml.kernel.org/r/1315994224.5040.1.camel@twins
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- ipc/sem.c |   10 ++++++++++
+ ipc/sem.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
 
+diff --git a/ipc/sem.c b/ipc/sem.c
+index 10b94bc59d4a..b8360eaacc7a 100644
 --- a/ipc/sem.c
 +++ b/ipc/sem.c
-@@ -712,6 +712,13 @@ static int perform_atomic_semop(struct s
+@@ -712,6 +712,13 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
  static void wake_up_sem_queue_prepare(struct list_head *pt,
  				struct sem_queue *q, int error)
  {
@@ -44,7 +46,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (list_empty(pt)) {
  		/*
  		 * Hold preempt off so that we don't get preempted and have the
-@@ -723,6 +730,7 @@ static void wake_up_sem_queue_prepare(st
+@@ -723,6 +730,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
  	q->pid = error;
  
  	list_add_tail(&q->list, pt);
@@ -52,7 +54,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /**
-@@ -736,6 +744,7 @@ static void wake_up_sem_queue_prepare(st
+@@ -736,6 +744,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
   */
  static void wake_up_sem_queue_do(struct list_head *pt)
  {
@@ -60,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	struct sem_queue *q, *t;
  	int did_something;
  
-@@ -748,6 +757,7 @@ static void wake_up_sem_queue_do(struct
+@@ -748,6 +757,7 @@ static void wake_up_sem_queue_do(struct list_head *pt)
  	}
  	if (did_something)
  		preempt_enable();
diff --git a/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch b/debian/patches/features/all/rt/0274-x86-kvm-Require-const-tsc-for-RT.patch
similarity index 62%
rename from debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch
rename to debian/patches/features/all/rt/0274-x86-kvm-Require-const-tsc-for-RT.patch
index 79390c1..25d765a 100644
--- a/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch
+++ b/debian/patches/features/all/rt/0274-x86-kvm-Require-const-tsc-for-RT.patch
@@ -1,7 +1,7 @@
-Subject: x86: kvm Require const tsc for RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Sun, 06 Nov 2011 12:26:18 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Sun, 6 Nov 2011 12:26:18 +0100
+Subject: [PATCH 274/332] x86: kvm Require const tsc for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=bdc7f290738d463f4bdc5a24225062e06b39cc06
 
 Non constant TSC is a nightmare on bare metal already, but with
 virtualization it becomes a complete disaster because the workarounds
@@ -10,12 +10,14 @@ a guest on top of a RT host.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/x86/kvm/x86.c |    7 +++++++
+ arch/x86/kvm/x86.c | 7 +++++++
  1 file changed, 7 insertions(+)
 
+diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
+index 3dbcb09c19cf..9e2c2b00215b 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -5958,6 +5958,13 @@ int kvm_arch_init(void *opaque)
+@@ -5969,6 +5969,13 @@ int kvm_arch_init(void *opaque)
  		goto out;
  	}
  
diff --git a/debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch b/debian/patches/features/all/rt/0275-KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
similarity index 64%
rename from debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
rename to debian/patches/features/all/rt/0275-KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
index bda8d1c..d6065dd 100644
--- a/debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
+++ b/debian/patches/features/all/rt/0275-KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
@@ -1,7 +1,7 @@
 From: Marcelo Tosatti <mtosatti at redhat.com>
 Date: Wed, 8 Apr 2015 20:33:25 -0300
-Subject: KVM: lapic: mark LAPIC timer handler as irqsafe
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 275/332] KVM: lapic: mark LAPIC timer handler as irqsafe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=dc07ed637dfe2f511c10530ca595b194645b10b1
 
 Since lapic timer handler only wakes up a simple waitqueue,
 it can be executed from hardirq context.
@@ -11,12 +11,14 @@ Reduces average cyclictest latency by 3us.
 Signed-off-by: Marcelo Tosatti <mtosatti at redhat.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/kvm/lapic.c |    1 +
+ arch/x86/kvm/lapic.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
+index 3f05c044720b..fe68afd37162 100644
 --- a/arch/x86/kvm/lapic.c
 +++ b/arch/x86/kvm/lapic.c
-@@ -1939,6 +1939,7 @@ int kvm_create_lapic(struct kvm_vcpu *vc
+@@ -1939,6 +1939,7 @@ int kvm_create_lapic(struct kvm_vcpu *vcpu)
  	hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC,
  		     HRTIMER_MODE_ABS_PINNED);
  	apic->lapic_timer.timer.function = apic_timer_fn;
diff --git a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch b/debian/patches/features/all/rt/0276-scsi-fcoe-Make-RT-aware.patch
similarity index 71%
rename from debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch
rename to debian/patches/features/all/rt/0276-scsi-fcoe-Make-RT-aware.patch
index 7399920..a10a4cd 100644
--- a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch
+++ b/debian/patches/features/all/rt/0276-scsi-fcoe-Make-RT-aware.patch
@@ -1,21 +1,23 @@
-Subject: scsi/fcoe: Make RT aware.
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sat, 12 Nov 2011 14:00:48 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 276/332] scsi/fcoe: Make RT aware.
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=3f07329fab938ae8d1c8e27a299d904bf738aa9c
 
 Do not disable preemption while taking sleeping locks. All user look safe
 for migrate_diable() only.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/scsi/fcoe/fcoe.c      |   16 ++++++++--------
- drivers/scsi/fcoe/fcoe_ctlr.c |    4 ++--
- drivers/scsi/libfc/fc_exch.c  |    4 ++--
+ drivers/scsi/fcoe/fcoe.c      | 16 ++++++++--------
+ drivers/scsi/fcoe/fcoe_ctlr.c |  4 ++--
+ drivers/scsi/libfc/fc_exch.c  |  4 ++--
  3 files changed, 12 insertions(+), 12 deletions(-)
 
+diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
+index 9bd41a35a78a..8e2d436c2e3f 100644
 --- a/drivers/scsi/fcoe/fcoe.c
 +++ b/drivers/scsi/fcoe/fcoe.c
-@@ -1455,11 +1455,11 @@ static int fcoe_rcv(struct sk_buff *skb,
+@@ -1455,11 +1455,11 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
  static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen)
  {
  	struct fcoe_percpu_s *fps;
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return rc;
  }
-@@ -1646,11 +1646,11 @@ static inline int fcoe_filter_frames(str
+@@ -1646,11 +1646,11 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
  		return 0;
  	}
  
@@ -44,7 +46,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return -EINVAL;
  }
  
-@@ -1693,7 +1693,7 @@ static void fcoe_recv_frame(struct sk_bu
+@@ -1693,7 +1693,7 @@ static void fcoe_recv_frame(struct sk_buff *skb)
  	 */
  	hp = (struct fcoe_hdr *) skb_network_header(skb);
  
@@ -53,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) {
  		if (stats->ErrorFrames < 5)
  			printk(KERN_WARNING "fcoe: FCoE version "
-@@ -1725,13 +1725,13 @@ static void fcoe_recv_frame(struct sk_bu
+@@ -1725,13 +1725,13 @@ static void fcoe_recv_frame(struct sk_buff *skb)
  		goto drop;
  
  	if (!fcoe_filter_frames(lport, fp)) {
@@ -69,9 +71,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	kfree_skb(skb);
  }
  
+diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
+index dcf36537a767..1a1f2e46452c 100644
 --- a/drivers/scsi/fcoe/fcoe_ctlr.c
 +++ b/drivers/scsi/fcoe/fcoe_ctlr.c
-@@ -834,7 +834,7 @@ static unsigned long fcoe_ctlr_age_fcfs(
+@@ -834,7 +834,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
  
  	INIT_LIST_HEAD(&del_list);
  
@@ -80,7 +84,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	list_for_each_entry_safe(fcf, next, &fip->fcfs, list) {
  		deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2;
-@@ -870,7 +870,7 @@ static unsigned long fcoe_ctlr_age_fcfs(
+@@ -870,7 +870,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
  				sel_time = fcf->time;
  		}
  	}
@@ -89,9 +93,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	list_for_each_entry_safe(fcf, next, &del_list, list) {
  		/* Removes fcf from current list */
+diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
+index 16ca31ad5ec0..c3987347e762 100644
 --- a/drivers/scsi/libfc/fc_exch.c
 +++ b/drivers/scsi/libfc/fc_exch.c
-@@ -814,10 +814,10 @@ static struct fc_exch *fc_exch_em_alloc(
+@@ -814,10 +814,10 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport,
  	}
  	memset(ep, 0, sizeof(*ep));
  
diff --git a/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch b/debian/patches/features/all/rt/0277-sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
similarity index 84%
rename from debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
rename to debian/patches/features/all/rt/0277-sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
index 70087e6..6a2d963 100644
--- a/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
+++ b/debian/patches/features/all/rt/0277-sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
@@ -1,7 +1,8 @@
 From: Paul Gortmaker <paul.gortmaker at windriver.com>
 Date: Sat, 14 Feb 2015 11:01:16 -0500
-Subject: sas-ata/isci: dont't disable interrupts in qc_issue handler
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 277/332] sas-ata/isci: dont't disable interrupts in qc_issue
+ handler
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9ad6ade42054bdd36d89c472dbc1ceff514cdef8
 
 On 3.14-rt we see the following trace on Canoe Pass for
 SCSI_ISCI "Intel(R) C600 Series Chipset SAS Controller"
@@ -54,12 +55,14 @@ be running the qc_issue code with interrupts enabled anyway.
 Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/scsi/libsas/sas_ata.c |    4 ++--
+ drivers/scsi/libsas/sas_ata.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
+index 87f5e694dbed..23c0a50fb6aa 100644
 --- a/drivers/scsi/libsas/sas_ata.c
 +++ b/drivers/scsi/libsas/sas_ata.c
-@@ -190,7 +190,7 @@ static unsigned int sas_ata_qc_issue(str
+@@ -190,7 +190,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
  	/* TODO: audit callers to ensure they are ready for qc_issue to
  	 * unconditionally re-enable interrupts
  	 */
@@ -68,7 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	spin_unlock(ap->lock);
  
  	/* If the device fell off, no sense in issuing commands */
-@@ -252,7 +252,7 @@ static unsigned int sas_ata_qc_issue(str
+@@ -252,7 +252,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
  
   out:
  	spin_lock(ap->lock);
diff --git a/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch b/debian/patches/features/all/rt/0278-x86-crypto-Reduce-preempt-disabled-regions.patch
similarity index 79%
rename from debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch
rename to debian/patches/features/all/rt/0278-x86-crypto-Reduce-preempt-disabled-regions.patch
index aae9a68..2a1f422 100644
--- a/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch
+++ b/debian/patches/features/all/rt/0278-x86-crypto-Reduce-preempt-disabled-regions.patch
@@ -1,7 +1,7 @@
-Subject: x86: crypto: Reduce preempt disabled regions
 From: Peter Zijlstra <peterz at infradead.org>
 Date: Mon, 14 Nov 2011 18:19:27 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 278/332] x86: crypto: Reduce preempt disabled regions
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0d8e462ab9b4e3a348eccf7e1159a62e271475c7
 
 Restrict the preempt disabled regions to the actual floating point
 operations and enable preemption for the administrative actions.
@@ -14,12 +14,14 @@ Signed-off-by: Peter Zijlstra <peterz at infradead.org>
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/x86/crypto/aesni-intel_glue.c |   24 +++++++++++++-----------
+ arch/x86/crypto/aesni-intel_glue.c | 24 +++++++++++++-----------
  1 file changed, 13 insertions(+), 11 deletions(-)
 
+diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
+index aa8b0672f87a..2429414bfc71 100644
 --- a/arch/x86/crypto/aesni-intel_glue.c
 +++ b/arch/x86/crypto/aesni-intel_glue.c
-@@ -372,14 +372,14 @@ static int ecb_encrypt(struct blkcipher_
+@@ -372,14 +372,14 @@ static int ecb_encrypt(struct blkcipher_desc *desc,
  	err = blkcipher_walk_virt(desc, &walk);
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
@@ -37,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return err;
  }
-@@ -396,14 +396,14 @@ static int ecb_decrypt(struct blkcipher_
+@@ -396,14 +396,14 @@ static int ecb_decrypt(struct blkcipher_desc *desc,
  	err = blkcipher_walk_virt(desc, &walk);
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
@@ -54,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return err;
  }
-@@ -420,14 +420,14 @@ static int cbc_encrypt(struct blkcipher_
+@@ -420,14 +420,14 @@ static int cbc_encrypt(struct blkcipher_desc *desc,
  	err = blkcipher_walk_virt(desc, &walk);
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
@@ -71,7 +73,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return err;
  }
-@@ -444,14 +444,14 @@ static int cbc_decrypt(struct blkcipher_
+@@ -444,14 +444,14 @@ static int cbc_decrypt(struct blkcipher_desc *desc,
  	err = blkcipher_walk_virt(desc, &walk);
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
@@ -88,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	return err;
  }
-@@ -503,18 +503,20 @@ static int ctr_crypt(struct blkcipher_de
+@@ -503,18 +503,20 @@ static int ctr_crypt(struct blkcipher_desc *desc,
  	err = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE);
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
diff --git a/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches/features/all/rt/0279-crypto-Reduce-preempt-disabled-regions-more-algos.patch
similarity index 76%
rename from debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch
rename to debian/patches/features/all/rt/0279-crypto-Reduce-preempt-disabled-regions-more-algos.patch
index 59a7d86..7175890 100644
--- a/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch
+++ b/debian/patches/features/all/rt/0279-crypto-Reduce-preempt-disabled-regions-more-algos.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 21 Feb 2014 17:24:04 +0100
-Subject: crypto: Reduce preempt disabled regions, more algos
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 279/332] crypto: Reduce preempt disabled regions, more algos
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=06261f430b7b1e76ec926c520fca364a9fc2f637
 
 Don Estabrook reported
 | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100()
@@ -38,13 +38,15 @@ the bug is gone.
 Reported-by: Don Estabrook <don.estabrook at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- arch/x86/crypto/cast5_avx_glue.c |   21 +++++++++------------
- arch/x86/crypto/glue_helper.c    |   31 +++++++++++++++----------------
+ arch/x86/crypto/cast5_avx_glue.c | 21 +++++++++------------
+ arch/x86/crypto/glue_helper.c    | 31 +++++++++++++++----------------
  2 files changed, 24 insertions(+), 28 deletions(-)
 
+diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c
+index 8648158f3916..d7699130ee36 100644
 --- a/arch/x86/crypto/cast5_avx_glue.c
 +++ b/arch/x86/crypto/cast5_avx_glue.c
-@@ -59,7 +59,7 @@ static inline void cast5_fpu_end(bool fp
+@@ -59,7 +59,7 @@ static inline void cast5_fpu_end(bool fpu_enabled)
  static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,
  		     bool enc)
  {
@@ -53,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
  	const unsigned int bsize = CAST5_BLOCK_SIZE;
  	unsigned int nbytes;
-@@ -75,7 +75,7 @@ static int ecb_crypt(struct blkcipher_de
+@@ -75,7 +75,7 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,
  		u8 *wsrc = walk->src.virt.addr;
  		u8 *wdst = walk->dst.virt.addr;
  
@@ -62,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		/* Process multi-block batch */
  		if (nbytes >= bsize * CAST5_PARALLEL_BLOCKS) {
-@@ -103,10 +103,9 @@ static int ecb_crypt(struct blkcipher_de
+@@ -103,10 +103,9 @@ static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,
  		} while (nbytes >= bsize);
  
  done:
@@ -74,7 +76,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return err;
  }
  
-@@ -227,7 +226,7 @@ static unsigned int __cbc_decrypt(struct
+@@ -227,7 +226,7 @@ static unsigned int __cbc_decrypt(struct blkcipher_desc *desc,
  static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
  		       struct scatterlist *src, unsigned int nbytes)
  {
@@ -83,7 +85,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct blkcipher_walk walk;
  	int err;
  
-@@ -236,12 +235,11 @@ static int cbc_decrypt(struct blkcipher_
+@@ -236,12 +235,11 @@ static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
  	while ((nbytes = walk.nbytes)) {
@@ -98,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return err;
  }
  
-@@ -311,7 +309,7 @@ static unsigned int __ctr_crypt(struct b
+@@ -311,7 +309,7 @@ static unsigned int __ctr_crypt(struct blkcipher_desc *desc,
  static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
  		     struct scatterlist *src, unsigned int nbytes)
  {
@@ -107,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct blkcipher_walk walk;
  	int err;
  
-@@ -320,13 +318,12 @@ static int ctr_crypt(struct blkcipher_de
+@@ -320,13 +318,12 @@ static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
  	desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
  
  	while ((nbytes = walk.nbytes) >= CAST5_BLOCK_SIZE) {
@@ -123,9 +125,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (walk.nbytes) {
  		ctr_crypt_final(desc, &walk);
  		err = blkcipher_walk_done(desc, &walk, 0);
+diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c
+index 6a85598931b5..3a506ce7ed93 100644
 --- a/arch/x86/crypto/glue_helper.c
 +++ b/arch/x86/crypto/glue_helper.c
-@@ -39,7 +39,7 @@ static int __glue_ecb_crypt_128bit(const
+@@ -39,7 +39,7 @@ static int __glue_ecb_crypt_128bit(const struct common_glue_ctx *gctx,
  	void *ctx = crypto_blkcipher_ctx(desc->tfm);
  	const unsigned int bsize = 128 / 8;
  	unsigned int nbytes, i, func_bytes;
@@ -134,7 +138,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	int err;
  
  	err = blkcipher_walk_virt(desc, walk);
-@@ -49,7 +49,7 @@ static int __glue_ecb_crypt_128bit(const
+@@ -49,7 +49,7 @@ static int __glue_ecb_crypt_128bit(const struct common_glue_ctx *gctx,
  		u8 *wdst = walk->dst.virt.addr;
  
  		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
@@ -143,7 +147,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		for (i = 0; i < gctx->num_funcs; i++) {
  			func_bytes = bsize * gctx->funcs[i].num_blocks;
-@@ -71,10 +71,10 @@ static int __glue_ecb_crypt_128bit(const
+@@ -71,10 +71,10 @@ static int __glue_ecb_crypt_128bit(const struct common_glue_ctx *gctx,
  		}
  
  done:
@@ -155,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return err;
  }
  
-@@ -194,7 +194,7 @@ int glue_cbc_decrypt_128bit(const struct
+@@ -194,7 +194,7 @@ int glue_cbc_decrypt_128bit(const struct common_glue_ctx *gctx,
  			    struct scatterlist *src, unsigned int nbytes)
  {
  	const unsigned int bsize = 128 / 8;
@@ -164,7 +168,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct blkcipher_walk walk;
  	int err;
  
-@@ -203,12 +203,12 @@ int glue_cbc_decrypt_128bit(const struct
+@@ -203,12 +203,12 @@ int glue_cbc_decrypt_128bit(const struct common_glue_ctx *gctx,
  
  	while ((nbytes = walk.nbytes)) {
  		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
@@ -179,7 +183,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return err;
  }
  EXPORT_SYMBOL_GPL(glue_cbc_decrypt_128bit);
-@@ -277,7 +277,7 @@ int glue_ctr_crypt_128bit(const struct c
+@@ -277,7 +277,7 @@ int glue_ctr_crypt_128bit(const struct common_glue_ctx *gctx,
  			  struct scatterlist *src, unsigned int nbytes)
  {
  	const unsigned int bsize = 128 / 8;
@@ -188,7 +192,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct blkcipher_walk walk;
  	int err;
  
-@@ -286,13 +286,12 @@ int glue_ctr_crypt_128bit(const struct c
+@@ -286,13 +286,12 @@ int glue_ctr_crypt_128bit(const struct common_glue_ctx *gctx,
  
  	while ((nbytes = walk.nbytes) >= bsize) {
  		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
@@ -204,7 +208,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (walk.nbytes) {
  		glue_ctr_crypt_final_128bit(
  			gctx->funcs[gctx->num_funcs - 1].fn_u.ctr, desc, &walk);
-@@ -347,7 +346,7 @@ int glue_xts_crypt_128bit(const struct c
+@@ -347,7 +346,7 @@ int glue_xts_crypt_128bit(const struct common_glue_ctx *gctx,
  			  void *tweak_ctx, void *crypt_ctx)
  {
  	const unsigned int bsize = 128 / 8;
@@ -213,7 +217,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct blkcipher_walk walk;
  	int err;
  
-@@ -360,21 +359,21 @@ int glue_xts_crypt_128bit(const struct c
+@@ -360,21 +359,21 @@ int glue_xts_crypt_128bit(const struct common_glue_ctx *gctx,
  
  	/* set minimum length to bsize, for tweak_fn */
  	fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
diff --git a/debian/patches/features/all/rt/dm-make-rt-aware.patch b/debian/patches/features/all/rt/0280-dm-Make-rt-aware.patch
similarity index 65%
rename from debian/patches/features/all/rt/dm-make-rt-aware.patch
rename to debian/patches/features/all/rt/0280-dm-Make-rt-aware.patch
index 88ba319..d9cae38 100644
--- a/debian/patches/features/all/rt/dm-make-rt-aware.patch
+++ b/debian/patches/features/all/rt/0280-dm-Make-rt-aware.patch
@@ -1,7 +1,7 @@
-Subject: dm: Make rt aware
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 14 Nov 2011 23:06:09 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 280/332] dm: Make rt aware
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=4fa92113e6b5ffc575c7e7383d3644a01c895e4e
 
 Use the BUG_ON_NORT variant for the irq_disabled() checks. RT has
 interrupts legitimately enabled here as we cant deadlock against the
@@ -11,12 +11,14 @@ Reported-by: Luis Claudio R. Goncalves <lclaudio at uudg.org>
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/md/dm-rq.c |    2 +-
+ drivers/md/dm-rq.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
+index ba7c4c685db3..834ec328f217 100644
 --- a/drivers/md/dm-rq.c
 +++ b/drivers/md/dm-rq.c
-@@ -842,7 +842,7 @@ static void dm_old_request_fn(struct req
+@@ -842,7 +842,7 @@ static void dm_old_request_fn(struct request_queue *q)
  		/* Establish tio->ti before queuing work (map_tio_request) */
  		tio->ti = ti;
  		kthread_queue_work(&md->kworker, &tio->work);
diff --git a/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch b/debian/patches/features/all/rt/0281-acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
similarity index 82%
rename from debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
rename to debian/patches/features/all/rt/0281-acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
index 6197f22..0fc8b64 100644
--- a/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
+++ b/debian/patches/features/all/rt/0281-acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
@@ -1,7 +1,8 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Wed, 13 Feb 2013 09:26:05 -0500
-Subject: acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 281/332] acpi/rt: Convert acpi_gbl_hardware lock back to a
+ raw_spinlock_t
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f64d30cec87fcb87f5d1a40afe76918d2dffc390
 
 We hit the following bug with 3.6-rt:
 
@@ -64,16 +65,18 @@ Link: http://lkml.kernel.org/r/1360765565.23152.5.camel@gandalf.local.home
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/acpi/acpica/acglobal.h  |    2 +-
- drivers/acpi/acpica/hwregs.c    |    4 ++--
- drivers/acpi/acpica/hwxface.c   |    4 ++--
- drivers/acpi/acpica/utmutex.c   |    4 ++--
- include/acpi/platform/aclinux.h |   15 +++++++++++++++
+ drivers/acpi/acpica/acglobal.h  |  2 +-
+ drivers/acpi/acpica/hwregs.c    |  4 ++--
+ drivers/acpi/acpica/hwxface.c   |  4 ++--
+ drivers/acpi/acpica/utmutex.c   |  4 ++--
+ include/acpi/platform/aclinux.h | 15 +++++++++++++++
  5 files changed, 22 insertions(+), 7 deletions(-)
 
+diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
+index 750fa824d42c..441edf51484a 100644
 --- a/drivers/acpi/acpica/acglobal.h
 +++ b/drivers/acpi/acpica/acglobal.h
-@@ -116,7 +116,7 @@ ACPI_GLOBAL(u8, acpi_gbl_global_lock_pen
+@@ -116,7 +116,7 @@ ACPI_GLOBAL(u8, acpi_gbl_global_lock_pending);
   * interrupt level
   */
  ACPI_GLOBAL(acpi_spinlock, acpi_gbl_gpe_lock);	/* For GPE data structs and registers */
@@ -82,9 +85,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock);
  
  /* Mutex for _OSI support */
+diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
+index 3b7fb99362b6..696bf8e62afb 100644
 --- a/drivers/acpi/acpica/hwregs.c
 +++ b/drivers/acpi/acpica/hwregs.c
-@@ -363,14 +363,14 @@ acpi_status acpi_hw_clear_acpi_status(vo
+@@ -363,14 +363,14 @@ acpi_status acpi_hw_clear_acpi_status(void)
  			  ACPI_BITMASK_ALL_FIXED_STATUS,
  			  ACPI_FORMAT_UINT64(acpi_gbl_xpm1a_status.address)));
  
@@ -101,9 +106,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (ACPI_FAILURE(status)) {
  		goto exit;
+diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
+index 98c26ff39409..6e236f2ea791 100644
 --- a/drivers/acpi/acpica/hwxface.c
 +++ b/drivers/acpi/acpica/hwxface.c
-@@ -373,7 +373,7 @@ acpi_status acpi_write_bit_register(u32
+@@ -373,7 +373,7 @@ acpi_status acpi_write_bit_register(u32 register_id, u32 value)
  		return_ACPI_STATUS(AE_BAD_PARAMETER);
  	}
  
@@ -112,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * At this point, we know that the parent register is one of the
-@@ -434,7 +434,7 @@ acpi_status acpi_write_bit_register(u32
+@@ -434,7 +434,7 @@ acpi_status acpi_write_bit_register(u32 register_id, u32 value)
  
  unlock_and_exit:
  
@@ -121,9 +128,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return_ACPI_STATUS(status);
  }
  
+diff --git a/drivers/acpi/acpica/utmutex.c b/drivers/acpi/acpica/utmutex.c
+index 15073375bd00..357e7ca5a587 100644
 --- a/drivers/acpi/acpica/utmutex.c
 +++ b/drivers/acpi/acpica/utmutex.c
-@@ -88,7 +88,7 @@ acpi_status acpi_ut_mutex_initialize(voi
+@@ -88,7 +88,7 @@ acpi_status acpi_ut_mutex_initialize(void)
  		return_ACPI_STATUS (status);
  	}
  
@@ -141,6 +150,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	acpi_os_delete_lock(acpi_gbl_reference_count_lock);
  
  	/* Delete the reader/writer lock */
+diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
+index e861a24f06f2..b5c97d3059c7 100644
 --- a/include/acpi/platform/aclinux.h
 +++ b/include/acpi/platform/aclinux.h
 @@ -133,6 +133,7 @@
diff --git a/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch b/debian/patches/features/all/rt/0282-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch
similarity index 86%
rename from debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch
rename to debian/patches/features/all/rt/0282-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch
index bf3e8f3..2b6bbd2 100644
--- a/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch
+++ b/debian/patches/features/all/rt/0282-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch
@@ -1,7 +1,7 @@
-Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 14 Dec 2011 01:03:49 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 282/332] cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0066e5eecfcbddddbe820c91fdf224bc25c9a854
 
 There are "valid" GFP_ATOMIC allocations such as
 
@@ -41,10 +41,12 @@ which forbid allocations at run-time.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/x86/Kconfig |    2 +-
- lib/Kconfig      |    1 +
+ arch/x86/Kconfig | 2 +-
+ lib/Kconfig      | 1 +
  2 files changed, 2 insertions(+), 1 deletion(-)
 
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 935b5fbacd85..14c824810efd 100644
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
 @@ -900,7 +900,7 @@ config IOMMU_HELPER
@@ -56,6 +58,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	---help---
  	  Enable maximum number of CPUS and NUMA Nodes for this architecture.
  	  If unsure, say N.
+diff --git a/lib/Kconfig b/lib/Kconfig
+index 260a80e313b9..b06becb3f477 100644
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
 @@ -400,6 +400,7 @@ config CHECK_SIGNATURE
diff --git a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch b/debian/patches/features/all/rt/0283-random-Make-it-work-on-rt.patch
similarity index 76%
rename from debian/patches/features/all/rt/random-make-it-work-on-rt.patch
rename to debian/patches/features/all/rt/0283-random-Make-it-work-on-rt.patch
index 2650c7d..8f16021 100644
--- a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch
+++ b/debian/patches/features/all/rt/0283-random-Make-it-work-on-rt.patch
@@ -1,7 +1,7 @@
-Subject: random: Make it work on rt
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Tue, 21 Aug 2012 20:38:50 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 283/332] random: Make it work on rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=40364e9ec9cce9e9786651c7cdfd1782671b6498
 
 Delegate the random insertion to the forced threaded interrupt
 handler. Store the return IP of the hard interrupt handler in the irq
@@ -9,19 +9,20 @@ descriptor and feed it into the random generator as a source of
 entropy.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- drivers/char/random.c   |   11 +++++------
- drivers/hv/vmbus_drv.c  |    4 +++-
- include/linux/irqdesc.h |    1 +
- include/linux/random.h  |    2 +-
- kernel/irq/handle.c     |    8 +++++++-
- kernel/irq/manage.c     |    6 ++++++
+ drivers/char/random.c   | 11 +++++------
+ drivers/hv/vmbus_drv.c  |  4 +++-
+ include/linux/irqdesc.h |  1 +
+ include/linux/random.h  |  2 +-
+ kernel/irq/handle.c     |  8 +++++++-
+ kernel/irq/manage.c     |  6 ++++++
  6 files changed, 23 insertions(+), 9 deletions(-)
 
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index f17bc435eee1..ec886dda1b21 100644
 --- a/drivers/char/random.c
 +++ b/drivers/char/random.c
-@@ -1120,28 +1120,27 @@ static __u32 get_reg(struct fast_pool *f
+@@ -1120,28 +1120,27 @@ static __u32 get_reg(struct fast_pool *f, struct pt_regs *regs)
  	return *(ptr + f->reg_idx++);
  }
  
@@ -55,6 +56,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	fast_mix(fast_pool);
  	add_interrupt_bench(cycles);
+diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
+index 0276d2ef06ee..8868045eabde 100644
 --- a/drivers/hv/vmbus_drv.c
 +++ b/drivers/hv/vmbus_drv.c
 @@ -761,6 +761,8 @@ static void vmbus_isr(void)
@@ -75,6 +78,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  
+diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
+index c9be57931b58..eeeb540971ae 100644
 --- a/include/linux/irqdesc.h
 +++ b/include/linux/irqdesc.h
 @@ -66,6 +66,7 @@ struct irq_desc {
@@ -85,9 +90,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	raw_spinlock_t		lock;
  	struct cpumask		*percpu_enabled;
  	const struct cpumask	*percpu_affinity;
+diff --git a/include/linux/random.h b/include/linux/random.h
+index 16ab429735a7..9d0fecb5b6c2 100644
 --- a/include/linux/random.h
 +++ b/include/linux/random.h
-@@ -31,7 +31,7 @@ static inline void add_latent_entropy(vo
+@@ -31,7 +31,7 @@ static inline void add_latent_entropy(void) {}
  
  extern void add_input_randomness(unsigned int type, unsigned int code,
  				 unsigned int value) __latent_entropy;
@@ -96,9 +103,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  extern void get_random_bytes(void *buf, int nbytes);
  extern int add_random_ready_callback(struct random_ready_callback *rdy);
+diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
+index d3f24905852c..f87aa8fdcc51 100644
 --- a/kernel/irq/handle.c
 +++ b/kernel/irq/handle.c
-@@ -181,10 +181,16 @@ irqreturn_t handle_irq_event_percpu(stru
+@@ -181,10 +181,16 @@ irqreturn_t handle_irq_event_percpu(struct irq_desc *desc)
  {
  	irqreturn_t retval;
  	unsigned int flags = 0;
@@ -116,6 +125,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (!noirqdebug)
  		note_interrupt(desc, retval);
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index 6b075cc0603a..5994867526f3 100644
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
 @@ -1023,6 +1023,12 @@ static int irq_thread(void *data)
diff --git a/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch b/debian/patches/features/all/rt/0284-random-avoid-preempt_disable-ed-section.patch
similarity index 87%
rename from debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch
rename to debian/patches/features/all/rt/0284-random-avoid-preempt_disable-ed-section.patch
index 8b551a2..e24d697 100644
--- a/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch
+++ b/debian/patches/features/all/rt/0284-random-avoid-preempt_disable-ed-section.patch
@@ -1,8 +1,7 @@
-From 81e7296af883a58c3e5609842e129de01442198d Mon Sep 17 00:00:00 2001
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 12 May 2017 15:46:17 +0200
-Subject: [PATCH] random: avoid preempt_disable()ed section
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 284/332] random: avoid preempt_disable()ed section
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f352a0e6040e8f9dd4a736bdffd2a09862739810
 
 extract_crng() will use sleeping locks while in a preempt_disable()
 section due to get_cpu_var().
@@ -11,9 +10,11 @@ Work around it with local_locks.
 Cc: stable-rt at vger.kernel.org # where it applies to
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/char/random.c |   12 ++++++++----
+ drivers/char/random.c | 12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)
 
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index ec886dda1b21..25ee319dc8e3 100644
 --- a/drivers/char/random.c
 +++ b/drivers/char/random.c
 @@ -262,6 +262,7 @@
diff --git a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch b/debian/patches/features/all/rt/0285-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch
similarity index 90%
rename from debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
rename to debian/patches/features/all/rt/0285-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch
index 8253bae..af882bc 100644
--- a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
+++ b/debian/patches/features/all/rt/0285-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch
@@ -1,7 +1,7 @@
-Subject: cpu: Make hotplug.lock a "sleeping" spinlock on RT
 From: Steven Rostedt <rostedt at goodmis.org>
-Date: Fri, 02 Mar 2012 10:36:57 -0500
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 2 Mar 2012 10:36:57 -0500
+Subject: [PATCH 285/332] cpu: Make hotplug.lock a "sleeping" spinlock on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=db2465c5af0b071f8225d1674fc2b7ce43262454
 
 Tasks can block on hotplug.lock in pin_current_cpu(), but their state
 might be != RUNNING. So the mutex wakeup will set the state
@@ -20,9 +20,11 @@ Cc: Clark Williams <clark.williams at gmail.com>
 Link: http://lkml.kernel.org/r/1330702617.25686.265.camel@gandalf.stny.rr.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- kernel/cpu.c |   32 +++++++++++++++++++++++++-------
+ kernel/cpu.c | 32 +++++++++++++++++++++++++-------
  1 file changed, 25 insertions(+), 7 deletions(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 4b8f59bee8d9..9bb0d333bfc7 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -210,10 +210,16 @@ static int cpu_hotplug_disabled;
diff --git a/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch b/debian/patches/features/all/rt/0286-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
similarity index 93%
rename from debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch
rename to debian/patches/features/all/rt/0286-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
index 0c6304e..a2271b3 100644
--- a/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch
+++ b/debian/patches/features/all/rt/0286-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
@@ -1,7 +1,7 @@
 From: Steven Rostedt <srostedt at redhat.com>
 Date: Mon, 16 Jul 2012 08:07:43 +0000
-Subject: cpu/rt: Rework cpu down for PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 286/332] cpu/rt: Rework cpu down for PREEMPT_RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cc197087372a4ef19c98b71c6710910706534d19
 
 Bringing a CPU down is a pain with the PREEMPT_RT kernel because
 tasks can be preempted in many more places than in non-RT. In
@@ -48,16 +48,17 @@ This helps fix issues with ksoftirqd and workqueue that unbind on CPU down.
 
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/sched.h |    7 +
- kernel/cpu.c          |  236 +++++++++++++++++++++++++++++++++++++++++---------
- kernel/sched/core.c   |   78 ++++++++++++++++
+ include/linux/sched.h |   7 ++
+ kernel/cpu.c          | 236 +++++++++++++++++++++++++++++++++++++++++---------
+ kernel/sched/core.c   |  78 +++++++++++++++++
  3 files changed, 280 insertions(+), 41 deletions(-)
 
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index f49f4970ce30..9bb98e2bc6d0 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -2480,6 +2480,10 @@ extern void do_set_cpus_allowed(struct t
+@@ -2506,6 +2506,10 @@ extern void do_set_cpus_allowed(struct task_struct *p,
  
  extern int set_cpus_allowed_ptr(struct task_struct *p,
  				const struct cpumask *new_mask);
@@ -68,7 +69,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #else
  static inline void do_set_cpus_allowed(struct task_struct *p,
  				      const struct cpumask *new_mask)
-@@ -2492,6 +2496,9 @@ static inline int set_cpus_allowed_ptr(s
+@@ -2518,6 +2522,9 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
  		return -EINVAL;
  	return 0;
  }
@@ -78,6 +79,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  #ifdef CONFIG_NO_HZ_COMMON
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 9bb0d333bfc7..acac23803b36 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -210,16 +210,10 @@ static int cpu_hotplug_disabled;
@@ -165,7 +168,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static DEFINE_PER_CPU(struct hotplug_pcp, hotplug_pcp);
  
  /**
-@@ -276,18 +288,39 @@ static DEFINE_PER_CPU(struct hotplug_pcp
+@@ -276,18 +288,39 @@ static DEFINE_PER_CPU(struct hotplug_pcp, hotplug_pcp);
  void pin_current_cpu(void)
  {
  	struct hotplug_pcp *hp;
@@ -301,7 +304,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /*
   * Start the sync_unplug_thread on the target cpu and wait for it to
   * complete.
-@@ -335,23 +426,83 @@ static int sync_unplug_thread(void *data
+@@ -335,23 +426,83 @@ static int sync_unplug_thread(void *data)
  static int cpu_unplug_begin(unsigned int cpu)
  {
  	struct hotplug_pcp *hp = &per_cpu(hotplug_pcp, cpu);
@@ -427,7 +430,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	cpuhp_lock_release();
  }
  
-@@ -907,6 +1058,9 @@ static int takedown_cpu(unsigned int cpu
+@@ -920,6 +1071,9 @@ static int takedown_cpu(unsigned int cpu)
  	kthread_park(per_cpu_ptr(&cpuhp_state, cpu)->thread);
  	smpboot_park_threads(cpu);
  
@@ -437,9 +440,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * Prevent irq alloc/free while the dying cpu reorganizes the
  	 * interrupt affinities.
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 54b8a2344de1..08c9047375e1 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -1140,6 +1140,84 @@ void do_set_cpus_allowed(struct task_str
+@@ -1152,6 +1152,84 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
  		set_curr_task(rq, p);
  }
  
diff --git a/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch b/debian/patches/features/all/rt/0287-cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
similarity index 86%
rename from debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
rename to debian/patches/features/all/rt/0287-cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
index 73d6865..eb6377f 100644
--- a/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
+++ b/debian/patches/features/all/rt/0287-cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
@@ -1,7 +1,7 @@
 From: Steven Rostedt <rostedt at goodmis.org>
 Date: Thu, 5 Dec 2013 09:16:52 -0500
-Subject: cpu hotplug: Document why PREEMPT_RT uses a spinlock
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 287/332] cpu hotplug: Document why PREEMPT_RT uses a spinlock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=30e50edd8755282828ea2f5cbc0dd29255958d64
 
 The patch:
 
@@ -34,9 +34,11 @@ Reported-by: Nicholas Mc Guire <der.herr at hofr.at>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/cpu.c |    8 ++++++++
+ kernel/cpu.c | 8 ++++++++
  1 file changed, 8 insertions(+)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index acac23803b36..82a409cf8c8a 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -260,6 +260,14 @@ struct hotplug_pcp {
diff --git a/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch b/debian/patches/features/all/rt/0288-kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
similarity index 77%
rename from debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
rename to debian/patches/features/all/rt/0288-kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
index e9c999b..6b6c823 100644
--- a/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
+++ b/debian/patches/features/all/rt/0288-kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
@@ -1,7 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 7 Jun 2013 22:37:06 +0200
-Subject: kernel/cpu: fix cpu down problem if kthread's cpu is going down
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 288/332] kernel/cpu: fix cpu down problem if kthread's cpu is
+ going down
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ae71a96857e31286988c22871d6627a5a8945538
 
 If kthread is pinned to CPUx and CPUx is going down then we get into
 trouble:
@@ -22,9 +23,11 @@ notfier complete their work.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/cpu.c |   15 +++++++++++++--
+ kernel/cpu.c | 15 +++++++++++++--
  1 file changed, 13 insertions(+), 2 deletions(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 82a409cf8c8a..d4a29d33e52b 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
 @@ -259,6 +259,7 @@ struct hotplug_pcp {
@@ -35,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #ifdef CONFIG_PREEMPT_RT_FULL
  	/*
  	 * Note, on PREEMPT_RT, the hotplug lock must save the state of
-@@ -362,6 +363,7 @@ static int sync_unplug_thread(void *data
+@@ -362,6 +363,7 @@ static int sync_unplug_thread(void *data)
  {
  	struct hotplug_pcp *hp = data;
  
@@ -43,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	preempt_disable();
  	hp->unplug = current;
  	wait_for_pinned_cpus(hp);
-@@ -427,6 +429,14 @@ static void __cpu_unplug_sync(struct hot
+@@ -427,6 +429,14 @@ static void __cpu_unplug_sync(struct hotplug_pcp *hp)
  	wait_for_completion(&hp->synced);
  }
  
@@ -58,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Start the sync_unplug_thread on the target cpu and wait for it to
   * complete.
-@@ -450,6 +460,7 @@ static int cpu_unplug_begin(unsigned int
+@@ -450,6 +460,7 @@ static int cpu_unplug_begin(unsigned int cpu)
  	tell_sched_cpu_down_begin(cpu);
  
  	init_completion(&hp->synced);
@@ -66,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	hp->sync_tsk = kthread_create(sync_unplug_thread, hp, "sync_unplug/%d", cpu);
  	if (IS_ERR(hp->sync_tsk)) {
-@@ -465,8 +476,7 @@ static int cpu_unplug_begin(unsigned int
+@@ -465,8 +476,7 @@ static int cpu_unplug_begin(unsigned int cpu)
  	 * wait for tasks that are going to enter these sections and
  	 * we must not have them block.
  	 */
@@ -76,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return 0;
  }
  
-@@ -1062,6 +1072,7 @@ static int takedown_cpu(unsigned int cpu
+@@ -1075,6 +1085,7 @@ static int takedown_cpu(unsigned int cpu)
  	struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
  	int err;
  
diff --git a/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch b/debian/patches/features/all/rt/0289-kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
similarity index 68%
rename from debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
rename to debian/patches/features/all/rt/0289-kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
index 08d9309..1405003 100644
--- a/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
+++ b/debian/patches/features/all/rt/0289-kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 14 Jun 2013 17:16:35 +0200
-Subject: kernel/hotplug: restore original cpu mask oncpu/down
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 289/332] kernel/hotplug: restore original cpu mask oncpu/down
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9442bc17a0bfd91d249b9ecd489a321fe42d50b2
 
 If a task which is allowed to run only on CPU X puts CPU Y down then it
 will be allowed on all CPUs but the on CPU Y after it comes back from
@@ -11,12 +11,14 @@ the CPU the task is running is going down.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/cpu.c |   13 ++++++++++++-
+ kernel/cpu.c | 13 ++++++++++++-
  1 file changed, 12 insertions(+), 1 deletion(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index d4a29d33e52b..bdf5331e9afd 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -1166,6 +1166,7 @@ static int __ref _cpu_down(unsigned int
+@@ -1179,6 +1179,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	bool hasdied = false;
  	int mycpu;
  	cpumask_var_t cpumask;
@@ -24,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (num_online_cpus() == 1)
  		return -EBUSY;
-@@ -1176,6 +1177,12 @@ static int __ref _cpu_down(unsigned int
+@@ -1189,6 +1190,12 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	/* Move the downtaker off the unplug cpu */
  	if (!alloc_cpumask_var(&cpumask, GFP_KERNEL))
  		return -ENOMEM;
@@ -37,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	cpumask_andnot(cpumask, cpu_online_mask, cpumask_of(cpu));
  	set_cpus_allowed_ptr(current, cpumask);
  	free_cpumask_var(cpumask);
-@@ -1184,7 +1191,8 @@ static int __ref _cpu_down(unsigned int
+@@ -1197,7 +1204,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	if (mycpu == cpu) {
  		printk(KERN_ERR "Yuck! Still on unplug CPU\n!");
  		migrate_enable();
@@ -47,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	}
  
  	cpu_hotplug_begin();
-@@ -1238,6 +1246,9 @@ static int __ref _cpu_down(unsigned int
+@@ -1251,6 +1259,9 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	/* This post dead nonsense must die */
  	if (!ret && hasdied)
  		cpu_notify_nofail(CPU_POST_DEAD, cpu);
diff --git a/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch b/debian/patches/features/all/rt/0290-cpu_down-move-migrate_enable-back.patch
similarity index 67%
rename from debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch
rename to debian/patches/features/all/rt/0290-cpu_down-move-migrate_enable-back.patch
index 804d04c..aa8dbd1 100644
--- a/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch
+++ b/debian/patches/features/all/rt/0290-cpu_down-move-migrate_enable-back.patch
@@ -1,7 +1,7 @@
-From:	Tiejun Chen <tiejun.chen at windriver.com>
-Subject: cpu_down: move migrate_enable() back
-Date:	Thu, 7 Nov 2013 10:06:07 +0800
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+From: Tiejun Chen <tiejun.chen at windriver.com>
+Date: Thu, 7 Nov 2013 10:06:07 +0800
+Subject: [PATCH 290/332] cpu_down: move migrate_enable() back
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8c13e7a97354dba4881ac72675dafa0c6aa28116
 
 Commit 08c1ab68, "hotplug-use-migrate-disable.patch", intends to
 use migrate_enable()/migrate_disable() to replace that combination
@@ -30,12 +30,14 @@ So we should move migrate_enable() as the original scheme.
 
 Signed-off-by: Tiejun Chen <tiejun.chen at windriver.com>
 ---
- kernel/cpu.c |    2 +-
+ kernel/cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index bdf5331e9afd..60774d291e3a 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -1195,6 +1195,7 @@ static int __ref _cpu_down(unsigned int
+@@ -1208,6 +1208,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  		goto restore_cpus;
  	}
  
@@ -43,7 +45,7 @@ Signed-off-by: Tiejun Chen <tiejun.chen at windriver.com>
  	cpu_hotplug_begin();
  	ret = cpu_unplug_begin(cpu);
  	if (ret) {
-@@ -1242,7 +1243,6 @@ static int __ref _cpu_down(unsigned int
+@@ -1255,7 +1256,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
  	cpu_unplug_done(cpu);
  out_cancel:
  	cpu_hotplug_done();
diff --git a/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch b/debian/patches/features/all/rt/0291-hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
similarity index 82%
rename from debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
rename to debian/patches/features/all/rt/0291-hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
index 9a3ccf0..27bb48b 100644
--- a/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
+++ b/debian/patches/features/all/rt/0291-hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
@@ -1,7 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Tue, 24 Mar 2015 08:14:49 +0100
-Subject: hotplug: Use set_cpus_allowed_ptr() in sync_unplug_thread()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 291/332] hotplug: Use set_cpus_allowed_ptr() in
+ sync_unplug_thread()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=985f3c04f4e7655a2fceaec323db5f767108a0bf
 
 do_set_cpus_allowed() is not safe vs ->sched_class change.
 
@@ -31,12 +32,14 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/cpu.c |    2 +-
+ kernel/cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/cpu.c b/kernel/cpu.c
+index 60774d291e3a..010db3c943cd 100644
 --- a/kernel/cpu.c
 +++ b/kernel/cpu.c
-@@ -418,7 +418,7 @@ static int sync_unplug_thread(void *data
+@@ -418,7 +418,7 @@ static int sync_unplug_thread(void *data)
  	 * we don't want any more work on this CPU.
  	 */
  	current->flags &= ~PF_NO_SETAFFINITY;
diff --git a/debian/patches/features/all/rt/rt-locking-Reenable-migration-accross-schedule.patch b/debian/patches/features/all/rt/0292-rt-locking-Reenable-migration-accross-schedule.patch
similarity index 83%
rename from debian/patches/features/all/rt/rt-locking-Reenable-migration-accross-schedule.patch
rename to debian/patches/features/all/rt/0292-rt-locking-Reenable-migration-accross-schedule.patch
index 9cca067..3a9fed2 100644
--- a/debian/patches/features/all/rt/rt-locking-Reenable-migration-accross-schedule.patch
+++ b/debian/patches/features/all/rt/0292-rt-locking-Reenable-migration-accross-schedule.patch
@@ -1,7 +1,7 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Mon, 8 Feb 2016 16:15:28 +0100
-Subject: rt/locking: Reenable migration accross schedule
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 292/332] rt/locking: Reenable migration accross schedule
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=61aa6a3bc9460eb0e588667ee1b9da7be1cb14de
 
 We currently disable migration across lock acquisition. That includes the part
 where we block on the lock and schedule out. We cannot disable migration after
@@ -14,12 +14,14 @@ migrate disable level. For nested locking this does not help at all.
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/locking/rtmutex.c |   32 ++++++++++++++++++++------------
+ kernel/locking/rtmutex.c | 32 ++++++++++++++++++++------------
  1 file changed, 20 insertions(+), 12 deletions(-)
 
+diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
+index 6e52bce66a26..78a6c4a223c1 100644
 --- a/kernel/locking/rtmutex.c
 +++ b/kernel/locking/rtmutex.c
-@@ -980,14 +980,19 @@ static int __try_to_take_rt_mutex(struct
+@@ -980,14 +980,19 @@ static int __try_to_take_rt_mutex(struct rt_mutex *lock,
   * preemptible spin_lock functions:
   */
  static inline void rt_spin_lock_fastlock(struct rt_mutex *lock,
@@ -41,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static inline void rt_spin_lock_fastunlock(struct rt_mutex *lock,
-@@ -1045,7 +1050,8 @@ static int task_blocks_on_rt_mutex(struc
+@@ -1045,7 +1050,8 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock,
   * We store the current state under p->pi_lock in p->saved_state and
   * the try_to_wake_up() code handles this accordingly.
   */
@@ -51,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  {
  	struct task_struct *lock_owner, *self = current;
  	struct rt_mutex_waiter waiter, *top_waiter;
-@@ -1089,8 +1095,13 @@ static void  noinline __sched rt_spin_lo
+@@ -1089,8 +1095,13 @@ static void  noinline __sched rt_spin_lock_slowlock(struct rt_mutex *lock)
  
  		debug_rt_mutex_print_deadlock(&waiter);
  
@@ -66,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		raw_spin_lock_irqsave(&lock->wait_lock, flags);
  
-@@ -1148,38 +1159,35 @@ static void  noinline __sched rt_spin_lo
+@@ -1148,38 +1159,35 @@ static void  noinline __sched rt_spin_lock_slowunlock(struct rt_mutex *lock)
  
  void __lockfunc rt_spin_lock__no_mg(spinlock_t *lock)
  {
diff --git a/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch b/debian/patches/features/all/rt/0293-scsi-qla2xxx-Use-local_irq_save_nort-in-qla2x00_poll.patch
similarity index 80%
rename from debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch
rename to debian/patches/features/all/rt/0293-scsi-qla2xxx-Use-local_irq_save_nort-in-qla2x00_poll.patch
index d6d8f0f..d3300d1 100644
--- a/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch
+++ b/debian/patches/features/all/rt/0293-scsi-qla2xxx-Use-local_irq_save_nort-in-qla2x00_poll.patch
@@ -1,7 +1,8 @@
-Subject: scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll
 From: John Kacur <jkacur at redhat.com>
 Date: Fri, 27 Apr 2012 12:48:46 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 293/332] scsi: qla2xxx: Use local_irq_save_nort() in
+ qla2x00_poll
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ca3c0096b6c5c1b374bbe21efd60a9788cc89851
 
 RT triggers the following:
 
@@ -26,9 +27,11 @@ Link: http://lkml.kernel.org/r/1335523726-10024-1-git-send-email-jkacur@redhat.c
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/scsi/qla2xxx/qla_inline.h |    4 ++--
+ drivers/scsi/qla2xxx/qla_inline.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
+index edc48f3b8230..ee5c6f9dfb6f 100644
 --- a/drivers/scsi/qla2xxx/qla_inline.h
 +++ b/drivers/scsi/qla2xxx/qla_inline.h
 @@ -59,12 +59,12 @@ qla2x00_poll(struct rsp_que *rsp)
diff --git a/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches/features/all/rt/0294-net-Remove-preemption-disabling-in-netif_rx.patch
similarity index 79%
rename from debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch
rename to debian/patches/features/all/rt/0294-net-Remove-preemption-disabling-in-netif_rx.patch
index ccea3f7..60e0ae4 100644
--- a/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch
+++ b/debian/patches/features/all/rt/0294-net-Remove-preemption-disabling-in-netif_rx.patch
@@ -1,7 +1,7 @@
-Subject: net: Remove preemption disabling in netif_rx()
 From: Priyanka Jain <Priyanka.Jain at freescale.com>
 Date: Thu, 17 May 2012 09:35:11 +0530
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 294/332] net: Remove preemption disabling in netif_rx()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=294b9476b4164b4cb38c46539195d8fe2d7c228f
 
 1)enqueue_to_backlog() (called from netif_rx) should be
   bind to a particluar CPU. This can be achieved by
@@ -31,14 +31,14 @@ Link: http://lkml.kernel.org/r/1337227511-2271-1-git-send-email-Priyanka.Jain@fr
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- Testing: Tested successfully on p4080ds(8-core SMP system)  
-
- net/core/dev.c |    8 ++++----
+ net/core/dev.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
+diff --git a/net/core/dev.c b/net/core/dev.c
+index ea1af7131ef4..83fdaccfdfca 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3811,7 +3811,7 @@ static int netif_rx_internal(struct sk_b
+@@ -3819,7 +3819,7 @@ static int netif_rx_internal(struct sk_buff *skb)
  		struct rps_dev_flow voidflow, *rflow = &voidflow;
  		int cpu;
  
@@ -47,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		rcu_read_lock();
  
  		cpu = get_rps_cpu(skb->dev, skb, &rflow);
-@@ -3821,13 +3821,13 @@ static int netif_rx_internal(struct sk_b
+@@ -3829,13 +3829,13 @@ static int netif_rx_internal(struct sk_buff *skb)
  		ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail);
  
  		rcu_read_unlock();
diff --git a/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch b/debian/patches/features/all/rt/0295-net-Another-local_irq_disable-kmalloc-headache.patch
similarity index 74%
rename from debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch
rename to debian/patches/features/all/rt/0295-net-Another-local_irq_disable-kmalloc-headache.patch
index 792b1b6..6e5ba5f 100644
--- a/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch
+++ b/debian/patches/features/all/rt/0295-net-Another-local_irq_disable-kmalloc-headache.patch
@@ -1,15 +1,17 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 26 Sep 2012 16:21:08 +0200
-Subject: net: Another local_irq_disable/kmalloc headache
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 295/332] net: Another local_irq_disable/kmalloc headache
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d5e3d97fd2275c13a4e73c68ac5048091f9aa3d0
 
 Replace it by a local lock. Though that's pretty inefficient :(
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- net/core/skbuff.c |   10 ++++++----
+ net/core/skbuff.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)
 
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c
+index fe008f1bd930..2f20335051d9 100644
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
 @@ -64,6 +64,7 @@
@@ -28,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
  {
-@@ -367,10 +369,10 @@ static void *__netdev_alloc_frag(unsigne
+@@ -367,10 +369,10 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
  	unsigned long flags;
  	void *data;
  
@@ -41,7 +43,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	return data;
  }
  
-@@ -438,13 +440,13 @@ struct sk_buff *__netdev_alloc_skb(struc
+@@ -438,13 +440,13 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len,
  	if (sk_memalloc_socks())
  		gfp_mask |= __GFP_MEMALLOC;
  
diff --git a/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch b/debian/patches/features/all/rt/0296-net-core-protect-users-of-napi_alloc_cache-against-r.patch
similarity index 84%
rename from debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch
rename to debian/patches/features/all/rt/0296-net-core-protect-users-of-napi_alloc_cache-against-r.patch
index 107aa07..c8adc0f 100644
--- a/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch
+++ b/debian/patches/features/all/rt/0296-net-core-protect-users-of-napi_alloc_cache-against-r.patch
@@ -1,8 +1,8 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 15 Jan 2016 16:33:34 +0100
-Subject: net/core: protect users of napi_alloc_cache against
+Subject: [PATCH 296/332] net/core: protect users of napi_alloc_cache against
  reentrance
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2bb682e5a3de393e64cff1e2bdf61098a147c64a
 
 On -RT the code running in BH can not be moved to another CPU so CPU
 local variable remain local. However the code can be preempted
@@ -13,9 +13,11 @@ This patch ensures that each user of napi_alloc_cache uses a local lock.
 Cc: stable-rt at vger.kernel.org
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- net/core/skbuff.c |   25 +++++++++++++++++++------
+ net/core/skbuff.c | 25 +++++++++++++++++++------
  1 file changed, 19 insertions(+), 6 deletions(-)
 
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c
+index 2f20335051d9..9fa6bea3dd3f 100644
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
 @@ -362,6 +362,7 @@ struct napi_alloc_cache {
@@ -54,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	len += NET_SKB_PAD + NET_IP_ALIGN;
  
-@@ -507,7 +513,10 @@ struct sk_buff *__napi_alloc_skb(struct
+@@ -507,7 +513,10 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
  	if (sk_memalloc_socks())
  		gfp_mask |= __GFP_MEMALLOC;
  
@@ -65,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	if (unlikely(!data))
  		return NULL;
  
-@@ -518,7 +527,7 @@ struct sk_buff *__napi_alloc_skb(struct
+@@ -518,7 +527,7 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi, unsigned int len,
  	}
  
  	/* use OR instead of assignment to avoid clearing of bits in mask */
@@ -103,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	/* record skb to CPU local list */
  	nc->skb_cache[nc->skb_count++] = skb;
  
-@@ -793,6 +805,7 @@ static inline void _kfree_skb_defer(stru
+@@ -793,6 +805,7 @@ static inline void _kfree_skb_defer(struct sk_buff *skb)
  				     nc->skb_cache);
  		nc->skb_count = 0;
  	}
diff --git a/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch b/debian/patches/features/all/rt/0297-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch
similarity index 70%
rename from debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch
rename to debian/patches/features/all/rt/0297-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch
index 302eb0a..638b598 100644
--- a/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch
+++ b/debian/patches/features/all/rt/0297-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch
@@ -1,7 +1,8 @@
-Subject: net: netfilter: Serialize xt_write_recseq sections on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 28 Oct 2012 11:18:08 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 297/332] net: netfilter: Serialize xt_write_recseq sections on
+ RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ab2b0527b84ef452e6c04ce8808c9328c5be4a0f
 
 The netfilter code relies only on the implicit semantics of
 local_bh_disable() for serializing wt_write_recseq sections. RT breaks
@@ -9,12 +10,13 @@ that and needs explicit serialization here.
 
 Reported-by: Peter LaDow <petela at gocougs.wsu.edu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- include/linux/netfilter/x_tables.h |    7 +++++++
- net/netfilter/core.c               |    6 ++++++
+ include/linux/netfilter/x_tables.h | 7 +++++++
+ net/netfilter/core.c               | 6 ++++++
  2 files changed, 13 insertions(+)
 
+diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
+index 2ad1a2b289b5..b4d10155af54 100644
 --- a/include/linux/netfilter/x_tables.h
 +++ b/include/linux/netfilter/x_tables.h
 @@ -4,6 +4,7 @@
@@ -25,7 +27,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include <uapi/linux/netfilter/x_tables.h>
  
  /* Test a struct->invflags and a boolean for inequality */
-@@ -300,6 +301,8 @@ void xt_free_table_info(struct xt_table_
+@@ -300,6 +301,8 @@ void xt_free_table_info(struct xt_table_info *info);
   */
  DECLARE_PER_CPU(seqcount_t, xt_recseq);
  
@@ -34,7 +36,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /* xt_tee_enabled - true if x_tables needs to handle reentrancy
   *
   * Enabled if current ip(6)tables ruleset has at least one -j TEE rule.
-@@ -320,6 +323,9 @@ static inline unsigned int xt_write_recs
+@@ -320,6 +323,9 @@ static inline unsigned int xt_write_recseq_begin(void)
  {
  	unsigned int addend;
  
@@ -44,7 +46,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * Low order bit of sequence is set if we already
  	 * called xt_write_recseq_begin().
-@@ -350,6 +356,7 @@ static inline void xt_write_recseq_end(u
+@@ -350,6 +356,7 @@ static inline void xt_write_recseq_end(unsigned int addend)
  	/* this is kind of a write_seqcount_end(), but addend is 0 or 1 */
  	smp_wmb();
  	__this_cpu_add(xt_recseq.sequence, addend);
@@ -52,6 +54,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  /*
+diff --git a/net/netfilter/core.c b/net/netfilter/core.c
+index 004af030ef1a..b64f751bda45 100644
 --- a/net/netfilter/core.c
 +++ b/net/netfilter/core.c
 @@ -22,12 +22,18 @@
diff --git a/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch b/debian/patches/features/all/rt/0298-net-Add-a-mutex-around-devnet_rename_seq.patch
similarity index 80%
rename from debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch
rename to debian/patches/features/all/rt/0298-net-Add-a-mutex-around-devnet_rename_seq.patch
index 0fb3aa6..49255c0 100644
--- a/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch
+++ b/debian/patches/features/all/rt/0298-net-Add-a-mutex-around-devnet_rename_seq.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Wed, 20 Mar 2013 18:06:20 +0100
-Subject: net: Add a mutex around devnet_rename_seq
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 298/332] net: Add a mutex around devnet_rename_seq
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1169e11ef929ce19c5b9529ae1f4fb87b73ad090
 
 On RT write_seqcount_begin() disables preemption and device_rename()
 allocates memory with GFP_KERNEL and grabs later the sysfs_mutex
@@ -17,12 +17,14 @@ it when it detects a writer in progress. This keeps the normal case
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- net/core/dev.c |   34 ++++++++++++++++++++--------------
+ net/core/dev.c | 34 ++++++++++++++++++++--------------
  1 file changed, 20 insertions(+), 14 deletions(-)
 
+diff --git a/net/core/dev.c b/net/core/dev.c
+index 83fdaccfdfca..4421ba0c253a 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -190,6 +190,7 @@ static unsigned int napi_gen_id = NR_CPU
+@@ -190,6 +190,7 @@ static unsigned int napi_gen_id = NR_CPUS;
  static DEFINE_READ_MOSTLY_HASHTABLE(napi_hash, 8);
  
  static seqcount_t devnet_rename_seq;
@@ -30,7 +32,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static inline void dev_base_seq_inc(struct net *net)
  {
-@@ -888,7 +889,8 @@ int netdev_get_name(struct net *net, cha
+@@ -888,7 +889,8 @@ int netdev_get_name(struct net *net, char *name, int ifindex)
  	strcpy(name, dev->name);
  	rcu_read_unlock();
  	if (read_seqcount_retry(&devnet_rename_seq, seq)) {
@@ -40,7 +42,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		goto retry;
  	}
  
-@@ -1157,20 +1159,17 @@ int dev_change_name(struct net_device *d
+@@ -1157,20 +1159,17 @@ int dev_change_name(struct net_device *dev, const char *newname)
  	if (dev->flags & IFF_UP)
  		return -EBUSY;
  
@@ -67,7 +69,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (oldname[0] && !strchr(oldname, '%'))
  		netdev_info(dev, "renamed from %s\n", oldname);
-@@ -1183,11 +1182,12 @@ int dev_change_name(struct net_device *d
+@@ -1183,11 +1182,12 @@ int dev_change_name(struct net_device *dev, const char *newname)
  	if (ret) {
  		memcpy(dev->name, oldname, IFNAMSIZ);
  		dev->name_assign_type = old_assign_type;
@@ -83,7 +85,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	netdev_adjacent_rename_links(dev, oldname);
  
-@@ -1208,7 +1208,8 @@ int dev_change_name(struct net_device *d
+@@ -1208,7 +1208,8 @@ int dev_change_name(struct net_device *dev, const char *newname)
  		/* err >= 0 after dev_alloc_name() or stores the first errno */
  		if (err >= 0) {
  			err = ret;
@@ -93,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			memcpy(dev->name, oldname, IFNAMSIZ);
  			memcpy(oldname, newname, IFNAMSIZ);
  			dev->name_assign_type = old_assign_type;
-@@ -1221,6 +1222,11 @@ int dev_change_name(struct net_device *d
+@@ -1221,6 +1222,11 @@ int dev_change_name(struct net_device *dev, const char *newname)
  	}
  
  	return err;
diff --git a/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch b/debian/patches/features/all/rt/0299-crypto-Convert-crypto-notifier-chain-to-SRCU.patch
similarity index 92%
rename from debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch
rename to debian/patches/features/all/rt/0299-crypto-Convert-crypto-notifier-chain-to-SRCU.patch
index 87c1f69..b60fe25 100644
--- a/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch
+++ b/debian/patches/features/all/rt/0299-crypto-Convert-crypto-notifier-chain-to-SRCU.patch
@@ -1,7 +1,7 @@
-Subject: crypto: Convert crypto notifier chain to SRCU
 From: Peter Zijlstra <peterz at infradead.org>
-Date: Fri, 05 Oct 2012 09:03:24 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 5 Oct 2012 09:03:24 +0100
+Subject: [PATCH 299/332] crypto: Convert crypto notifier chain to SRCU
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=2f704ee5ef7e9db5ae25be3ec0b0f7f0c8e4c758
 
 The crypto notifier deadlocks on RT. Though this can be a real deadlock
 on mainline as well due to fifo fair rwsems.
@@ -114,11 +114,13 @@ block the probe thread and the whole party is dead locked.
 Signed-off-by: Peter Zijlstra <peterz at infradead.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- crypto/algapi.c   |    4 ++--
- crypto/api.c      |    6 +++---
- crypto/internal.h |    4 ++--
+ crypto/algapi.c   | 4 ++--
+ crypto/api.c      | 6 +++---
+ crypto/internal.h | 4 ++--
  3 files changed, 7 insertions(+), 7 deletions(-)
 
+diff --git a/crypto/algapi.c b/crypto/algapi.c
+index 1fad2a6b3bbb..ecb7315426a9 100644
 --- a/crypto/algapi.c
 +++ b/crypto/algapi.c
 @@ -719,13 +719,13 @@ EXPORT_SYMBOL_GPL(crypto_spawn_tfm2);
@@ -137,6 +139,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL_GPL(crypto_unregister_notifier);
  
+diff --git a/crypto/api.c b/crypto/api.c
+index bbc147cb5dec..bc1a848f02ec 100644
 --- a/crypto/api.c
 +++ b/crypto/api.c
 @@ -31,7 +31,7 @@ EXPORT_SYMBOL_GPL(crypto_alg_list);
@@ -148,7 +152,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  EXPORT_SYMBOL_GPL(crypto_chain);
  
  static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg);
-@@ -236,10 +236,10 @@ int crypto_probing_notify(unsigned long
+@@ -236,10 +236,10 @@ int crypto_probing_notify(unsigned long val, void *v)
  {
  	int ok;
  
@@ -161,6 +165,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  
  	return ok;
+diff --git a/crypto/internal.h b/crypto/internal.h
+index 7eefcdb00227..0ecc7f5a2f40 100644
 --- a/crypto/internal.h
 +++ b/crypto/internal.h
 @@ -47,7 +47,7 @@ struct crypto_larval {
@@ -172,7 +178,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifdef CONFIG_PROC_FS
  void __init crypto_init_proc(void);
-@@ -146,7 +146,7 @@ static inline int crypto_is_moribund(str
+@@ -146,7 +146,7 @@ static inline int crypto_is_moribund(struct crypto_alg *alg)
  
  static inline void crypto_notify(unsigned long val, void *v)
  {
diff --git a/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch b/debian/patches/features/all/rt/0300-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch
similarity index 85%
rename from debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch
rename to debian/patches/features/all/rt/0300-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch
index f1cad36..a7b548f 100644
--- a/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch
+++ b/debian/patches/features/all/rt/0300-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch
@@ -1,9 +1,8 @@
-Subject: lockdep: selftest: Only do hardirq context test for raw spinlock
-From: Yong Zhang <yong.zhang0 at gmail.com>
-Date: Mon, 16 Apr 2012 15:01:56 +0800
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
-
 From: Yong Zhang <yong.zhang at windriver.com>
+Date: Mon, 16 Apr 2012 15:01:56 +0800
+Subject: [PATCH 300/332] lockdep: selftest: Only do hardirq context test for
+ raw spinlock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=5e59342c16cc6d0e7566047e06b699c36c99fcb4
 
 On -rt there is no softirq context any more and rwlock is sleepable,
 disable softirq context test and rwlock+irq test.
@@ -13,9 +12,11 @@ Cc: Yong Zhang <yong.zhang at windriver.com>
 Link: http://lkml.kernel.org/r/1334559716-18447-3-git-send-email-yong.zhang0@gmail.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- lib/locking-selftest.c |   23 +++++++++++++++++++++++
+ lib/locking-selftest.c | 23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)
 
+diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
+index f3a217ea0388..c17fc0bd0aa3 100644
 --- a/lib/locking-selftest.c
 +++ b/lib/locking-selftest.c
 @@ -1858,6 +1858,7 @@ void locking_selftest(void)
diff --git a/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/debian/patches/features/all/rt/0301-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
similarity index 75%
rename from debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
rename to debian/patches/features/all/rt/0301-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
index 2bdd4d6..0185c6f 100644
--- a/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
+++ b/debian/patches/features/all/rt/0301-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
@@ -1,7 +1,8 @@
 From: Josh Cartwright <josh.cartwright at ni.com>
 Date: Wed, 28 Jan 2015 13:08:45 -0600
-Subject: lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 301/332] lockdep: selftest: fix warnings due to missing
+ PREEMPT_RT conditionals
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=26fa3e85ce03f01b82ca2517d9e6dae1746bd579
 
 "lockdep: Selftest: Only do hardirq context test for raw spinlock"
 disabled the execution of certain tests with PREEMPT_RT_FULL, but did
@@ -24,9 +25,11 @@ Signed-off-by: Xander Huff <xander.huff at ni.com>
 Acked-by: Gratian Crisan <gratian.crisan at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- lib/locking-selftest.c |   27 +++++++++++++++++++++++++++
+ lib/locking-selftest.c | 27 +++++++++++++++++++++++++++
  1 file changed, 27 insertions(+)
 
+diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
+index c17fc0bd0aa3..4611b156ef79 100644
 --- a/lib/locking-selftest.c
 +++ b/lib/locking-selftest.c
 @@ -590,6 +590,8 @@ GENERATE_TESTCASE(init_held_rsem)
@@ -38,7 +41,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include "locking-selftest-rlock-hardirq.h"
  GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock)
  
-@@ -605,9 +607,12 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_
+@@ -605,9 +607,12 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_rlock)
  #include "locking-selftest-wlock-softirq.h"
  GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock)
  
@@ -51,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Enabling hardirqs with a softirq-safe lock held:
   */
-@@ -640,6 +645,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A
+@@ -640,6 +645,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_rlock)
  #undef E1
  #undef E2
  
@@ -60,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Enabling irqs with an irq-safe lock held:
   */
-@@ -663,6 +670,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A
+@@ -663,6 +670,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2A_rlock)
  #include "locking-selftest-spin-hardirq.h"
  GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin)
  
@@ -69,7 +72,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include "locking-selftest-rlock-hardirq.h"
  GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock)
  
-@@ -678,6 +687,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B
+@@ -678,6 +687,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_rlock)
  #include "locking-selftest-wlock-softirq.h"
  GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock)
  
@@ -78,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #undef E1
  #undef E2
  
-@@ -709,6 +720,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B
+@@ -709,6 +720,8 @@ GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock)
  #include "locking-selftest-spin-hardirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin)
  
@@ -87,7 +90,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include "locking-selftest-rlock-hardirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock)
  
-@@ -724,6 +737,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_
+@@ -724,6 +737,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_rlock)
  #include "locking-selftest-wlock-softirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock)
  
@@ -96,7 +99,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #undef E1
  #undef E2
  #undef E3
-@@ -757,6 +772,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_
+@@ -757,6 +772,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock)
  #include "locking-selftest-spin-hardirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin)
  
@@ -105,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #include "locking-selftest-rlock-hardirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock)
  
-@@ -772,10 +789,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_
+@@ -772,10 +789,14 @@ GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_rlock)
  #include "locking-selftest-wlock-softirq.h"
  GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock)
  
@@ -120,7 +123,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * read-lock / write-lock irq inversion.
   *
-@@ -838,6 +859,10 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inver
+@@ -838,6 +859,10 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_inversion_soft_wlock)
  #undef E2
  #undef E3
  
@@ -131,7 +134,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * read-lock / write-lock recursion that is actually safe.
   */
-@@ -876,6 +901,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_
+@@ -876,6 +901,8 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_soft)
  #undef E2
  #undef E3
  
diff --git a/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch b/debian/patches/features/all/rt/0302-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
similarity index 89%
rename from debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch
rename to debian/patches/features/all/rt/0302-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
index a5e8ce2..790d198 100644
--- a/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch
+++ b/debian/patches/features/all/rt/0302-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
@@ -1,7 +1,8 @@
 From: Yong Zhang <yong.zhang at windriver.com>
 Date: Wed, 11 Jul 2012 22:05:21 +0000
-Subject: perf: Make swevent hrtimer run in irq instead of softirq
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 302/332] perf: Make swevent hrtimer run in irq instead of
+ softirq
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ec2c97b4eccd0c09ecbf55a7d1e49f93ef984db1
 
 Otherwise we get a deadlock like below:
 
@@ -52,14 +53,15 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
 Link: http://lkml.kernel.org/r/1341476476-5666-1-git-send-email-yong.zhang0@gmail.com
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
-
 ---
- kernel/events/core.c |    1 +
+ kernel/events/core.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/kernel/events/core.c b/kernel/events/core.c
+index c774773ac3a4..5bccc706b710 100644
 --- a/kernel/events/core.c
 +++ b/kernel/events/core.c
-@@ -8363,6 +8363,7 @@ static void perf_swevent_init_hrtimer(st
+@@ -8389,6 +8389,7 @@ static void perf_swevent_init_hrtimer(struct perf_event *event)
  
  	hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
  	hwc->hrtimer.function = perf_swevent_hrtimer;
diff --git a/debian/patches/features/all/rt/kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch b/debian/patches/features/all/rt/0303-kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
similarity index 60%
rename from debian/patches/features/all/rt/kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
rename to debian/patches/features/all/rt/0303-kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
index 7882587..685d713 100644
--- a/debian/patches/features/all/rt/kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
+++ b/debian/patches/features/all/rt/0303-kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 4 Feb 2016 16:38:10 +0100
-Subject: [PATCH] kernel/perf: mark perf_cpu_context's timer as irqsafe
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 303/332] kernel/perf: mark perf_cpu_context's timer as irqsafe
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=615f5777e5e0beffd879920618ba9ec837363da7
 
 Otherwise we get a WARN_ON() backtrace and some events are reported as
 "not counted".
@@ -10,12 +10,14 @@ Cc: stable-rt at vger.kernel.org
 Reported-by: Yang Shi <yang.shi at linaro.org>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/events/core.c |    1 +
+ kernel/events/core.c | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/kernel/events/core.c b/kernel/events/core.c
+index 5bccc706b710..c87f78e25de5 100644
 --- a/kernel/events/core.c
 +++ b/kernel/events/core.c
-@@ -1050,6 +1050,7 @@ static void __perf_mux_hrtimer_init(stru
+@@ -1050,6 +1050,7 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
  	raw_spin_lock_init(&cpuctx->hrtimer_lock);
  	hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
  	timer->function = perf_mux_hrtimer_handler;
diff --git a/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch b/debian/patches/features/all/rt/0304-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch
similarity index 69%
rename from debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch
rename to debian/patches/features/all/rt/0304-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch
index b5a6b4c..f06df8e 100644
--- a/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch
+++ b/debian/patches/features/all/rt/0304-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch
@@ -1,17 +1,18 @@
-Subject: rcu: Disable RCU_FAST_NO_HZ on RT
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Sun, 28 Oct 2012 13:26:09 +0000
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 304/332] rcu: Disable RCU_FAST_NO_HZ on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f0aff4b595c98c2d5a0f86dd5f9520b992d81060
 
 This uses a timer_list timer from the irq disabled guts of the idle
 code. Disable it for now to prevent wreckage.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-
 ---
- init/Kconfig |    2 +-
+ init/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index 1762f2521ebc..4811bfaa905c 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -623,7 +623,7 @@ config RCU_FANOUT_LEAF
diff --git a/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch b/debian/patches/features/all/rt/0305-rcu-Eliminate-softirq-processing-from-rcutree.patch
similarity index 89%
rename from debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch
rename to debian/patches/features/all/rt/0305-rcu-Eliminate-softirq-processing-from-rcutree.patch
index dd0a389..5435cee 100644
--- a/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch
+++ b/debian/patches/features/all/rt/0305-rcu-Eliminate-softirq-processing-from-rcutree.patch
@@ -1,7 +1,7 @@
 From: "Paul E. McKenney" <paulmck at linux.vnet.ibm.com>
 Date: Mon, 4 Nov 2013 13:21:10 -0800
-Subject: rcu: Eliminate softirq processing from rcutree
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 305/332] rcu: Eliminate softirq processing from rcutree
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c4c1c7ad61eb7686c20792cc5b449ef8998b7a80
 
 Running RCU out of softirq is a problem for some workloads that would
 like to manage RCU core processing independently of other softirq work,
@@ -17,11 +17,13 @@ Tested-by: Mike Galbraith <bitbucket at online.de>
 Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/rcu/tree.c        |  110 ++++++++++++++++++++++++++++++---
- kernel/rcu/tree.h        |    5 -
- kernel/rcu/tree_plugin.h |  153 ++++++-----------------------------------------
- 3 files changed, 122 insertions(+), 146 deletions(-)
+ kernel/rcu/tree.c        | 112 ++++++++++++++++++++++++++++++----
+ kernel/rcu/tree.h        |   5 +-
+ kernel/rcu/tree_plugin.h | 153 +++++++----------------------------------------
+ 3 files changed, 123 insertions(+), 147 deletions(-)
 
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
+index 7e423f05056f..dbee19478f09 100644
 --- a/kernel/rcu/tree.c
 +++ b/kernel/rcu/tree.c
 @@ -55,6 +55,11 @@
@@ -36,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include "tree.h"
  #include "rcu.h"
-@@ -3044,18 +3049,17 @@ static void
+@@ -3044,18 +3049,17 @@ __rcu_process_callbacks(struct rcu_state *rsp)
  /*
   * Do RCU core processing for the current CPU.
   */
@@ -57,12 +59,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Schedule RCU callback invocation.  If the specified type of RCU
   * does not support RCU priority boosting, just do a direct call,
-@@ -3067,18 +3071,105 @@ static void invoke_rcu_callbacks(struct
+@@ -3067,18 +3071,105 @@ static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
  {
  	if (unlikely(!READ_ONCE(rcu_scheduler_fully_active)))
  		return;
 -	if (likely(!rsp->boost)) {
 -		rcu_do_batch(rsp, rdp);
+-		return;
+-	}
+-	invoke_rcu_callbacks_kthread();
 +	rcu_do_batch(rsp, rdp);
 +}
 +
@@ -74,18 +79,20 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +	 */
 +	if (t && (status != RCU_KTHREAD_YIELDING || is_idle_task(current)))
 +		wake_up_process(t);
-+}
-+
+ }
+ 
 +/*
 + * Wake up this CPU's rcuc kthread to do RCU core processing.
 + */
-+static void invoke_rcu_core(void)
-+{
+ static void invoke_rcu_core(void)
+ {
+-	if (cpu_online(smp_processor_id()))
+-		raise_softirq(RCU_SOFTIRQ);
 +	unsigned long flags;
 +	struct task_struct *t;
 +
 +	if (!cpu_online(smp_processor_id()))
- 		return;
++		return;
 +	local_irq_save(flags);
 +	__this_cpu_write(rcu_cpu_has_work, 1);
 +	t = __this_cpu_read(rcu_cpu_kthread_task);
@@ -132,16 +139,14 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 +			*statusp = RCU_KTHREAD_WAITING;
 +			return;
 +		}
- 	}
--	invoke_rcu_callbacks_kthread();
++	}
 +	*statusp = RCU_KTHREAD_YIELDING;
 +	trace_rcu_utilization(TPS("Start CPU kthread at rcu_yield"));
 +	schedule_timeout_interruptible(2);
 +	trace_rcu_utilization(TPS("End CPU kthread at rcu_yield"));
 +	*statusp = RCU_KTHREAD_WAITING;
- }
- 
--static void invoke_rcu_core(void)
++}
++
 +static struct smp_hotplug_thread rcu_cpu_thread_spec = {
 +	.store			= &rcu_cpu_kthread_task,
 +	.thread_should_run	= rcu_cpu_kthread_should_run,
@@ -155,9 +160,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 + * Spawn per-CPU RCU core processing kthreads.
 + */
 +static int __init rcu_spawn_core_kthreads(void)
- {
--	if (cpu_online(smp_processor_id()))
--		raise_softirq(RCU_SOFTIRQ);
++{
 +	int cpu;
 +
 +	for_each_possible_cpu(cpu)
@@ -177,6 +180,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * We don't need protection against CPU-hotplug here because
+diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
+index e8032555649e..958ac107062c 100644
 --- a/kernel/rcu/tree.h
 +++ b/kernel/rcu/tree.h
 @@ -596,12 +596,10 @@ extern struct rcu_state rcu_bh_state;
@@ -192,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #ifndef RCU_TREE_NONCORE
  
-@@ -621,10 +619,9 @@ void call_rcu(struct rcu_head *head, rcu
+@@ -621,10 +619,9 @@ void call_rcu(struct rcu_head *head, rcu_callback_t func);
  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);
@@ -204,6 +209,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static int rcu_spawn_one_boost_kthread(struct rcu_state *rsp,
  						 struct rcu_node *rnp);
  #endif /* #ifdef CONFIG_RCU_BOOST */
+diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
+index a375276227a8..be12d1aac840 100644
 --- a/kernel/rcu/tree_plugin.h
 +++ b/kernel/rcu/tree_plugin.h
 @@ -24,26 +24,10 @@
@@ -248,7 +255,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #ifdef CONFIG_RCU_NOCB_CPU
  static cpumask_var_t rcu_nocb_mask; /* CPUs to have callbacks offloaded. */
  static bool have_rcu_nocb_mask;	    /* Was rcu_nocb_mask allocated? */
-@@ -633,15 +625,6 @@ static void rcu_preempt_check_callbacks(
+@@ -633,15 +625,6 @@ static void rcu_preempt_check_callbacks(void)
  		t->rcu_read_unlock_special.b.need_qs = true;
  }
  
@@ -284,7 +291,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  #ifdef CONFIG_RCU_BOOST
  
  #include "../locking/rtmutex_common.h"
-@@ -861,16 +857,6 @@ static void rcu_initiate_boost_trace(str
+@@ -861,16 +857,6 @@ static void rcu_initiate_boost_trace(struct rcu_node *rnp)
  
  #endif /* #else #ifdef CONFIG_RCU_TRACE */
  
@@ -301,10 +308,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Carry out RCU priority boosting on the task indicated by ->exp_tasks
   * or ->boost_tasks, advancing the pointer to the next task in the
-@@ -1014,23 +1000,6 @@ static void rcu_initiate_boost(struct rc
+@@ -1013,23 +999,6 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
+ 	}
  }
  
- /*
+-/*
 - * Wake up the per-CPU kthread to invoke RCU callbacks.
 - */
 -static void invoke_rcu_callbacks_kthread(void)
@@ -321,11 +329,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 -	local_irq_restore(flags);
 -}
 -
--/*
+ /*
   * Is the current CPU running the RCU-callbacks kthread?
   * Caller must have preemption disabled.
-  */
-@@ -1084,67 +1053,6 @@ static int rcu_spawn_one_boost_kthread(s
+@@ -1084,67 +1053,6 @@ static int rcu_spawn_one_boost_kthread(struct rcu_state *rsp,
  	return 0;
  }
  
@@ -393,7 +400,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  /*
   * Set the per-rcu_node kthread's affinity to cover all CPUs that are
   * served by the rcu_node in question.  The CPU hotplug lock is still
-@@ -1175,26 +1083,12 @@ static void rcu_boost_kthread_setaffinit
+@@ -1175,26 +1083,12 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
  	free_cpumask_var(cm);
  }
  
@@ -420,7 +427,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	rcu_for_each_leaf_node(rcu_state_p, rnp)
  		(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
  }
-@@ -1217,11 +1111,6 @@ static void rcu_initiate_boost(struct rc
+@@ -1217,11 +1111,6 @@ static void rcu_initiate_boost(struct rcu_node *rnp, unsigned long flags)
  	raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
  }
  
diff --git a/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch b/debian/patches/features/all/rt/0306-rcu-make-RCU_BOOST-default-on-RT.patch
similarity index 79%
rename from debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch
rename to debian/patches/features/all/rt/0306-rcu-make-RCU_BOOST-default-on-RT.patch
index cfb094b..747ffee 100644
--- a/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch
+++ b/debian/patches/features/all/rt/0306-rcu-make-RCU_BOOST-default-on-RT.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 21 Mar 2014 20:19:05 +0100
-Subject: rcu: make RCU_BOOST default on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 306/332] rcu: make RCU_BOOST default on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=238a49b3ed2e0426537abf530df86966e4b8589b
 
 Since it is no longer invoked from the softirq people run into OOM more
 often if the priority of the RCU thread is too low. Making boosting
@@ -10,9 +10,11 @@ someone knows better.
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- init/Kconfig |    4 ++--
+ init/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
+diff --git a/init/Kconfig b/init/Kconfig
+index 4811bfaa905c..2ce33a32e65d 100644
 --- a/init/Kconfig
 +++ b/init/Kconfig
 @@ -506,7 +506,7 @@ config TINY_RCU
diff --git a/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch b/debian/patches/features/all/rt/0307-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
similarity index 75%
rename from debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
rename to debian/patches/features/all/rt/0307-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
index 627bbb1..b541e19 100644
--- a/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
+++ b/debian/patches/features/all/rt/0307-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
@@ -1,7 +1,7 @@
 From: Julia Cartwright <julia at ni.com>
 Date: Wed, 12 Oct 2016 11:21:14 -0500
-Subject: [PATCH] rcu: enable rcu_normal_after_boot by default for RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 307/332] rcu: enable rcu_normal_after_boot by default for RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1bc4742f74045cf0be2add39fbe27d570c21ef54
 
 The forcing of an expedited grace period is an expensive and very
 RT-application unfriendly operation, as it forcibly preempts all running
@@ -14,9 +14,11 @@ Suggested-by: Luiz Capitulino <lcapitulino at redhat.com>
 Signed-off-by: Julia Cartwright <julia at ni.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/rcu/update.c |    2 +-
+ kernel/rcu/update.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
+index 949714f485ee..ee02e1e1b3e5 100644
 --- a/kernel/rcu/update.c
 +++ b/kernel/rcu/update.c
 @@ -62,7 +62,7 @@
diff --git a/debian/patches/features/all/rt/preempt-lazy-support.patch b/debian/patches/features/all/rt/0308-sched-Add-support-for-lazy-preemption.patch
similarity index 79%
rename from debian/patches/features/all/rt/preempt-lazy-support.patch
rename to debian/patches/features/all/rt/0308-sched-Add-support-for-lazy-preemption.patch
index ef8ca2c..9f3a3ed 100644
--- a/debian/patches/features/all/rt/preempt-lazy-support.patch
+++ b/debian/patches/features/all/rt/0308-sched-Add-support-for-lazy-preemption.patch
@@ -1,7 +1,7 @@
-Subject: sched: Add support for lazy preemption
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Fri, 26 Oct 2012 18:50:54 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 308/332] sched: Add support for lazy preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=1fd34015331a60b14b265badbe91ac160a1299b5
 
 It has become an obsession to mitigate the determinism vs. throughput
 loss of RT. Looking at the mainline semantics of preemption points
@@ -53,20 +53,22 @@ performance.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- include/linux/preempt.h      |   29 ++++++++++++++++-
- include/linux/sched.h        |   37 ++++++++++++++++++++++
- include/linux/thread_info.h  |   12 ++++++-
- include/linux/trace_events.h |    1 
- kernel/Kconfig.preempt       |    6 +++
- kernel/sched/core.c          |   72 +++++++++++++++++++++++++++++++++++++++++--
- kernel/sched/fair.c          |   16 ++++-----
- kernel/sched/features.h      |    3 +
- kernel/sched/sched.h         |    9 +++++
- kernel/trace/trace.c         |   37 +++++++++++++---------
- kernel/trace/trace.h         |    2 +
- kernel/trace/trace_output.c  |   14 +++++++-
+ include/linux/preempt.h      | 29 +++++++++++++++++-
+ include/linux/sched.h        | 37 +++++++++++++++++++++++
+ include/linux/thread_info.h  | 12 +++++++-
+ include/linux/trace_events.h |  1 +
+ kernel/Kconfig.preempt       |  6 ++++
+ kernel/sched/core.c          | 72 ++++++++++++++++++++++++++++++++++++++++++--
+ kernel/sched/fair.c          | 16 +++++-----
+ kernel/sched/features.h      |  3 ++
+ kernel/sched/sched.h         |  9 ++++++
+ kernel/trace/trace.c         | 37 ++++++++++++++---------
+ kernel/trace/trace.h         |  2 ++
+ kernel/trace/trace_output.c  | 14 +++++++--
  12 files changed, 209 insertions(+), 29 deletions(-)
 
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 5f733773f54e..1cfb1cb72354 100644
 --- a/include/linux/preempt.h
 +++ b/include/linux/preempt.h
 @@ -153,6 +153,20 @@ extern void preempt_count_sub(int val);
@@ -126,9 +128,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		set_preempt_need_resched(); \
  } while (0)
  
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 9bb98e2bc6d0..9ff3bc25e63f 100644
 --- a/include/linux/sched.h
 +++ b/include/linux/sched.h
-@@ -3349,6 +3349,43 @@ static inline int test_tsk_need_resched(
+@@ -3375,6 +3375,43 @@ static inline int test_tsk_need_resched(struct task_struct *tsk)
  	return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED));
  }
  
@@ -172,9 +176,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  static inline int restart_syscall(void)
  {
  	set_tsk_thread_flag(current, TIF_SIGPENDING);
+diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
+index 2873baf5372a..eb1a108f17ca 100644
 --- a/include/linux/thread_info.h
 +++ b/include/linux/thread_info.h
-@@ -107,7 +107,17 @@ static inline int test_ti_thread_flag(st
+@@ -107,7 +107,17 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
  #define test_thread_flag(flag) \
  	test_ti_thread_flag(current_thread_info(), flag)
  
@@ -193,6 +199,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES
  static inline int arch_within_stack_frames(const void * const stack,
+diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
+index 28aa5381878e..15154b13a53b 100644
 --- a/include/linux/trace_events.h
 +++ b/include/linux/trace_events.h
 @@ -58,6 +58,7 @@ struct trace_entry {
@@ -203,6 +211,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  };
  
  #define TRACE_EVENT_TYPE_MAX						\
+diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
+index f8a2982bdbde..11dbe26a8279 100644
 --- a/kernel/Kconfig.preempt
 +++ b/kernel/Kconfig.preempt
 @@ -6,6 +6,12 @@ config PREEMPT_RT_BASE
@@ -218,9 +228,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  choice
  	prompt "Preemption Model"
  	default PREEMPT_NONE
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 08c9047375e1..053876b85076 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -510,6 +510,38 @@ void resched_curr(struct rq *rq)
+@@ -522,6 +522,38 @@ void resched_curr(struct rq *rq)
  		trace_sched_wake_idle_without_ipi(cpu);
  }
  
@@ -259,7 +271,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  void resched_cpu(int cpu)
  {
  	struct rq *rq = cpu_rq(cpu);
-@@ -2531,6 +2563,9 @@ int sched_fork(unsigned long clone_flags
+@@ -2543,6 +2575,9 @@ int sched_fork(unsigned long clone_flags, struct task_struct *p)
  	p->on_cpu = 0;
  #endif
  	init_task_preempt_count(p);
@@ -269,7 +281,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_SMP
  	plist_node_init(&p->pushable_tasks, MAX_PRIO);
  	RB_CLEAR_NODE(&p->pushable_dl_tasks);
-@@ -3362,6 +3397,7 @@ void migrate_disable(void)
+@@ -3374,6 +3409,7 @@ void migrate_disable(void)
  	}
  
  	preempt_disable();
@@ -277,7 +289,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	pin_current_cpu();
  	p->migrate_disable = 1;
  	preempt_enable();
-@@ -3401,6 +3437,7 @@ void migrate_enable(void)
+@@ -3413,6 +3449,7 @@ void migrate_enable(void)
  
  	unpin_current_cpu();
  	preempt_enable();
@@ -285,7 +297,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  EXPORT_SYMBOL(migrate_enable);
  #endif
-@@ -3530,6 +3567,7 @@ static void __sched notrace __schedule(b
+@@ -3542,6 +3579,7 @@ static void __sched notrace __schedule(bool preempt)
  
  	next = pick_next_task(rq, prev, cookie);
  	clear_tsk_need_resched(prev);
@@ -293,7 +305,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	clear_preempt_need_resched();
  	rq->clock_skip_update = 0;
  
-@@ -3675,6 +3713,30 @@ static void __sched notrace preempt_sche
+@@ -3687,6 +3725,30 @@ static void __sched notrace preempt_schedule_common(void)
  	} while (need_resched());
  }
  
@@ -324,7 +336,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_PREEMPT
  /*
   * this is the entry point to schedule() from in-kernel preemption
-@@ -3689,7 +3751,8 @@ asmlinkage __visible void __sched notrac
+@@ -3701,7 +3763,8 @@ asmlinkage __visible void __sched notrace preempt_schedule(void)
  	 */
  	if (likely(!preemptible()))
  		return;
@@ -334,7 +346,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	preempt_schedule_common();
  }
  NOKPROBE_SYMBOL(preempt_schedule);
-@@ -3716,6 +3779,9 @@ asmlinkage __visible void __sched notrac
+@@ -3728,6 +3791,9 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
  	if (likely(!preemptible()))
  		return;
  
@@ -344,7 +356,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	do {
  		/*
  		 * Because the function tracer can trace preempt_count_sub()
-@@ -5523,7 +5589,9 @@ void init_idle(struct task_struct *idle,
+@@ -5535,7 +5601,9 @@ void init_idle(struct task_struct *idle, int cpu)
  
  	/* Set the preempt count _outside_ the spinlocks! */
  	init_idle_preempt_count(idle, cpu);
@@ -355,9 +367,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * The idle tasks have their own, simple scheduling class:
  	 */
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
+index 7a68c631d5b5..f9189909640b 100644
 --- a/kernel/sched/fair.c
 +++ b/kernel/sched/fair.c
-@@ -3518,7 +3518,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
+@@ -3518,7 +3518,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
  	ideal_runtime = sched_slice(cfs_rq, curr);
  	delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime;
  	if (delta_exec > ideal_runtime) {
@@ -366,7 +380,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		/*
  		 * The current task ran long enough, ensure it doesn't get
  		 * re-elected due to buddy favours.
-@@ -3542,7 +3542,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq
+@@ -3542,7 +3542,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
  		return;
  
  	if (delta > ideal_runtime)
@@ -375,7 +389,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void
-@@ -3684,7 +3684,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc
+@@ -3684,7 +3684,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued)
  	 * validating it and just reschedule.
  	 */
  	if (queued) {
@@ -384,7 +398,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  		return;
  	}
  	/*
-@@ -3866,7 +3866,7 @@ static void __account_cfs_rq_runtime(str
+@@ -3866,7 +3866,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec)
  	 * hierarchy can be throttled
  	 */
  	if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr))
@@ -393,7 +407,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static __always_inline
-@@ -4494,7 +4494,7 @@ static void hrtick_start_fair(struct rq
+@@ -4494,7 +4494,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
  
  		if (delta < 0) {
  			if (rq->curr == p)
@@ -402,7 +416,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			return;
  		}
  		hrtick_start(rq, delta);
-@@ -5905,7 +5905,7 @@ static void check_preempt_wakeup(struct
+@@ -5862,7 +5862,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
  	return;
  
  preempt:
@@ -411,7 +425,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	/*
  	 * Only set the backward buddy when the current task is still
  	 * on the rq. This can happen when a wakeup gets interleaved
-@@ -8631,7 +8631,7 @@ static void task_fork_fair(struct task_s
+@@ -8588,7 +8588,7 @@ static void task_fork_fair(struct task_struct *p)
  		 * 'current' within the tree based on its new key value.
  		 */
  		swap(curr->vruntime, se->vruntime);
@@ -420,7 +434,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  
  	se->vruntime -= cfs_rq->min_vruntime;
-@@ -8655,7 +8655,7 @@ prio_changed_fair(struct rq *rq, struct
+@@ -8612,7 +8612,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio)
  	 */
  	if (rq->curr == p) {
  		if (p->prio > oldprio)
@@ -429,6 +443,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	} else
  		check_preempt_curr(rq, p, 0);
  }
+diff --git a/kernel/sched/features.h b/kernel/sched/features.h
+index 11258a0feae7..6d28fcd08872 100644
 --- a/kernel/sched/features.h
 +++ b/kernel/sched/features.h
 @@ -47,6 +47,9 @@ SCHED_FEAT(NONTASK_CAPACITY, true)
@@ -441,9 +457,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #else
  
  /*
+diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
+index 662a9e43031c..16df04073b57 100644
 --- a/kernel/sched/sched.h
 +++ b/kernel/sched/sched.h
-@@ -1347,6 +1347,15 @@ extern void init_sched_fair_class(void);
+@@ -1336,6 +1336,15 @@ extern void init_sched_fair_class(void);
  extern void resched_curr(struct rq *rq);
  extern void resched_cpu(int cpu);
  
@@ -459,9 +477,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  extern struct rt_bandwidth def_rt_bandwidth;
  extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime);
  
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index b2711ef6ed8e..a6d7b662f67d 100644
 --- a/kernel/trace/trace.c
 +++ b/kernel/trace/trace.c
-@@ -1897,6 +1897,7 @@ tracing_generic_entry_update(struct trac
+@@ -1897,6 +1897,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
  	struct task_struct *tsk = current;
  
  	entry->preempt_count		= pc & 0xff;
@@ -469,17 +489,17 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	entry->pid			= (tsk) ? tsk->pid : 0;
  	entry->flags =
  #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-@@ -1907,7 +1908,8 @@ tracing_generic_entry_update(struct trac
+@@ -1907,7 +1908,8 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
  		((pc & NMI_MASK    ) ? TRACE_FLAG_NMI     : 0) |
  		((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) |
- 		((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
+ 		((pc & SOFTIRQ_OFFSET) ? TRACE_FLAG_SOFTIRQ : 0) |
 -		(tif_need_resched() ? TRACE_FLAG_NEED_RESCHED : 0) |
 +		(tif_need_resched_now() ? TRACE_FLAG_NEED_RESCHED : 0) |
 +		(need_resched_lazy() ? TRACE_FLAG_NEED_RESCHED_LAZY : 0) |
  		(test_preempt_need_resched() ? TRACE_FLAG_PREEMPT_RESCHED : 0);
  
  	entry->migrate_disable = (tsk) ? __migrate_disabled(tsk) & 0xFF : 0;
-@@ -2894,15 +2896,17 @@ get_total_entries(struct trace_buffer *b
+@@ -2894,15 +2896,17 @@ get_total_entries(struct trace_buffer *buf,
  
  static void print_lat_help_header(struct seq_file *m)
  {
@@ -506,7 +526,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  static void print_event_info(struct trace_buffer *buf, struct seq_file *m)
-@@ -2928,11 +2932,14 @@ static void print_func_help_header_irq(s
+@@ -2928,11 +2932,14 @@ static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file
  	print_event_info(buf, m);
  	seq_puts(m, "#                              _-----=> irqs-off\n"
  		    "#                             / _----=> need-resched\n"
@@ -526,6 +546,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  void
+diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
+index b0d8576c27ae..702b9376b278 100644
 --- a/kernel/trace/trace.h
 +++ b/kernel/trace/trace.h
 @@ -124,6 +124,7 @@ struct kretprobe_trace_entry_head {
@@ -544,9 +566,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  };
  
  #define TRACE_BUF_SIZE		1024
+diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
+index badf130635f1..65a6dde71a7d 100644
 --- a/kernel/trace/trace_output.c
 +++ b/kernel/trace/trace_output.c
-@@ -386,6 +386,7 @@ int trace_print_lat_fmt(struct trace_seq
+@@ -386,6 +386,7 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
  {
  	char hardsoft_irq;
  	char need_resched;
@@ -554,7 +578,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	char irqs_off;
  	int hardirq;
  	int softirq;
-@@ -416,6 +417,9 @@ int trace_print_lat_fmt(struct trace_seq
+@@ -416,6 +417,9 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
  		break;
  	}
  
@@ -564,7 +588,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	hardsoft_irq =
  		(nmi && hardirq)     ? 'Z' :
  		nmi                  ? 'z' :
-@@ -424,14 +428,20 @@ int trace_print_lat_fmt(struct trace_seq
+@@ -424,14 +428,20 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry)
  		softirq              ? 's' :
  		                       '.' ;
  
diff --git a/debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch b/debian/patches/features/all/rt/0309-ftrace-Fix-trace-header-alignment.patch
similarity index 88%
rename from debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch
rename to debian/patches/features/all/rt/0309-ftrace-Fix-trace-header-alignment.patch
index 70f93dc..6ca98b5 100644
--- a/debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch
+++ b/debian/patches/features/all/rt/0309-ftrace-Fix-trace-header-alignment.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sun, 16 Oct 2016 05:08:30 +0200
-Subject: [PATCH] ftrace: Fix trace header alignment
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 309/332] ftrace: Fix trace header alignment
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b1a47da584cf53963834ac07a6cf73c6e53497aa
 
 Line up helper arrows to the right column.
 
@@ -10,12 +10,14 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 [bigeasy: fixup function tracer header]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/trace/trace.c |   32 ++++++++++++++++----------------
+ kernel/trace/trace.c | 32 ++++++++++++++++----------------
  1 file changed, 16 insertions(+), 16 deletions(-)
 
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
+index a6d7b662f67d..efaba0dac5da 100644
 --- a/kernel/trace/trace.c
 +++ b/kernel/trace/trace.c
-@@ -2896,17 +2896,17 @@ get_total_entries(struct trace_buffer *b
+@@ -2896,17 +2896,17 @@ get_total_entries(struct trace_buffer *buf,
  
  static void print_lat_help_header(struct seq_file *m)
  {
@@ -44,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void print_event_info(struct trace_buffer *buf, struct seq_file *m)
-@@ -2935,11 +2935,11 @@ static void print_func_help_header_irq(s
+@@ -2935,11 +2935,11 @@ static void print_func_help_header_irq(struct trace_buffer *buf, struct seq_file
  		    "#                            |/  _-----=> need-resched_lazy\n"
  		    "#                            || / _---=> hardirq/softirq\n"
  		    "#                            ||| / _--=> preempt-depth\n"
diff --git a/debian/patches/features/all/rt/x86-preempt-lazy.patch b/debian/patches/features/all/rt/0310-x86-Support-for-lazy-preemption.patch
similarity index 78%
rename from debian/patches/features/all/rt/x86-preempt-lazy.patch
rename to debian/patches/features/all/rt/0310-x86-Support-for-lazy-preemption.patch
index 96e5aa5..bf958f0 100644
--- a/debian/patches/features/all/rt/x86-preempt-lazy.patch
+++ b/debian/patches/features/all/rt/0310-x86-Support-for-lazy-preemption.patch
@@ -1,21 +1,23 @@
-Subject: x86: Support for lazy preemption
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Thu, 01 Nov 2012 11:03:47 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Thu, 1 Nov 2012 11:03:47 +0100
+Subject: [PATCH 310/332] x86: Support for lazy preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=59d4e7cec3064d97cdc11074516abca0ac9491b6
 
 Implement the x86 pieces for lazy preempt.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/x86/Kconfig                   |    1 +
- arch/x86/entry/common.c            |    4 ++--
- arch/x86/entry/entry_32.S          |   17 +++++++++++++++++
- arch/x86/entry/entry_64.S          |   16 ++++++++++++++++
- arch/x86/include/asm/preempt.h     |   31 ++++++++++++++++++++++++++++++-
- arch/x86/include/asm/thread_info.h |   11 +++++++++++
- arch/x86/kernel/asm-offsets.c      |    2 ++
+ arch/x86/Kconfig                   |  1 +
+ arch/x86/entry/common.c            |  4 ++--
+ arch/x86/entry/entry_32.S          | 17 +++++++++++++++++
+ arch/x86/entry/entry_64.S          | 16 ++++++++++++++++
+ arch/x86/include/asm/preempt.h     | 31 ++++++++++++++++++++++++++++++-
+ arch/x86/include/asm/thread_info.h | 11 +++++++++++
+ arch/x86/kernel/asm-offsets.c      |  2 ++
  7 files changed, 79 insertions(+), 3 deletions(-)
 
+diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
+index 14c824810efd..f8a995c90c01 100644
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
 @@ -17,6 +17,7 @@ config X86_64
@@ -26,9 +28,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	select ACPI_LEGACY_TABLES_LOOKUP	if ACPI
  	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
  	select ANON_INODES
+diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
+index 90c7c6aa1ed3..56d01a339ba4 100644
 --- a/arch/x86/entry/common.c
 +++ b/arch/x86/entry/common.c
-@@ -129,7 +129,7 @@ static long syscall_trace_enter(struct p
+@@ -129,7 +129,7 @@ static long syscall_trace_enter(struct pt_regs *regs)
  
  #define EXIT_TO_USERMODE_LOOP_FLAGS				\
  	(_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_UPROBE |	\
@@ -37,7 +41,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
  {
-@@ -145,7 +145,7 @@ static void exit_to_usermode_loop(struct
+@@ -145,7 +145,7 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
  		/* We have work to do. */
  		local_irq_enable();
  
@@ -46,6 +50,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  			schedule();
  
  #ifdef ARCH_RT_DELAYS_SIGNAL_SEND
+diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
+index edba8606b99a..4a3389535fc6 100644
 --- a/arch/x86/entry/entry_32.S
 +++ b/arch/x86/entry/entry_32.S
 @@ -308,8 +308,25 @@ END(ret_from_exception)
@@ -74,6 +80,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	testl	$X86_EFLAGS_IF, PT_EFLAGS(%esp)	# interrupts off (exception path) ?
  	jz	restore_all
  	call	preempt_schedule_irq
+diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
+index 38dedcf62e01..65916d49dbc9 100644
 --- a/arch/x86/entry/entry_64.S
 +++ b/arch/x86/entry/entry_64.S
 @@ -546,7 +546,23 @@ GLOBAL(retint_user)
@@ -100,9 +108,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	call	preempt_schedule_irq
  	jmp	0b
  1:
+diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
+index 17f218645701..11bd1b7ee6eb 100644
 --- a/arch/x86/include/asm/preempt.h
 +++ b/arch/x86/include/asm/preempt.h
-@@ -79,17 +79,46 @@ static __always_inline void __preempt_co
+@@ -79,17 +79,46 @@ static __always_inline void __preempt_count_sub(int val)
   * a decrement which hits zero means we have no preempt_count and should
   * reschedule.
   */
@@ -150,6 +160,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  }
  
  #ifdef CONFIG_PREEMPT
+diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
+index ad6f5eb07a95..5ceb3a1c2b1a 100644
 --- a/arch/x86/include/asm/thread_info.h
 +++ b/arch/x86/include/asm/thread_info.h
 @@ -54,11 +54,14 @@ struct task_struct;
@@ -203,6 +215,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define STACK_WARN		(THREAD_SIZE/8)
  
  /*
+diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
+index c62e015b126c..0cc71257fca6 100644
 --- a/arch/x86/kernel/asm-offsets.c
 +++ b/arch/x86/kernel/asm-offsets.c
 @@ -36,6 +36,7 @@ void common(void) {
diff --git a/debian/patches/features/all/rt/arm-preempt-lazy-support.patch b/debian/patches/features/all/rt/0311-arm-Add-support-for-lazy-preemption.patch
similarity index 76%
rename from debian/patches/features/all/rt/arm-preempt-lazy-support.patch
rename to debian/patches/features/all/rt/0311-arm-Add-support-for-lazy-preemption.patch
index ed8ea0b..865f567 100644
--- a/debian/patches/features/all/rt/arm-preempt-lazy-support.patch
+++ b/debian/patches/features/all/rt/0311-arm-Add-support-for-lazy-preemption.patch
@@ -1,20 +1,22 @@
-Subject: arm: Add support for lazy preemption
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Wed, 31 Oct 2012 12:04:11 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 311/332] arm: Add support for lazy preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=08d22e203a57436afcdc9b437cea15118fab1f42
 
 Implement the arm pieces for lazy preempt.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/arm/Kconfig                   |    1 +
- arch/arm/include/asm/thread_info.h |    8 ++++++--
- arch/arm/kernel/asm-offsets.c      |    1 +
- arch/arm/kernel/entry-armv.S       |   19 ++++++++++++++++---
- arch/arm/kernel/entry-common.S     |    9 +++++++--
- arch/arm/kernel/signal.c           |    3 ++-
+ arch/arm/Kconfig                   |  1 +
+ arch/arm/include/asm/thread_info.h |  8 ++++++--
+ arch/arm/kernel/asm-offsets.c      |  1 +
+ arch/arm/kernel/entry-armv.S       | 19 ++++++++++++++++---
+ arch/arm/kernel/entry-common.S     |  9 +++++++--
+ arch/arm/kernel/signal.c           |  3 ++-
  6 files changed, 33 insertions(+), 8 deletions(-)
 
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 1703d4162857..5715844e83e3 100644
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
 @@ -75,6 +75,7 @@ config ARM
@@ -25,6 +27,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	select HAVE_RCU_TABLE_FREE if (SMP && ARM_LPAE)
  	select HAVE_REGS_AND_STACK_ACCESS_API
  	select HAVE_SYSCALL_TRACEPOINTS
+diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h
+index 776757d1604a..1f36a4eccc72 100644
 --- a/arch/arm/include/asm/thread_info.h
 +++ b/arch/arm/include/asm/thread_info.h
 @@ -49,6 +49,7 @@ struct cpu_context_save {
@@ -35,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	mm_segment_t		addr_limit;	/* address limit */
  	struct task_struct	*task;		/* main task structure */
  	__u32			cpu;		/* cpu */
-@@ -142,7 +143,8 @@ extern int vfp_restore_user_hwstate(stru
+@@ -142,7 +143,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
  #define TIF_SYSCALL_TRACE	4	/* syscall trace active */
  #define TIF_SYSCALL_AUDIT	5	/* syscall auditing active */
  #define TIF_SYSCALL_TRACEPOINT	6	/* syscall tracepoint instrumentation */
@@ -45,7 +49,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #define TIF_NOHZ		12	/* in adaptive nohz mode */
  #define TIF_USING_IWMMXT	17
-@@ -152,6 +154,7 @@ extern int vfp_restore_user_hwstate(stru
+@@ -152,6 +154,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
  #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
  #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
  #define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
@@ -53,7 +57,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define _TIF_UPROBE		(1 << TIF_UPROBE)
  #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
-@@ -167,7 +170,8 @@ extern int vfp_restore_user_hwstate(stru
+@@ -167,7 +170,8 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
   * Change these and you break ASM code in entry-common.S
   */
  #define _TIF_WORK_MASK		(_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
@@ -63,6 +67,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  #endif /* __KERNEL__ */
  #endif /* __ASM_ARM_THREAD_INFO_H */
+diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
+index 608008229c7d..3866da3f7bb7 100644
 --- a/arch/arm/kernel/asm-offsets.c
 +++ b/arch/arm/kernel/asm-offsets.c
 @@ -65,6 +65,7 @@ int main(void)
@@ -73,6 +79,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
    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 --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
+index 9f157e7c51e7..468e224d76aa 100644
 --- a/arch/arm/kernel/entry-armv.S
 +++ b/arch/arm/kernel/entry-armv.S
 @@ -220,11 +220,18 @@ ENDPROC(__dabt_svc)
@@ -112,6 +120,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #endif
  
  __und_fault:
+diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
+index 10c3283d6c19..8872937862cc 100644
 --- a/arch/arm/kernel/entry-common.S
 +++ b/arch/arm/kernel/entry-common.S
 @@ -36,7 +36,9 @@
@@ -138,9 +148,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
   UNWIND(.fnend		)
  ENDPROC(ret_fast_syscall)
  
+diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
+index 7b8f2141427b..96541e00b74a 100644
 --- a/arch/arm/kernel/signal.c
 +++ b/arch/arm/kernel/signal.c
-@@ -572,7 +572,8 @@ do_work_pending(struct pt_regs *regs, un
+@@ -572,7 +572,8 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
  	 */
  	trace_hardirqs_off();
  	do {
diff --git a/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch b/debian/patches/features/all/rt/0312-powerpc-Add-support-for-lazy-preemption.patch
similarity index 75%
rename from debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch
rename to debian/patches/features/all/rt/0312-powerpc-Add-support-for-lazy-preemption.patch
index df5966b..fb074c8 100644
--- a/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch
+++ b/debian/patches/features/all/rt/0312-powerpc-Add-support-for-lazy-preemption.patch
@@ -1,19 +1,21 @@
 From: Thomas Gleixner <tglx at linutronix.de>
 Date: Thu, 1 Nov 2012 10:14:11 +0100
-Subject: powerpc: Add support for lazy preemption
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 312/332] powerpc: Add support for lazy preemption
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=bf63e400fedaae6bf4334b2c510155b75f9fb63c
 
 Implement the powerpc pieces for lazy preempt.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- arch/powerpc/Kconfig                   |    1 +
- arch/powerpc/include/asm/thread_info.h |   11 ++++++++---
- arch/powerpc/kernel/asm-offsets.c      |    1 +
- arch/powerpc/kernel/entry_32.S         |   17 ++++++++++++-----
- arch/powerpc/kernel/entry_64.S         |   14 +++++++++++---
+ arch/powerpc/Kconfig                   |  1 +
+ arch/powerpc/include/asm/thread_info.h | 11 ++++++++---
+ arch/powerpc/kernel/asm-offsets.c      |  1 +
+ arch/powerpc/kernel/entry_32.S         | 17 ++++++++++++-----
+ arch/powerpc/kernel/entry_64.S         | 14 +++++++++++---
  5 files changed, 33 insertions(+), 11 deletions(-)
 
+diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
+index 7b9f0a58ffb6..619485b777d2 100644
 --- a/arch/powerpc/Kconfig
 +++ b/arch/powerpc/Kconfig
 @@ -135,6 +135,7 @@ config PPC
@@ -24,6 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	select HAVE_MOD_ARCH_SPECIFIC
  	select MODULES_USE_ELF_RELA
  	select CLONE_BACKWARDS
+diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
+index 87e4b2d8dcd4..981e501a4359 100644
 --- a/arch/powerpc/include/asm/thread_info.h
 +++ b/arch/powerpc/include/asm/thread_info.h
 @@ -43,6 +43,8 @@ struct thread_info {
@@ -35,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	unsigned long	local_flags;		/* private flags for thread */
  #ifdef CONFIG_LIVEPATCH
  	unsigned long *livepatch_sp;
-@@ -88,8 +90,7 @@ static inline struct thread_info *curren
+@@ -88,8 +90,7 @@ static inline struct thread_info *current_thread_info(void)
  #define TIF_SYSCALL_TRACE	0	/* syscall trace active */
  #define TIF_SIGPENDING		1	/* signal pending */
  #define TIF_NEED_RESCHED	2	/* rescheduling necessary */
@@ -45,7 +49,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #define TIF_32BIT		4	/* 32 bit binary */
  #define TIF_RESTORE_TM		5	/* need to restore TM FP/VEC/VSX */
  #define TIF_SYSCALL_AUDIT	7	/* syscall auditing active */
-@@ -107,6 +108,8 @@ static inline struct thread_info *curren
+@@ -107,6 +108,8 @@ static inline struct thread_info *current_thread_info(void)
  #if defined(CONFIG_PPC64)
  #define TIF_ELF2ABI		18	/* function descriptors must die! */
  #endif
@@ -54,7 +58,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /* as above, but as bit values */
  #define _TIF_SYSCALL_TRACE	(1<<TIF_SYSCALL_TRACE)
-@@ -125,14 +128,16 @@ static inline struct thread_info *curren
+@@ -125,14 +128,16 @@ static inline struct thread_info *current_thread_info(void)
  #define _TIF_SYSCALL_TRACEPOINT	(1<<TIF_SYSCALL_TRACEPOINT)
  #define _TIF_EMULATE_STACK_STORE	(1<<TIF_EMULATE_STACK_STORE)
  #define _TIF_NOHZ		(1<<TIF_NOHZ)
@@ -72,6 +76,8 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  /* Bits in local_flags */
  /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */
+diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
+index c833d88c423d..96e9fbc3f684 100644
 --- a/arch/powerpc/kernel/asm-offsets.c
 +++ b/arch/powerpc/kernel/asm-offsets.c
 @@ -156,6 +156,7 @@ int main(void)
@@ -82,9 +88,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	DEFINE(TI_TASK, offsetof(struct thread_info, task));
  	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
  
+diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
+index 3841d749a430..6dbaeff192b9 100644
 --- a/arch/powerpc/kernel/entry_32.S
 +++ b/arch/powerpc/kernel/entry_32.S
-@@ -835,7 +835,14 @@ user_exc_return:		/* r10 contains MSR_KE
+@@ -835,7 +835,14 @@ user_exc_return:		/* r10 contains MSR_KERNEL here */
  	cmpwi	0,r0,0		/* if non-zero, just restore regs and return */
  	bne	restore
  	andi.	r8,r8,_TIF_NEED_RESCHED
@@ -99,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	lwz	r3,_MSR(r1)
  	andi.	r0,r3,MSR_EE	/* interrupts off? */
  	beq	restore		/* don't schedule if so */
-@@ -846,11 +853,11 @@ user_exc_return:		/* r10 contains MSR_KE
+@@ -846,11 +853,11 @@ user_exc_return:		/* r10 contains MSR_KERNEL here */
  	 */
  	bl	trace_hardirqs_off
  #endif
@@ -114,7 +122,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #ifdef CONFIG_TRACE_IRQFLAGS
  	/* And now, to properly rebalance the above, we tell lockdep they
  	 * are being turned back on, which will happen when we return
-@@ -1171,7 +1178,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE
+@@ -1171,7 +1178,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
  #endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
  
  do_work:			/* r10 contains MSR_KERNEL here */
@@ -123,7 +131,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	beq	do_user_signal
  
  do_resched:			/* r10 contains MSR_KERNEL here */
-@@ -1192,7 +1199,7 @@ do_resched:			/* r10 contains MSR_KERNEL
+@@ -1192,7 +1199,7 @@ do_resched:			/* r10 contains MSR_KERNEL here */
  	MTMSRD(r10)		/* disable interrupts */
  	CURRENT_THREAD_INFO(r9, r1)
  	lwz	r9,TI_FLAGS(r9)
@@ -132,9 +140,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	bne-	do_resched
  	andi.	r0,r9,_TIF_USER_WORK_MASK
  	beq	restore_user
+diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
+index 767ef6d68c9e..2cb4d5552319 100644
 --- a/arch/powerpc/kernel/entry_64.S
 +++ b/arch/powerpc/kernel/entry_64.S
-@@ -656,7 +656,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEG
+@@ -656,7 +656,7 @@ _GLOBAL(ret_from_except_lite)
  	bl	restore_math
  	b	restore
  #endif
@@ -143,7 +153,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	beq	2f
  	bl	restore_interrupts
  	SCHEDULE_USER
-@@ -718,10 +718,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEG
+@@ -718,10 +718,18 @@ _GLOBAL(ret_from_except_lite)
  
  #ifdef CONFIG_PREEMPT
  	/* Check if we need to preempt */
@@ -163,7 +173,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	cmpwi	cr1,r8,0
  	ld	r0,SOFTE(r1)
  	cmpdi	r0,0
-@@ -738,7 +746,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEG
+@@ -738,7 +746,7 @@ _GLOBAL(ret_from_except_lite)
  	/* Re-test flags and eventually loop */
  	CURRENT_THREAD_INFO(r9, r1)
  	ld	r4,TI_FLAGS(r9)
diff --git a/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch b/debian/patches/features/all/rt/0313-arch-arm64-Add-lazy-preempt-support.patch
similarity index 74%
rename from debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch
rename to debian/patches/features/all/rt/0313-arch-arm64-Add-lazy-preempt-support.patch
index 65b6899..75e71e6 100644
--- a/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch
+++ b/debian/patches/features/all/rt/0313-arch-arm64-Add-lazy-preempt-support.patch
@@ -1,7 +1,7 @@
 From: Anders Roxell <anders.roxell at linaro.org>
 Date: Thu, 14 May 2015 17:52:17 +0200
-Subject: arch/arm64: Add lazy preempt support
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 313/332] arch/arm64: Add lazy preempt support
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f80ebf3d6d6d7558678ecf1dc35d6e57618579f7
 
 arm64 is missing support for PREEMPT_RT. The main feature which is
 lacking is support for lazy preemption. The arch-specific entry code,
@@ -12,13 +12,15 @@ indicate that support for full RT preemption is now available.
 
 Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
 ---
- arch/arm64/Kconfig                   |    1 +
- arch/arm64/include/asm/thread_info.h |    7 ++++++-
- arch/arm64/kernel/asm-offsets.c      |    1 +
- arch/arm64/kernel/entry.S            |   12 +++++++++---
- arch/arm64/kernel/signal.c           |    2 +-
+ arch/arm64/Kconfig                   |  1 +
+ arch/arm64/include/asm/thread_info.h |  7 ++++++-
+ arch/arm64/kernel/asm-offsets.c      |  1 +
+ arch/arm64/kernel/entry.S            | 12 +++++++++---
+ arch/arm64/kernel/signal.c           |  2 +-
  5 files changed, 18 insertions(+), 5 deletions(-)
 
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index 9984f654c000..78d1b49fbed5 100644
 --- a/arch/arm64/Kconfig
 +++ b/arch/arm64/Kconfig
 @@ -91,6 +91,7 @@ config ARM64
@@ -29,6 +31,8 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  	select HAVE_REGS_AND_STACK_ACCESS_API
  	select HAVE_RCU_TABLE_FREE
  	select HAVE_SYSCALL_TRACEPOINTS
+diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
+index e9ea5a6bd449..6c500ad63c6a 100644
 --- a/arch/arm64/include/asm/thread_info.h
 +++ b/arch/arm64/include/asm/thread_info.h
 @@ -49,6 +49,7 @@ struct thread_info {
@@ -39,7 +43,7 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  	int			cpu;		/* cpu */
  };
  
-@@ -112,6 +113,7 @@ static inline struct thread_info *curren
+@@ -112,6 +113,7 @@ static inline struct thread_info *current_thread_info(void)
  #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 */
@@ -47,7 +51,7 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  #define TIF_NOHZ		7
  #define TIF_SYSCALL_TRACE	8
  #define TIF_SYSCALL_AUDIT	9
-@@ -127,6 +129,7 @@ static inline struct thread_info *curren
+@@ -127,6 +129,7 @@ static inline struct thread_info *current_thread_info(void)
  #define _TIF_NEED_RESCHED	(1 << TIF_NEED_RESCHED)
  #define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
  #define _TIF_FOREIGN_FPSTATE	(1 << TIF_FOREIGN_FPSTATE)
@@ -55,7 +59,7 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  #define _TIF_NOHZ		(1 << TIF_NOHZ)
  #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
  #define _TIF_SYSCALL_AUDIT	(1 << TIF_SYSCALL_AUDIT)
-@@ -135,7 +138,9 @@ static inline struct thread_info *curren
+@@ -135,7 +138,9 @@ static inline struct thread_info *current_thread_info(void)
  #define _TIF_32BIT		(1 << TIF_32BIT)
  
  #define _TIF_WORK_MASK		(_TIF_NEED_RESCHED | _TIF_SIGPENDING | \
@@ -66,6 +70,8 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  
  #define _TIF_SYSCALL_WORK	(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
  				 _TIF_SYSCALL_TRACEPOINT | _TIF_SECCOMP | \
+diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
+index c58ddf8c4062..a8f2f7c1fe12 100644
 --- a/arch/arm64/kernel/asm-offsets.c
 +++ b/arch/arm64/kernel/asm-offsets.c
 @@ -38,6 +38,7 @@ int main(void)
@@ -76,9 +82,11 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
    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 --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
+index b4c7db434654..433d846f4f51 100644
 --- a/arch/arm64/kernel/entry.S
 +++ b/arch/arm64/kernel/entry.S
-@@ -428,11 +428,16 @@ ENDPROC(el1_sync)
+@@ -430,11 +430,16 @@ ENDPROC(el1_sync)
  
  #ifdef CONFIG_PREEMPT
  	ldr	w24, [tsk, #TI_PREEMPT]		// get preempt count
@@ -98,7 +106,7 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  #endif
  #ifdef CONFIG_TRACE_IRQFLAGS
  	bl	trace_hardirqs_on
-@@ -446,6 +451,7 @@ ENDPROC(el1_irq)
+@@ -448,6 +453,7 @@ ENDPROC(el1_irq)
  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?
@@ -106,9 +114,11 @@ Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
  	ret	x24
  #endif
  
+diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
+index 404dd67080b9..639dc6d12e72 100644
 --- a/arch/arm64/kernel/signal.c
 +++ b/arch/arm64/kernel/signal.c
-@@ -409,7 +409,7 @@ asmlinkage void do_notify_resume(struct
+@@ -409,7 +409,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs,
  	 */
  	trace_hardirqs_off();
  	do {
diff --git a/debian/patches/features/all/rt/0314-sched-migrate-disable-handle-updated-task-mask-mg-di.patch b/debian/patches/features/all/rt/0314-sched-migrate-disable-handle-updated-task-mask-mg-di.patch
new file mode 100644
index 0000000..c8e2bb6
--- /dev/null
+++ b/debian/patches/features/all/rt/0314-sched-migrate-disable-handle-updated-task-mask-mg-di.patch
@@ -0,0 +1,125 @@
+From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+Date: Mon, 19 Jun 2017 09:55:47 +0200
+Subject: [PATCH 314/332] sched/migrate disable: handle updated task-mask
+ mg-dis section
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=9b573d7609dbb7cd332735c77896509455a105f0
+
+If task's cpumask changes while in the task is in a migrate_disable()
+section then we don't react on it after a migrate_enable(). It matters
+however if current CPU is no longer part of the cpumask. We also miss
+the ->set_cpus_allowed() callback.
+This patch fixes it by setting task->migrate_disable_update once we this
+"delayed" hook.
+This bug was introduced while fixing unrelated issue in
+migrate_disable() in v4.4-rt3 (update_migrate_disable() got removed
+during that).
+
+Cc: stable-rt at vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
+---
+ include/linux/sched.h |  1 +
+ kernel/sched/core.c   | 59 +++++++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 54 insertions(+), 6 deletions(-)
+
+diff --git a/include/linux/sched.h b/include/linux/sched.h
+index 9ff3bc25e63f..e775696b480a 100644
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -1557,6 +1557,7 @@ struct task_struct {
+ 	unsigned int policy;
+ #ifdef CONFIG_PREEMPT_RT_FULL
+ 	int migrate_disable;
++	int migrate_disable_update;
+ # ifdef CONFIG_SCHED_DEBUG
+ 	int migrate_disable_atomic;
+ # endif
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 053876b85076..2a9a715d38ca 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -1150,18 +1150,14 @@ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_ma
+ 	p->nr_cpus_allowed = cpumask_weight(new_mask);
+ }
+ 
+-void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
++static void __do_set_cpus_allowed_tail(struct task_struct *p,
++				       const struct cpumask *new_mask)
+ {
+ 	struct rq *rq = task_rq(p);
+ 	bool queued, running;
+ 
+ 	lockdep_assert_held(&p->pi_lock);
+ 
+-	if (__migrate_disabled(p)) {
+-		cpumask_copy(&p->cpus_allowed, new_mask);
+-		return;
+-	}
+-
+ 	queued = task_on_rq_queued(p);
+ 	running = task_current(rq, p);
+ 
+@@ -1184,6 +1180,20 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
+ 		set_curr_task(rq, p);
+ }
+ 
++void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
++{
++	if (__migrate_disabled(p)) {
++		lockdep_assert_held(&p->pi_lock);
++
++		cpumask_copy(&p->cpus_allowed, new_mask);
++#if defined(CONFIG_PREEMPT_RT_FULL) && defined(CONFIG_SMP)
++		p->migrate_disable_update = 1;
++#endif
++		return;
++	}
++	__do_set_cpus_allowed_tail(p, new_mask);
++}
++
+ static DEFINE_PER_CPU(struct cpumask, sched_cpumasks);
+ static DEFINE_MUTEX(sched_down_mutex);
+ static cpumask_t sched_down_cpumask;
+@@ -3447,6 +3457,43 @@ void migrate_enable(void)
+ 	 */
+ 	p->migrate_disable = 0;
+ 
++	if (p->migrate_disable_update) {
++		struct rq *rq;
++		struct rq_flags rf;
++
++		rq = task_rq_lock(p, &rf);
++		update_rq_clock(rq);
++
++		__do_set_cpus_allowed_tail(p, &p->cpus_allowed);
++		task_rq_unlock(rq, p, &rf);
++
++		p->migrate_disable_update = 0;
++
++		WARN_ON(smp_processor_id() != task_cpu(p));
++		if (!cpumask_test_cpu(task_cpu(p), &p->cpus_allowed)) {
++			const struct cpumask *cpu_valid_mask = cpu_active_mask;
++			struct migration_arg arg;
++			unsigned int dest_cpu;
++
++			if (p->flags & PF_KTHREAD) {
++				/*
++				 * Kernel threads are allowed on online && !active CPUs
++				 */
++				cpu_valid_mask = cpu_online_mask;
++			}
++			dest_cpu = cpumask_any_and(cpu_valid_mask, &p->cpus_allowed);
++			arg.task = p;
++			arg.dest_cpu = dest_cpu;
++
++			unpin_current_cpu();
++			preempt_lazy_enable();
++			preempt_enable();
++			stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg);
++			tlb_migrate_finish(p->mm);
++			return;
++		}
++	}
++
+ 	unpin_current_cpu();
+ 	preempt_enable();
+ 	preempt_lazy_enable();
diff --git a/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch b/debian/patches/features/all/rt/0315-leds-trigger-disable-CPU-trigger-on-RT.patch
similarity index 82%
rename from debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch
rename to debian/patches/features/all/rt/0315-leds-trigger-disable-CPU-trigger-on-RT.patch
index 6e39e6c..cbf9665 100644
--- a/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch
+++ b/debian/patches/features/all/rt/0315-leds-trigger-disable-CPU-trigger-on-RT.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 23 Jan 2014 14:45:59 +0100
-Subject: leds: trigger: disable CPU trigger on -RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 315/332] leds: trigger: disable CPU trigger on -RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=07cdbd16de8013978d6256e3e327466eed956ea0
 
 as it triggers:
 |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141
@@ -20,9 +20,11 @@ as it triggers:
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/leds/trigger/Kconfig |    2 +-
+ drivers/leds/trigger/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
+index 3f9ddb9fafa7..09da5b6b44a1 100644
 --- a/drivers/leds/trigger/Kconfig
 +++ b/drivers/leds/trigger/Kconfig
 @@ -69,7 +69,7 @@ config LEDS_TRIGGER_BACKLIGHT
diff --git a/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch b/debian/patches/features/all/rt/0316-mmci-Remove-bogus-local_irq_save.patch
similarity index 67%
rename from debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch
rename to debian/patches/features/all/rt/0316-mmci-Remove-bogus-local_irq_save.patch
index d71239d..6879ac3 100644
--- a/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch
+++ b/debian/patches/features/all/rt/0316-mmci-Remove-bogus-local_irq_save.patch
@@ -1,19 +1,21 @@
-Subject: mmci: Remove bogus local_irq_save()
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Wed, 09 Jan 2013 12:11:12 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 9 Jan 2013 12:11:12 +0100
+Subject: [PATCH 316/332] mmci: Remove bogus local_irq_save()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=afccc25a2e764aa793c5e86f3424208f84c95e2e
 
 On !RT interrupt runs with interrupts disabled. On RT it's in a
 thread, so no need to disable interrupts at all.
 
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/mmc/host/mmci.c |    5 -----
+ drivers/mmc/host/mmci.c | 5 -----
  1 file changed, 5 deletions(-)
 
+diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
+index df990bb8c873..1a162709a85e 100644
 --- a/drivers/mmc/host/mmci.c
 +++ b/drivers/mmc/host/mmci.c
-@@ -1147,15 +1147,12 @@ static irqreturn_t mmci_pio_irq(int irq,
+@@ -1147,15 +1147,12 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id)
  	struct sg_mapping_iter *sg_miter = &host->sg_miter;
  	struct variant_data *variant = host->variant;
  	void __iomem *base = host->base;
@@ -29,7 +31,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	do {
  		unsigned int remain, len;
  		char *buffer;
-@@ -1195,8 +1192,6 @@ static irqreturn_t mmci_pio_irq(int irq,
+@@ -1195,8 +1192,6 @@ static irqreturn_t mmci_pio_irq(int irq, void *dev_id)
  
  	sg_miter_stop(sg_miter);
  
diff --git a/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch b/debian/patches/features/all/rt/0317-cpufreq-drop-K8-s-driver-from-beeing-selected.patch
similarity index 76%
rename from debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch
rename to debian/patches/features/all/rt/0317-cpufreq-drop-K8-s-driver-from-beeing-selected.patch
index 8f7ced4..c88bf28 100644
--- a/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch
+++ b/debian/patches/features/all/rt/0317-cpufreq-drop-K8-s-driver-from-beeing-selected.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 9 Apr 2015 15:23:01 +0200
-Subject: cpufreq: drop K8's driver from beeing selected
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 317/332] cpufreq: drop K8's driver from beeing selected
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f94a8c31e077c97d2c994e2d5817f8f70148f6ec
 
 Ralf posted a picture of a backtrace from
 
@@ -17,9 +17,11 @@ I have no machine with this, I simply switch it off.
 Reported-by:  Ralf Mardorf <ralf.mardorf at alice-dsl.net>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/cpufreq/Kconfig.x86 |    2 +-
+ drivers/cpufreq/Kconfig.x86 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
+index adbd1de1cea5..1fac5074f2cf 100644
 --- a/drivers/cpufreq/Kconfig.x86
 +++ b/drivers/cpufreq/Kconfig.x86
 @@ -124,7 +124,7 @@ config X86_POWERNOW_K7_ACPI
diff --git a/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch b/debian/patches/features/all/rt/0318-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
similarity index 81%
rename from debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
rename to debian/patches/features/all/rt/0318-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
index f11c316..e05ff99 100644
--- a/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
+++ b/debian/patches/features/all/rt/0318-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
@@ -1,8 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sun, 16 Oct 2016 05:11:54 +0200
-Subject: [PATCH] connector/cn_proc: Protect send_msg() with a local lock
- on RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 318/332] connector/cn_proc: Protect send_msg() with a local
+ lock on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=b96facd14e2546c5d9512cfa05dfe0df98c34637
 
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931
 |in_atomic(): 1, irqs_disabled(): 0, pid: 31807, name: sleep
@@ -31,9 +31,11 @@ delivery") which is v4.7-rc6.
 Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/connector/cn_proc.c |    6 ++++--
+ drivers/connector/cn_proc.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
+diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
+index a782ce87715c..19d265948526 100644
 --- a/drivers/connector/cn_proc.c
 +++ b/drivers/connector/cn_proc.c
 @@ -32,6 +32,7 @@
@@ -44,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  /*
   * Size of a cn_msg followed by a proc_event structure.  Since the
-@@ -54,10 +55,11 @@ static struct cb_id cn_proc_event_id = {
+@@ -54,10 +55,11 @@ static struct cb_id cn_proc_event_id = { CN_IDX_PROC, CN_VAL_PROC };
  
  /* proc_event_counts is used as the sequence number of the netlink message */
  static DEFINE_PER_CPU(__u32, proc_event_counts) = { 0 };
@@ -57,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	msg->seq = __this_cpu_inc_return(proc_event_counts) - 1;
  	((struct proc_event *)msg->data)->cpu = smp_processor_id();
-@@ -70,7 +72,7 @@ static inline void send_msg(struct cn_ms
+@@ -70,7 +72,7 @@ static inline void send_msg(struct cn_msg *msg)
  	 */
  	cn_netlink_send(msg, 0, CN_IDX_PROC, GFP_NOWAIT);
  
diff --git a/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/debian/patches/features/all/rt/0319-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
similarity index 78%
rename from debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
rename to debian/patches/features/all/rt/0319-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
index f373ca8..9312222 100644
--- a/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
+++ b/debian/patches/features/all/rt/0319-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
@@ -1,8 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Thu, 31 Mar 2016 04:08:28 +0200
-Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex
- for -rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 319/332] drivers/block/zram: Replace bit spinlocks with
+ rtmutex for -rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=84facf9b19fb27c399ea670c5e129812c76dce5b
 
 They're nondeterministic, and lead to ___might_sleep() splats in -rt.
 OTOH, they're a lot less wasteful than an rtmutex per page.
@@ -10,13 +10,15 @@ OTOH, they're a lot less wasteful than an rtmutex per page.
 Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/block/zram/zram_drv.c |   30 ++++++++++++++++--------------
- drivers/block/zram/zram_drv.h |   41 +++++++++++++++++++++++++++++++++++++++++
+ drivers/block/zram/zram_drv.c | 30 ++++++++++++++++--------------
+ drivers/block/zram/zram_drv.h | 41 +++++++++++++++++++++++++++++++++++++++++
  2 files changed, 57 insertions(+), 14 deletions(-)
 
+diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
+index c9914d653968..553954c4ffd0 100644
 --- a/drivers/block/zram/zram_drv.c
 +++ b/drivers/block/zram/zram_drv.c
-@@ -528,6 +528,8 @@ static struct zram_meta *zram_meta_alloc
+@@ -528,6 +528,8 @@ static struct zram_meta *zram_meta_alloc(char *pool_name, u64 disksize)
  		goto out_error;
  	}
  
@@ -25,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return meta;
  
  out_error:
-@@ -576,12 +578,12 @@ static int zram_decompress_page(struct z
+@@ -576,12 +578,12 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
  	unsigned long handle;
  	unsigned int size;
  
@@ -40,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		memset(mem, 0, PAGE_SIZE);
  		return 0;
  	}
-@@ -596,7 +598,7 @@ static int zram_decompress_page(struct z
+@@ -596,7 +598,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
  		zcomp_stream_put(zram->comp);
  	}
  	zs_unmap_object(meta->mem_pool, handle);
@@ -49,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* Should NEVER happen. Return bio error if it does. */
  	if (unlikely(ret)) {
-@@ -616,14 +618,14 @@ static int zram_bvec_read(struct zram *z
+@@ -616,14 +618,14 @@ static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
  	struct zram_meta *meta = zram->meta;
  	page = bvec->bv_page;
  
@@ -67,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (is_partial_io(bvec))
  		/* Use  a temporary buffer to decompress the page */
-@@ -700,10 +702,10 @@ static int zram_bvec_write(struct zram *
+@@ -700,10 +702,10 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
  		if (user_mem)
  			kunmap_atomic(user_mem);
  		/* Free memory associated with this sector now. */
@@ -80,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		atomic64_inc(&zram->stats.zero_pages);
  		ret = 0;
-@@ -794,12 +796,12 @@ static int zram_bvec_write(struct zram *
+@@ -794,12 +796,12 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
  	 * Free memory associated with this sector
  	 * before overwriting unused sectors.
  	 */
@@ -95,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* Update stats */
  	atomic64_add(clen, &zram->stats.compr_data_size);
-@@ -842,9 +844,9 @@ static void zram_bio_discard(struct zram
+@@ -842,9 +844,9 @@ static void zram_bio_discard(struct zram *zram, u32 index,
  	}
  
  	while (n >= PAGE_SIZE) {
@@ -107,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		atomic64_inc(&zram->stats.notify_free);
  		index++;
  		n -= PAGE_SIZE;
-@@ -973,9 +975,9 @@ static void zram_slot_free_notify(struct
+@@ -973,9 +975,9 @@ static void zram_slot_free_notify(struct block_device *bdev,
  	zram = bdev->bd_disk->private_data;
  	meta = zram->meta;
  
@@ -119,6 +121,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	atomic64_inc(&zram->stats.notify_free);
  }
  
+diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
+index 74fcf10da374..fd4020c99b9e 100644
 --- a/drivers/block/zram/zram_drv.h
 +++ b/drivers/block/zram/zram_drv.h
 @@ -73,6 +73,9 @@ enum zram_pageflags {
diff --git a/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch b/debian/patches/features/all/rt/0320-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
similarity index 70%
rename from debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
rename to debian/patches/features/all/rt/0320-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
index c204cc8..aac1d1d 100644
--- a/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
+++ b/debian/patches/features/all/rt/0320-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
@@ -1,8 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Thu, 20 Oct 2016 11:15:22 +0200
-Subject: [PATCH] drivers/zram: Don't disable preemption in
+Subject: [PATCH 320/332] drivers/zram: Don't disable preemption in
  zcomp_stream_get/put()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=04eb7f1deeabf46369100daa09068340e21631c4
 
 In v4.7, the driver switched to percpu compression streams, disabling
 preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We
@@ -14,14 +14,16 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 [bigeasy: get_locked_var() -> per zcomp_strm lock]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/block/zram/zcomp.c    |   12 ++++++++++--
- drivers/block/zram/zcomp.h    |    1 +
- drivers/block/zram/zram_drv.c |    6 +++---
+ drivers/block/zram/zcomp.c    | 12 ++++++++++--
+ drivers/block/zram/zcomp.h    |  1 +
+ drivers/block/zram/zram_drv.c |  6 +++---
  3 files changed, 14 insertions(+), 5 deletions(-)
 
+diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
+index 4b5cd3a7b2b6..fa8329ad79fd 100644
 --- a/drivers/block/zram/zcomp.c
 +++ b/drivers/block/zram/zcomp.c
-@@ -118,12 +118,19 @@ ssize_t zcomp_available_show(const char
+@@ -118,12 +118,19 @@ ssize_t zcomp_available_show(const char *comp, char *buf)
  
  struct zcomp_strm *zcomp_stream_get(struct zcomp *comp)
  {
@@ -43,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  int zcomp_compress(struct zcomp_strm *zstrm,
-@@ -174,6 +181,7 @@ static int __zcomp_cpu_notifier(struct z
+@@ -174,6 +181,7 @@ static int __zcomp_cpu_notifier(struct zcomp *comp,
  			pr_err("Can't allocate a compression stream\n");
  			return NOTIFY_BAD;
  		}
@@ -51,6 +53,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		*per_cpu_ptr(comp->stream, cpu) = zstrm;
  		break;
  	case CPU_DEAD:
+diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h
+index 478cac2ed465..f7a6efdc3285 100644
 --- a/drivers/block/zram/zcomp.h
 +++ b/drivers/block/zram/zcomp.h
 @@ -14,6 +14,7 @@ struct zcomp_strm {
@@ -61,9 +65,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  };
  
  /* dynamic per-device compression frontend */
+diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
+index 553954c4ffd0..2038d138f286 100644
 --- a/drivers/block/zram/zram_drv.c
 +++ b/drivers/block/zram/zram_drv.c
-@@ -577,6 +577,7 @@ static int zram_decompress_page(struct z
+@@ -577,6 +577,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
  	struct zram_meta *meta = zram->meta;
  	unsigned long handle;
  	unsigned int size;
@@ -71,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	zram_lock_table(&meta->table[index]);
  	handle = meta->table[index].handle;
-@@ -588,16 +589,15 @@ static int zram_decompress_page(struct z
+@@ -588,16 +589,15 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
  		return 0;
  	}
  
diff --git a/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch b/debian/patches/features/all/rt/0321-drm-i915-drop-trace_i915_gem_ring_dispatch-on-rt.patch
similarity index 80%
rename from debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch
rename to debian/patches/features/all/rt/0321-drm-i915-drop-trace_i915_gem_ring_dispatch-on-rt.patch
index d44bcc2..2af2b08 100644
--- a/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch
+++ b/debian/patches/features/all/rt/0321-drm-i915-drop-trace_i915_gem_ring_dispatch-on-rt.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 25 Apr 2013 18:12:52 +0200
-Subject: drm/i915: drop trace_i915_gem_ring_dispatch on rt
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 321/332] drm/i915: drop trace_i915_gem_ring_dispatch on rt
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=cffdd5cd15257f13f5ed45c010324b72479b93b7
 
 This tracepoint is responsible for:
 
@@ -42,12 +42,14 @@ so it is gone now on RT.
 Reported-by: Joakim Hernberg <jbh at alchemy.lu>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/gpu/drm/i915/i915_gem_execbuffer.c |    2 ++
+ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++
  1 file changed, 2 insertions(+)
 
+diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+index 2117f172d7a2..96c15501b0c8 100644
 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
 +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-@@ -1489,7 +1489,9 @@ execbuf_submit(struct i915_execbuffer_pa
+@@ -1489,7 +1489,9 @@ execbuf_submit(struct i915_execbuffer_params *params,
  	if (ret)
  		return ret;
  
diff --git a/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch b/debian/patches/features/all/rt/0322-i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
similarity index 63%
rename from debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
rename to debian/patches/features/all/rt/0322-i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
index 14ecd11..d014664 100644
--- a/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
+++ b/debian/patches/features/all/rt/0322-i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
@@ -1,7 +1,8 @@
 From: Clark Williams <williams at redhat.com>
 Date: Tue, 26 May 2015 10:43:43 -0500
-Subject: i915: bogus warning from i915 when running on PREEMPT_RT
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 322/332] i915: bogus warning from i915 when running on
+ PREEMPT_RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0f8c964e22143301d0ecb677fb4663f28c6b6b0c
 
 The i915 driver has a 'WARN_ON(!in_interrupt())' in the display
 handler, which whines constanly on the RT kernel (since the interrupt
@@ -14,12 +15,14 @@ Tested-by: Joakim Hernberg <jhernberg at alchemy.lu>
 Signed-off-by: Clark Williams <williams at redhat.com>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/gpu/drm/i915/intel_display.c |    2 +-
+ drivers/gpu/drm/i915/intel_display.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index f8efd20e4a90..5abe6e027888 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -12131,7 +12131,7 @@ void intel_check_page_flip(struct drm_i9
+@@ -12134,7 +12134,7 @@ void intel_check_page_flip(struct drm_i915_private *dev_priv, int pipe)
  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
  	struct intel_flip_work *work;
  
diff --git a/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch b/debian/patches/features/all/rt/0323-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch
similarity index 59%
rename from debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch
rename to debian/patches/features/all/rt/0323-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch
index 2c6c20d..7dd027c 100644
--- a/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch
+++ b/debian/patches/features/all/rt/0323-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch
@@ -1,7 +1,8 @@
-Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sat, 27 Feb 2016 08:09:11 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 323/332] drm,radeon,i915: Use preempt_disable/enable_rt()
+ where recommended
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=ddf96f5101dade0400f1077372c8977b83195749
 
 DRM folks identified the spots, so use them.
 
@@ -10,13 +11,15 @@ Cc: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Cc: linux-rt-users <linux-rt-users at vger.kernel.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/gpu/drm/i915/i915_irq.c         |    2 ++
- drivers/gpu/drm/radeon/radeon_display.c |    2 ++
+ drivers/gpu/drm/i915/i915_irq.c         | 2 ++
+ drivers/gpu/drm/radeon/radeon_display.c | 2 ++
  2 files changed, 4 insertions(+)
 
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
+index 02908e37c228..05c0480576e1 100644
 --- a/drivers/gpu/drm/i915/i915_irq.c
 +++ b/drivers/gpu/drm/i915/i915_irq.c
-@@ -812,6 +812,7 @@ static int i915_get_crtc_scanoutpos(stru
+@@ -812,6 +812,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
  	spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
  
  	/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
@@ -24,7 +27,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Get optional system timestamp before query. */
  	if (stime)
-@@ -863,6 +864,7 @@ static int i915_get_crtc_scanoutpos(stru
+@@ -863,6 +864,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
  		*etime = ktime_get();
  
  	/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
@@ -32,9 +35,11 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
  
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index cdb8cb568c15..b6d7fd964cbc 100644
 --- a/drivers/gpu/drm/radeon/radeon_display.c
 +++ b/drivers/gpu/drm/radeon/radeon_display.c
-@@ -1845,6 +1845,7 @@ int radeon_get_crtc_scanoutpos(struct dr
+@@ -1845,6 +1845,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
  	struct radeon_device *rdev = dev->dev_private;
  
  	/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
@@ -42,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	/* Get optional system timestamp before query. */
  	if (stime)
-@@ -1937,6 +1938,7 @@ int radeon_get_crtc_scanoutpos(struct dr
+@@ -1937,6 +1938,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
  		*etime = ktime_get();
  
  	/* preempt_enable_rt() should go right here in PREEMPT_RT patchset. */
diff --git a/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch b/debian/patches/features/all/rt/0324-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch
similarity index 86%
rename from debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch
rename to debian/patches/features/all/rt/0324-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch
index 2969c88..354a4c6 100644
--- a/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch
+++ b/debian/patches/features/all/rt/0324-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch
@@ -1,8 +1,8 @@
-Subject: drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end()
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sat, 27 Feb 2016 09:01:42 +0100
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
-
+Subject: [PATCH 324/332] drm,i915: Use local_lock/unlock_irq() in
+ intel_pipe_update_start/end()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=80ddf4652b61ffa1512c4e5f344e6535701286a3
 
 [    8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918
 [    8.014041] in_atomic(): 0, irqs_disabled(): 1, pid: 78, name: kworker/u4:4
@@ -57,9 +57,11 @@ Cc: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Cc: linux-rt-users <linux-rt-users at vger.kernel.org>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 ---
- drivers/gpu/drm/i915/intel_sprite.c |   11 +++++++----
+ drivers/gpu/drm/i915/intel_sprite.c | 11 +++++++----
  1 file changed, 7 insertions(+), 4 deletions(-)
 
+diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
+index 64f4e2e18594..aebf1e9eabcb 100644
 --- a/drivers/gpu/drm/i915/intel_sprite.c
 +++ b/drivers/gpu/drm/i915/intel_sprite.c
 @@ -35,6 +35,7 @@
@@ -70,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  #include "intel_drv.h"
  #include "intel_frontbuffer.h"
  #include <drm/i915_drm.h>
-@@ -65,6 +66,8 @@ int intel_usecs_to_scanlines(const struc
+@@ -65,6 +66,8 @@ int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
  			    1000 * adjusted_mode->crtc_htotal);
  }
  
@@ -79,7 +81,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  /**
   * intel_pipe_update_start() - start update of a set of display registers
   * @crtc: the crtc of which the registers are going to be updated
-@@ -95,7 +98,7 @@ void intel_pipe_update_start(struct inte
+@@ -98,7 +101,7 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
  	min = vblank_start - intel_usecs_to_scanlines(adjusted_mode, 100);
  	max = vblank_start - 1;
  
@@ -88,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  
  	if (min <= 0 || max <= 0)
  		return;
-@@ -125,11 +128,11 @@ void intel_pipe_update_start(struct inte
+@@ -128,11 +131,11 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
  			break;
  		}
  
@@ -102,7 +104,7 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
  	}
  
  	finish_wait(wq, &wait);
-@@ -181,7 +184,7 @@ void intel_pipe_update_end(struct intel_
+@@ -202,7 +205,7 @@ void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work
  		crtc->base.state->event = NULL;
  	}
  
diff --git a/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch b/debian/patches/features/all/rt/0325-cgroups-use-simple-wait-in-css_release.patch
similarity index 81%
rename from debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch
rename to debian/patches/features/all/rt/0325-cgroups-use-simple-wait-in-css_release.patch
index 5d19911..eae7c25 100644
--- a/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch
+++ b/debian/patches/features/all/rt/0325-cgroups-use-simple-wait-in-css_release.patch
@@ -1,7 +1,7 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Fri, 13 Feb 2015 15:52:24 +0100
-Subject: cgroups: use simple wait in css_release()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 325/332] cgroups: use simple wait in css_release()
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=71e12d05dbe7eff545c41fb01a780f9672a368fe
 
 To avoid:
 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
@@ -29,10 +29,12 @@ To avoid:
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- include/linux/cgroup-defs.h |    2 ++
- kernel/cgroup.c             |    9 +++++----
+ include/linux/cgroup-defs.h | 2 ++
+ kernel/cgroup.c             | 9 +++++----
  2 files changed, 7 insertions(+), 4 deletions(-)
 
+diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
+index 6fb1c34cf805..ccd2a5addb56 100644
 --- a/include/linux/cgroup-defs.h
 +++ b/include/linux/cgroup-defs.h
 @@ -16,6 +16,7 @@
@@ -43,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #ifdef CONFIG_CGROUPS
  
-@@ -137,6 +138,7 @@ struct cgroup_subsys_state {
+@@ -138,6 +139,7 @@ struct cgroup_subsys_state {
  	/* percpu_ref killing and RCU release */
  	struct rcu_head rcu_head;
  	struct work_struct destroy_work;
@@ -51,9 +53,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  };
  
  /*
+diff --git a/kernel/cgroup.c b/kernel/cgroup.c
+index 4c233437ee1a..6c3c9f298f22 100644
 --- a/kernel/cgroup.c
 +++ b/kernel/cgroup.c
-@@ -5041,10 +5041,10 @@ static void css_free_rcu_fn(struct rcu_h
+@@ -5041,10 +5041,10 @@ static void css_free_rcu_fn(struct rcu_head *rcu_head)
  	queue_work(cgroup_destroy_wq, &css->destroy_work);
  }
  
@@ -66,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	struct cgroup_subsys *ss = css->ss;
  	struct cgroup *cgrp = css->cgroup;
  
-@@ -5087,8 +5087,8 @@ static void css_release(struct percpu_re
+@@ -5087,8 +5087,8 @@ static void css_release(struct percpu_ref *ref)
  	struct cgroup_subsys_state *css =
  		container_of(ref, struct cgroup_subsys_state, refcnt);
  
@@ -77,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  static void init_and_link_css(struct cgroup_subsys_state *css,
-@@ -5740,6 +5740,7 @@ static int __init cgroup_wq_init(void)
+@@ -5749,6 +5749,7 @@ static int __init cgroup_wq_init(void)
  	 */
  	cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1);
  	BUG_ON(!cgroup_destroy_wq);
diff --git a/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch b/debian/patches/features/all/rt/0326-memcontrol-Prevent-scheduling-while-atomic-in-cgroup.patch
similarity index 79%
rename from debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch
rename to debian/patches/features/all/rt/0326-memcontrol-Prevent-scheduling-while-atomic-in-cgroup.patch
index 4415145..0affb2e 100644
--- a/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch
+++ b/debian/patches/features/all/rt/0326-memcontrol-Prevent-scheduling-while-atomic-in-cgroup.patch
@@ -1,7 +1,8 @@
 From: Mike Galbraith <umgwanakikbuti at gmail.com>
 Date: Sat, 21 Jun 2014 10:09:48 +0200
-Subject: memcontrol: Prevent scheduling while atomic in cgroup code
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 326/332] memcontrol: Prevent scheduling while atomic in cgroup
+ code
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=d3f5a30b551332480ed1fb3641ce3f9cf42efd88
 
 mm, memcg: make refill_stock() use get_cpu_light()
 
@@ -38,9 +39,11 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti at gmail.com>
 [bigeasy: use memcg_stock_ll as a locallock since it is now IRQ-off region]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- mm/memcontrol.c |   13 +++++++------
+ mm/memcontrol.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)
 
+diff --git a/mm/memcontrol.c b/mm/memcontrol.c
+index 58d032994c2d..1f2ebc924916 100644
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
 @@ -1695,6 +1695,7 @@ struct memcg_stock_pcp {
@@ -51,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  static DEFINE_MUTEX(percpu_charge_mutex);
  
  /**
-@@ -1717,7 +1718,7 @@ static bool consume_stock(struct mem_cgr
+@@ -1717,7 +1718,7 @@ static bool consume_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
  	if (nr_pages > CHARGE_BATCH)
  		return ret;
  
@@ -60,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	stock = this_cpu_ptr(&memcg_stock);
  	if (memcg == stock->cached && stock->nr_pages >= nr_pages) {
-@@ -1725,7 +1726,7 @@ static bool consume_stock(struct mem_cgr
+@@ -1725,7 +1726,7 @@ static bool consume_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
  		ret = true;
  	}
  
@@ -69,7 +72,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return ret;
  }
-@@ -1752,13 +1753,13 @@ static void drain_local_stock(struct wor
+@@ -1752,13 +1753,13 @@ static void drain_local_stock(struct work_struct *dummy)
  	struct memcg_stock_pcp *stock;
  	unsigned long flags;
  
@@ -85,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  /*
-@@ -1770,7 +1771,7 @@ static void refill_stock(struct mem_cgro
+@@ -1770,7 +1771,7 @@ static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
  	struct memcg_stock_pcp *stock;
  	unsigned long flags;
  
@@ -94,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	stock = this_cpu_ptr(&memcg_stock);
  	if (stock->cached != memcg) { /* reset if necessary */
-@@ -1779,7 +1780,7 @@ static void refill_stock(struct mem_cgro
+@@ -1779,7 +1780,7 @@ static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)
  	}
  	stock->nr_pages += nr_pages;
  
diff --git a/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches/features/all/rt/0327-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
similarity index 81%
rename from debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
rename to debian/patches/features/all/rt/0327-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
index 54dcfcd..6c3412e 100644
--- a/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
+++ b/debian/patches/features/all/rt/0327-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
@@ -1,7 +1,7 @@
 From: Mike Galbraith <efault at gmx.de>
 Date: Sun, 8 Jan 2017 09:32:25 +0100
-Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 327/332] cpuset: Convert callback_lock to raw_spinlock_t
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e60512952aceb7031e02da0e0f2d740e4f4c8ec2
 
 The two commits below add up to a cpuset might_sleep() splat for RT:
 
@@ -46,12 +46,14 @@ Cc: stable-rt at vger.kernel.org
 Signed-off-by: Mike Galbraith <efault at gmx.de>
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/cpuset.c |   66 ++++++++++++++++++++++++++++----------------------------
+ kernel/cpuset.c | 66 ++++++++++++++++++++++++++++-----------------------------
  1 file changed, 33 insertions(+), 33 deletions(-)
 
+diff --git a/kernel/cpuset.c b/kernel/cpuset.c
+index 247afb108343..331ab910e5f6 100644
 --- a/kernel/cpuset.c
 +++ b/kernel/cpuset.c
-@@ -284,7 +284,7 @@ static struct cpuset top_cpuset = {
+@@ -285,7 +285,7 @@ static struct cpuset top_cpuset = {
   */
  
  static DEFINE_MUTEX(cpuset_mutex);
@@ -60,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  static struct workqueue_struct *cpuset_migrate_mm_wq;
  
-@@ -907,9 +907,9 @@ static void update_cpumasks_hier(struct
+@@ -908,9 +908,9 @@ static void update_cpumasks_hier(struct cpuset *cs, struct cpumask *new_cpus)
  			continue;
  		rcu_read_unlock();
  
@@ -72,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		WARN_ON(!cgroup_subsys_on_dfl(cpuset_cgrp_subsys) &&
  			!cpumask_equal(cp->cpus_allowed, cp->effective_cpus));
-@@ -974,9 +974,9 @@ static int update_cpumask(struct cpuset
+@@ -975,9 +975,9 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
  	if (retval < 0)
  		return retval;
  
@@ -84,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* use trialcs->cpus_allowed as a temp variable */
  	update_cpumasks_hier(cs, trialcs->cpus_allowed);
-@@ -1176,9 +1176,9 @@ static void update_nodemasks_hier(struct
+@@ -1177,9 +1177,9 @@ static void update_nodemasks_hier(struct cpuset *cs, nodemask_t *new_mems)
  			continue;
  		rcu_read_unlock();
  
@@ -96,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  		WARN_ON(!cgroup_subsys_on_dfl(cpuset_cgrp_subsys) &&
  			!nodes_equal(cp->mems_allowed, cp->effective_mems));
-@@ -1246,9 +1246,9 @@ static int update_nodemask(struct cpuset
+@@ -1247,9 +1247,9 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs,
  	if (retval < 0)
  		goto done;
  
@@ -108,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/* use trialcs->mems_allowed as a temp variable */
  	update_nodemasks_hier(cs, &trialcs->mems_allowed);
-@@ -1339,9 +1339,9 @@ static int update_flag(cpuset_flagbits_t
+@@ -1340,9 +1340,9 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
  	spread_flag_changed = ((is_spread_slab(cs) != is_spread_slab(trialcs))
  			|| (is_spread_page(cs) != is_spread_page(trialcs)));
  
@@ -120,7 +122,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (!cpumask_empty(trialcs->cpus_allowed) && balance_flag_changed)
  		rebuild_sched_domains_locked();
-@@ -1756,7 +1756,7 @@ static int cpuset_common_seq_show(struct
+@@ -1757,7 +1757,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v)
  	cpuset_filetype_t type = seq_cft(sf)->private;
  	int ret = 0;
  
@@ -129,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	switch (type) {
  	case FILE_CPULIST:
-@@ -1775,7 +1775,7 @@ static int cpuset_common_seq_show(struct
+@@ -1776,7 +1776,7 @@ static int cpuset_common_seq_show(struct seq_file *sf, void *v)
  		ret = -EINVAL;
  	}
  
@@ -138,7 +140,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	return ret;
  }
  
-@@ -1989,12 +1989,12 @@ static int cpuset_css_online(struct cgro
+@@ -1990,12 +1990,12 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
  
  	cpuset_inc();
  
@@ -153,7 +155,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (!test_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags))
  		goto out_unlock;
-@@ -2021,12 +2021,12 @@ static int cpuset_css_online(struct cgro
+@@ -2022,12 +2022,12 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
  	}
  	rcu_read_unlock();
  
@@ -168,7 +170,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  out_unlock:
  	mutex_unlock(&cpuset_mutex);
  	return 0;
-@@ -2065,7 +2065,7 @@ static void cpuset_css_free(struct cgrou
+@@ -2066,7 +2066,7 @@ static void cpuset_css_free(struct cgroup_subsys_state *css)
  static void cpuset_bind(struct cgroup_subsys_state *root_css)
  {
  	mutex_lock(&cpuset_mutex);
@@ -177,7 +179,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys)) {
  		cpumask_copy(top_cpuset.cpus_allowed, cpu_possible_mask);
-@@ -2076,7 +2076,7 @@ static void cpuset_bind(struct cgroup_su
+@@ -2077,7 +2077,7 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css)
  		top_cpuset.mems_allowed = top_cpuset.effective_mems;
  	}
  
@@ -186,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  	mutex_unlock(&cpuset_mutex);
  }
  
-@@ -2177,12 +2177,12 @@ hotplug_update_tasks_legacy(struct cpuse
+@@ -2178,12 +2178,12 @@ hotplug_update_tasks_legacy(struct cpuset *cs,
  {
  	bool is_empty;
  
@@ -201,7 +203,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	/*
  	 * Don't call update_tasks_cpumask() if the cpuset becomes empty,
-@@ -2219,10 +2219,10 @@ hotplug_update_tasks(struct cpuset *cs,
+@@ -2220,10 +2220,10 @@ hotplug_update_tasks(struct cpuset *cs,
  	if (nodes_empty(*new_mems))
  		*new_mems = parent_cs(cs)->effective_mems;
  
@@ -214,7 +216,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	if (cpus_updated)
  		update_tasks_cpumask(cs);
-@@ -2308,21 +2308,21 @@ static void cpuset_hotplug_workfn(struct
+@@ -2309,21 +2309,21 @@ static void cpuset_hotplug_workfn(struct work_struct *work)
  
  	/* synchronize cpus_allowed to cpu_active_mask */
  	if (cpus_updated) {
@@ -240,7 +242,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  		update_tasks_nodemask(&top_cpuset);
  	}
  
-@@ -2420,11 +2420,11 @@ void cpuset_cpus_allowed(struct task_str
+@@ -2421,11 +2421,11 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
  {
  	unsigned long flags;
  
@@ -254,7 +256,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  }
  
  void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
-@@ -2472,11 +2472,11 @@ nodemask_t cpuset_mems_allowed(struct ta
+@@ -2473,11 +2473,11 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk)
  	nodemask_t mask;
  	unsigned long flags;
  
@@ -268,7 +270,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  	return mask;
  }
-@@ -2568,14 +2568,14 @@ bool __cpuset_node_allowed(int node, gfp
+@@ -2569,14 +2569,14 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask)
  		return true;
  
  	/* Not hardwall and node outside mems_allowed: scan up cpusets */
diff --git a/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch b/debian/patches/features/all/rt/0328-rt-ntp-Move-call-to-schedule_delayed_work-to-helper-.patch
similarity index 82%
rename from debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch
rename to debian/patches/features/all/rt/0328-rt-ntp-Move-call-to-schedule_delayed_work-to-helper-.patch
index 632b8ef..74b9f5b 100644
--- a/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch
+++ b/debian/patches/features/all/rt/0328-rt-ntp-Move-call-to-schedule_delayed_work-to-helper-.patch
@@ -1,7 +1,8 @@
-Date: Wed, 26 Jun 2013 15:28:11 -0400
 From: Steven Rostedt <rostedt at goodmis.org>
-Subject: rt,ntp: Move call to schedule_delayed_work() to helper thread
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Wed, 26 Jun 2013 15:28:11 -0400
+Subject: [PATCH 328/332] rt,ntp: Move call to schedule_delayed_work() to
+ helper thread
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=0e9098c00810753a481a626600bab0d904cc83e5
 
 The ntp code for notify_cmos_timer() is called from a hard interrupt
 context. schedule_delayed_work() under PREEMPT_RT_FULL calls spinlocks
@@ -22,9 +23,11 @@ Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
 [bigeasy: use swork_queue() instead a helper thread]
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- kernel/time/ntp.c |   26 ++++++++++++++++++++++++++
+ kernel/time/ntp.c | 26 ++++++++++++++++++++++++++
  1 file changed, 26 insertions(+)
 
+diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
+index 6df8927c58a5..05b7391bf9bd 100644
 --- a/kernel/time/ntp.c
 +++ b/kernel/time/ntp.c
 @@ -17,6 +17,7 @@
@@ -35,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
  
  #include "ntp_internal.h"
  #include "timekeeping_internal.h"
-@@ -568,10 +569,35 @@ static void sync_cmos_clock(struct work_
+@@ -568,10 +569,35 @@ static void sync_cmos_clock(struct work_struct *work)
  			   &sync_cmos_work, timespec64_to_jiffies(&next));
  }
  
diff --git a/debian/patches/features/all/rt/md-disable-bcache.patch b/debian/patches/features/all/rt/0329-md-disable-bcache.patch
similarity index 73%
rename from debian/patches/features/all/rt/md-disable-bcache.patch
rename to debian/patches/features/all/rt/0329-md-disable-bcache.patch
index 0beba70..7f0accf 100644
--- a/debian/patches/features/all/rt/md-disable-bcache.patch
+++ b/debian/patches/features/all/rt/0329-md-disable-bcache.patch
@@ -1,7 +1,10 @@
 From: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 Date: Thu, 29 Aug 2013 11:48:57 +0200
-Subject: md: disable bcache
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Subject: [PATCH 329/332] md: disable bcache
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=8a4fa1e30ea45c38a87e857d0b976014ba6c155c
 
 It uses anon semaphores
 |drivers/md/bcache/request.c: In function ‘cached_dev_write_complete’:
@@ -17,9 +20,11 @@ either we get rid of those or we have to introduce them…
 
 Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 ---
- drivers/md/bcache/Kconfig |    1 +
+ drivers/md/bcache/Kconfig | 1 +
  1 file changed, 1 insertion(+)
 
+diff --git a/drivers/md/bcache/Kconfig b/drivers/md/bcache/Kconfig
+index 4d200883c505..98b64ed5cb81 100644
 --- a/drivers/md/bcache/Kconfig
 +++ b/drivers/md/bcache/Kconfig
 @@ -1,6 +1,7 @@
diff --git a/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch b/debian/patches/features/all/rt/0330-workqueue-Prevent-deadlock-stall-on-RT.patch
similarity index 82%
rename from debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch
rename to debian/patches/features/all/rt/0330-workqueue-Prevent-deadlock-stall-on-RT.patch
index acc0878..76ded2c 100644
--- a/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch
+++ b/debian/patches/features/all/rt/0330-workqueue-Prevent-deadlock-stall-on-RT.patch
@@ -1,7 +1,7 @@
-Subject: workqueue: Prevent deadlock/stall on RT
 From: Thomas Gleixner <tglx at linutronix.de>
-Date: Fri, 27 Jun 2014 16:24:52 +0200 (CEST)
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
+Date: Fri, 27 Jun 2014 16:24:52 +0200
+Subject: [PATCH 330/332] workqueue: Prevent deadlock/stall on RT
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=818b007c3708572fa30c3db794d8eef19da58455
 
 Austin reported a XFS deadlock/stall on RT where scheduled work gets
 never exececuted and tasks are waiting for each other for ever.
@@ -36,15 +36,16 @@ Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
 Link: http://vger.kernel.org/r/alpine.DEB.2.10.1406271249510.5170@nanos
 Cc: Richard Weinberger <richard.weinberger at gmail.com>
 Cc: Steven Rostedt <rostedt at goodmis.org>
-
 ---
- kernel/sched/core.c |    7 ++++--
- kernel/workqueue.c  |   60 ++++++++++++++++++++++++++++++++++++++++------------
+ kernel/sched/core.c |  7 +++++--
+ kernel/workqueue.c  | 60 +++++++++++++++++++++++++++++++++++++++++------------
  2 files changed, 52 insertions(+), 15 deletions(-)
 
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index 2a9a715d38ca..0486c2a8a8d5 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3615,9 +3615,8 @@ void __noreturn do_task_dead(void)
+@@ -3674,9 +3674,8 @@ void __noreturn do_task_dead(void)
  
  static inline void sched_submit_work(struct task_struct *tsk)
  {
@@ -55,7 +56,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  	/*
  	 * If a worker went to sleep, notify and ask workqueue whether
  	 * it wants to wake up a task to maintain concurrency.
-@@ -3625,6 +3624,10 @@ static inline void sched_submit_work(str
+@@ -3684,6 +3683,10 @@ static inline void sched_submit_work(struct task_struct *tsk)
  	if (tsk->flags & PF_WQ_WORKER)
  		wq_worker_sleeping(tsk);
  
@@ -66,6 +67,8 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  	/*
  	 * If we are going to sleep and we have plugged IO queued,
  	 * make sure to submit it to avoid deadlocks.
+diff --git a/kernel/workqueue.c b/kernel/workqueue.c
+index 7649d8181b21..f8da6bd7702b 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -123,6 +123,11 @@ enum {
@@ -80,7 +83,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
   * A: pool->attach_mutex protected.
   *
   * PL: wq_pool_mutex protected.
-@@ -428,6 +433,31 @@ static void workqueue_sysfs_unregister(s
+@@ -428,6 +433,31 @@ static void workqueue_sysfs_unregister(struct workqueue_struct *wq);
  		if (({ assert_rcu_or_wq_mutex(wq); false; })) { }	\
  		else
  
@@ -112,7 +115,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  #ifdef CONFIG_DEBUG_OBJECTS_WORK
  
  static struct debug_obj_descr work_debug_descr;
-@@ -834,10 +864,16 @@ static struct worker *first_idle_worker(
+@@ -834,10 +864,16 @@ static struct worker *first_idle_worker(struct worker_pool *pool)
   */
  static void wake_up_worker(struct worker_pool *pool)
  {
@@ -130,7 +133,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  }
  
  /**
-@@ -866,7 +902,7 @@ void wq_worker_running(struct task_struc
+@@ -866,7 +902,7 @@ void wq_worker_running(struct task_struct *task)
   */
  void wq_worker_sleeping(struct task_struct *task)
  {
@@ -139,7 +142,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  	struct worker_pool *pool;
  
  	/*
-@@ -883,26 +919,18 @@ void wq_worker_sleeping(struct task_stru
+@@ -883,26 +919,18 @@ void wq_worker_sleeping(struct task_struct *task)
  		return;
  
  	worker->sleeping = 1;
@@ -169,7 +172,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  }
  
  /**
-@@ -1631,7 +1659,9 @@ static void worker_enter_idle(struct wor
+@@ -1631,7 +1659,9 @@ static void worker_enter_idle(struct worker *worker)
  	worker->last_active = jiffies;
  
  	/* idle_list is LIFO */
@@ -179,7 +182,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  
  	if (too_many_workers(pool) && !timer_pending(&pool->idle_timer))
  		mod_timer(&pool->idle_timer, jiffies + IDLE_WORKER_TIMEOUT);
-@@ -1664,7 +1694,9 @@ static void worker_leave_idle(struct wor
+@@ -1664,7 +1694,9 @@ static void worker_leave_idle(struct worker *worker)
  		return;
  	worker_clr_flags(worker, WORKER_IDLE);
  	pool->nr_idle--;
@@ -189,7 +192,7 @@ Cc: Steven Rostedt <rostedt at goodmis.org>
  }
  
  static struct worker *alloc_worker(int node)
-@@ -1830,7 +1862,9 @@ static void destroy_worker(struct worker
+@@ -1830,7 +1862,9 @@ static void destroy_worker(struct worker *worker)
  	pool->nr_workers--;
  	pool->nr_idle--;
  
diff --git a/debian/patches/features/all/rt/0331-Add-localversion-for-RT-release.patch b/debian/patches/features/all/rt/0331-Add-localversion-for-RT-release.patch
new file mode 100644
index 0000000..623e30a
--- /dev/null
+++ b/debian/patches/features/all/rt/0331-Add-localversion-for-RT-release.patch
@@ -0,0 +1,18 @@
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Fri, 8 Jul 2011 20:25:16 +0200
+Subject: [PATCH 331/332] Add localversion for -RT release
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=e48784a7c79999c2e4d7f41442a06891213f7a0a
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ localversion-rt | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 localversion-rt
+
+diff --git a/localversion-rt b/localversion-rt
+new file mode 100644
+index 000000000000..9a218ca23053
+--- /dev/null
++++ b/localversion-rt
+@@ -0,0 +1 @@
++-rt23
diff --git a/debian/patches/features/all/rt/0332-Linux-4.9.47-rt37-REBASE.patch b/debian/patches/features/all/rt/0332-Linux-4.9.47-rt37-REBASE.patch
new file mode 100644
index 0000000..c1bcb46
--- /dev/null
+++ b/debian/patches/features/all/rt/0332-Linux-4.9.47-rt37-REBASE.patch
@@ -0,0 +1,17 @@
+From: Steven Rostedt <rostedt at goodmis.org>
+Date: Wed, 5 Jul 2017 13:15:02 -0400
+Subject: [PATCH 332/332] Linux 4.9.47-rt37 REBASE
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=c18af5ed4d9406bc158ab1f76773d89727870422
+
+Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
+---
+ localversion-rt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/localversion-rt b/localversion-rt
+index 9a218ca23053..a3b2408c1da6 100644
+--- a/localversion-rt
++++ b/localversion-rt
+@@ -1 +1 @@
+--rt23
++-rt37
diff --git a/debian/patches/features/all/rt/localversion.patch b/debian/patches/features/all/rt/localversion.patch
deleted file mode 100644
index b096ae9..0000000
--- a/debian/patches/features/all/rt/localversion.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Subject: Add localversion for -RT release
-From: Thomas Gleixner <tglx at linutronix.de>
-Date: Fri, 08 Jul 2011 20:25:16 +0200
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9.30-rt20.tar.xz
-
-Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
----
- localversion-rt |    1 +
- 1 file changed, 1 insertion(+)
-
---- /dev/null
-+++ b/localversion-rt
-@@ -0,0 +1 @@
-+-rt20
diff --git a/debian/patches/series-rt b/debian/patches/series-rt
index 880a5f8..646f7c3 100644
--- a/debian/patches/series-rt
+++ b/debian/patches/series-rt
@@ -1,617 +1,332 @@
-###########################################################
-# DELTA against a known Linus release
-###########################################################
-
-############################################################
-# UPSTREAM changes queued
-############################################################
-
-############################################################
-# UPSTREAM FIXES, patches pending
-############################################################
-features/all/rt/timer-make-the-base-lock-raw.patch
-
-############################################################
-# Stuff broken upstream, patches submitted
-############################################################
-features/all/rt/lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
-features/all/rt/lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
-features/all/rt/lockdep-Fix-per-cpu-static-objects.patch
-
-features/all/rt/0001-futex-Cleanup-variable-names-for-futex_top_waiter.patch
-features/all/rt/0002-futex-Use-smp_store_release-in-mark_wake_futex.patch
-features/all/rt/0003-futex-Remove-rt_mutex_deadlock_account_.patch
-features/all/rt/0004-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
-features/all/rt/0005-futex-Change-locking-rules.patch
-features/all/rt/0006-futex-Cleanup-refcounting.patch
-features/all/rt/0007-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
-features/all/rt/0008-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
-features/all/rt/0009-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
-features/all/rt/0010-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
-features/all/rt/0011-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
-features/all/rt/0012-futex-Futex_unlock_pi-determinism.patch
-features/all/rt/0013-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
-features/all/rt/0001-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
-features/all/rt/0002-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
-features/all/rt/0003-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
-features/all/rt/0004-rtmutex-Clean-up.patch
-features/all/rt/0005-sched-rtmutex-Refactor-rt_mutex_setprio.patch
-features/all/rt/0006-sched-tracing-Update-trace_sched_pi_setprio.patch
-features/all/rt/0007-rtmutex-Fix-PI-chain-order-integrity.patch
-features/all/rt/0008-rtmutex-Fix-more-prio-comparisons.patch
-features/all/rt/0009-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
-features/all/rt/0001-futex-Avoid-freeing-an-active-timer.patch
-features/all/rt/0002-futex-Fix-small-and-harmless-looking-inconsistencies.patch
-features/all/rt/0003-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
-features/all/rt/0004-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
-features/all/rt/futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
-
-# Those two should vanish soon (not use PIT during bootup)
-features/all/rt/at91_dont_enable_disable_clock.patch
-
-############################################################
-# Stuff which needs addressing upstream, but requires more
-# information
-############################################################
-features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch
-
-############################################################
-# Stuff broken upstream, need to be sent
-############################################################
-features/all/rt/rtmutex--Handle-non-enqueued-waiters-gracefully.patch
-features/all/rt/fs-dcache-include-wait.h.patch
-features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch
-features/all/rt/fs-dcache-init-in_lookup_hashtable.patch
-features/all/rt/iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
-features/all/rt/iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
-features/all/rt/x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
-features/all/rt/rxrpc-remove-unused-static-variables.patch
-features/all/rt/rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
-features/all/rt/locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
-features/all/rt/pinctrl-qcom-Use-raw-spinlock-variants.patch
-features/all/rt/x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
-
-# Wants a different fix for upstream
-features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
-
-############################################################
-# Submitted on LKML
-############################################################
-
-# SPARC part of erly printk consolidation
-features/all/rt/sparc64-use-generic-rwsem-spinlocks-rt.patch
-
-# SRCU
-features/all/rt/kernel-SRCU-provide-a-static-initializer.patch
-
-############################################################
-# Submitted to mips ML
-############################################################
-
-############################################################
-# Submitted to ARM ML
-############################################################
-
-############################################################
-# Submitted to PPC ML
-############################################################
-
-############################################################
-# Submitted on LKML
-############################################################
-
-############################################################
-# Submitted to net-dev
-############################################################
-
-############################################################
-# Pending in tip
-############################################################
-
-############################################################
-# Stuff which should go upstream ASAP
-############################################################
-
-# SCHED BLOCK/WQ
-features/all/rt/block-shorten-interrupt-disabled-regions.patch
-
-# Timekeeping split jiffies lock. Needs a good argument :)
-features/all/rt/timekeeping-split-jiffies-lock.patch
-
-# Tracing
-features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch
-
-# PTRACE/SIGNAL crap
-features/all/rt/signal-revert-ptrace-preempt-magic.patch
-
-# ARM lock annotation
-features/all/rt/arm-convert-boot-lock-to-raw.patch
-features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch
-
-# PREEMPT_ENABLE_NO_RESCHED
-
-# SIGNALS / POSIXTIMERS
-features/all/rt/posix-timers-no-broadcast.patch
-features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch
-
-# SCHED
-
-# GENERIC CMPXCHG
-
-# SHORTEN PREEMPT DISABLED
-features/all/rt/drivers-random-reduce-preempt-disabled-region.patch
-
-# CLOCKSOURCE
-features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch
-features/all/rt/clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
-features/all/rt/clocksource-tclib-allow-higher-clockrates.patch
-
-# DRIVERS NET
-features/all/rt/drivers-net-8139-disable-irq-nosync.patch
-
-# PREEMPT
-
-# PM
-features/all/rt/suspend-prevernt-might-sleep-splats.patch
-
-# NETWORKING
-features/all/rt/net-prevent-abba-deadlock.patch
-features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch
-
-# X86
-features/all/rt/x86-io-apic-migra-no-unmask.patch
-
-# RCU
-
-# LOCKING INIT FIXES
-
-# PCI
-features/all/rt/pci-access-use-__wake_up_all_locked.patch
-
-# WORKQUEUE
-
-
-#####################################################
-# Stuff which should go mainline, but wants some care
-#####################################################
-
-# SEQLOCK
-
-# ANON RW SEMAPHORES
-
-# TRACING
-features/all/rt/latencyhist-disable-jump-labels.patch
-features/all/rt/latency-hist.patch
-features/all/rt/latency_hist-update-sched_wakeup-probe.patch
-features/all/rt/trace-latency-hist-Consider-new-argument-when-probin.patch
-features/all/rt/trace_Use_rcuidle_version_for_preemptoff_hist_trace_point.patch
-
-##################################################
-# REAL RT STUFF starts here
-##################################################
-
-# PRINTK
-features/all/rt/printk-kill.patch
-features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch
-
-# Enable RT CONFIG
-features/all/rt/rt-preempt-base-config.patch
-features/all/rt/kconfig-disable-a-few-options-rt.patch
-features/all/rt/kconfig-preempt-rt-full.patch
-
-# WARN/BUG_ON_RT
-features/all/rt/bug-rt-dependend-variants.patch
-features/all/rt/iommu-amd--Use-WARN_ON_NORT.patch
-
-# LOCAL_IRQ_RT/NON_RT
-features/all/rt/local-irq-rt-depending-variants.patch
-
-# PREEMPT NORT
-features/all/rt/preempt-nort-rt-variants.patch
-
-# local locks & migrate disable
-features/all/rt/introduce_migrate_disable_cpu_light.patch
-features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch
-features/all/rt/rt-local-irq-lock.patch
-features/all/rt/locallock-add-local_lock_on.patch
-
-# ANNOTATE local_irq_disable sites
-features/all/rt/ata-disable-interrupts-if-non-rt.patch
-features/all/rt/ide-use-nort-local-irq-variants.patch
-features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch
-features/all/rt/inpt-gameport-use-local-irq-nort.patch
-features/all/rt/user-use-local-irq-nort.patch
-features/all/rt/usb-use-_nort-in-giveback.patch
-features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch
-features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch
-
-# Sigh
-features/all/rt/signal-fix-up-rcu-wreckage.patch
-features/all/rt/oleg-signal-rt-fix.patch
-features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch
-
-# ANNOTATE BUG/WARNON
-features/all/rt/net-wireless-warn-nort.patch
-
-# BIT SPINLOCKS - SIGH
-features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch
-features/all/rt/fs-jbd-replace-bh_state-lock.patch
-
-# GENIRQ
-features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch
-features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch
-features/all/rt/genirq-disable-irqpoll-on-rt.patch
-features/all/rt/genirq-force-threading.patch
-
-# DRIVERS NET
-features/all/rt/drivers-net-vortex-fix-locking-issues.patch
-
-# MM PAGE_ALLOC
-features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch
-features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch
-
-# MM SWAP
-features/all/rt/mm-convert-swap-to-percpu-locked.patch
-features/all/rt/mm-perform-lru_add_drain_all-remotely.patch
-
-# MM vmstat
-features/all/rt/mm-make-vmstat-rt-aware.patch
-
-# MM memory
-features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch
-
-# MM bounce
-features/all/rt/mm-bounce-local-irq-save-nort.patch
-
-# MM SLxB
-features/all/rt/mm-disable-sloub-rt.patch
-features/all/rt/mm-enable-slub.patch
-features/all/rt/slub-enable-irqs-for-no-wait.patch
-features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch
-
-# MM
-features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch
-features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
-features/all/rt/mm-memcontrol-do_not_disable_irq.patch
-features/all/rt/mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
-features/all/rt/mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
-features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch
-
-# RADIX TREE
-features/all/rt/radix-tree-use-local-locks.patch
-
-# PANIC
-features/all/rt/panic-disable-random-on-rt.patch
-
-# TIMERS
-features/all/rt/timers-prepare-for-full-preemption.patch
-features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch
-
-# HRTIMERS
-features/all/rt/hrtimers-prepare-full-preemption.patch
-features/all/rt/hrtimer-enfore-64byte-alignment.patch
-features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch
-features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
-features/all/rt/timer-fd-avoid-live-lock.patch
-features/all/rt/tick-broadcast--Make-hrtimer-irqsafe.patch
-features/all/rt/timer-hrtimer-check-properly-for-a-running-timer.patch
-
-# POSIX-CPU-TIMERS
-features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch
-
-# SCHEDULER
-features/all/rt/sched-delay-put-task.patch
-features/all/rt/sched-limit-nr-migrate.patch
-features/all/rt/sched-mmdrop-delayed.patch
-features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
-features/all/rt/sched-rt-mutex-wakeup.patch
-features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch
-features/all/rt/cond-resched-softirq-rt.patch
-features/all/rt/cond-resched-lock-rt-tweak.patch
-features/all/rt/sched-disable-ttwu-queue.patch
-features/all/rt/sched-disable-rt-group-sched-on-rt.patch
-features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
-features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
-
-# STOP MACHINE
-features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
-features/all/rt/stop-machine-raw-lock.patch
-
-# MIGRATE DISABLE AND PER CPU
-features/all/rt/hotplug-light-get-online-cpus.patch
-features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch
-features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch
-features/all/rt/ftrace-migrate-disable-tracing.patch
-features/all/rt/hotplug-use-migrate-disable.patch
-
-# NOHZ
-
-# LOCKDEP
-features/all/rt/lockdep-no-softirq-accounting-on-rt.patch
-
-# SOFTIRQ
-features/all/rt/mutex-no-spin-on-rt.patch
-features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch
-features/all/rt/softirq-preempt-fix-3-re.patch
-features/all/rt/softirq-disable-softirq-stacks-for-rt.patch
-features/all/rt/softirq-split-locks.patch
-features/all/rt/kernel-softirq-unlock-with-irqs-on.patch
-features/all/rt/kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
-features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch
-features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch
-features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch
-features/all/rt/timers-Don-t-wake-ktimersoftd-on-every-tick.patch
-features/all/rt/Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
-features/all/rt/rtmutex-trylock-is-okay-on-RT.patch
-
-# compile fix due to rtmutex locks
-features/all/rt/gpu_don_t_check_for_the_lock_owner.patch
-features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
-
-# FUTEX/RTMUTEX
-features/all/rt/rtmutex-futex-prepare-rt.patch
-features/all/rt/futex-requeue-pi-fix.patch
-features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
-
-# RTMUTEX
-features/all/rt/pid.h-include-atomic.h.patch
-features/all/rt/arm-include-definition-for-cpumask_t.patch
-features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
-features/all/rt/rtmutex-lock-killable.patch
-features/all/rt/rtmutex-Make-lock_killable-work.patch
-features/all/rt/spinlock-types-separate-raw.patch
-features/all/rt/rtmutex-avoid-include-hell.patch
-features/all/rt/rtmutex_dont_include_rcu.patch
-features/all/rt/rt-add-rt-locks.patch
-features/all/rt/rt-drop_mutex_disable_on_not_debug.patch
-features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch
-features/all/rt/rtmutex-Provide-rt_mutex_lock_state.patch
-features/all/rt/rtmutex-Provide-locked-slowpath.patch
-features/all/rt/futex-rtmutex-Cure-RT-double-blocking-issue.patch
-features/all/rt/rwsem-rt-Lift-single-reader-restriction.patch
-features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch
-
-# RCU
-features/all/rt/peter_zijlstra-frob-rcu.patch
-features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch
-features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
-features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch
-
-# DRIVERS SERIAL
-features/all/rt/drivers-tty-fix-omap-lock-crap.patch
-features/all/rt/drivers-tty-pl011-irq-disable-madness.patch
-features/all/rt/rt-serial-warn-fix.patch
-features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch
-
-# SIMPLE WAITQUEUE
-features/all/rt/wait.h-include-atomic.h.patch
-features/all/rt/work-simple-Simple-work-queue-implemenation.patch
-features/all/rt/completion-use-simple-wait-queues.patch
-features/all/rt/fs-aio-simple-simple-work.patch
-features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch
-features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch
-
-# FS
-features/all/rt/peterz-percpu-rwsem-rt.patch
-features/all/rt/fs-namespace-preemption-fix.patch
-features/all/rt/mm-protect-activate-switch-mm.patch
-features/all/rt/fs-block-rt-support.patch
-features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch
-features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch
-
-# X86
-features/all/rt/x86-mce-timer-hrtimer.patch
-features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch
-features/all/rt/x86-stackprot-no-random-on-rt.patch
-features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch
-features/all/rt/x86-UV-raw_spinlock-conversion.patch
-features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch
-
-# CPU get light
-features/all/rt/epoll-use-get-cpu-light.patch
-features/all/rt/mm-vmalloc-use-get-cpu-light.patch
-features/all/rt/block-mq-use-cpu_light.patch
-features/all/rt/block-mq-drop-preempt-disable.patch
-features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch
-features/all/rt/md-raid5-percpu-handling-rt-aware.patch
-
-# CPU CHILL
-features/all/rt/rt-introduce-cpu-chill.patch
-features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
-
-# block
-features/all/rt/block-blk-mq-use-swait.patch
-
-# BLOCK LIVELOCK PREVENTION
-features/all/rt/block-use-cpu-chill.patch
-
-# FS LIVELOCK PREVENTION
-features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch
-features/all/rt/net-use-cpu-chill.patch
-features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch
-
-# WORKQUEUE more fixes
-features/all/rt/workqueue-use-rcu.patch
-features/all/rt/workqueue-use-locallock.patch
-features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch
-features/all/rt/workqueue-distangle-from-rq-lock.patch
-
-# IDR
-features/all/rt/idr-use-local-lock-for-protection.patch
-features/all/rt/percpu_ida-use-locklocks.patch
-
-# DEBUGOBJECTS
-features/all/rt/debugobjects-rt.patch
-
-# JUMPLABEL
-features/all/rt/jump-label-rt.patch
-
-# SEQLOCKS
-features/all/rt/seqlock-prevent-rt-starvation.patch
-
-# NETWORKING
-features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch
-features/all/rt/skbufhead-raw-lock.patch
-features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch
-features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch
-features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch
-features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
-features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch
-features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch
-features/all/rt/net-add-a-lock-around-icmp_sk.patch
-features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
-
-# NETWORK DEBUGGING AID
-features/all/rt/ping-sysrq.patch
-
-# irqwork
-features/all/rt/irqwork-push_most_work_into_softirq_context.patch
-features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch
-
-# Sound
-features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
-
-# CONSOLE. NEEDS more thought !!!
-features/all/rt/printk-rt-aware.patch
-features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
-features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch
-
-# POWERC
-features/all/rt/power-use-generic-rwsem-on-rt.patch
-features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
-features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch
-
-# ARM
-features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch
-features/all/rt/arm-unwind-use_raw_lock.patch
-features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch
-features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch
-features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
-
-# ARM64
-features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch
-
-# KGDB
-features/all/rt/kgb-serial-hackaround.patch
-
-# SYSFS - RT indicator
-features/all/rt/sysfs-realtime-entry.patch
-
-# KMAP/HIGHMEM
-features/all/rt/power-disable-highmem-on-rt.patch
-features/all/rt/mips-disable-highmem-on-rt.patch
-features/all/rt/mm-rt-kmap-atomic-scheduling.patch
-features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch
-features/all/rt/x86-highmem-add-a-already-used-pte-check.patch
-features/all/rt/arm-highmem-flush-tlb-on-unmap.patch
-features/all/rt/arm-enable-highmem-for-rt.patch
-
-# IPC
-features/all/rt/ipc-sem-rework-semaphore-wakeups.patch
-
-# SYSRQ
-
-# KVM require constant freq TSC (smp function call -> cpufreq)
-features/all/rt/x86-kvm-require-const-tsc-for-rt.patch
-features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
-
-# SCSI/FCOE
-features/all/rt/scsi-fcoe-rt-aware.patch
-features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
-
-# X86 crypto
-features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch
-features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch
-
-# Device mapper
-features/all/rt/dm-make-rt-aware.patch
-
-# ACPI
-features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
-
-# CPUMASK OFFSTACK
-features/all/rt/cpumask-disable-offstack-on-rt.patch
-
-# RANDOM
-features/all/rt/random-make-it-work-on-rt.patch
-features/all/rt/random-avoid-preempt_disable-ed-section.patch
-
-# HOTPLUG
-features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch
-features/all/rt/cpu-rt-rework-cpu-down.patch
-features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
-features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
-features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
-features/all/rt/cpu_down_move_migrate_enable_back.patch
-features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
-
-features/all/rt/rt-locking-Reenable-migration-accross-schedule.patch
-
-# SCSCI QLA2xxx
-features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch
-
-# NET
-features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch
-features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch
-features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch
-features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch
-features/all/rt/net-make-devnet_rename_seq-a-mutex.patch
-
-# CRYPTO
-features/all/rt/peterz-srcu-crypto-chain.patch
-
-# LOCKDEP
-features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch
-features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
-
-# PERF
-features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch
-features/all/rt/kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
-
-# RCU
-features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch
-features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch
-features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch
-features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
-
-# PREEMPT LAZY
-features/all/rt/preempt-lazy-support.patch
-features/all/rt/ftrace-Fix-trace-header-alignment.patch
-features/all/rt/x86-preempt-lazy.patch
-features/all/rt/arm-preempt-lazy-support.patch
-features/all/rt/powerpc-preempt-lazy-support.patch
-features/all/rt/arch-arm64-Add-lazy-preempt-support.patch
-
-# LEDS
-features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch
-
-# DRIVERS
-features/all/rt/mmci-remove-bogus-irq-save.patch
-features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch
-features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
-features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
-features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
-
-# I915
-features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch
-features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
-features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch
-features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch
-
-# CGROUPS
-features/all/rt/cgroups-use-simple-wait-in-css_release.patch
-features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch
-features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
-
-# New stuff
-# Revisit: We need this in other places as well
-features/all/rt/move_sched_delayed_work_to_helper.patch
-
-# MD
-features/all/rt/md-disable-bcache.patch
-
-# WORKQUEUE SIGH
-features/all/rt/workqueue-prevent-deadlock-stall.patch
-
-# Add RT to version
-features/all/rt/localversion.patch
+features/all/rt/0001-timer-make-the-base-lock-raw.patch
+features/all/rt/0002-lockdep-Handle-statically-initialized-PER_CPU-locks-.patch
+features/all/rt/0003-lockdep-Fix-compilation-error-for-CONFIG_MODULES-and.patch
+features/all/rt/0004-lockdep-Fix-per-cpu-static-objects.patch
+features/all/rt/0005-futex-Cleanup-variable-names-for-futex_top_waiter.patch
+features/all/rt/0006-futex-Use-smp_store_release-in-mark_wake_futex.patch
+features/all/rt/0007-futex-Remove-rt_mutex_deadlock_account_.patch
+features/all/rt/0008-futex-rt_mutex-Provide-futex-specific-rt_mutex-API.patch
+features/all/rt/0009-futex-Change-locking-rules.patch
+features/all/rt/0010-futex-Cleanup-refcounting.patch
+features/all/rt/0011-futex-Rework-inconsistent-rt_mutex-futex_q-state.patch
+features/all/rt/0012-futex-Pull-rt_mutex_futex_unlock-out-from-under-hb-l.patch
+features/all/rt/0013-futex-rt_mutex-Introduce-rt_mutex_init_waiter.patch
+features/all/rt/0014-futex-rt_mutex-Restructure-rt_mutex_finish_proxy_loc.patch
+features/all/rt/0015-futex-Rework-futex_lock_pi-to-use-rt_mutex_-_proxy_l.patch
+features/all/rt/0016-futex-Futex_unlock_pi-determinism.patch
+features/all/rt/0017-futex-Drop-hb-lock-before-enqueueing-on-the-rtmutex.patch
+features/all/rt/0018-rtmutex-Deboost-before-waking-up-the-top-waiter.patch
+features/all/rt/0019-sched-rtmutex-deadline-Fix-a-PI-crash-for-deadline-t.patch
+features/all/rt/0020-sched-deadline-rtmutex-Dont-miss-the-dl_runtime-dl_p.patch
+features/all/rt/0021-rtmutex-Clean-up.patch
+features/all/rt/0022-sched-rtmutex-Refactor-rt_mutex_setprio.patch
+features/all/rt/0023-sched-tracing-Update-trace_sched_pi_setprio.patch
+features/all/rt/0024-rtmutex-Fix-PI-chain-order-integrity.patch
+features/all/rt/0025-rtmutex-Fix-more-prio-comparisons.patch
+features/all/rt/0026-rtmutex-Plug-preempt-count-leak-in-rt_mutex_futex_un.patch
+features/all/rt/0027-futex-Avoid-freeing-an-active-timer.patch
+features/all/rt/0028-futex-Fix-small-and-harmless-looking-inconsistencies.patch
+features/all/rt/0029-futex-Clarify-mark_wake_futex-memory-barrier-usage.patch
+features/all/rt/0030-MAINTAINERS-Add-FUTEX-SUBSYSTEM.patch
+features/all/rt/0031-futex-rt_mutex-Fix-rt_mutex_cleanup_proxy_lock.patch
+features/all/rt/0032-arm-at91-do-not-disable-enable-clocks-in-a-row.patch
+features/all/rt/0033-ARM-smp-Move-clear_tasks_mm_cpumask-call-to-__cpu_di.patch
+features/all/rt/0034-rtmutex-Handle-non-enqueued-waiters-gracefully.patch
+features/all/rt/0035-fs-dcache-include-wait.h.patch
+features/all/rt/0036-rbtree-include-rcu.h-because-we-use-it.patch
+features/all/rt/0037-fs-dcache-init-in_lookup_hashtable.patch
+features/all/rt/0038-iommu-iova-don-t-disable-preempt-around-this_cpu_ptr.patch
+features/all/rt/0039-iommu-vt-d-don-t-disable-preemption-while-accessing-.patch
+features/all/rt/0040-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
+features/all/rt/0041-rxrpc-remove-unused-static-variables.patch
+features/all/rt/0042-rcu-update-make-RCU_EXPEDITE_BOOT-default.patch
+features/all/rt/0043-locking-percpu-rwsem-use-swait-for-the-wating-writer.patch
+features/all/rt/0044-pinctrl-qcom-Use-raw-spinlock-variants.patch
+features/all/rt/0045-x86-mm-cpa-avoid-wbinvd-for-PREEMPT.patch
+features/all/rt/0046-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch
+features/all/rt/0047-sparc64-use-generic-rwsem-spinlocks-rt.patch
+features/all/rt/0048-kernel-SRCU-provide-a-static-initializer.patch
+features/all/rt/0049-block-Shorten-interrupt-disabled-regions.patch
+features/all/rt/0050-timekeeping-Split-jiffies-seqlock.patch
+features/all/rt/0051-tracing-Account-for-preempt-off-in-preempt_schedule.patch
+features/all/rt/0052-signal-Revert-ptrace-preempt-magic.patch
+features/all/rt/0053-arm-Convert-arm-boot_lock-to-raw.patch
+features/all/rt/0054-arm-kprobe-replace-patch_lock-to-raw-lock.patch
+features/all/rt/0055-posix-timers-Prevent-broadcast-signals.patch
+features/all/rt/0056-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch
+features/all/rt/0057-drivers-random-Reduce-preempt-disabled-region.patch
+features/all/rt/0058-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch
+features/all/rt/0059-clockevents-drivers-timer-atmel-pit-fix-double-free_.patch
+features/all/rt/0060-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch
+features/all/rt/0061-drivers-net-Use-disable_irq_nosync-in-8139too.patch
+features/all/rt/0062-suspend-Prevent-might-sleep-splats.patch
+features/all/rt/0063-net-flip-lock-dep-thingy.patch.patch
+features/all/rt/0064-net-sched-Use-msleep-instead-of-yield.patch
+features/all/rt/0065-x86-ioapic-Do-not-unmask-io_apic-when-interrupt-is-i.patch
+features/all/rt/0066-pci-Use-__wake_up_all_locked-in-pci_unblock_user_cfg.patch
+features/all/rt/0067-latencyhist-disable-jump-labels.patch
+features/all/rt/0068-tracing-Add-latency-histograms.patch
+features/all/rt/0069-latency_hist-Update-sched_wakeup-probe.patch
+features/all/rt/0070-trace-latency-hist-Consider-new-argument-when-probin.patch
+features/all/rt/0071-trace-Use-rcuidle-version-for-preemptoff_hist-trace-.patch
+features/all/rt/0072-printk-Add-a-printk-kill-switch.patch
+features/all/rt/0073-printk-Add-force_early_printk-boot-param-to-help-wit.patch
+features/all/rt/0074-rt-Provide-PREEMPT_RT_BASE-config-switch.patch
+features/all/rt/0075-kconfig-Disable-config-options-which-are-not-RT-comp.patch
+features/all/rt/0076-kconfig-Add-PREEMPT_RT_FULL.patch
+features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch
+features/all/rt/0078-iommu-amd-Use-WARN_ON_NORT-in-__attach_device.patch
+features/all/rt/0079-rt-local_irq_-variants-depending-on-RT-RT.patch
+features/all/rt/0080-preempt-Provide-preempt_-_-no-rt-variants.patch
+features/all/rt/0081-Intrduce-migrate_disable-cpu_light.patch
+features/all/rt/0082-futex-workaround-migrate_disable-enable-in-different.patch
+features/all/rt/0083-rt-Add-local-irq-locks.patch
+features/all/rt/0084-locallock-add-local_lock_on.patch
+features/all/rt/0085-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch
+features/all/rt/0086-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch
+features/all/rt/0087-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch
+features/all/rt/0088-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch
+features/all/rt/0089-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch
+features/all/rt/0090-usb-Use-_nort-in-giveback-function.patch
+features/all/rt/0091-mm-scatterlist-Do-not-disable-irqs-on-RT.patch
+features/all/rt/0092-mm-workingset-Do-not-protect-workingset_shadow_nodes.patch
+features/all/rt/0093-signal-Make-__lock_task_sighand-RT-aware.patch
+features/all/rt/0094-signal-x86-Delay-calling-signals-in-atomic.patch
+features/all/rt/0095-x86-signal-delay-calling-signals-on-32bit.patch
+features/all/rt/0096-net-wireless-Use-WARN_ON_NORT.patch
+features/all/rt/0097-buffer_head-Replace-bh_uptodate_lock-for-rt.patch
+features/all/rt/0098-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch
+features/all/rt/0099-list_bl-Make-list-head-locking-RT-safe.patch
+features/all/rt/0100-list_bl-fixup-bogus-lockdep-warning.patch
+features/all/rt/0101-genirq-Disable-irqpoll-on-rt.patch
+features/all/rt/0102-genirq-Force-interrupt-thread-on-RT.patch
+features/all/rt/0103-drivers-net-vortex-fix-locking-issues.patch
+features/all/rt/0104-mm-page_alloc-rt-friendly-per-cpu-pages.patch
+features/all/rt/0105-mm-page_alloc-Reduce-lock-sections-further.patch
+features/all/rt/0106-mm-swap-Convert-to-percpu-locked.patch
+features/all/rt/0107-mm-perform-lru_add_drain_all-remotely.patch
+features/all/rt/0108-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch
+features/all/rt/0109-ARM-Initialize-split-page-table-locks-for-vector-pag.patch
+features/all/rt/0110-mm-bounce-Use-local_irq_save_nort.patch
+features/all/rt/0111-mm-Allow-only-slub-on-RT.patch
+features/all/rt/0112-mm-Enable-SLUB-for-RT.patch
+features/all/rt/0113-slub-Enable-irqs-for-__GFP_WAIT.patch
+features/all/rt/0114-slub-Disable-SLUB_CPU_PARTIAL.patch
+features/all/rt/0115-mm-page_alloc-Use-local_lock_on-instead-of-plain-spi.patch
+features/all/rt/0116-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch
+features/all/rt/0117-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch
+features/all/rt/0118-mm-memcontrol-mem_cgroup_migrate-replace-another-loc.patch
+features/all/rt/0119-mm-backing-dev-don-t-disable-IRQs-in-wb_congested_pu.patch
+features/all/rt/0120-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch
+features/all/rt/0121-radix-tree-use-local-locks.patch
+features/all/rt/0122-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch
+features/all/rt/0123-timers-Prepare-for-full-preemption.patch
+features/all/rt/0124-timer-delay-waking-softirqs-from-the-jiffy-tick.patch
+features/all/rt/0125-hrtimers-Prepare-full-preemption.patch
+features/all/rt/0126-hrtimer-enfore-64byte-alignment.patch
+features/all/rt/0127-hrtimer-Fixup-hrtimer-callback-changes-for-preempt-r.patch
+features/all/rt/0128-sched-deadline-dl_task_timer-has-to-be-irqsafe.patch
+features/all/rt/0129-timer-fd-Prevent-live-lock.patch
+features/all/rt/0130-tick-broadcast-Make-broadcast-hrtimer-irqsafe.patch
+features/all/rt/0131-timer-hrtimer-check-properly-for-a-running-timer.patch
+features/all/rt/0132-posix-timers-Thread-posix-cpu-timers-on-rt.patch
+features/all/rt/0133-sched-Move-task_struct-cleanup-to-RCU.patch
+features/all/rt/0134-sched-Limit-the-number-of-task-migrations-per-batch.patch
+features/all/rt/0135-sched-Move-mmdrop-to-RCU-on-RT.patch
+features/all/rt/0136-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch
+features/all/rt/0137-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch
+features/all/rt/0138-sched-Prevent-task-state-corruption-by-spurious-lock.patch
+features/all/rt/0139-sched-Remove-TASK_ALL.patch
+features/all/rt/0140-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch
+features/all/rt/0141-sched-Take-RT-softirq-semantics-into-account-in-cond.patch
+features/all/rt/0142-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch
+features/all/rt/0143-sched-Disable-TTWU_QUEUE-on-RT.patch
+features/all/rt/0144-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch
+features/all/rt/0145-sched-ttwu-Return-success-when-only-changing-the-sav.patch
+features/all/rt/0146-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch
+features/all/rt/0147-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch
+features/all/rt/0148-stop_machine-Use-raw-spinlocks.patch
+features/all/rt/0149-hotplug-Lightweight-get-online-cpus.patch
+features/all/rt/0150-hotplug-sync_unplug-No-n-in-task-name.patch
+features/all/rt/0151-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch
+features/all/rt/0152-trace-Add-migrate-disabled-counter-to-tracing-output.patch
+features/all/rt/0153-hotplug-Use-migrate-disable-on-unplug.patch
+features/all/rt/0154-lockdep-Make-it-RT-aware.patch
+features/all/rt/0155-locking-Disable-spin-on-owner-for-RT.patch
+features/all/rt/0156-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch
+features/all/rt/0157-softirq-Check-preemption-after-reenabling-interrupts.patch
+features/all/rt/0158-softirq-Disable-softirq-stacks-for-RT.patch
+features/all/rt/0159-softirq-Split-softirq-locks.patch
+features/all/rt/0160-kernel-softirq-unlock-with-irqs-on.patch
+features/all/rt/0161-kernel-migrate_disable-do-fastpath-in-atomic-irqs-of.patch
+features/all/rt/0162-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch
+features/all/rt/0163-softirq-split-timer-softirqs-out-of-ksoftirqd.patch
+features/all/rt/0164-softirq-wake-the-timer-softirq-if-needed.patch
+features/all/rt/0165-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
+features/all/rt/0166-Revert-timers-Don-t-wake-ktimersoftd-on-every-tick.patch
+features/all/rt/0167-rtmutex-trylock-is-okay-on-RT.patch
+features/all/rt/0168-gpu-don-t-check-for-the-lock-owner.patch
+features/all/rt/0169-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch
+features/all/rt/0170-rtmutex-Handle-the-various-new-futex-race-conditions.patch
+features/all/rt/0171-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch
+features/all/rt/0172-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch
+features/all/rt/0173-pid.h-include-atomic.h.patch
+features/all/rt/0174-arm-include-definition-for-cpumask_t.patch
+features/all/rt/0175-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch
+features/all/rt/0176-rtmutex-Add-rtmutex_lock_killable.patch
+features/all/rt/0177-rtmutex-Make-lock_killable-work.patch
+features/all/rt/0178-spinlock-Split-the-lock-types-header.patch
+features/all/rt/0179-rtmutex-Avoid-include-hell.patch
+features/all/rt/0180-rbtree-don-t-include-the-rcu-header.patch
+features/all/rt/0181-rt-Add-the-preempt-rt-lock-replacement-APIs.patch
+features/all/rt/0182-rt-Drop-mutex_disable-on-DEBUG-configs-and-the-GPL-s.patch
+features/all/rt/0183-kernel-locking-use-an-exclusive-wait_q-for-sleepers.patch
+features/all/rt/0184-rtmutex-Add-RT-aware-ww-locks.patch
+features/all/rt/0185-rtmutex-Provide-rt_mutex_lock_state.patch
+features/all/rt/0186-rtmutex-Provide-locked-slowpath.patch
+features/all/rt/0187-futex-rtmutex-Cure-RT-double-blocking-issue.patch
+features/all/rt/0188-rwsem-rt-Lift-single-reader-restriction.patch
+features/all/rt/0189-ptrace-fix-ptrace-vs-tasklist_lock-race.patch
+features/all/rt/0190-rcu-Frob-softirq-test.patch
+features/all/rt/0191-rcu-Merge-RCU-bh-into-RCU-preempt.patch
+features/all/rt/0192-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch
+features/all/rt/0193-rcutree-rcu_bh_qs-Disable-irq-while-calling-rcu_pree.patch
+features/all/rt/0194-tty-serial-omap-Make-the-locking-RT-aware.patch
+features/all/rt/0195-tty-serial-pl011-Make-the-locking-work-on-RT.patch
+features/all/rt/0196-rt-Improve-the-serial-console-PASS_LIMIT.patch
+features/all/rt/0197-tty-serial-8250-don-t-take-the-trylock-during-oops.patch
+features/all/rt/0198-wait.h-include-atomic.h.patch
+features/all/rt/0199-work-simple-Simple-work-queue-implemenation.patch
+features/all/rt/0200-completion-Use-simple-wait-queues.patch
+features/all/rt/0201-fs-aio-simple-simple-work.patch
+features/all/rt/0202-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch
+features/all/rt/0203-hrtimer-Move-schedule_work-call-to-helper-thread.patch
+features/all/rt/0204-locking-percpu-rwsem-Remove-preempt_disable-variants.patch
+features/all/rt/0205-fs-namespace-preemption-fix.patch
+features/all/rt/0206-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch
+features/all/rt/0207-block-Turn-off-warning-which-is-bogus-on-RT.patch
+features/all/rt/0208-fs-ntfs-disable-interrupt-only-on-RT.patch
+features/all/rt/0209-fs-jbd2-pull-your-plug-when-waiting-for-space.patch
+features/all/rt/0210-x86-Convert-mce-timer-to-hrtimer.patch
+features/all/rt/0211-x86-mce-use-swait-queue-for-mce-wakeups.patch
+features/all/rt/0212-x86-stackprotector-Avoid-random-pool-on-rt.patch
+features/all/rt/0213-x86-Use-generic-rwsem_spinlocks-on-rt.patch
+features/all/rt/0214-x86-UV-raw_spinlock-conversion.patch
+features/all/rt/0215-thermal-Defer-thermal-wakups-to-threads.patch
+features/all/rt/0216-fs-epoll-Do-not-disable-preemption-on-RT.patch
+features/all/rt/0217-mm-vmalloc-Another-preempt-disable-region-which-suck.patch
+features/all/rt/0218-block-mq-use-cpu_light.patch
+features/all/rt/0219-block-mq-do-not-invoke-preempt_disable.patch
+features/all/rt/0220-block-mq-don-t-complete-requests-via-IPI.patch
+features/all/rt/0221-md-raid5-Make-raid5_percpu-handling-RT-aware.patch
+features/all/rt/0222-rt-Introduce-cpu_chill.patch
+features/all/rt/0223-cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
+features/all/rt/0224-block-blk-mq-Use-swait.patch
+features/all/rt/0225-block-Use-cpu_chill-for-retry-loops.patch
+features/all/rt/0226-fs-dcache-Use-cpu_chill-in-trylock-loops.patch
+features/all/rt/0227-net-Use-cpu_chill-instead-of-cpu_relax.patch
+features/all/rt/0228-fs-dcache-use-swait_queue-instead-of-waitqueue.patch
+features/all/rt/0229-workqueue-Use-normal-rcu.patch
+features/all/rt/0230-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch
+features/all/rt/0231-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch
+features/all/rt/0232-sched-Distangle-worker-accounting-from-rqlock.patch
+features/all/rt/0233-idr-Use-local-lock-instead-of-preempt-enable-disable.patch
+features/all/rt/0234-percpu_ida-Use-local-locks.patch
+features/all/rt/0235-debugobjects-Make-RT-aware.patch
+features/all/rt/0236-jump-label-disable-if-stop_machine-is-used.patch
+features/all/rt/0237-seqlock-Prevent-rt-starvation.patch
+features/all/rt/0238-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch
+features/all/rt/0239-net-Use-skbufhead-with-raw-lock.patch
+features/all/rt/0240-net-core-cpuhotplug-Drain-input_pkt_queue-lockless.patch
+features/all/rt/0241-net-move-xmit_recursion-to-per-task-variable-on-RT.patch
+features/all/rt/0242-net-provide-a-way-to-delegate-processing-a-softirq-t.patch
+features/all/rt/0243-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch
+features/all/rt/0244-net-Qdisc-use-a-seqlock-instead-seqcount.patch
+features/all/rt/0245-net-add-back-the-missing-serialization-in-ip_send_un.patch
+features/all/rt/0246-net-add-a-lock-around-icmp_sk.patch
+features/all/rt/0247-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch
+features/all/rt/0248-net-sysrq-via-icmp.patch
+features/all/rt/0249-irqwork-push-most-work-into-softirq-context.patch
+features/all/rt/0250-irqwork-Move-irq-safe-work-to-irq-context.patch
+features/all/rt/0251-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
+features/all/rt/0252-printk-Make-rt-aware.patch
+features/all/rt/0253-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch
+features/all/rt/0254-printk-Drop-the-logbuf_lock-more-often.patch
+features/all/rt/0255-powerpc-Use-generic-rwsem-on-RT.patch
+features/all/rt/0256-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch
+features/all/rt/0257-powerpc-ps3-device-init.c-adapt-to-completions-using.patch
+features/all/rt/0258-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch
+features/all/rt/0259-arm-unwind-use-a-raw_spin_lock.patch
+features/all/rt/0260-ARM-enable-irq-in-translation-section-permission-fau.patch
+features/all/rt/0261-genirq-update-irq_set_irqchip_state-documentation.patch
+features/all/rt/0262-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch
+features/all/rt/0263-arm64-xen-Make-XEN-depend-on-RT.patch
+features/all/rt/0264-kgdb-serial-Short-term-workaround.patch
+features/all/rt/0265-sysfs-Add-sys-kernel-realtime-entry.patch
+features/all/rt/0266-powerpc-Disable-highmem-on-RT.patch
+features/all/rt/0267-mips-Disable-highmem-on-RT.patch
+features/all/rt/0268-mm-rt-kmap_atomic-scheduling.patch
+features/all/rt/0269-mm-rt-Fix-generic-kmap_atomic-for-RT.patch
+features/all/rt/0270-x86-highmem-Add-a-already-used-pte-check.patch
+features/all/rt/0271-arm-highmem-Flush-tlb-on-unmap.patch
+features/all/rt/0272-arm-Enable-highmem-for-rt.patch
+features/all/rt/0273-ipc-sem-Rework-semaphore-wakeups.patch
+features/all/rt/0274-x86-kvm-Require-const-tsc-for-RT.patch
+features/all/rt/0275-KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch
+features/all/rt/0276-scsi-fcoe-Make-RT-aware.patch
+features/all/rt/0277-sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch
+features/all/rt/0278-x86-crypto-Reduce-preempt-disabled-regions.patch
+features/all/rt/0279-crypto-Reduce-preempt-disabled-regions-more-algos.patch
+features/all/rt/0280-dm-Make-rt-aware.patch
+features/all/rt/0281-acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch
+features/all/rt/0282-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch
+features/all/rt/0283-random-Make-it-work-on-rt.patch
+features/all/rt/0284-random-avoid-preempt_disable-ed-section.patch
+features/all/rt/0285-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch
+features/all/rt/0286-cpu-rt-Rework-cpu-down-for-PREEMPT_RT.patch
+features/all/rt/0287-cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch
+features/all/rt/0288-kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch
+features/all/rt/0289-kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch
+features/all/rt/0290-cpu_down-move-migrate_enable-back.patch
+features/all/rt/0291-hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch
+features/all/rt/0292-rt-locking-Reenable-migration-accross-schedule.patch
+features/all/rt/0293-scsi-qla2xxx-Use-local_irq_save_nort-in-qla2x00_poll.patch
+features/all/rt/0294-net-Remove-preemption-disabling-in-netif_rx.patch
+features/all/rt/0295-net-Another-local_irq_disable-kmalloc-headache.patch
+features/all/rt/0296-net-core-protect-users-of-napi_alloc_cache-against-r.patch
+features/all/rt/0297-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch
+features/all/rt/0298-net-Add-a-mutex-around-devnet_rename_seq.patch
+features/all/rt/0299-crypto-Convert-crypto-notifier-chain-to-SRCU.patch
+features/all/rt/0300-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch
+features/all/rt/0301-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch
+features/all/rt/0302-perf-Make-swevent-hrtimer-run-in-irq-instead-of-soft.patch
+features/all/rt/0303-kernel-perf-mark-perf_cpu_context-s-timer-as-irqsafe.patch
+features/all/rt/0304-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch
+features/all/rt/0305-rcu-Eliminate-softirq-processing-from-rcutree.patch
+features/all/rt/0306-rcu-make-RCU_BOOST-default-on-RT.patch
+features/all/rt/0307-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch
+features/all/rt/0308-sched-Add-support-for-lazy-preemption.patch
+features/all/rt/0309-ftrace-Fix-trace-header-alignment.patch
+features/all/rt/0310-x86-Support-for-lazy-preemption.patch
+features/all/rt/0311-arm-Add-support-for-lazy-preemption.patch
+features/all/rt/0312-powerpc-Add-support-for-lazy-preemption.patch
+features/all/rt/0313-arch-arm64-Add-lazy-preempt-support.patch
+features/all/rt/0314-sched-migrate-disable-handle-updated-task-mask-mg-di.patch
+features/all/rt/0315-leds-trigger-disable-CPU-trigger-on-RT.patch
+features/all/rt/0316-mmci-Remove-bogus-local_irq_save.patch
+features/all/rt/0317-cpufreq-drop-K8-s-driver-from-beeing-selected.patch
+features/all/rt/0318-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch
+features/all/rt/0319-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch
+features/all/rt/0320-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch
+features/all/rt/0321-drm-i915-drop-trace_i915_gem_ring_dispatch-on-rt.patch
+features/all/rt/0322-i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch
+features/all/rt/0323-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch
+features/all/rt/0324-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch
+features/all/rt/0325-cgroups-use-simple-wait-in-css_release.patch
+features/all/rt/0326-memcontrol-Prevent-scheduling-while-atomic-in-cgroup.patch
+features/all/rt/0327-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch
+features/all/rt/0328-rt-ntp-Move-call-to-schedule_delayed_work-to-helper-.patch
+features/all/rt/0329-md-disable-bcache.patch
+features/all/rt/0330-workqueue-Prevent-deadlock-stall-on-RT.patch
+features/all/rt/0331-Add-localversion-for-RT-release.patch
+features/all/rt/0332-Linux-4.9.47-rt37-REBASE.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list