diff --git a/debian/changelog b/debian/changelog index ce8cf309c..e45c0d5c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ linux-2.6 (3.4.1-1~experimental.1) UNRELEASED; urgency=low [ Ben Hutchings ] * DFSG: Remove the new vs6624 driver, which contains non-free firmware * aufs: Update to aufs3.4-20120521 + * [rt] Update to 3.4-rt8 and reenable -- Ben Hutchings Mon, 21 May 2012 01:37:21 +0100 diff --git a/debian/config/amd64/defines b/debian/config/amd64/defines index f671a257b..7676d1c3f 100644 --- a/debian/config/amd64/defines +++ b/debian/config/amd64/defines @@ -1,7 +1,7 @@ [base] featuresets: none -# rt + rt kernel-arch: x86 [build] diff --git a/debian/config/i386/defines b/debian/config/i386/defines index 67feae443..806789224 100644 --- a/debian/config/i386/defines +++ b/debian/config/i386/defines @@ -1,7 +1,7 @@ [base] featuresets: none -# rt + rt kernel-arch: x86 [description] diff --git a/debian/patches/features/all/rt/0001-x86-Call-idle-notifier-after-irq_enter.patch b/debian/patches/features/all/rt/0001-x86-Call-idle-notifier-after-irq_enter.patch deleted file mode 100644 index 8954ad54c..000000000 --- a/debian/patches/features/all/rt/0001-x86-Call-idle-notifier-after-irq_enter.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 76f41af7cc93591a2723d2c59918df003f90cb09 Mon Sep 17 00:00:00 2001 -From: Frederic Weisbecker -Date: Mon, 26 Sep 2011 12:19:11 +0200 -Subject: [PATCH 001/267] x86: Call idle notifier after irq_enter() - -Interrupts notify the idle exit state before calling irq_enter(). But -the notifier code calls rcu_read_lock() and this is not allowed while -rcu is in an extended quiescent state. We need to wait for -rcu_irq_enter() to be called before doing so otherwise this results in -a grumpy RCU: - -[ 0.099991] WARNING: at include/linux/rcupdate.h:194 __atomic_notifier_call_chain+0xd2/0x110() -[ 0.099991] Hardware name: AMD690VM-FMH -[ 0.099991] Modules linked in: -[ 0.099991] Pid: 0, comm: swapper Not tainted 3.0.0-rc6+ #255 -[ 0.099991] Call Trace: -[ 0.099991] [] warn_slowpath_common+0x7a/0xb0 -[ 0.099991] [] warn_slowpath_null+0x15/0x20 -[ 0.099991] [] __atomic_notifier_call_chain+0xd2/0x110 -[ 0.099991] [] atomic_notifier_call_chain+0x11/0x20 -[ 0.099991] [] exit_idle+0x43/0x50 -[ 0.099991] [] smp_apic_timer_interrupt+0x39/0xa0 -[ 0.099991] [] apic_timer_interrupt+0x13/0x20 -[ 0.099991] [] ? default_idle+0xa7/0x350 -[ 0.099991] [] ? default_idle+0xa5/0x350 -[ 0.099991] [] amd_e400_idle+0x8b/0x110 -[ 0.099991] [] ? rcu_enter_nohz+0x8f/0x160 -[ 0.099991] [] cpu_idle+0xb0/0x110 -[ 0.099991] [] rest_init+0xe5/0x140 -[ 0.099991] [] ? rest_init+0x48/0x140 -[ 0.099991] [] start_kernel+0x3d1/0x3dc -[ 0.099991] [] x86_64_start_reservations+0x131/0x135 -[ 0.099991] [] x86_64_start_kernel+0xed/0xf4 - -Signed-off-by: Frederic Weisbecker -Link: http://lkml.kernel.org/r/20110929194047.GA10247@linux.vnet.ibm.com -Cc: Ingo Molnar -Cc: H. Peter Anvin -Cc: Andy Henroid -Signed-off-by: Paul E. McKenney -Signed-off-by: Thomas Gleixner ---- - arch/x86/kernel/apic/apic.c | 6 +++--- - arch/x86/kernel/apic/io_apic.c | 2 +- - arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 +- - arch/x86/kernel/cpu/mcheck/threshold.c | 2 +- - arch/x86/kernel/irq.c | 6 +++--- - 5 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c -index f98d84c..2cd2d93 100644 ---- a/arch/x86/kernel/apic/apic.c -+++ b/arch/x86/kernel/apic/apic.c -@@ -876,8 +876,8 @@ void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) - * Besides, if we don't timer interrupts ignore the global - * interrupt lock, which is the WrongThing (tm) to do. - */ -- exit_idle(); - irq_enter(); -+ exit_idle(); - local_apic_timer_interrupt(); - irq_exit(); - -@@ -1809,8 +1809,8 @@ void smp_spurious_interrupt(struct pt_regs *regs) - { - u32 v; - -- exit_idle(); - irq_enter(); -+ exit_idle(); - /* - * Check if this really is a spurious interrupt and ACK it - * if it is a vectored one. Just in case... -@@ -1846,8 +1846,8 @@ void smp_error_interrupt(struct pt_regs *regs) - "Illegal register address", /* APIC Error Bit 7 */ - }; - -- exit_idle(); - irq_enter(); -+ exit_idle(); - /* First tickle the hardware, only then report what went on. -- REW */ - v0 = apic_read(APIC_ESR); - apic_write(APIC_ESR, 0); -diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c -index 6d939d7..8980555 100644 ---- a/arch/x86/kernel/apic/io_apic.c -+++ b/arch/x86/kernel/apic/io_apic.c -@@ -2421,8 +2421,8 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) - unsigned vector, me; - - ack_APIC_irq(); -- exit_idle(); - irq_enter(); -+ exit_idle(); - - me = smp_processor_id(); - for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { -diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c -index 787e06c..ce21561 100644 ---- a/arch/x86/kernel/cpu/mcheck/therm_throt.c -+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c -@@ -397,8 +397,8 @@ static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt; - - asmlinkage void smp_thermal_interrupt(struct pt_regs *regs) - { -- exit_idle(); - irq_enter(); -+ exit_idle(); - inc_irq_stat(irq_thermal_count); - smp_thermal_vector(); - irq_exit(); -diff --git a/arch/x86/kernel/cpu/mcheck/threshold.c b/arch/x86/kernel/cpu/mcheck/threshold.c -index d746df2..aa578ca 100644 ---- a/arch/x86/kernel/cpu/mcheck/threshold.c -+++ b/arch/x86/kernel/cpu/mcheck/threshold.c -@@ -19,8 +19,8 @@ void (*mce_threshold_vector)(void) = default_threshold_interrupt; - - asmlinkage void smp_threshold_interrupt(void) - { -- exit_idle(); - irq_enter(); -+ exit_idle(); - inc_irq_stat(irq_threshold_count); - mce_threshold_vector(); - irq_exit(); -diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c -index 429e0c9..5d31e5b 100644 ---- a/arch/x86/kernel/irq.c -+++ b/arch/x86/kernel/irq.c -@@ -181,8 +181,8 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs) - unsigned vector = ~regs->orig_ax; - unsigned irq; - -- exit_idle(); - irq_enter(); -+ exit_idle(); - - irq = __this_cpu_read(vector_irq[vector]); - -@@ -209,10 +209,10 @@ void smp_x86_platform_ipi(struct pt_regs *regs) - - ack_APIC_irq(); - -- exit_idle(); -- - irq_enter(); - -+ exit_idle(); -+ - inc_irq_stat(x86_platform_ipis); - - if (x86_platform_ipi_callback) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0008-arm-enable-interrupts-in-signal-code.patch.patch b/debian/patches/features/all/rt/0008-arm-enable-interrupts-in-signal-code.patch.patch deleted file mode 100644 index a61e49bba..000000000 --- a/debian/patches/features/all/rt/0008-arm-enable-interrupts-in-signal-code.patch.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 415c7e81f6b54e5f8e8cddf0f2ff1c1855eeade3 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sat, 16 Jul 2011 16:27:13 +0200 -Subject: [PATCH 008/267] arm-enable-interrupts-in-signal-code.patch - -Signed-off-by: Thomas Gleixner ---- - arch/arm/kernel/signal.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c -index 9e617bd..c7001bc 100644 ---- a/arch/arm/kernel/signal.c -+++ b/arch/arm/kernel/signal.c -@@ -672,6 +672,9 @@ static void do_signal(struct pt_regs *regs, int syscall) - if (!user_mode(regs)) - return; - -+ local_irq_enable(); -+ preempt_check_resched(); -+ - /* - * If we were from a system call, check for system call restarting... - */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0009-powerpc-85xx-Mark-cascade-irq-IRQF_NO_THREAD.patch b/debian/patches/features/all/rt/0009-powerpc-85xx-Mark-cascade-irq-IRQF_NO_THREAD.patch deleted file mode 100644 index be1a1b15e..000000000 --- a/debian/patches/features/all/rt/0009-powerpc-85xx-Mark-cascade-irq-IRQF_NO_THREAD.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 490faa4e4541df017386a562e4e9ad7011f49562 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sat, 16 Jul 2011 12:09:54 +0200 -Subject: [PATCH 009/267] powerpc: 85xx: Mark cascade irq IRQF_NO_THREAD - -Cascade interrupt must run in hard interrupt context. - -Signed-off-by: Thomas Gleixner ---- - arch/powerpc/platforms/85xx/mpc85xx_cds.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c -index 66cb8d6..7e2a4d2 100644 ---- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c -+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c -@@ -177,7 +177,7 @@ static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id) - - static struct irqaction mpc85xxcds_8259_irqaction = { - .handler = mpc85xx_8259_cascade_action, -- .flags = IRQF_SHARED, -+ .flags = IRQF_SHARED | IRQF_NO_THREAD, - .name = "8259 cascade", - }; - #endif /* PPC_I8259 */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0010-powerpc-wsp-Mark-opb-cascade-handler-IRQF_NO_THREAD.patch b/debian/patches/features/all/rt/0010-powerpc-wsp-Mark-opb-cascade-handler-IRQF_NO_THREAD.patch deleted file mode 100644 index 281cc142d..000000000 --- a/debian/patches/features/all/rt/0010-powerpc-wsp-Mark-opb-cascade-handler-IRQF_NO_THREAD.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 05a48c448ba9085941f020ea02a7c880e80d683c Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 5 Oct 2011 14:11:24 +0200 -Subject: [PATCH 010/267] powerpc: wsp: Mark opb cascade handler - IRQF_NO_THREAD - -Cascade handlers must run in hard interrupt context. - -Signed-off-by: Thomas Gleixner ---- - arch/powerpc/platforms/wsp/opb_pic.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/arch/powerpc/platforms/wsp/opb_pic.c b/arch/powerpc/platforms/wsp/opb_pic.c -index be05631..19f353d 100644 ---- a/arch/powerpc/platforms/wsp/opb_pic.c -+++ b/arch/powerpc/platforms/wsp/opb_pic.c -@@ -320,7 +320,8 @@ void __init opb_pic_init(void) - } - - /* Attach opb interrupt handler to new virtual IRQ */ -- rc = request_irq(virq, opb_irq_handler, 0, "OPB LS Cascade", opb); -+ rc = request_irq(virq, opb_irq_handler, IRQF_NO_THREAD, -+ "OPB LS Cascade", opb); - if (rc) { - printk("opb: request_irq failed: %d\n", rc); - continue; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0011-powerpc-Mark-IPI-interrupts-IRQF_NO_THREAD.patch b/debian/patches/features/all/rt/0011-powerpc-Mark-IPI-interrupts-IRQF_NO_THREAD.patch deleted file mode 100644 index 802c53cb6..000000000 --- a/debian/patches/features/all/rt/0011-powerpc-Mark-IPI-interrupts-IRQF_NO_THREAD.patch +++ /dev/null @@ -1,73 +0,0 @@ -From c5f5de2dcb79c63ab914f69b8d1a59ba211f8b15 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 5 Oct 2011 14:00:26 +0200 -Subject: [PATCH 011/267] powerpc: Mark IPI interrupts IRQF_NO_THREAD - -IPI handlers cannot be threaded. Remove the obsolete IRQF_DISABLED -flag (see commit e58aa3d2) while at it. - -Signed-off-by: Thomas Gleixner ---- - arch/powerpc/kernel/smp.c | 4 ++-- - arch/powerpc/platforms/powermac/smp.c | 4 ++-- - arch/powerpc/sysdev/xics/xics-common.c | 5 +++-- - 3 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c -index 6df7090..abdedd3 100644 ---- a/arch/powerpc/kernel/smp.c -+++ b/arch/powerpc/kernel/smp.c -@@ -187,8 +187,8 @@ int smp_request_message_ipi(int virq, int msg) - return 1; - } - #endif -- err = request_irq(virq, smp_ipi_action[msg], IRQF_PERCPU, -- smp_ipi_name[msg], 0); -+ err = request_irq(virq, smp_ipi_action[msg], -+ IRQF_PERCPU | IRQF_NO_THREAD, smp_ipi_name[msg], 0); - WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n", - virq, smp_ipi_name[msg], err); - -diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c -index 3394254..8d75ac8 100644 ---- a/arch/powerpc/platforms/powermac/smp.c -+++ b/arch/powerpc/platforms/powermac/smp.c -@@ -200,7 +200,7 @@ static int psurge_secondary_ipi_init(void) - - if (psurge_secondary_virq) - rc = request_irq(psurge_secondary_virq, psurge_ipi_intr, -- IRQF_PERCPU, "IPI", NULL); -+ IRQF_NO_THREAD | IRQF_PERCPU, "IPI", NULL); - - if (rc) - pr_err("Failed to setup secondary cpu IPI\n"); -@@ -408,7 +408,7 @@ static int __init smp_psurge_kick_cpu(int nr) - - static struct irqaction psurge_irqaction = { - .handler = psurge_ipi_intr, -- .flags = IRQF_PERCPU, -+ .flags = IRQF_PERCPU | IRQF_NO_THREAD, - .name = "primary IPI", - }; - -diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c -index 63762c6..4ba6194 100644 ---- a/arch/powerpc/sysdev/xics/xics-common.c -+++ b/arch/powerpc/sysdev/xics/xics-common.c -@@ -134,10 +134,11 @@ static void xics_request_ipi(void) - BUG_ON(ipi == NO_IRQ); - - /* -- * IPIs are marked IRQF_PERCPU. The handler was set in map. -+ * IPIs are marked PERCPU and also IRQF_NO_THREAD as they must -+ * run in hard interrupt context. The handler was set in map. - */ - BUG_ON(request_irq(ipi, icp_ops->ipi_action, -- IRQF_PERCPU, "IPI", NULL)); -+ IRQF_NO_THREAD|IRQF_PERCPU, "IPI", NULL)); - } - - int __init xics_smp_probe(void) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0012-powerpc-Allow-irq-threading.patch b/debian/patches/features/all/rt/0012-powerpc-Allow-irq-threading.patch deleted file mode 100644 index bbefa88dc..000000000 --- a/debian/patches/features/all/rt/0012-powerpc-Allow-irq-threading.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2e574f68fff54d8c7398b3984f183fb80ec8ce3e Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sat, 16 Jul 2011 13:16:24 +0200 -Subject: [PATCH 012/267] powerpc: Allow irq threading - -All interrupts which must be non threaded are marked -IRQF_NO_THREAD. So it's safe to allow force threaded handlers. - -Signed-off-by: Thomas Gleixner ---- - arch/powerpc/Kconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 951e18f..7c93c7e 100644 ---- a/arch/powerpc/Kconfig -+++ b/arch/powerpc/Kconfig -@@ -132,6 +132,7 @@ config PPC - select IRQ_PER_CPU - select GENERIC_IRQ_SHOW - select GENERIC_IRQ_SHOW_LEVEL -+ select IRQ_FORCED_THREADING - select HAVE_RCU_TABLE_FREE if SMP - select HAVE_SYSCALL_TRACEPOINTS - select HAVE_BPF_JIT if (PPC64 && NET) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0013-sched-Keep-period-timer-ticking-when-throttling-acti.patch b/debian/patches/features/all/rt/0013-sched-Keep-period-timer-ticking-when-throttling-acti.patch deleted file mode 100644 index b02e64043..000000000 --- a/debian/patches/features/all/rt/0013-sched-Keep-period-timer-ticking-when-throttling-acti.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 9e1c03d11fdc2426a5d53a1d0e0b63b412924287 Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra -Date: Tue, 18 Oct 2011 22:03:48 +0200 -Subject: [PATCH 013/267] sched: Keep period timer ticking when throttling - active - -When a runqueue is throttled we cannot disable the period timer -because that timer is the only way to undo the throttling. - -We got stale throttling entries when a rq was throttled and then the -global sysctl was disabled, which stopped the timer. - -[ tglx: Preliminary changelog ] - -Signed-off-by: Thomas Gleixner ---- - kernel/sched_rt.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c -index 78fcacf..40d97e1 100644 ---- a/kernel/sched_rt.c -+++ b/kernel/sched_rt.c -@@ -580,12 +580,9 @@ static inline int balance_runtime(struct rt_rq *rt_rq) - - static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) - { -- int i, idle = 1; -+ int i, idle = 1, throttled = 0; - const struct cpumask *span; - -- if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF) -- return 1; -- - span = sched_rt_period_mask(); - for_each_cpu(i, span) { - int enqueue = 0; -@@ -620,12 +617,17 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) - if (!rt_rq_throttled(rt_rq)) - enqueue = 1; - } -+ if (rt_rq->rt_throttled) -+ throttled = 1; - - if (enqueue) - sched_rt_rq_enqueue(rt_rq); - raw_spin_unlock(&rq->lock); - } - -+ if (!throttled && (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF)) -+ return 1; -+ - return idle; - } - -@@ -686,7 +688,8 @@ static void update_curr_rt(struct rq *rq) - if (unlikely((s64)delta_exec < 0)) - delta_exec = 0; - -- schedstat_set(curr->se.statistics.exec_max, max(curr->se.statistics.exec_max, delta_exec)); -+ schedstat_set(curr->se.statistics.exec_max, -+ max(curr->se.statistics.exec_max, delta_exec)); - - curr->se.sum_exec_runtime += delta_exec; - account_group_exec_runtime(curr, delta_exec); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0014-sched-Do-not-throttle-due-to-PI-boosting.patch b/debian/patches/features/all/rt/0014-sched-Do-not-throttle-due-to-PI-boosting.patch deleted file mode 100644 index 108503d07..000000000 --- a/debian/patches/features/all/rt/0014-sched-Do-not-throttle-due-to-PI-boosting.patch +++ /dev/null @@ -1,52 +0,0 @@ -From ce43773df1fea5d063ac8d1aca4ff806bf899b5b Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra -Date: Tue, 18 Oct 2011 22:03:48 +0200 -Subject: [PATCH 014/267] sched: Do not throttle due to PI boosting - -When a runqueue has rt_runtime_us = 0 then the only way it can -accumulate rt_time is via PI boosting. Though that causes the runqueue -to be throttled and replenishing does not change anything due to -rt_runtime_us = 0. So avoid that situation by clearing rt_time and -skip the throttling alltogether. - -[ tglx: Preliminary changelog ] - -Signed-off-by: Thomas Gleixner ---- - kernel/sched_rt.c | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c -index 40d97e1..c108b9c 100644 ---- a/kernel/sched_rt.c -+++ b/kernel/sched_rt.c -@@ -659,8 +659,24 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) - return 0; - - if (rt_rq->rt_time > runtime) { -- rt_rq->rt_throttled = 1; -- printk_once(KERN_WARNING "sched: RT throttling activated\n"); -+ struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq); -+ -+ /* -+ * Don't actually throttle groups that have no runtime assigned -+ * but accrue some time due to boosting. -+ */ -+ if (likely(rt_b->rt_runtime)) { -+ rt_rq->rt_throttled = 1; -+ printk_once(KERN_WARNING "sched: RT throttling activated\n"); -+ } else { -+ /* -+ * In case we did anyway, make it go away, -+ * replenishment is a joke, since it will replenish us -+ * with exactly 0 ns. -+ */ -+ rt_rq->rt_time = 0; -+ } -+ - if (rt_rq_throttled(rt_rq)) { - sched_rt_rq_dequeue(rt_rq); - return 1; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0015-time-Remove-bogus-comments.patch b/debian/patches/features/all/rt/0015-time-Remove-bogus-comments.patch deleted file mode 100644 index d75938a77..000000000 --- a/debian/patches/features/all/rt/0015-time-Remove-bogus-comments.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f427d80501aa7fcdf695288aa8eb507dbd5c9369 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 28 Feb 2012 19:06:50 +0100 -Subject: [PATCH 015/267] time: Remove bogus comments - -There is no global irq lock which makes a syscall magically SMP -safe. Remove the outdated comment concerning do_settimeofday() as -well. - -Signed-off-by: Thomas Gleixner ---- - kernel/time.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/kernel/time.c b/kernel/time.c -index 73e416d..ba744cf 100644 ---- a/kernel/time.c -+++ b/kernel/time.c -@@ -163,7 +163,6 @@ int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz) - return error; - - if (tz) { -- /* SMP safe, global irq locking makes it work. */ - sys_tz = *tz; - update_vsyscall_tz(); - if (firsttime) { -@@ -173,12 +172,7 @@ int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz) - } - } - if (tv) -- { -- /* SMP safe, again the code in arch/foo/time.c should -- * globally block out interrupts when it runs. -- */ - return do_settimeofday(tv); -- } - return 0; - } - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0016-x86-vdso-Remove-bogus-locking-in-update_vsyscall_tz.patch b/debian/patches/features/all/rt/0016-x86-vdso-Remove-bogus-locking-in-update_vsyscall_tz.patch deleted file mode 100644 index c328ab0cb..000000000 --- a/debian/patches/features/all/rt/0016-x86-vdso-Remove-bogus-locking-in-update_vsyscall_tz.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 76f63af187b74e8d533678278b247292340ccc10 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 28 Feb 2012 19:10:46 +0100 -Subject: [PATCH 016/267] x86: vdso: Remove bogus locking in - update_vsyscall_tz() - -Changing the sequence count in update_vsyscall_tz() is completely -pointless. - -The vdso code copies the data unprotected. There is no point to change -this as sys_tz is nowhere protected at all. See sys_gettimeofday(). - -Signed-off-by: Thomas Gleixner ---- - arch/x86/kernel/vsyscall_64.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c -index e4d4a22..f04adbd 100644 ---- a/arch/x86/kernel/vsyscall_64.c -+++ b/arch/x86/kernel/vsyscall_64.c -@@ -80,12 +80,7 @@ early_param("vsyscall", vsyscall_setup); - - void update_vsyscall_tz(void) - { -- unsigned long flags; -- -- write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags); -- /* sys_tz has changed */ - vsyscall_gtod_data.sys_tz = sys_tz; -- write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); - } - - void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0017-x86-vdso-Use-seqcount-instead-of-seqlock.patch b/debian/patches/features/all/rt/0017-x86-vdso-Use-seqcount-instead-of-seqlock.patch deleted file mode 100644 index d8401a70a..000000000 --- a/debian/patches/features/all/rt/0017-x86-vdso-Use-seqcount-instead-of-seqlock.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 11f9d4b70b2592b57dda3c33bdcd726ee98c9a71 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 28 Feb 2012 18:24:07 +0100 -Subject: [PATCH 017/267] x86: vdso: Use seqcount instead of seqlock - -The update of the vdso data happens under xtime_lock, so adding a -nested lock is pointless. Just use a seqcount to sync the readers. - -Signed-off-by: Thomas Gleixner ---- - arch/x86/include/asm/vgtod.h | 2 +- - arch/x86/kernel/vsyscall_64.c | 11 +++-------- - arch/x86/vdso/vclock_gettime.c | 16 ++++++++-------- - 3 files changed, 12 insertions(+), 17 deletions(-) - -diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h -index 815285b..1f00717 100644 ---- a/arch/x86/include/asm/vgtod.h -+++ b/arch/x86/include/asm/vgtod.h -@@ -5,7 +5,7 @@ - #include - - struct vsyscall_gtod_data { -- seqlock_t lock; -+ seqcount_t seq; - - /* open coded 'struct timespec' */ - time_t wall_time_sec; -diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c -index f04adbd..50392ee 100644 ---- a/arch/x86/kernel/vsyscall_64.c -+++ b/arch/x86/kernel/vsyscall_64.c -@@ -52,10 +52,7 @@ - #include "vsyscall_trace.h" - - DEFINE_VVAR(int, vgetcpu_mode); --DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) = --{ -- .lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock), --}; -+DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data); - - static enum { EMULATE, NATIVE, NONE } vsyscall_mode = NATIVE; - -@@ -86,9 +83,7 @@ void update_vsyscall_tz(void) - void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, - struct clocksource *clock, u32 mult) - { -- unsigned long flags; -- -- write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags); -+ write_seqcount_begin(&vsyscall_gtod_data.seq); - - /* copy vsyscall data */ - vsyscall_gtod_data.clock.vclock_mode = clock->archdata.vclock_mode; -@@ -101,7 +96,7 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm, - vsyscall_gtod_data.wall_to_monotonic = *wtm; - vsyscall_gtod_data.wall_time_coarse = __current_kernel_time(); - -- write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags); -+ write_seqcount_end(&vsyscall_gtod_data.seq); - } - - static void warn_bad_vsyscall(const char *level, struct pt_regs *regs, -diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c -index 6bc0e72..d8511fb 100644 ---- a/arch/x86/vdso/vclock_gettime.c -+++ b/arch/x86/vdso/vclock_gettime.c -@@ -86,11 +86,11 @@ notrace static noinline int do_realtime(struct timespec *ts) - { - unsigned long seq, ns; - do { -- seq = read_seqbegin(>od->lock); -+ seq = read_seqcount_begin(>od->seq); - ts->tv_sec = gtod->wall_time_sec; - ts->tv_nsec = gtod->wall_time_nsec; - ns = vgetns(); -- } while (unlikely(read_seqretry(>od->lock, seq))); -+ } while (unlikely(read_seqcount_retry(>od->seq, seq))); - timespec_add_ns(ts, ns); - return 0; - } -@@ -99,12 +99,12 @@ notrace static noinline int do_monotonic(struct timespec *ts) - { - unsigned long seq, ns, secs; - do { -- seq = read_seqbegin(>od->lock); -+ seq = read_seqcount_begin(>od->seq); - secs = gtod->wall_time_sec; - ns = gtod->wall_time_nsec + vgetns(); - secs += gtod->wall_to_monotonic.tv_sec; - ns += gtod->wall_to_monotonic.tv_nsec; -- } while (unlikely(read_seqretry(>od->lock, seq))); -+ } while (unlikely(read_seqcount_retry(>od->seq, seq))); - - /* wall_time_nsec, vgetns(), and wall_to_monotonic.tv_nsec - * are all guaranteed to be nonnegative. -@@ -123,10 +123,10 @@ notrace static noinline int do_realtime_coarse(struct timespec *ts) - { - unsigned long seq; - do { -- seq = read_seqbegin(>od->lock); -+ seq = read_seqcount_begin(>od->seq); - ts->tv_sec = gtod->wall_time_coarse.tv_sec; - ts->tv_nsec = gtod->wall_time_coarse.tv_nsec; -- } while (unlikely(read_seqretry(>od->lock, seq))); -+ } while (unlikely(read_seqcount_retry(>od->seq, seq))); - return 0; - } - -@@ -134,12 +134,12 @@ notrace static noinline int do_monotonic_coarse(struct timespec *ts) - { - unsigned long seq, ns, secs; - do { -- seq = read_seqbegin(>od->lock); -+ seq = read_seqcount_begin(>od->seq); - secs = gtod->wall_time_coarse.tv_sec; - ns = gtod->wall_time_coarse.tv_nsec; - secs += gtod->wall_to_monotonic.tv_sec; - ns += gtod->wall_to_monotonic.tv_nsec; -- } while (unlikely(read_seqretry(>od->lock, seq))); -+ } while (unlikely(read_seqcount_retry(>od->seq, seq))); - - /* wall_time_nsec and wall_to_monotonic.tv_nsec are - * guaranteed to be between 0 and NSEC_PER_SEC. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0018-ia64-vsyscall-Use-seqcount-instead-of-seqlock.patch b/debian/patches/features/all/rt/0018-ia64-vsyscall-Use-seqcount-instead-of-seqlock.patch deleted file mode 100644 index b21fdbe5b..000000000 --- a/debian/patches/features/all/rt/0018-ia64-vsyscall-Use-seqcount-instead-of-seqlock.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 0ad3596103ef2c8ecb6145c8a98ed7e38a9bc6ce Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 28 Feb 2012 18:33:08 +0100 -Subject: [PATCH 018/267] ia64: vsyscall: Use seqcount instead of seqlock - -The update of the vdso data happens under xtime_lock, so adding a -nested lock is pointless. Just use a seqcount to sync the readers. - -Signed-off-by: Thomas Gleixner -Cc: Tony Luck ---- - arch/ia64/kernel/asm-offsets.c | 4 ++-- - arch/ia64/kernel/fsys.S | 2 +- - arch/ia64/kernel/fsyscall_gtod_data.h | 2 +- - arch/ia64/kernel/time.c | 10 +++------- - 4 files changed, 7 insertions(+), 11 deletions(-) - -diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c -index af56501..106aeb6 100644 ---- a/arch/ia64/kernel/asm-offsets.c -+++ b/arch/ia64/kernel/asm-offsets.c -@@ -269,8 +269,8 @@ void foo(void) - BLANK(); - - /* used by fsys_gettimeofday in arch/ia64/kernel/fsys.S */ -- DEFINE(IA64_GTOD_LOCK_OFFSET, -- offsetof (struct fsyscall_gtod_data_t, lock)); -+ DEFINE(IA64_GTOD_SEQ_OFFSET, -+ offsetof (struct fsyscall_gtod_data_t, seq); - DEFINE(IA64_GTOD_WALL_TIME_OFFSET, - offsetof (struct fsyscall_gtod_data_t, wall_time)); - DEFINE(IA64_GTOD_MONO_TIME_OFFSET, -diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S -index 331d42b..fa77de7 100644 ---- a/arch/ia64/kernel/fsys.S -+++ b/arch/ia64/kernel/fsys.S -@@ -174,7 +174,7 @@ ENTRY(fsys_set_tid_address) - FSYS_RETURN - END(fsys_set_tid_address) - --#if IA64_GTOD_LOCK_OFFSET !=0 -+#if IA64_GTOD_SEQ_OFFSET !=0 - #error fsys_gettimeofday incompatible with changes to struct fsyscall_gtod_data_t - #endif - #if IA64_ITC_JITTER_OFFSET !=0 -diff --git a/arch/ia64/kernel/fsyscall_gtod_data.h b/arch/ia64/kernel/fsyscall_gtod_data.h -index 57d2ee6..146b15b 100644 ---- a/arch/ia64/kernel/fsyscall_gtod_data.h -+++ b/arch/ia64/kernel/fsyscall_gtod_data.h -@@ -6,7 +6,7 @@ - */ - - struct fsyscall_gtod_data_t { -- seqlock_t lock; -+ seqcount_t seq; - struct timespec wall_time; - struct timespec monotonic_time; - cycle_t clk_mask; -diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c -index 43920de..8e991a0 100644 ---- a/arch/ia64/kernel/time.c -+++ b/arch/ia64/kernel/time.c -@@ -35,9 +35,7 @@ - - static cycle_t itc_get_cycles(struct clocksource *cs); - --struct fsyscall_gtod_data_t fsyscall_gtod_data = { -- .lock = __SEQLOCK_UNLOCKED(fsyscall_gtod_data.lock), --}; -+struct fsyscall_gtod_data_t fsyscall_gtod_data; - - struct itc_jitter_data_t itc_jitter_data; - -@@ -460,9 +458,7 @@ void update_vsyscall_tz(void) - void update_vsyscall(struct timespec *wall, struct timespec *wtm, - struct clocksource *c, u32 mult) - { -- unsigned long flags; -- -- write_seqlock_irqsave(&fsyscall_gtod_data.lock, flags); -+ write_seqcount_begin(&fsyscall_gtod_data.seq); - - /* copy fsyscall clock data */ - fsyscall_gtod_data.clk_mask = c->mask; -@@ -485,6 +481,6 @@ void update_vsyscall(struct timespec *wall, struct timespec *wtm, - fsyscall_gtod_data.monotonic_time.tv_sec++; - } - -- write_sequnlock_irqrestore(&fsyscall_gtod_data.lock, flags); -+ write_seqcount_end(&fsyscall_gtod_data.seq); - } - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0021-vfs-fs_struct-Move-code-out-of-seqcount-write-sectio.patch b/debian/patches/features/all/rt/0021-vfs-fs_struct-Move-code-out-of-seqcount-write-sectio.patch deleted file mode 100644 index c1f7d8794..000000000 --- a/debian/patches/features/all/rt/0021-vfs-fs_struct-Move-code-out-of-seqcount-write-sectio.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 00f0fcf98b55531834e45b94ad6f8b03737e2ce0 Mon Sep 17 00:00:00 2001 -From: Al Viro -Date: Thu, 15 Mar 2012 18:39:40 +0000 -Subject: [PATCH 021/267] vfs: fs_struct: Move code out of seqcount write - sections - -RT cannot disable preemption in the seqcount write sections due to -functions called which take "sleeping" spinlocks. - -Move the code out of those sections. It does not need to be there. - -Signed-off-by: Thomas Gleixner ---- - fs/fs_struct.c | 27 +++++++++++++++------------ - 1 file changed, 15 insertions(+), 12 deletions(-) - -diff --git a/fs/fs_struct.c b/fs/fs_struct.c -index 78b519c..f5818c4 100644 ---- a/fs/fs_struct.c -+++ b/fs/fs_struct.c -@@ -26,11 +26,11 @@ void set_fs_root(struct fs_struct *fs, struct path *path) - { - struct path old_root; - -+ path_get_longterm(path); - spin_lock(&fs->lock); - write_seqcount_begin(&fs->seq); - old_root = fs->root; - fs->root = *path; -- path_get_longterm(path); - write_seqcount_end(&fs->seq); - spin_unlock(&fs->lock); - if (old_root.dentry) -@@ -45,11 +45,11 @@ void set_fs_pwd(struct fs_struct *fs, struct path *path) - { - struct path old_pwd; - -+ path_get_longterm(path); - spin_lock(&fs->lock); - write_seqcount_begin(&fs->seq); - old_pwd = fs->pwd; - fs->pwd = *path; -- path_get_longterm(path); - write_seqcount_end(&fs->seq); - spin_unlock(&fs->lock); - -@@ -57,6 +57,14 @@ void set_fs_pwd(struct fs_struct *fs, struct path *path) - path_put_longterm(&old_pwd); - } - -+static inline int replace_path(struct path *p, const struct path *old, const struct path *new) -+{ -+ if (likely(p->dentry != old->dentry || p->mnt != old->mnt)) -+ return 0; -+ *p = *new; -+ return 1; -+} -+ - void chroot_fs_refs(struct path *old_root, struct path *new_root) - { - struct task_struct *g, *p; -@@ -68,21 +76,16 @@ void chroot_fs_refs(struct path *old_root, struct path *new_root) - task_lock(p); - fs = p->fs; - if (fs) { -+ int hits = 0; - spin_lock(&fs->lock); - write_seqcount_begin(&fs->seq); -- if (fs->root.dentry == old_root->dentry -- && fs->root.mnt == old_root->mnt) { -- path_get_longterm(new_root); -- fs->root = *new_root; -+ hits += replace_path(&fs->root, old_root, new_root); -+ hits += replace_path(&fs->pwd, old_root, new_root); -+ write_seqcount_end(&fs->seq); -+ while (hits--) { - count++; -- } -- if (fs->pwd.dentry == old_root->dentry -- && fs->pwd.mnt == old_root->mnt) { - path_get_longterm(new_root); -- fs->pwd = *new_root; -- count++; - } -- write_seqcount_end(&fs->seq); - spin_unlock(&fs->lock); - } - task_unlock(p); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0022-timekeeping-Split-xtime_lock.patch b/debian/patches/features/all/rt/0022-timekeeping-Split-xtime_lock.patch deleted file mode 100644 index df406fb8e..000000000 --- a/debian/patches/features/all/rt/0022-timekeeping-Split-xtime_lock.patch +++ /dev/null @@ -1,537 +0,0 @@ -From 575bc99dec3a6b5121859ec0dc56a400313c500b Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Thu, 1 Mar 2012 15:14:06 +0100 -Subject: [PATCH 022/267] timekeeping: Split xtime_lock - -xtime_lock is going to be split apart in mainline, so we can shorten -the seqcount protected regions and avoid updating seqcount in some -code pathes. This is a straight forward split, so we can avoid the -whole mess with raw seqlocks for RT. - -Signed-off-by: Thomas Gleixner ---- - kernel/time/jiffies.c | 4 +- - kernel/time/ntp.c | 24 ++++++++---- - kernel/time/tick-common.c | 10 +++-- - kernel/time/tick-internal.h | 3 +- - kernel/time/tick-sched.c | 16 +++++--- - kernel/time/timekeeping.c | 90 +++++++++++++++++++++++++------------------ - 6 files changed, 88 insertions(+), 59 deletions(-) - -diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c -index a470154..21940eb 100644 ---- a/kernel/time/jiffies.c -+++ b/kernel/time/jiffies.c -@@ -74,9 +74,9 @@ u64 get_jiffies_64(void) - u64 ret; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - ret = jiffies_64; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - return ret; - } - EXPORT_SYMBOL(get_jiffies_64); -diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c -index 4b85a7a..419cbaa 100644 ---- a/kernel/time/ntp.c -+++ b/kernel/time/ntp.c -@@ -358,7 +358,8 @@ static enum hrtimer_restart ntp_leap_second(struct hrtimer *timer) - { - enum hrtimer_restart res = HRTIMER_NORESTART; - -- write_seqlock(&xtime_lock); -+ raw_spin_lock(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - - switch (time_state) { - case TIME_OK: -@@ -388,7 +389,8 @@ static enum hrtimer_restart ntp_leap_second(struct hrtimer *timer) - break; - } - -- write_sequnlock(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock(&xtime_lock); - - return res; - } -@@ -663,7 +665,8 @@ int do_adjtimex(struct timex *txc) - - getnstimeofday(&ts); - -- write_seqlock_irq(&xtime_lock); -+ raw_spin_lock_irq(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - - if (txc->modes & ADJ_ADJTIME) { - long save_adjust = time_adjust; -@@ -705,7 +708,8 @@ int do_adjtimex(struct timex *txc) - /* fill PPS status fields */ - pps_fill_timex(txc); - -- write_sequnlock_irq(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irq(&xtime_lock); - - txc->time.tv_sec = ts.tv_sec; - txc->time.tv_usec = ts.tv_nsec; -@@ -903,7 +907,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) - - pts_norm = pps_normalize_ts(*phase_ts); - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - - /* clear the error bits, they will be set again if needed */ - time_status &= ~(STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR); -@@ -916,7 +921,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) - * just start the frequency interval */ - if (unlikely(pps_fbase.tv_sec == 0)) { - pps_fbase = *raw_ts; -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - return; - } - -@@ -931,7 +937,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) - time_status |= STA_PPSJITTER; - /* restart the frequency calibration interval */ - pps_fbase = *raw_ts; -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - pr_err("hardpps: PPSJITTER: bad pulse\n"); - return; - } -@@ -948,7 +955,8 @@ void hardpps(const struct timespec *phase_ts, const struct timespec *raw_ts) - - hardpps_update_phase(pts_norm.nsec); - -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - } - EXPORT_SYMBOL(hardpps); - -diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c -index da6c9ec..39de540 100644 ---- a/kernel/time/tick-common.c -+++ b/kernel/time/tick-common.c -@@ -63,13 +63,15 @@ int tick_is_oneshot_available(void) - static void tick_periodic(int cpu) - { - if (tick_do_timer_cpu == cpu) { -- write_seqlock(&xtime_lock); -+ raw_spin_lock(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - - /* Keep track of the next tick event */ - tick_next_period = ktime_add(tick_next_period, tick_period); - - do_timer(1); -- write_sequnlock(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock(&xtime_lock); - } - - update_process_times(user_mode(get_irq_regs())); -@@ -130,9 +132,9 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast) - ktime_t next; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - next = tick_next_period; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); - -diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h -index 4e265b9..c91100d 100644 ---- a/kernel/time/tick-internal.h -+++ b/kernel/time/tick-internal.h -@@ -141,4 +141,5 @@ static inline int tick_device_is_functional(struct clock_event_device *dev) - #endif - - extern void do_timer(unsigned long ticks); --extern seqlock_t xtime_lock; -+extern raw_spinlock_t xtime_lock; -+extern seqcount_t xtime_seq; -diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c -index c923640..d7abd2f 100644 ---- a/kernel/time/tick-sched.c -+++ b/kernel/time/tick-sched.c -@@ -56,7 +56,8 @@ static void tick_do_update_jiffies64(ktime_t now) - return; - - /* Reevalute with xtime_lock held */ -- write_seqlock(&xtime_lock); -+ raw_spin_lock(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - - delta = ktime_sub(now, last_jiffies_update); - if (delta.tv64 >= tick_period.tv64) { -@@ -79,7 +80,8 @@ 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); - } -- write_sequnlock(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock(&xtime_lock); - } - - /* -@@ -89,12 +91,14 @@ static ktime_t tick_init_jiffy_update(void) - { - ktime_t period; - -- write_seqlock(&xtime_lock); -+ raw_spin_lock(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - /* Did we start the jiffies update yet ? */ - if (last_jiffies_update.tv64 == 0) - last_jiffies_update = tick_next_period; - period = last_jiffies_update; -- write_sequnlock(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock(&xtime_lock); - return period; - } - -@@ -345,11 +349,11 @@ void tick_nohz_stop_sched_tick(int inidle) - ts->idle_calls++; - /* Read jiffies and the time when jiffies were updated last */ - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - last_update = last_jiffies_update; - last_jiffies = jiffies; - time_delta = timekeeping_max_deferment(); -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) || - arch_needs_cpu(cpu)) { -diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c -index 2378413..da9e1f9 100644 ---- a/kernel/time/timekeeping.c -+++ b/kernel/time/timekeeping.c -@@ -139,8 +139,8 @@ static inline s64 timekeeping_get_ns_raw(void) - * This read-write spinlock protects us from races in SMP while - * playing with xtime. - */ --__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock); -- -+__cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(xtime_lock); -+seqcount_t xtime_seq; - - /* - * The current time -@@ -222,7 +222,7 @@ void getnstimeofday(struct timespec *ts) - WARN_ON(timekeeping_suspended); - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - - *ts = xtime; - nsecs = timekeeping_get_ns(); -@@ -230,7 +230,7 @@ void getnstimeofday(struct timespec *ts) - /* If arch requires, add in gettimeoffset() */ - nsecs += arch_gettimeoffset(); - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - timespec_add_ns(ts, nsecs); - } -@@ -245,14 +245,14 @@ ktime_t ktime_get(void) - WARN_ON(timekeeping_suspended); - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - secs = xtime.tv_sec + wall_to_monotonic.tv_sec; - nsecs = xtime.tv_nsec + wall_to_monotonic.tv_nsec; - nsecs += timekeeping_get_ns(); - /* If arch requires, add in gettimeoffset() */ - nsecs += arch_gettimeoffset(); - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - /* - * Use ktime_set/ktime_add_ns to create a proper ktime on - * 32-bit architectures without CONFIG_KTIME_SCALAR. -@@ -278,14 +278,14 @@ void ktime_get_ts(struct timespec *ts) - WARN_ON(timekeeping_suspended); - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - *ts = xtime; - tomono = wall_to_monotonic; - nsecs = timekeeping_get_ns(); - /* If arch requires, add in gettimeoffset() */ - nsecs += arch_gettimeoffset(); - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec, - ts->tv_nsec + tomono.tv_nsec + nsecs); -@@ -313,7 +313,7 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real) - do { - u32 arch_offset; - -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - - *ts_raw = raw_time; - *ts_real = xtime; -@@ -326,7 +326,7 @@ void getnstime_raw_and_real(struct timespec *ts_raw, struct timespec *ts_real) - nsecs_raw += arch_offset; - nsecs_real += arch_offset; - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - timespec_add_ns(ts_raw, nsecs_raw); - timespec_add_ns(ts_real, nsecs_real); -@@ -365,7 +365,8 @@ int do_settimeofday(const struct timespec *tv) - if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) - return -EINVAL; - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - - timekeeping_forward_now(); - -@@ -381,7 +382,8 @@ int do_settimeofday(const struct timespec *tv) - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); - -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - - /* signal hrtimers about time change */ - clock_was_set(); -@@ -405,7 +407,8 @@ int timekeeping_inject_offset(struct timespec *ts) - if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) - return -EINVAL; - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - - timekeeping_forward_now(); - -@@ -418,7 +421,8 @@ int timekeeping_inject_offset(struct timespec *ts) - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); - -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - - /* signal hrtimers about time change */ - clock_was_set(); -@@ -490,11 +494,11 @@ void getrawmonotonic(struct timespec *ts) - s64 nsecs; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - nsecs = timekeeping_get_ns_raw(); - *ts = raw_time; - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - timespec_add_ns(ts, nsecs); - } -@@ -510,11 +514,11 @@ int timekeeping_valid_for_hres(void) - int ret; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - - ret = timekeeper.clock->flags & CLOCK_SOURCE_VALID_FOR_HRES; - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - return ret; - } -@@ -572,7 +576,8 @@ void __init timekeeping_init(void) - read_persistent_clock(&now); - read_boot_clock(&boot); - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - - ntp_init(); - -@@ -593,7 +598,8 @@ void __init timekeeping_init(void) - -boot.tv_sec, -boot.tv_nsec); - total_sleep_time.tv_sec = 0; - total_sleep_time.tv_nsec = 0; -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - } - - /* time in seconds when suspend began */ -@@ -640,7 +646,8 @@ void timekeeping_inject_sleeptime(struct timespec *delta) - if (!(ts.tv_sec == 0 && ts.tv_nsec == 0)) - return; - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - timekeeping_forward_now(); - - __timekeeping_inject_sleeptime(delta); -@@ -650,7 +657,8 @@ void timekeeping_inject_sleeptime(struct timespec *delta) - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); - -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - - /* signal hrtimers about time change */ - clock_was_set(); -@@ -673,7 +681,8 @@ static void timekeeping_resume(void) - - clocksource_resume(); - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - - if (timespec_compare(&ts, &timekeeping_suspend_time) > 0) { - ts = timespec_sub(ts, timekeeping_suspend_time); -@@ -683,7 +692,8 @@ static void timekeeping_resume(void) - timekeeper.clock->cycle_last = timekeeper.clock->read(timekeeper.clock); - timekeeper.ntp_error = 0; - timekeeping_suspended = 0; -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - - touch_softlockup_watchdog(); - -@@ -701,7 +711,8 @@ static int timekeeping_suspend(void) - - read_persistent_clock(&timekeeping_suspend_time); - -- write_seqlock_irqsave(&xtime_lock, flags); -+ raw_spin_lock_irqsave(&xtime_lock, flags); -+ write_seqcount_begin(&xtime_seq); - timekeeping_forward_now(); - timekeeping_suspended = 1; - -@@ -724,7 +735,8 @@ static int timekeeping_suspend(void) - timekeeping_suspend_time = - timespec_add(timekeeping_suspend_time, delta_delta); - } -- write_sequnlock_irqrestore(&xtime_lock, flags); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock_irqrestore(&xtime_lock, flags); - - clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); - clocksource_suspend(); -@@ -1101,13 +1113,13 @@ void get_monotonic_boottime(struct timespec *ts) - WARN_ON(timekeeping_suspended); - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - *ts = xtime; - tomono = wall_to_monotonic; - sleep = total_sleep_time; - nsecs = timekeeping_get_ns(); - -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec + sleep.tv_sec, - ts->tv_nsec + tomono.tv_nsec + sleep.tv_nsec + nsecs); -@@ -1158,10 +1170,10 @@ struct timespec current_kernel_time(void) - unsigned long seq; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - - now = xtime; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - return now; - } -@@ -1173,11 +1185,11 @@ struct timespec get_monotonic_coarse(void) - unsigned long seq; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - - now = xtime; - mono = wall_to_monotonic; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - - set_normalized_timespec(&now, now.tv_sec + mono.tv_sec, - now.tv_nsec + mono.tv_nsec); -@@ -1209,11 +1221,11 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, - unsigned long seq; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - *xtim = xtime; - *wtom = wall_to_monotonic; - *sleep = total_sleep_time; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - } - - /** -@@ -1225,9 +1237,9 @@ ktime_t ktime_get_monotonic_offset(void) - struct timespec wtom; - - do { -- seq = read_seqbegin(&xtime_lock); -+ seq = read_seqcount_begin(&xtime_seq); - wtom = wall_to_monotonic; -- } while (read_seqretry(&xtime_lock, seq)); -+ } while (read_seqcount_retry(&xtime_seq, seq)); - return timespec_to_ktime(wtom); - } - -@@ -1239,7 +1251,9 @@ ktime_t ktime_get_monotonic_offset(void) - */ - void xtime_update(unsigned long ticks) - { -- write_seqlock(&xtime_lock); -+ raw_spin_lock(&xtime_lock); -+ write_seqcount_begin(&xtime_seq); - do_timer(ticks); -- write_sequnlock(&xtime_lock); -+ write_seqcount_end(&xtime_seq); -+ raw_spin_unlock(&xtime_lock); - } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0024-mm-memcg-shorten-preempt-disabled-section-around-eve.patch b/debian/patches/features/all/rt/0024-mm-memcg-shorten-preempt-disabled-section-around-eve.patch deleted file mode 100644 index 7f32f2d5b..000000000 --- a/debian/patches/features/all/rt/0024-mm-memcg-shorten-preempt-disabled-section-around-eve.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 2d38d140493b8b52deebbe11692a71e4513b7605 Mon Sep 17 00:00:00 2001 -From: Johannes Weiner -Date: Thu, 17 Nov 2011 07:49:25 +0100 -Subject: [PATCH 024/267] mm: memcg: shorten preempt-disabled section around - event checks - -Only the ratelimit checks themselves have to run with preemption -disabled, the resulting actions - checking for usage thresholds, -updating the soft limit tree - can and should run with preemption -enabled. - -Signed-off-by: Johannes Weiner -Tested-by: Luis Henriques -Cc: Peter Zijlstra -Signed-off-by: Thomas Gleixner ---- - mm/memcontrol.c | 73 ++++++++++++++++++++++++++----------------------------- - 1 file changed, 35 insertions(+), 38 deletions(-) - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 778554f..abf5497 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -683,37 +683,32 @@ static unsigned long mem_cgroup_nr_lru_pages(struct mem_cgroup *memcg, - return total; - } - --static bool __memcg_event_check(struct mem_cgroup *memcg, int target) -+static bool mem_cgroup_event_ratelimit(struct mem_cgroup *memcg, -+ enum mem_cgroup_events_target target) - { - unsigned long val, next; - - val = __this_cpu_read(memcg->stat->events[MEM_CGROUP_EVENTS_COUNT]); - next = __this_cpu_read(memcg->stat->targets[target]); - /* from time_after() in jiffies.h */ -- return ((long)next - (long)val < 0); --} -- --static void __mem_cgroup_target_update(struct mem_cgroup *memcg, int target) --{ -- unsigned long val, next; -- -- val = __this_cpu_read(memcg->stat->events[MEM_CGROUP_EVENTS_COUNT]); -- -- switch (target) { -- case MEM_CGROUP_TARGET_THRESH: -- next = val + THRESHOLDS_EVENTS_TARGET; -- break; -- case MEM_CGROUP_TARGET_SOFTLIMIT: -- next = val + SOFTLIMIT_EVENTS_TARGET; -- break; -- case MEM_CGROUP_TARGET_NUMAINFO: -- next = val + NUMAINFO_EVENTS_TARGET; -- break; -- default: -- return; -+ if ((long)next - (long)val < 0) { -+ switch (target) { -+ case MEM_CGROUP_TARGET_THRESH: -+ next = val + THRESHOLDS_EVENTS_TARGET; -+ break; -+ case MEM_CGROUP_TARGET_SOFTLIMIT: -+ next = val + SOFTLIMIT_EVENTS_TARGET; -+ break; -+ case MEM_CGROUP_TARGET_NUMAINFO: -+ next = val + NUMAINFO_EVENTS_TARGET; -+ break; -+ default: -+ break; -+ } -+ __this_cpu_write(memcg->stat->targets[target], next); -+ return true; - } -- -- __this_cpu_write(memcg->stat->targets[target], next); -+ return false; - } - - /* -@@ -724,25 +719,27 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page) - { - preempt_disable(); - /* threshold event is triggered in finer grain than soft limit */ -- if (unlikely(__memcg_event_check(memcg, MEM_CGROUP_TARGET_THRESH))) { -+ if (unlikely(mem_cgroup_event_ratelimit(memcg, -+ MEM_CGROUP_TARGET_THRESH))) { -+ bool do_softlimit, do_numainfo; -+ -+ do_softlimit = mem_cgroup_event_ratelimit(memcg, -+ MEM_CGROUP_TARGET_SOFTLIMIT); -+#if MAX_NUMNODES > 1 -+ do_numainfo = mem_cgroup_event_ratelimit(memcg, -+ MEM_CGROUP_TARGET_NUMAINFO); -+#endif -+ preempt_enable(); -+ - mem_cgroup_threshold(memcg); -- __mem_cgroup_target_update(memcg, MEM_CGROUP_TARGET_THRESH); -- if (unlikely(__memcg_event_check(memcg, -- MEM_CGROUP_TARGET_SOFTLIMIT))) { -+ if (unlikely(do_softlimit)) - mem_cgroup_update_tree(memcg, page); -- __mem_cgroup_target_update(memcg, -- MEM_CGROUP_TARGET_SOFTLIMIT); -- } - #if MAX_NUMNODES > 1 -- if (unlikely(__memcg_event_check(memcg, -- MEM_CGROUP_TARGET_NUMAINFO))) { -+ if (unlikely(do_numainfo)) - atomic_inc(&memcg->numainfo_events); -- __mem_cgroup_target_update(memcg, -- MEM_CGROUP_TARGET_NUMAINFO); -- } - #endif -- } -- preempt_enable(); -+ } else -+ preempt_enable(); - } - - static struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0030-sched-Create-schedule_preempt_disabled.patch b/debian/patches/features/all/rt/0030-sched-Create-schedule_preempt_disabled.patch deleted file mode 100644 index 9e299d7f0..000000000 --- a/debian/patches/features/all/rt/0030-sched-Create-schedule_preempt_disabled.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 64b759067a99f8482feb0c2f75f6ce0fde842166 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Mon, 21 Mar 2011 12:09:35 +0100 -Subject: [PATCH 030/267] sched: Create schedule_preempt_disabled() - -Get rid of the ever repeating: - - preempt_enable_no_resched(); - schedule(); - preempt_disable(); - -Signed-off-by: Thomas Gleixner ---- - include/linux/sched.h | 1 + - kernel/sched.c | 12 ++++++++++++ - 2 files changed, 13 insertions(+) - -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 1c4f3e9..9897fe6 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -359,6 +359,7 @@ extern signed long schedule_timeout_interruptible(signed long timeout); - extern signed long schedule_timeout_killable(signed long timeout); - extern signed long schedule_timeout_uninterruptible(signed long timeout); - asmlinkage void schedule(void); -+extern void schedule_preempt_disabled(void); - extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); - - struct nsproxy; -diff --git a/kernel/sched.c b/kernel/sched.c -index 6b32395..465fd11 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4456,6 +4456,18 @@ asmlinkage void __sched schedule(void) - } - EXPORT_SYMBOL(schedule); - -+/** -+ * schedule_preempt_disabled - called with preemption disabled -+ * -+ * Returns with preemption disabled. Note: preempt_count must be 1 -+ */ -+void __sched schedule_preempt_disabled(void) -+{ -+ preempt_enable_no_resched(); -+ schedule(); -+ preempt_disable(); -+} -+ - #ifdef CONFIG_MUTEX_SPIN_ON_OWNER - - static inline bool owner_running(struct mutex *lock, struct task_struct *owner) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0031-sched-Use-schedule_preempt_disabled.patch b/debian/patches/features/all/rt/0031-sched-Use-schedule_preempt_disabled.patch deleted file mode 100644 index ca9a8546c..000000000 --- a/debian/patches/features/all/rt/0031-sched-Use-schedule_preempt_disabled.patch +++ /dev/null @@ -1,500 +0,0 @@ -From 662df03fb70d4e277547eaa2adfd7e0d520bb35f Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Mon, 21 Mar 2011 12:33:18 +0100 -Subject: [PATCH 031/267] sched: Use schedule_preempt_disabled() - -Coccinelle based conversion. - -Signed-off-by: Thomas Gleixner ---- - arch/arm/kernel/process.c | 4 +--- - arch/avr32/kernel/process.c | 4 +--- - arch/blackfin/kernel/process.c | 4 +--- - arch/cris/kernel/process.c | 4 +--- - arch/frv/kernel/process.c | 4 +--- - arch/h8300/kernel/process.c | 4 +--- - arch/ia64/kernel/process.c | 4 +--- - arch/m32r/kernel/process.c | 4 +--- - arch/m68k/kernel/process_mm.c | 4 +--- - arch/m68k/kernel/process_no.c | 4 +--- - arch/microblaze/kernel/process.c | 4 +--- - arch/mips/kernel/process.c | 4 +--- - arch/mn10300/kernel/process.c | 4 +--- - arch/parisc/kernel/process.c | 4 +--- - arch/powerpc/kernel/idle.c | 8 ++++---- - arch/powerpc/platforms/iseries/setup.c | 8 ++------ - arch/s390/kernel/process.c | 4 +--- - arch/score/kernel/process.c | 4 +--- - arch/sh/kernel/idle.c | 4 +--- - arch/sparc/kernel/process_32.c | 8 ++------ - arch/sparc/kernel/process_64.c | 10 ++++------ - arch/tile/kernel/process.c | 4 +--- - arch/x86/kernel/process_32.c | 4 +--- - arch/x86/kernel/process_64.c | 4 +--- - arch/xtensa/kernel/process.c | 4 +--- - init/main.c | 5 +---- - kernel/mutex.c | 4 +--- - kernel/softirq.c | 4 +--- - 28 files changed, 36 insertions(+), 95 deletions(-) - -diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 3d0c6fb..54833ff 100644 ---- a/arch/arm/kernel/process.c -+++ b/arch/arm/kernel/process.c -@@ -214,9 +214,7 @@ void cpu_idle(void) - } - leds_event(led_idle_end); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c -index ef5a2a0..c8724c9 100644 ---- a/arch/avr32/kernel/process.c -+++ b/arch/avr32/kernel/process.c -@@ -38,9 +38,7 @@ void cpu_idle(void) - while (!need_resched()) - cpu_idle_sleep(); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c -index 6a80a9e..11acc10 100644 ---- a/arch/blackfin/kernel/process.c -+++ b/arch/blackfin/kernel/process.c -@@ -92,9 +92,7 @@ void cpu_idle(void) - while (!need_resched()) - idle(); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c -index aa585e4..d8f50ff 100644 ---- a/arch/cris/kernel/process.c -+++ b/arch/cris/kernel/process.c -@@ -115,9 +115,7 @@ void cpu_idle (void) - idle = default_idle; - idle(); - } -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c -index 3901df1..29cc497 100644 ---- a/arch/frv/kernel/process.c -+++ b/arch/frv/kernel/process.c -@@ -92,9 +92,7 @@ void cpu_idle(void) - idle(); - } - -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c -index 933bd38..1a173b3 100644 ---- a/arch/h8300/kernel/process.c -+++ b/arch/h8300/kernel/process.c -@@ -81,9 +81,7 @@ void cpu_idle(void) - while (1) { - while (!need_resched()) - idle(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c -index 6d33c5c..9dc52b6 100644 ---- a/arch/ia64/kernel/process.c -+++ b/arch/ia64/kernel/process.c -@@ -330,9 +330,7 @@ cpu_idle (void) - normal_xtp(); - #endif - } -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - check_pgt_cache(); - if (cpu_is_offline(cpu)) - play_dead(); -diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c -index 422bea9..3a4a32b 100644 ---- a/arch/m32r/kernel/process.c -+++ b/arch/m32r/kernel/process.c -@@ -90,9 +90,7 @@ void cpu_idle (void) - - idle(); - } -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/m68k/kernel/process_mm.c b/arch/m68k/kernel/process_mm.c -index aa4ffb8..c413aa0 100644 ---- a/arch/m68k/kernel/process_mm.c -+++ b/arch/m68k/kernel/process_mm.c -@@ -94,9 +94,7 @@ void cpu_idle(void) - while (1) { - while (!need_resched()) - idle(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/m68k/kernel/process_no.c b/arch/m68k/kernel/process_no.c -index 5e1078c..f7fe6c3 100644 ---- a/arch/m68k/kernel/process_no.c -+++ b/arch/m68k/kernel/process_no.c -@@ -73,9 +73,7 @@ void cpu_idle(void) - /* endless idle loop with no priority at all */ - while (1) { - idle(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c -index 95cc295..d3b2b42 100644 ---- a/arch/microblaze/kernel/process.c -+++ b/arch/microblaze/kernel/process.c -@@ -108,9 +108,7 @@ void cpu_idle(void) - idle(); - tick_nohz_restart_sched_tick(); - -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - check_pgt_cache(); - } - } -diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c -index c47f96e..4dbf66d 100644 ---- a/arch/mips/kernel/process.c -+++ b/arch/mips/kernel/process.c -@@ -78,9 +78,7 @@ void __noreturn cpu_idle(void) - play_dead(); - #endif - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c -index 28eec31..cac401d 100644 ---- a/arch/mn10300/kernel/process.c -+++ b/arch/mn10300/kernel/process.c -@@ -123,9 +123,7 @@ void cpu_idle(void) - idle(); - } - -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c -index 4b4b918..f6eb367 100644 ---- a/arch/parisc/kernel/process.c -+++ b/arch/parisc/kernel/process.c -@@ -71,9 +71,7 @@ void cpu_idle(void) - while (1) { - while (!need_resched()) - barrier(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - check_pgt_cache(); - } - } -diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c -index 39a2baa..f46dae5 100644 ---- a/arch/powerpc/kernel/idle.c -+++ b/arch/powerpc/kernel/idle.c -@@ -94,11 +94,11 @@ void cpu_idle(void) - HMT_medium(); - ppc64_runlatch_on(); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- if (cpu_should_die()) -+ if (cpu_should_die()) { -+ preempt_enable_no_resched(); - cpu_die(); -- schedule(); -- preempt_disable(); -+ } -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c -index ea0acbd..e0c5b49 100644 ---- a/arch/powerpc/platforms/iseries/setup.c -+++ b/arch/powerpc/platforms/iseries/setup.c -@@ -582,9 +582,7 @@ static void iseries_shared_idle(void) - if (hvlpevent_is_pending()) - process_iSeries_events(); - -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -@@ -611,9 +609,7 @@ static void iseries_dedicated_idle(void) - - ppc64_runlatch_on(); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c -index 53088e2..fa093f7 100644 ---- a/arch/s390/kernel/process.c -+++ b/arch/s390/kernel/process.c -@@ -94,9 +94,7 @@ void cpu_idle(void) - while (!need_resched()) - default_idle(); - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c -index 25d0803..2707023 100644 ---- a/arch/score/kernel/process.c -+++ b/arch/score/kernel/process.c -@@ -53,9 +53,7 @@ void __noreturn cpu_idle(void) - while (!need_resched()) - barrier(); - -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c -index db4ecd7..b7c18f0 100644 ---- a/arch/sh/kernel/idle.c -+++ b/arch/sh/kernel/idle.c -@@ -112,9 +112,7 @@ void cpu_idle(void) - } - - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c -index f793742..935fdbc 100644 ---- a/arch/sparc/kernel/process_32.c -+++ b/arch/sparc/kernel/process_32.c -@@ -113,9 +113,7 @@ void cpu_idle(void) - while (!need_resched()) - cpu_relax(); - } -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - check_pgt_cache(); - } - } -@@ -138,9 +136,7 @@ void cpu_idle(void) - while (!need_resched()) - cpu_relax(); - } -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - check_pgt_cache(); - } - } -diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c -index 3739a06..8ba0dbe 100644 ---- a/arch/sparc/kernel/process_64.c -+++ b/arch/sparc/kernel/process_64.c -@@ -102,15 +102,13 @@ void cpu_idle(void) - - tick_nohz_restart_sched_tick(); - -- preempt_enable_no_resched(); -- - #ifdef CONFIG_HOTPLUG_CPU -- if (cpu_is_offline(cpu)) -+ if (cpu_is_offline(cpu)) { -+ preempt_enable_no_resched(); - cpu_play_dead(); -+ } - #endif -- -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c -index 9c45d8b..5a8b631 100644 ---- a/arch/tile/kernel/process.c -+++ b/arch/tile/kernel/process.c -@@ -106,9 +106,7 @@ void cpu_idle(void) - current_thread_info()->status |= TS_POLLING; - } - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c -index 8598296..ada175e3 100644 ---- a/arch/x86/kernel/process_32.c -+++ b/arch/x86/kernel/process_32.c -@@ -117,9 +117,7 @@ void cpu_idle(void) - start_critical_timings(); - } - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c -index 6a364a6..08840ab 100644 ---- a/arch/x86/kernel/process_64.c -+++ b/arch/x86/kernel/process_64.c -@@ -150,9 +150,7 @@ void cpu_idle(void) - } - - tick_nohz_restart_sched_tick(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c -index 47041e7..2c90047 100644 ---- a/arch/xtensa/kernel/process.c -+++ b/arch/xtensa/kernel/process.c -@@ -113,9 +113,7 @@ void cpu_idle(void) - while (1) { - while (!need_resched()) - platform_idle(); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - } - -diff --git a/init/main.c b/init/main.c -index 217ed23..0e274f9 100644 ---- a/init/main.c -+++ b/init/main.c -@@ -378,11 +378,8 @@ static noinline void __init_refok rest_init(void) - * at least once to get things moving: - */ - init_idle_bootup_task(current); -- preempt_enable_no_resched(); -- schedule(); -- -+ schedule_preempt_disabled(); - /* Call into cpu_idle with preempt disabled */ -- preempt_disable(); - cpu_idle(); - } - -diff --git a/kernel/mutex.c b/kernel/mutex.c -index 89096dd..a307cc9 100644 ---- a/kernel/mutex.c -+++ b/kernel/mutex.c -@@ -240,9 +240,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, - - /* didn't get the lock, go to sleep: */ - spin_unlock_mutex(&lock->wait_lock, flags); -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - spin_lock_mutex(&lock->wait_lock, flags); - } - -diff --git a/kernel/softirq.c b/kernel/softirq.c -index 2c71d91..c9da2c8 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -744,9 +744,7 @@ static int run_ksoftirqd(void * __bind_cpu) - while (!kthread_should_stop()) { - preempt_disable(); - if (!local_softirq_pending()) { -- preempt_enable_no_resched(); -- schedule(); -- preempt_disable(); -+ schedule_preempt_disabled(); - } - - __set_current_state(TASK_RUNNING); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0038-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch b/debian/patches/features/all/rt/0038-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch deleted file mode 100644 index 3faf4580c..000000000 --- a/debian/patches/features/all/rt/0038-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 31e34bf84003d53073f3fa91d53cd6ac31bfbe58 Mon Sep 17 00:00:00 2001 -From: Benedikt Spranger -Date: Sat, 6 Mar 2010 17:47:10 +0100 -Subject: [PATCH 038/267] ARM: AT91: PIT: Remove irq handler when clock event - is unused - -Setup and remove the interrupt handler in clock event mode selection. -This avoids calling the (shared) interrupt handler when the device is -not used. - -Signed-off-by: Benedikt Spranger -Signed-off-by: Thomas Gleixner ---- - arch/arm/mach-at91/at91rm9200_time.c | 2 ++ - arch/arm/mach-at91/at91sam926x_time.c | 6 +++++- - 2 files changed, 7 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c -index 1dd69c8..0666570 100644 ---- a/arch/arm/mach-at91/at91rm9200_time.c -+++ b/arch/arm/mach-at91/at91rm9200_time.c -@@ -114,6 +114,7 @@ clkevt32k_mode(enum clock_event_mode mode, struct clock_event_device *dev) - last_crtr = read_CRTR(); - switch (mode) { - case CLOCK_EVT_MODE_PERIODIC: -+ setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq); - /* PIT for periodic irqs; fixed rate of 1/HZ */ - irqmask = AT91_ST_PITS; - at91_sys_write(AT91_ST_PIMR, LATCH); -@@ -127,6 +128,7 @@ clkevt32k_mode(enum clock_event_mode mode, struct clock_event_device *dev) - break; - case CLOCK_EVT_MODE_SHUTDOWN: - case CLOCK_EVT_MODE_UNUSED: -+ remove_irq(AT91_ID_SYS, &at91rm9200_timer_irq); - case CLOCK_EVT_MODE_RESUME: - irqmask = 0; - break; -diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c -index 4ba8549..97d1e14 100644 ---- a/arch/arm/mach-at91/at91sam926x_time.c -+++ b/arch/arm/mach-at91/at91sam926x_time.c -@@ -54,7 +54,7 @@ static struct clocksource pit_clk = { - .flags = CLOCK_SOURCE_IS_CONTINUOUS, - }; - -- -+static struct irqaction at91sam926x_pit_irq; - /* - * Clockevent device: interrupts every 1/HZ (== pit_cycles * MCK/16) - */ -@@ -63,6 +63,9 @@ pit_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev) - { - switch (mode) { - case CLOCK_EVT_MODE_PERIODIC: -+ /* Set up irq handler */ -+ setup_irq(AT91_ID_SYS, &at91sam926x_pit_irq); -+ - /* update clocksource counter */ - pit_cnt += pit_cycle * PIT_PICNT(at91_sys_read(AT91_PIT_PIVR)); - at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN -@@ -75,6 +78,7 @@ pit_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev) - case CLOCK_EVT_MODE_UNUSED: - /* disable irq, leaving the clocksource active */ - at91_sys_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN); -+ remove_irq(AT91_ID_SYS, &at91sam926x_pit_irq); - break; - case CLOCK_EVT_MODE_RESUME: - break; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0044-preempt-mark-legitimated-no-resched-sites.patch.patch b/debian/patches/features/all/rt/0044-preempt-mark-legitimated-no-resched-sites.patch.patch deleted file mode 100644 index e1e0c3a0d..000000000 --- a/debian/patches/features/all/rt/0044-preempt-mark-legitimated-no-resched-sites.patch.patch +++ /dev/null @@ -1,124 +0,0 @@ -From a5f63f3c98dcea7b51fda0df14ecc187fb329eee Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Mon, 21 Mar 2011 13:32:17 +0100 -Subject: [PATCH 044/267] preempt-mark-legitimated-no-resched-sites.patch - -Signed-off-by: Thomas Gleixner ---- - arch/powerpc/kernel/idle.c | 2 +- - arch/sparc/kernel/process_64.c | 2 +- - include/linux/preempt.h | 5 ++++- - kernel/sched.c | 6 +++--- - kernel/softirq.c | 4 ++-- - 5 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c -index f46dae5..5d70d10 100644 ---- a/arch/powerpc/kernel/idle.c -+++ b/arch/powerpc/kernel/idle.c -@@ -95,7 +95,7 @@ void cpu_idle(void) - ppc64_runlatch_on(); - tick_nohz_restart_sched_tick(); - if (cpu_should_die()) { -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - cpu_die(); - } - schedule_preempt_disabled(); -diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c -index 8ba0dbe..86fe09a 100644 ---- a/arch/sparc/kernel/process_64.c -+++ b/arch/sparc/kernel/process_64.c -@@ -104,7 +104,7 @@ void cpu_idle(void) - - #ifdef CONFIG_HOTPLUG_CPU - if (cpu_is_offline(cpu)) { -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - cpu_play_dead(); - } - #endif -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 58969b2..227b0f5 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h -@@ -48,12 +48,14 @@ do { \ - barrier(); \ - } while (0) - --#define preempt_enable_no_resched() \ -+#define __preempt_enable_no_resched() \ - do { \ - barrier(); \ - dec_preempt_count(); \ - } while (0) - -+#define preempt_enable_no_resched() __preempt_enable_no_resched() -+ - #define preempt_enable() \ - do { \ - preempt_enable_no_resched(); \ -@@ -92,6 +94,7 @@ do { \ - #else /* !CONFIG_PREEMPT_COUNT */ - - #define preempt_disable() do { } while (0) -+#define __preempt_enable_no_resched() do { } while (0) - #define preempt_enable_no_resched() do { } while (0) - #define preempt_enable() do { } while (0) - -diff --git a/kernel/sched.c b/kernel/sched.c -index 465fd11..e35f01c 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4415,7 +4415,7 @@ need_resched: - - post_schedule(rq); - -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - if (need_resched()) - goto need_resched; - } -@@ -4463,7 +4463,7 @@ EXPORT_SYMBOL(schedule); - */ - void __sched schedule_preempt_disabled(void) - { -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - schedule(); - preempt_disable(); - } -@@ -5705,7 +5705,7 @@ SYSCALL_DEFINE0(sched_yield) - __release(rq->lock); - spin_release(&rq->lock.dep_map, 1, _THIS_IP_); - do_raw_spin_unlock(&rq->lock); -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - - schedule(); - -diff --git a/kernel/softirq.c b/kernel/softirq.c -index c9da2c8..a8becbf 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -353,7 +353,7 @@ void irq_exit(void) - if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched()) - tick_nohz_stop_sched_tick(0); - #endif -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - } - - /* -@@ -759,7 +759,7 @@ static int run_ksoftirqd(void * __bind_cpu) - if (local_softirq_pending()) - __do_softirq(); - local_irq_enable(); -- preempt_enable_no_resched(); -+ __preempt_enable_no_resched(); - cond_resched(); - preempt_disable(); - rcu_note_context_switch((long)__bind_cpu); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0061-softirq-thread-do-softirq.patch.patch b/debian/patches/features/all/rt/0061-softirq-thread-do-softirq.patch.patch deleted file mode 100644 index bf812fec4..000000000 --- a/debian/patches/features/all/rt/0061-softirq-thread-do-softirq.patch.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 96af58acea4b1f2d36ff57313a95c5cd6e8c0e9c Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 28 Jun 2011 15:44:15 +0200 -Subject: [PATCH 061/267] softirq-thread-do-softirq.patch - -Signed-off-by: Thomas Gleixner ---- - include/linux/interrupt.h | 2 ++ - net/core/dev.c | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index a64b00e..21b94de 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -454,6 +454,8 @@ struct softirq_action - - asmlinkage void do_softirq(void); - asmlinkage void __do_softirq(void); -+static inline void thread_do_softirq(void) { do_softirq(); } -+ - extern void open_softirq(int nr, void (*action)(struct softirq_action *)); - extern void softirq_init(void); - static inline void __raise_softirq_irqoff(unsigned int nr) -diff --git a/net/core/dev.c b/net/core/dev.c -index 55cd370..c28987a 100644 ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -3037,7 +3037,7 @@ int netif_rx_ni(struct sk_buff *skb) - preempt_disable(); - err = netif_rx(skb); - if (local_softirq_pending()) -- do_softirq(); -+ thread_do_softirq(); - preempt_enable(); - - return err; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0064-x86-32-fix-signal-crap.patch.patch b/debian/patches/features/all/rt/0064-x86-32-fix-signal-crap.patch.patch deleted file mode 100644 index c0eccf01a..000000000 --- a/debian/patches/features/all/rt/0064-x86-32-fix-signal-crap.patch.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 52c45c824d10baf0dd84cc56dc2fc35536d4fa49 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Mon, 18 Jul 2011 15:59:38 +0200 -Subject: [PATCH 064/267] x86-32-fix-signal-crap.patch - -Signed-off-by: Thomas Gleixner ---- - arch/x86/kernel/entry_32.S | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S -index bcda816..426cf51 100644 ---- a/arch/x86/kernel/entry_32.S -+++ b/arch/x86/kernel/entry_32.S -@@ -629,7 +629,11 @@ work_notifysig: # deal with pending signals and - jne work_notifysig_v86 # returning to kernel-space or - # vm86-space - xorl %edx, %edx -+ TRACE_IRQS_ON -+ ENABLE_INTERRUPTS(CLBR_NONE) - call do_notify_resume -+ DISABLE_INTERRUPTS(CLBR_ANY) -+ TRACE_IRQS_OFF - jmp resume_userspace_sig - - ALIGN -@@ -642,7 +646,11 @@ work_notifysig_v86: - movl %esp, %eax - #endif - xorl %edx, %edx -+ TRACE_IRQS_ON -+ ENABLE_INTERRUPTS(CLBR_NONE) - call do_notify_resume -+ DISABLE_INTERRUPTS(CLBR_ANY) -+ TRACE_IRQS_OFF - jmp resume_userspace_sig - END(work_pending) - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0066-rcu-Reduce-lock-section.patch b/debian/patches/features/all/rt/0066-rcu-Reduce-lock-section.patch deleted file mode 100644 index 987ba1f22..000000000 --- a/debian/patches/features/all/rt/0066-rcu-Reduce-lock-section.patch +++ /dev/null @@ -1,98 +0,0 @@ -From e48b25d1e88f0066fc74583020ad764cd0d002f5 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Fri, 24 Jun 2011 22:23:02 +0200 -Subject: [PATCH 066/267] rcu: Reduce lock section - -So the waitqueue wakeup is outside the raw locked section. - -Signed-off-by: Thomas Gleixner ---- - kernel/rcutree.c | 2 +- - kernel/rcutree.h | 3 ++- - kernel/rcutree_plugin.h | 14 ++++++++------ - 3 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/kernel/rcutree.c b/kernel/rcutree.c -index 6b76d81..8ef8675 100644 ---- a/kernel/rcutree.c -+++ b/kernel/rcutree.c -@@ -1221,7 +1221,7 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp) - else - raw_spin_unlock_irqrestore(&rnp->lock, flags); - if (need_report & RCU_OFL_TASKS_EXP_GP) -- rcu_report_exp_rnp(rsp, rnp); -+ rcu_report_exp_rnp(rsp, rnp, true); - rcu_node_kthread_setaffinity(rnp, -1); - } - -diff --git a/kernel/rcutree.h b/kernel/rcutree.h -index 849ce9e..dca495d 100644 ---- a/kernel/rcutree.h -+++ b/kernel/rcutree.h -@@ -451,7 +451,8 @@ static void rcu_preempt_check_callbacks(int cpu); - static void rcu_preempt_process_callbacks(void); - void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); - #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU) --static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp); -+static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, -+ bool wake); - #endif /* #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU) */ - static int rcu_preempt_pending(int cpu); - static int rcu_preempt_needs_cpu(int cpu); -diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h -index 4b9b9f8..73cab33 100644 ---- a/kernel/rcutree_plugin.h -+++ b/kernel/rcutree_plugin.h -@@ -407,7 +407,7 @@ static noinline void rcu_read_unlock_special(struct task_struct *t) - * then we need to report up the rcu_node hierarchy. - */ - if (!empty_exp && !rcu_preempted_readers_exp(rnp)) -- rcu_report_exp_rnp(&rcu_preempt_state, rnp); -+ rcu_report_exp_rnp(&rcu_preempt_state, rnp, true); - } else { - local_irq_restore(flags); - } -@@ -731,7 +731,8 @@ static int sync_rcu_preempt_exp_done(struct rcu_node *rnp) - * - * Caller must hold sync_rcu_preempt_exp_mutex. - */ --static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp) -+static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, -+ bool wake) - { - unsigned long flags; - unsigned long mask; -@@ -744,7 +745,8 @@ static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp) - } - if (rnp->parent == NULL) { - raw_spin_unlock_irqrestore(&rnp->lock, flags); -- wake_up(&sync_rcu_preempt_exp_wq); -+ if (wake) -+ wake_up(&sync_rcu_preempt_exp_wq); - break; - } - mask = rnp->grpmask; -@@ -777,7 +779,7 @@ sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp) - must_wait = 1; - } - if (!must_wait) -- rcu_report_exp_rnp(rsp, rnp); -+ rcu_report_exp_rnp(rsp, rnp, false); - } - - /* -@@ -1069,9 +1071,9 @@ EXPORT_SYMBOL_GPL(synchronize_rcu_expedited); - * report on tasks preempted in RCU read-side critical sections during - * expedited RCU grace periods. - */ --static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp) -+static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, -+ bool wake) - { -- return; - } - - #endif /* #ifdef CONFIG_HOTPLUG_CPU */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0068-wait-Provide-__wake_up_all_locked.patch b/debian/patches/features/all/rt/0068-wait-Provide-__wake_up_all_locked.patch deleted file mode 100644 index 7b56a3b0e..000000000 --- a/debian/patches/features/all/rt/0068-wait-Provide-__wake_up_all_locked.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 90713b9e3f210d7ebb96dade4cc71b7397ce99d4 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Thu, 1 Dec 2011 00:04:00 +0100 -Subject: [PATCH 068/267] wait: Provide __wake_up_all_locked - -For code which protects the waitqueue itself with another lock it -makes no sense to acquire the waitqueue lock for wakeup all. Provide -__wake_up_all_locked. - -Signed-off-by: Thomas Gleixner -Cc: stable-rt@vger.kernel.org ---- - include/linux/wait.h | 5 +++-- - kernel/sched.c | 4 ++-- - 2 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/include/linux/wait.h b/include/linux/wait.h -index 3efc9f3..1e904b8 100644 ---- a/include/linux/wait.h -+++ b/include/linux/wait.h -@@ -157,7 +157,7 @@ void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); - void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); - void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, - void *key); --void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); -+void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr); - void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); - void __wake_up_bit(wait_queue_head_t *, void *, int); - int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); -@@ -170,7 +170,8 @@ wait_queue_head_t *bit_waitqueue(void *, int); - #define wake_up(x) __wake_up(x, TASK_NORMAL, 1, NULL) - #define wake_up_nr(x, nr) __wake_up(x, TASK_NORMAL, nr, NULL) - #define wake_up_all(x) __wake_up(x, TASK_NORMAL, 0, NULL) --#define wake_up_locked(x) __wake_up_locked((x), TASK_NORMAL) -+#define wake_up_locked(x) __wake_up_locked((x), TASK_NORMAL, 1) -+#define wake_up_all_locked(x) __wake_up_locked((x), TASK_NORMAL, 0) - - #define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL) - #define wake_up_interruptible_nr(x, nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL) -diff --git a/kernel/sched.c b/kernel/sched.c -index e35f01c..bb93b0b 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4637,9 +4637,9 @@ EXPORT_SYMBOL(__wake_up); - /* - * Same as __wake_up but called with the spinlock in wait_queue_head_t held. - */ --void __wake_up_locked(wait_queue_head_t *q, unsigned int mode) -+void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr) - { -- __wake_up_common(q, mode, 1, 0, NULL); -+ __wake_up_common(q, mode, nr, 0, NULL); - } - EXPORT_SYMBOL_GPL(__wake_up_locked); - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0069-pci-Use-__wake_up_all_locked-pci_unblock_user_cfg_ac.patch b/debian/patches/features/all/rt/0069-pci-Use-__wake_up_all_locked-pci_unblock_user_cfg_ac.patch deleted file mode 100644 index 0b964a8b0..000000000 --- a/debian/patches/features/all/rt/0069-pci-Use-__wake_up_all_locked-pci_unblock_user_cfg_ac.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0285604d1f4283b1bb59ec7efd683d4475c018db Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Thu, 1 Dec 2011 00:07:16 +0100 -Subject: [PATCH 069/267] pci: Use __wake_up_all_locked - pci_unblock_user_cfg_access() - -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 -Cc: stable-rt@vger.kernel.org ---- - 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 fdaa42a..1a6cc67 100644 ---- a/drivers/pci/access.c -+++ b/drivers/pci/access.c -@@ -441,7 +441,7 @@ void pci_unblock_user_cfg_access(struct pci_dev *dev) - WARN_ON(!dev->block_ucfg_access); - - dev->block_ucfg_access = 0; -- wake_up_all(&pci_ucfg_wait); -+ wake_up_all_locked(&pci_ucfg_wait); - raw_spin_unlock_irqrestore(&pci_lock, flags); - } - EXPORT_SYMBOL_GPL(pci_unblock_user_cfg_access); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0072-localversion.patch.patch b/debian/patches/features/all/rt/0072-localversion.patch.patch deleted file mode 100644 index f581c13d1..000000000 --- a/debian/patches/features/all/rt/0072-localversion.patch.patch +++ /dev/null @@ -1,23 +0,0 @@ -From dc3a0b29103cadebe8c40fd3ad80b18b7d1af27b Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Fri, 8 Jul 2011 20:25:16 +0200 -Subject: [PATCH 072/267] localversion.patch - -Signed-off-by: Thomas Gleixner -Signed-off-by: Peter Zijlstra -Link: http://lkml.kernel.org/n/tip-8vdw4bfcsds27cvox6rpb334@git.kernel.org ---- - 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 0000000..b2111a2 ---- /dev/null -+++ b/localversion-rt -@@ -0,0 +1 @@ -+-rt24 --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0092-mm-Replace-cgroup_page-bit-spinlock.patch b/debian/patches/features/all/rt/0092-mm-Replace-cgroup_page-bit-spinlock.patch deleted file mode 100644 index 623d45ce3..000000000 --- a/debian/patches/features/all/rt/0092-mm-Replace-cgroup_page-bit-spinlock.patch +++ /dev/null @@ -1,98 +0,0 @@ -From d553f4dded23aedcf07184908178b715c78cc492 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 19 Aug 2009 09:56:42 +0200 -Subject: [PATCH 092/267] mm: Replace cgroup_page bit spinlock - -Bit spinlocks are not working on RT. Replace them. - -Signed-off-by: Thomas Gleixner ---- - include/linux/page_cgroup.h | 28 ++++++++++++++++++++++++++++ - mm/page_cgroup.c | 1 + - 2 files changed, 29 insertions(+) - -diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h -index 961ecc7..2927c08 100644 ---- a/include/linux/page_cgroup.h -+++ b/include/linux/page_cgroup.h -@@ -30,6 +30,10 @@ enum { - */ - struct page_cgroup { - unsigned long flags; -+#ifdef CONFIG_PREEMPT_RT_BASE -+ spinlock_t pcg_lock; -+ spinlock_t pcm_lock; -+#endif - struct mem_cgroup *mem_cgroup; - struct list_head lru; /* per cgroup LRU list */ - }; -@@ -96,30 +100,54 @@ static inline void lock_page_cgroup(struct page_cgroup *pc) - * Don't take this lock in IRQ context. - * This lock is for pc->mem_cgroup, USED, CACHE, MIGRATION - */ -+#ifndef CONFIG_PREEMPT_RT_BASE - bit_spin_lock(PCG_LOCK, &pc->flags); -+#else -+ spin_lock(&pc->pcg_lock); -+#endif - } - - static inline void unlock_page_cgroup(struct page_cgroup *pc) - { -+#ifndef CONFIG_PREEMPT_RT_BASE - bit_spin_unlock(PCG_LOCK, &pc->flags); -+#else -+ spin_unlock(&pc->pcg_lock); -+#endif - } - - static inline void move_lock_page_cgroup(struct page_cgroup *pc, - unsigned long *flags) - { -+#ifndef CONFIG_PREEMPT_RT_BASE - /* - * We know updates to pc->flags of page cache's stats are from both of - * usual context or IRQ context. Disable IRQ to avoid deadlock. - */ - local_irq_save(*flags); - bit_spin_lock(PCG_MOVE_LOCK, &pc->flags); -+#else -+ spin_lock_irqsave(&pc->pcm_lock, *flags); -+#endif - } - - static inline void move_unlock_page_cgroup(struct page_cgroup *pc, - unsigned long *flags) - { -+#ifndef CONFIG_PREEMPT_RT_BASE - bit_spin_unlock(PCG_MOVE_LOCK, &pc->flags); - local_irq_restore(*flags); -+#else -+ spin_unlock_irqrestore(&pc->pcm_lock, *flags); -+#endif -+} -+ -+static inline void page_cgroup_lock_init(struct page_cgroup *pc) -+{ -+#ifdef CONFIG_PREEMPT_RT_BASE -+ spin_lock_init(&pc->pcg_lock); -+ spin_lock_init(&pc->pcm_lock); -+#endif - } - - #ifdef CONFIG_SPARSEMEM -diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c -index 2d123f9..2e0d18d 100644 ---- a/mm/page_cgroup.c -+++ b/mm/page_cgroup.c -@@ -17,6 +17,7 @@ static void __meminit init_page_cgroup(struct page_cgroup *pc, unsigned long id) - set_page_cgroup_array_id(pc, id); - pc->mem_cgroup = NULL; - INIT_LIST_HEAD(&pc->lru); -+ page_cgroup_lock_init(pc); - } - static unsigned long total_usage; - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0113-mm-vmstat-fix-the-irq-lock-asymetry.patch.patch b/debian/patches/features/all/rt/0113-mm-vmstat-fix-the-irq-lock-asymetry.patch.patch deleted file mode 100644 index 8a4c677a0..000000000 --- a/debian/patches/features/all/rt/0113-mm-vmstat-fix-the-irq-lock-asymetry.patch.patch +++ /dev/null @@ -1,56 +0,0 @@ -From d8ce6bcfe27b0b0649048b054827a7c6a64b5d0c Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 22 Jun 2011 20:47:08 +0200 -Subject: [PATCH 113/267] mm-vmstat-fix-the-irq-lock-asymetry.patch - -Signed-off-by: Thomas Gleixner ---- - mm/vmscan.c | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/mm/vmscan.c b/mm/vmscan.c -index cb33d9c..39f9629 100644 ---- a/mm/vmscan.c -+++ b/mm/vmscan.c -@@ -1344,8 +1344,8 @@ static int too_many_isolated(struct zone *zone, int file, - */ - static noinline_for_stack void - putback_lru_pages(struct zone *zone, struct scan_control *sc, -- unsigned long nr_anon, unsigned long nr_file, -- struct list_head *page_list) -+ unsigned long nr_anon, unsigned long nr_file, -+ struct list_head *page_list, unsigned long nr_reclaimed) - { - struct page *page; - struct pagevec pvec; -@@ -1356,7 +1356,12 @@ putback_lru_pages(struct zone *zone, struct scan_control *sc, - /* - * Put back any unfreeable pages. - */ -- spin_lock(&zone->lru_lock); -+ spin_lock_irq(&zone->lru_lock); -+ -+ if (current_is_kswapd()) -+ __count_vm_events(KSWAPD_STEAL, nr_reclaimed); -+ __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed); -+ - while (!list_empty(page_list)) { - int lru; - page = lru_to_page(page_list); -@@ -1539,12 +1544,7 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone, - priority, &nr_dirty, &nr_writeback); - } - -- local_irq_disable(); -- if (current_is_kswapd()) -- __count_vm_events(KSWAPD_STEAL, nr_reclaimed); -- __count_zone_vm_events(PGSTEAL, zone, nr_reclaimed); -- -- putback_lru_pages(zone, sc, nr_anon, nr_file, &page_list); -+ putback_lru_pages(zone, sc, nr_anon, nr_file, &page_list, nr_reclaimed); - - /* - * If reclaim is isolating dirty pages under writeback, it implies --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0119-panic-disable-random-on-rt.patch b/debian/patches/features/all/rt/0119-panic-disable-random-on-rt.patch deleted file mode 100644 index 74c6b41ac..000000000 --- a/debian/patches/features/all/rt/0119-panic-disable-random-on-rt.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f4c10a6646165be65152353cde34f57b80e14519 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 10 Apr 2012 14:34:04 -0400 -Subject: [PATCH 119/267] panic-disable-random-on-rt - ---- - kernel/panic.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/kernel/panic.c b/kernel/panic.c -index 3458469..50f4de5 100644 ---- a/kernel/panic.c -+++ b/kernel/panic.c -@@ -343,9 +343,11 @@ static u64 oops_id; - - static int init_oops_id(void) - { -+#ifndef CONFIG_PREEMPT_RT_FULL - if (!oops_id) - get_random_bytes(&oops_id, sizeof(oops_id)); - else -+#endif - oops_id++; - - return 0; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0135-hrtimer-Add-missing-debug_activate-aid-Was-Re-ANNOUN.patch b/debian/patches/features/all/rt/0135-hrtimer-Add-missing-debug_activate-aid-Was-Re-ANNOUN.patch deleted file mode 100644 index 3a0dbd08d..000000000 --- a/debian/patches/features/all/rt/0135-hrtimer-Add-missing-debug_activate-aid-Was-Re-ANNOUN.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 6d0f369ac20fb888983eff59ce6cb1ec93e815c5 Mon Sep 17 00:00:00 2001 -From: Yong Zhang -Date: Thu, 13 Oct 2011 15:52:30 +0800 -Subject: [PATCH 135/267] hrtimer: Add missing debug_activate() aid [Was: Re: - [ANNOUNCE] 3.0.6-rt17] - -On Fri, Oct 07, 2011 at 10:25:25AM -0700, Fernando Lopez-Lezcano wrote: -> On 10/06/2011 06:15 PM, Thomas Gleixner wrote: -> >Dear RT Folks, -> > -> >I'm pleased to announce the 3.0.6-rt17 release. -> -> Hi and thanks again. So far this one is not hanging which is very -> good news. But I still see the hrtimer_fixup_activate warnings I -> reported for rt16... - -Hi Fernando, - -I think below patch will smooth your concern? - -Thanks, -Yong ---- - kernel/hrtimer.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index 358442b..d363df8 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c -@@ -1042,6 +1042,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, - * remove it again and report a failure. This avoids - * stale base->first entries. - */ -+ debug_deactivate(timer); - __remove_hrtimer(timer, new_base, - timer->state & HRTIMER_STATE_CALLBACK, 0); - } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0145-sched-prevent-idle-boost.patch.patch b/debian/patches/features/all/rt/0145-sched-prevent-idle-boost.patch.patch deleted file mode 100644 index 344d62030..000000000 --- a/debian/patches/features/all/rt/0145-sched-prevent-idle-boost.patch.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 2cf8fbc8ec1ba087782bc59ae4e452bd42d6c9e2 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Mon, 6 Jun 2011 20:07:38 +0200 -Subject: [PATCH 145/267] sched-prevent-idle-boost.patch - -Signed-off-by: Thomas Gleixner ---- - kernel/sched.c | 21 +++++++++++++++++++-- - 1 file changed, 19 insertions(+), 2 deletions(-) - -diff --git a/kernel/sched.c b/kernel/sched.c -index f101d97..b813946 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -5037,6 +5037,24 @@ void rt_mutex_setprio(struct task_struct *p, int prio) - - rq = __task_rq_lock(p); - -+ /* -+ * Idle task boosting is a nono in general. There is one -+ * exception, when PREEMPT_RT and NOHZ is active: -+ * -+ * The idle task calls get_next_timer_interrupt() and holds -+ * the timer wheel base->lock on the CPU and another CPU wants -+ * to access the timer (probably to cancel it). We can safely -+ * ignore the boosting request, as the idle CPU runs this code -+ * with interrupts disabled and will complete the lock -+ * protected section without being interrupted. So there is no -+ * real need to boost. -+ */ -+ if (unlikely(p == rq->idle)) { -+ WARN_ON(p != rq->curr); -+ WARN_ON(p->pi_blocked_on); -+ goto out_unlock; -+ } -+ - trace_sched_pi_setprio(p, prio); - oldprio = p->prio; - prev_class = p->sched_class; -@@ -5060,11 +5078,10 @@ void rt_mutex_setprio(struct task_struct *p, int prio) - enqueue_task(rq, p, oldprio < prio ? ENQUEUE_HEAD : 0); - - check_class_changed(rq, p, prev_class, oldprio); -+out_unlock: - __task_rq_unlock(rq); - } -- - #endif -- - void set_user_nice(struct task_struct *p, long nice) - { - int old_prio, delta, on_rq; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0147-sched-Break-out-from-load_balancing-on-rq_lock-conte.patch b/debian/patches/features/all/rt/0147-sched-Break-out-from-load_balancing-on-rq_lock-conte.patch deleted file mode 100644 index 3367e88c2..000000000 --- a/debian/patches/features/all/rt/0147-sched-Break-out-from-load_balancing-on-rq_lock-conte.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 99413c8e97ac85b7f0d29603625302a76aa06e1e Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra -Date: Tue, 16 Mar 2010 14:31:44 -0700 -Subject: [PATCH 147/267] sched: Break out from load_balancing on rq_lock - contention - -Also limit NEW_IDLE pull - -Signed-off-by: Peter Zijlstra -Signed-off-by: Thomas Gleixner ---- - kernel/sched_fair.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c -index 8a39fa3..3747e53 100644 ---- a/kernel/sched_fair.c -+++ b/kernel/sched_fair.c -@@ -2899,6 +2899,10 @@ balance_tasks(struct rq *this_rq, int this_cpu, struct rq *busiest, - */ - if (idle == CPU_NEWLY_IDLE) - break; -+ -+ if (raw_spin_is_contended(&this_rq->lock) || -+ raw_spin_is_contended(&busiest->lock)) -+ break; - #endif - - /* -@@ -3039,6 +3043,20 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, - rem_load_move -= moved_load; - if (rem_load_move < 0) - break; -+ -+#ifdef CONFIG_PREEMPT -+ /* -+ * NEWIDLE balancing is a source of latency, so preemptible -+ * kernels will stop after the first task is pulled to minimize -+ * the critical section. -+ */ -+ if (idle == CPU_NEWLY_IDLE && this_rq->nr_running) -+ break; -+ -+ if (raw_spin_is_contended(&this_rq->lock) || -+ raw_spin_is_contended(&busiest->lock)) -+ break; -+#endif - } - rcu_read_unlock(); - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0150-sched-no-work-when-pi-blocked.patch.patch b/debian/patches/features/all/rt/0150-sched-no-work-when-pi-blocked.patch.patch deleted file mode 100644 index 2374e3e12..000000000 --- a/debian/patches/features/all/rt/0150-sched-no-work-when-pi-blocked.patch.patch +++ /dev/null @@ -1,62 +0,0 @@ -From dd97a1f5ab811d126ed8fff8fd9dc43dbbb845ee Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sun, 17 Jul 2011 20:46:52 +0200 -Subject: [PATCH 150/267] sched-no-work-when-pi-blocked.patch - -Signed-off-by: Thomas Gleixner ---- - include/linux/sched.h | 8 ++++++++ - kernel/sched.c | 5 ++++- - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 38d78dc..99e7f8b 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -2095,12 +2095,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice; - extern int rt_mutex_getprio(struct task_struct *p); - extern void rt_mutex_setprio(struct task_struct *p, int prio); - extern void rt_mutex_adjust_pi(struct task_struct *p); -+static inline bool tsk_is_pi_blocked(struct task_struct *tsk) -+{ -+ return tsk->pi_blocked_on != NULL; -+} - #else - static inline int rt_mutex_getprio(struct task_struct *p) - { - return p->normal_prio; - } - # define rt_mutex_adjust_pi(p) do { } while (0) -+static inline bool tsk_is_pi_blocked(struct task_struct *tsk) -+{ -+ return false; -+} - #endif - - extern bool yield_to(struct task_struct *p, bool preempt); -diff --git a/kernel/sched.c b/kernel/sched.c -index af3883b..5b871cb 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4461,7 +4461,7 @@ need_resched: - - static inline void sched_submit_work(struct task_struct *tsk) - { -- if (!tsk->state) -+ if (!tsk->state || tsk_is_pi_blocked(tsk)) - return; - - /* -@@ -4481,6 +4481,9 @@ static inline void sched_submit_work(struct task_struct *tsk) - - static inline void sched_update_worker(struct task_struct *tsk) - { -+ if (tsk_is_pi_blocked(tsk)) -+ return; -+ - if (tsk->flags & PF_WQ_WORKER) - wq_worker_running(tsk); - } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0152-sched-disable-ttwu-queue.patch.patch b/debian/patches/features/all/rt/0152-sched-disable-ttwu-queue.patch.patch deleted file mode 100644 index 7b47d398b..000000000 --- a/debian/patches/features/all/rt/0152-sched-disable-ttwu-queue.patch.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0366f3687cfda21ddb7b00c56165439afb0a2ffb Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Tue, 13 Sep 2011 16:42:35 +0200 -Subject: [PATCH 152/267] sched-disable-ttwu-queue.patch - -Signed-off-by: Thomas Gleixner ---- - kernel/sched_features.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/kernel/sched_features.h b/kernel/sched_features.h -index 8480224..0007001 100644 ---- a/kernel/sched_features.h -+++ b/kernel/sched_features.h -@@ -60,11 +60,15 @@ SCHED_FEAT(OWNER_SPIN, 1) - */ - SCHED_FEAT(NONTASK_POWER, 1) - -+#ifndef CONFIG_PREEMPT_RT_FULL - /* - * Queue remote wakeups on the target CPU and process them - * using the scheduler IPI. Reduces rq->lock contention/bounces. - */ - SCHED_FEAT(TTWU_QUEUE, 1) -+#else -+SCHED_FEAT(TTWU_QUEUE, 0) -+#endif - - SCHED_FEAT(FORCE_SD_OVERLAP, 0) - SCHED_FEAT(RT_RUNTIME_SHARE, 1) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0174-sched-clear-pf-thread-bound-on-fallback-rq.patch.patch b/debian/patches/features/all/rt/0174-sched-clear-pf-thread-bound-on-fallback-rq.patch.patch deleted file mode 100644 index 751a78457..000000000 --- a/debian/patches/features/all/rt/0174-sched-clear-pf-thread-bound-on-fallback-rq.patch.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 15761075fe95848ac4cfa95a0b2e860eb2e3b82a Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Fri, 4 Nov 2011 20:48:36 +0100 -Subject: [PATCH 174/267] sched-clear-pf-thread-bound-on-fallback-rq.patch - -Signed-off-by: Thomas Gleixner ---- - kernel/sched.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/kernel/sched.c b/kernel/sched.c -index 51c0ad6..81b340d 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -2570,7 +2570,12 @@ static int select_fallback_rq(int cpu, struct task_struct *p) - printk(KERN_INFO "process %d (%s) no longer affine to cpu%d\n", - task_pid_nr(p), p->comm, cpu); - } -- -+ /* -+ * Clear PF_THREAD_BOUND, otherwise we wreckage -+ * migrate_disable/enable. See optimization for -+ * PF_THREAD_BOUND tasks there. -+ */ -+ p->flags &= ~PF_THREAD_BOUND; - return dest_cpu; - } - --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0211-serial-8250-Clean-up-the-locking-for-rt.patch b/debian/patches/features/all/rt/0211-serial-8250-Clean-up-the-locking-for-rt.patch deleted file mode 100644 index 5e945e588..000000000 --- a/debian/patches/features/all/rt/0211-serial-8250-Clean-up-the-locking-for-rt.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 40ebaf9abcb5b1d219eba80ba6648c0142b9fa12 Mon Sep 17 00:00:00 2001 -From: Ingo Molnar -Date: Fri, 3 Jul 2009 08:30:01 -0500 -Subject: [PATCH 211/267] serial: 8250: Clean up the locking for -rt - -Signed-off-by: Ingo Molnar -Signed-off-by: Thomas Gleixner ---- - drivers/tty/serial/8250.c | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c -index eeadf1b..43f7f46 100644 ---- a/drivers/tty/serial/8250.c -+++ b/drivers/tty/serial/8250.c -@@ -2846,14 +2846,10 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) - - touch_nmi_watchdog(); - -- local_irq_save(flags); -- if (up->port.sysrq) { -- /* serial8250_handle_port() already took the lock */ -- locked = 0; -- } else if (oops_in_progress) { -- locked = spin_trylock(&up->port.lock); -- } else -- spin_lock(&up->port.lock); -+ if (up->port.sysrq || oops_in_progress) -+ locked = spin_trylock_irqsave(&up->port.lock, flags); -+ else -+ spin_lock_irqsave(&up->port.lock, flags); - - /* - * First save the IER then disable the interrupts -@@ -2885,8 +2881,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) - check_modem_status(up); - - if (locked) -- spin_unlock(&up->port.lock); -- local_irq_restore(flags); -+ spin_unlock_irqrestore(&up->port.lock, flags); - } - - static int __init serial8250_console_setup(struct console *co, char *options) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0213-drivers-tty-fix-omap-lock-crap.patch.patch b/debian/patches/features/all/rt/0213-drivers-tty-fix-omap-lock-crap.patch.patch deleted file mode 100644 index 0d60a371e..000000000 --- a/debian/patches/features/all/rt/0213-drivers-tty-fix-omap-lock-crap.patch.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 81272c044fe3dd9a13be10c4aca5a0d6d6d428e2 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Thu, 28 Jul 2011 13:32:57 +0200 -Subject: [PATCH 213/267] drivers-tty-fix-omap-lock-crap.patch - -Signed-off-by: Thomas Gleixner ---- - drivers/tty/serial/omap-serial.c | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c -index 5e713d3..93cdb92 100644 ---- a/drivers/tty/serial/omap-serial.c -+++ b/drivers/tty/serial/omap-serial.c -@@ -946,13 +946,12 @@ serial_omap_console_write(struct console *co, const char *s, - unsigned int ier; - int locked = 1; - -- local_irq_save(flags); - if (up->port.sysrq) - locked = 0; - else if (oops_in_progress) -- locked = spin_trylock(&up->port.lock); -+ locked = spin_trylock_irqsave(&up->port.lock, flags); - else -- spin_lock(&up->port.lock); -+ spin_lock_irqsave(&up->port.lock, flags); - - /* - * First save the IER then disable the interrupts -@@ -979,8 +978,7 @@ serial_omap_console_write(struct console *co, const char *s, - check_modem_status(up); - - if (locked) -- spin_unlock(&up->port.lock); -- local_irq_restore(flags); -+ spin_unlock_irqrestore(&up->port.lock, flags); - } - - static int __init --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0215-fs-namespace-preemption-fix.patch b/debian/patches/features/all/rt/0215-fs-namespace-preemption-fix.patch deleted file mode 100644 index dea3a1afb..000000000 --- a/debian/patches/features/all/rt/0215-fs-namespace-preemption-fix.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d9e6aef724ad0444ca59f536062b3ce3755ab8ff Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sun, 19 Jul 2009 08:44:27 -0500 -Subject: [PATCH 215/267] fs: namespace preemption fix - -On RT we cannot loop with preemption disabled here as -mnt_make_readonly() might have been preempted. We can safely enable -preemption while waiting for MNT_WRITE_HOLD to be cleared. Safe on !RT -as well. - -Signed-off-by: Thomas Gleixner ---- - fs/namespace.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/fs/namespace.c b/fs/namespace.c -index cfc6d44..63fd6d7 100644 ---- a/fs/namespace.c -+++ b/fs/namespace.c -@@ -341,8 +341,14 @@ int mnt_want_write(struct vfsmount *mnt) - * incremented count after it has set MNT_WRITE_HOLD. - */ - smp_mb(); -- while (mnt->mnt_flags & MNT_WRITE_HOLD) -+ /* -+ * No need to keep preemption disabled accross the spin loop. -+ */ -+ while (mnt->mnt_flags & MNT_WRITE_HOLD) { -+ preempt_enable(); - cpu_relax(); -+ preempt_disable(); -+ } - /* - * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will - * be set to match its requirements. So we must not load that until -@@ -352,9 +358,7 @@ int mnt_want_write(struct vfsmount *mnt) - if (__mnt_is_readonly(mnt)) { - mnt_dec_writers(mnt); - ret = -EROFS; -- goto out; - } --out: - preempt_enable(); - return ret; - } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0231-jump-label-rt.patch.patch b/debian/patches/features/all/rt/0231-jump-label-rt.patch.patch deleted file mode 100644 index ce32eafc9..000000000 --- a/debian/patches/features/all/rt/0231-jump-label-rt.patch.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2bd1f5a798104f32a4dd4dff8fcf06c97cbba2ba Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Wed, 13 Jul 2011 11:03:16 +0200 -Subject: [PATCH 231/267] jump-label-rt.patch - -Signed-off-by: Thomas Gleixner ---- - include/linux/jump_label.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h -index 388b0d4..9cc8ed9 100644 ---- a/include/linux/jump_label.h -+++ b/include/linux/jump_label.h -@@ -4,7 +4,7 @@ - #include - #include - --#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) -+#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) && !defined(CONFIG_PREEMPT_BASE) - - struct jump_label_key { - atomic_t enabled; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0235-printk-Disable-migration-instead-of-preemption.patch b/debian/patches/features/all/rt/0235-printk-Disable-migration-instead-of-preemption.patch deleted file mode 100644 index 284a0a765..000000000 --- a/debian/patches/features/all/rt/0235-printk-Disable-migration-instead-of-preemption.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 2393db19529654fe543796abc967c908eb7c6148 Mon Sep 17 00:00:00 2001 -From: Richard Weinberger -Date: Mon, 12 Dec 2011 14:35:56 +0100 -Subject: [PATCH 235/267] printk: Disable migration instead of preemption - -There is no need do disable preemption in vprintk(), disable_migrate() -is sufficient. This fixes the following bug in -rt: - -[ 14.759233] BUG: sleeping function called from invalid context -at /home/rw/linux-rt/kernel/rtmutex.c:645 -[ 14.759235] in_atomic(): 1, irqs_disabled(): 0, pid: 547, name: bash -[ 14.759244] Pid: 547, comm: bash Not tainted 3.0.12-rt29+ #3 -[ 14.759246] Call Trace: -[ 14.759301] [] __might_sleep+0xeb/0xf0 -[ 14.759318] [] rt_spin_lock_fastlock.constprop.9+0x21/0x43 -[ 14.759336] [] rt_spin_lock+0xe/0x10 -[ 14.759354] [] serial8250_console_write+0x81/0x121 -[ 14.759366] [] __call_console_drivers+0x7c/0x93 -[ 14.759369] [] _call_console_drivers+0x5c/0x60 -[ 14.759372] [] console_unlock+0x147/0x1a2 -[ 14.759374] [] vprintk+0x3ea/0x462 -[ 14.759383] [] printk+0x51/0x53 -[ 14.759399] [] ? proc_reg_poll+0x9a/0x9a -[ 14.759403] [] __handle_sysrq+0x50/0x14d -[ 14.759406] [] write_sysrq_trigger+0x4b/0x53 -[ 14.759408] [] ? __handle_sysrq+0x14d/0x14d -[ 14.759410] [] proc_reg_write+0x9f/0xbe -[ 14.759426] [] vfs_write+0xac/0xf3 -[ 14.759429] [] ? fget_light+0x3a/0x9b -[ 14.759431] [] sys_write+0x4a/0x6e -[ 14.759438] [] system_call_fastpath+0x16/0x1b - -Signed-off-by: Richard Weinberger -Link: http://lkml.kernel.org/r/1323696956-11445-1-git-send-email-rw@linutronix.de -Signed-off-by: Thomas Gleixner ---- - kernel/printk.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/kernel/printk.c b/kernel/printk.c -index fad23c8..13ea6a9 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -901,7 +901,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) - boot_delay_msec(); - printk_delay(); - -- preempt_disable(); -+ migrate_disable(); - /* This stops the holder of console_sem just where we want him */ - raw_local_irq_save(flags); - this_cpu = smp_processor_id(); -@@ -1032,7 +1032,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) - out_restore_irqs: - raw_local_irq_restore(flags); - -- preempt_enable(); -+ migrate_enable(); - return printed_len; - } - EXPORT_SYMBOL(printk); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0247-sysrq-Allow-immediate-Magic-SysRq-output-for-PREEMPT.patch b/debian/patches/features/all/rt/0247-sysrq-Allow-immediate-Magic-SysRq-output-for-PREEMPT.patch deleted file mode 100644 index c3dcbc846..000000000 --- a/debian/patches/features/all/rt/0247-sysrq-Allow-immediate-Magic-SysRq-output-for-PREEMPT.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 5f911928368b0d9b62da0df476c458037b4f7da4 Mon Sep 17 00:00:00 2001 -From: Frank Rowand -Date: Fri, 23 Sep 2011 13:43:12 -0700 -Subject: [PATCH 247/267] sysrq: Allow immediate Magic SysRq output for - PREEMPT_RT_FULL - -Add a CONFIG option to allow the output from Magic SysRq to be output -immediately, even if this causes large latencies. - -If PREEMPT_RT_FULL, printk() will not try to acquire the console lock -when interrupts or preemption are disabled. If the console lock is -not acquired the printk() output will be buffered, but will not be -output immediately. Some drivers call into the Magic SysRq code -with interrupts or preemption disabled, so the output of Magic SysRq -will be buffered instead of printing immediately if this option is -not selected. - -Even with this option selected, Magic SysRq output will be delayed -if the attempt to acquire the console lock fails. - -Signed-off-by: Frank Rowand -Link: http://lkml.kernel.org/r/4E7CEF60.5020508@am.sony.com -Signed-off-by: Thomas Gleixner ---- -[ukleinek: make apply on top of debian/sysrq-mask.patch] - - drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 +- - drivers/tty/sysrq.c | 23 +++++++++++++++++++++++ - include/linux/sysrq.h | 5 +++++ - kernel/printk.c | 5 +++-- - lib/Kconfig.debug | 22 ++++++++++++++++++++++ - 5 files changed, 54 insertions(+), 3 deletions(-) - -diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c -index b418947..a8b0559 100644 ---- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c -+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c -@@ -1226,7 +1226,7 @@ static void cpm_uart_console_write(struct console *co, const char *s, - { - struct uart_cpm_port *pinfo = &cpm_uart_ports[co->index]; - unsigned long flags; -- int nolock = oops_in_progress; -+ int nolock = oops_in_progress || sysrq_in_progress; - - if (unlikely(nolock)) { - local_irq_save(flags); -diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c -index 43db715..5219738 100644 ---- a/drivers/tty/sysrq.c -+++ b/drivers/tty/sysrq.c -@@ -492,6 +492,23 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) - sysrq_key_table[i] = op_p; - } - -+#ifdef CONFIG_MAGIC_SYSRQ_FORCE_PRINTK -+ -+int sysrq_in_progress; -+ -+static void set_sysrq_in_progress(int value) -+{ -+ sysrq_in_progress = value; -+} -+ -+#else -+ -+static void set_sysrq_in_progress(int value) -+{ -+} -+ -+#endif -+ - void __handle_sysrq(int key, bool check_mask) - { - struct sysrq_key_op *op_p; -@@ -500,6 +517,9 @@ void __handle_sysrq(int key, bool check_mask) - unsigned long flags; - - spin_lock_irqsave(&sysrq_key_table_lock, flags); -+ -+ set_sysrq_in_progress(1); -+ - /* - * Raise the apparent loglevel to maximum so that the sysrq header - * is shown to provide the user with positive feedback. We do not -@@ -541,6 +561,9 @@ void __handle_sysrq(int key, bool check_mask) - printk("\n"); - console_loglevel = orig_log_level; - } -+ -+ set_sysrq_in_progress(0); -+ - spin_unlock_irqrestore(&sysrq_key_table_lock, flags); - } - -diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h -index 7faf933..d224c0b 100644 ---- a/include/linux/sysrq.h -+++ b/include/linux/sysrq.h -@@ -38,6 +38,11 @@ struct sysrq_key_op { - int enable_mask; - }; - -+#ifdef CONFIG_MAGIC_SYSRQ_FORCE_PRINTK -+extern int sysrq_in_progress; -+#else -+#define sysrq_in_progress 0 -+#endif - #ifdef CONFIG_MAGIC_SYSRQ - - /* Generic SysRq interface -- you may call it from any device driver, supplying -diff --git a/kernel/printk.c b/kernel/printk.c -index 13ea6a9..9eabbbb 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -834,8 +835,8 @@ static int console_trylock_for_printk(unsigned int cpu, unsigned long flags) - { - int retval = 0, wake = 0; - #ifdef CONFIG_PREEMPT_RT_FULL -- int lock = !early_boot_irqs_disabled && !irqs_disabled_flags(flags) && -- !preempt_count(); -+ int lock = (!early_boot_irqs_disabled && !irqs_disabled_flags(flags) && -+ !preempt_count()) || sysrq_in_progress; - #else - int lock = 1; - #endif -diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index c347db3..13a937b 100644 ---- a/lib/Kconfig.debug -+++ b/lib/Kconfig.debug -@@ -62,6 +62,28 @@ config MAGIC_SYSRQ - Specifies the default mask for the allowed SysRq keys. This can be - used to disable several sensitive keys by default. - -+config MAGIC_SYSRQ_FORCE_PRINTK -+ bool "Force printk from Magic SysRq" -+ depends on MAGIC_SYSRQ && PREEMPT_RT_FULL -+ default n -+ help -+ Allow the output from Magic SysRq to be output immediately, even if -+ this causes large latencies. This can cause performance problems -+ for real-time processes. -+ -+ If PREEMPT_RT_FULL, printk() will not try to acquire the console lock -+ when interrupts or preemption are disabled. If the console lock is -+ not acquired the printk() output will be buffered, but will not be -+ output immediately. Some drivers call into the Magic SysRq code -+ with interrupts or preemption disabled, so the output of Magic SysRq -+ will be buffered instead of printing immediately if this option is -+ not selected. -+ -+ Even with this option selected, Magic SysRq output will be delayed -+ if the attempt to acquire the console lock fails. -+ -+ Don't say Y unless you really know what this hack does. -+ - config STRIP_ASM_SYMS - bool "Strip assembler-generated symbols during link" - default n --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0260-softirq-Check-preemption-after-reenabling-interrupts.patch b/debian/patches/features/all/rt/0260-softirq-Check-preemption-after-reenabling-interrupts.patch deleted file mode 100644 index a1c9015ec..000000000 --- a/debian/patches/features/all/rt/0260-softirq-Check-preemption-after-reenabling-interrupts.patch +++ /dev/null @@ -1,158 +0,0 @@ -From a583b75cab964e833c5031f86eb95d3caed27398 Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner -Date: Sun, 13 Nov 2011 17:17:09 +0100 -Subject: [PATCH 260/267] softirq: Check preemption after reenabling - interrupts - -raise_softirq_irqoff() disables interrupts and wakes the softirq -daemon, but after reenabling interrupts there is no preemption check, -so the execution of the softirq thread might be delayed arbitrarily. - -In principle we could add that check to local_irq_enable/restore, but -that's overkill as the rasie_softirq_irqoff() sections are the only -ones which show this behaviour. - -Reported-by: Carsten Emde -Signed-off-by: Thomas Gleixner -Cc: stable-rt@vger.kernel.org ---- - block/blk-iopoll.c | 3 +++ - block/blk-softirq.c | 3 +++ - include/linux/preempt.h | 3 +++ - net/core/dev.c | 6 ++++++ - 4 files changed, 15 insertions(+) - -diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c -index 58916af..f7ca9b4 100644 ---- a/block/blk-iopoll.c -+++ b/block/blk-iopoll.c -@@ -38,6 +38,7 @@ void blk_iopoll_sched(struct blk_iopoll *iop) - list_add_tail(&iop->list, &__get_cpu_var(blk_cpu_iopoll)); - __raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ); - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - EXPORT_SYMBOL(blk_iopoll_sched); - -@@ -135,6 +136,7 @@ static void blk_iopoll_softirq(struct softirq_action *h) - __raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ); - - local_irq_enable(); -+ preempt_check_resched_rt(); - } - - /** -@@ -204,6 +206,7 @@ static int __cpuinit blk_iopoll_cpu_notify(struct notifier_block *self, - &__get_cpu_var(blk_cpu_iopoll)); - __raise_softirq_irqoff(BLOCK_IOPOLL_SOFTIRQ); - local_irq_enable(); -+ preempt_check_resched_rt(); - } - - return NOTIFY_OK; -diff --git a/block/blk-softirq.c b/block/blk-softirq.c -index 1366a89..60a88ab 100644 ---- a/block/blk-softirq.c -+++ b/block/blk-softirq.c -@@ -50,6 +50,7 @@ static void trigger_softirq(void *data) - raise_softirq_irqoff(BLOCK_SOFTIRQ); - - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - - /* -@@ -92,6 +93,7 @@ static int __cpuinit blk_cpu_notify(struct notifier_block *self, - &__get_cpu_var(blk_cpu_done)); - raise_softirq_irqoff(BLOCK_SOFTIRQ); - local_irq_enable(); -+ preempt_check_resched_rt(); - } - - return NOTIFY_OK; -@@ -150,6 +152,7 @@ do_local: - goto do_local; - - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - - /** -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 6450c01..58d8982 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h -@@ -56,8 +56,10 @@ do { \ - - #ifndef CONFIG_PREEMPT_RT_BASE - # define preempt_enable_no_resched() __preempt_enable_no_resched() -+# define preempt_check_resched_rt() do { } while (0) - #else - # define preempt_enable_no_resched() preempt_enable() -+# define preempt_check_resched_rt() preempt_check_resched() - #endif - - #define preempt_enable() \ -@@ -105,6 +107,7 @@ do { \ - #define preempt_disable_notrace() do { } while (0) - #define preempt_enable_no_resched_notrace() do { } while (0) - #define preempt_enable_notrace() do { } while (0) -+#define preempt_check_resched_rt() do { } while (0) - - #endif /* CONFIG_PREEMPT_COUNT */ - -diff --git a/net/core/dev.c b/net/core/dev.c -index ae4fd5e..3756e96 100644 ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -1779,6 +1779,7 @@ static inline void __netif_reschedule(struct Qdisc *q) - sd->output_queue_tailp = &q->next_sched; - raise_softirq_irqoff(NET_TX_SOFTIRQ); - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - - void __netif_schedule(struct Qdisc *q) -@@ -1800,6 +1801,7 @@ void dev_kfree_skb_irq(struct sk_buff *skb) - sd->completion_queue = skb; - raise_softirq_irqoff(NET_TX_SOFTIRQ); - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - } - EXPORT_SYMBOL(dev_kfree_skb_irq); -@@ -2969,6 +2971,7 @@ enqueue: - rps_unlock(sd); - - local_irq_restore(flags); -+ preempt_check_resched_rt(); - - atomic_long_inc(&skb->dev->rx_dropped); - kfree_skb(skb); -@@ -3790,6 +3793,7 @@ static void net_rps_action_and_irq_enable(struct softnet_data *sd) - } else - #endif - local_irq_enable(); -+ preempt_check_resched_rt(); - } - - static int process_backlog(struct napi_struct *napi, int quota) -@@ -3862,6 +3866,7 @@ void __napi_schedule(struct napi_struct *n) - local_irq_save(flags); - ____napi_schedule(&__get_cpu_var(softnet_data), n); - local_irq_restore(flags); -+ preempt_check_resched_rt(); - } - EXPORT_SYMBOL(__napi_schedule); - -@@ -6402,6 +6407,7 @@ static int dev_cpu_callback(struct notifier_block *nfb, - - raise_softirq_irqoff(NET_TX_SOFTIRQ); - local_irq_enable(); -+ preempt_check_resched_rt(); - - /* Process offline CPU's input_pkt_queue */ - while ((skb = __skb_dequeue(&oldsd->process_queue))) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0266-rt-Make-migrate_disable-enable-and-__rt_mutex_init-n.patch b/debian/patches/features/all/rt/0266-rt-Make-migrate_disable-enable-and-__rt_mutex_init-n.patch deleted file mode 100644 index f05deb70e..000000000 --- a/debian/patches/features/all/rt/0266-rt-Make-migrate_disable-enable-and-__rt_mutex_init-n.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 87b9564badf043711b03d381536be29103e9cce9 Mon Sep 17 00:00:00 2001 -From: Steven Rostedt -Date: Mon, 16 Apr 2012 21:51:54 -0400 -Subject: [PATCH 266/267] rt: Make migrate_disable/enable() and - __rt_mutex_init non-GPL only - -Modules that load on the normal vanilla kernel should also load on -an -rt kernel as well. This does not mean we condone non-GPL modules, -we are only being consistent. - -Signed-off-by: Steven Rostedt ---- - kernel/rtmutex.c | 2 +- - kernel/sched.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index b525158..9c4f6e5 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c -@@ -1290,7 +1290,7 @@ void __rt_mutex_init(struct rt_mutex *lock, const char *name) - - debug_rt_mutex_init(lock, name); - } --EXPORT_SYMBOL_GPL(__rt_mutex_init); -+EXPORT_SYMBOL(__rt_mutex_init); - - /** - * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a -diff --git a/kernel/sched.c b/kernel/sched.c -index 1cc706d..3b12e0b 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4426,7 +4426,7 @@ void migrate_disable(void) - p->migrate_disable = 1; - preempt_enable(); - } --EXPORT_SYMBOL_GPL(migrate_disable); -+EXPORT_SYMBOL(migrate_disable); - - void migrate_enable(void) - { -@@ -4478,7 +4478,7 @@ void migrate_enable(void) - unpin_current_cpu(); - preempt_enable(); - } --EXPORT_SYMBOL_GPL(migrate_enable); -+EXPORT_SYMBOL(migrate_enable); - #else - static inline void update_migrate_disable(struct task_struct *p) { } - #define migrate_disabled_updated(p) 0 --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0267-Linux-3.2.16-rt27-REBASE.patch b/debian/patches/features/all/rt/0267-Linux-3.2.16-rt27-REBASE.patch deleted file mode 100644 index 426dae5e5..000000000 --- a/debian/patches/features/all/rt/0267-Linux-3.2.16-rt27-REBASE.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 9eee911c32b17fa49c4d00541a7459ab912d4fc5 Mon Sep 17 00:00:00 2001 -From: Steven Rostedt -Date: Mon, 16 Apr 2012 22:15:29 -0400 -Subject: [PATCH 267/267] Linux 3.2.16-rt27 REBASE - ---- - localversion-rt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/localversion-rt b/localversion-rt -index b2111a2..be1e37b 100644 ---- a/localversion-rt -+++ b/localversion-rt -@@ -1 +1 @@ ---rt24 -+-rt27 --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0084-acpi-Do-not-disable-interrupts-on-PREEMPT_RT.patch b/debian/patches/features/all/rt/acpi-use-local-irq-nort.patch similarity index 66% rename from debian/patches/features/all/rt/0084-acpi-Do-not-disable-interrupts-on-PREEMPT_RT.patch rename to debian/patches/features/all/rt/acpi-use-local-irq-nort.patch index e753eb468..afa44ee5d 100644 --- a/debian/patches/features/all/rt/0084-acpi-Do-not-disable-interrupts-on-PREEMPT_RT.patch +++ b/debian/patches/features/all/rt/acpi-use-local-irq-nort.patch @@ -1,19 +1,19 @@ -From 6bd3fc45f9c1bd877a0fd6776610ca5658dae3b1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 21 Jul 2009 22:54:51 +0200 -Subject: [PATCH 084/267] acpi: Do not disable interrupts on PREEMPT_RT +Subject: acpi: Do not disable interrupts on PREEMPT_RT Use the local_irq_*_nort() variants. Signed-off-by: Thomas Gleixner + --- arch/x86/include/asm/acpi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h -index 610001d..c1c23d2 100644 ---- a/arch/x86/include/asm/acpi.h -+++ b/arch/x86/include/asm/acpi.h +Index: linux-3.4/arch/x86/include/asm/acpi.h +=================================================================== +--- linux-3.4.orig/arch/x86/include/asm/acpi.h ++++ linux-3.4/arch/x86/include/asm/acpi.h @@ -51,8 +51,8 @@ #define ACPI_ASM_MACROS @@ -25,6 +25,3 @@ index 610001d..c1c23d2 100644 #define ACPI_FLUSH_CPU_CACHE() wbinvd() int __acpi_acquire_global_lock(unsigned int *lock); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0046-mm-Fixup-all-fault-handlers-to-check-current-pagefau.patch b/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch similarity index 54% rename from debian/patches/features/all/rt/0046-mm-Fixup-all-fault-handlers-to-check-current-pagefau.patch rename to debian/patches/features/all/rt/arch-use-pagefault-disabled.patch index a951e8db5..9916b827d 100644 --- a/debian/patches/features/all/rt/0046-mm-Fixup-all-fault-handlers-to-check-current-pagefau.patch +++ b/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch @@ -1,8 +1,6 @@ -From ce05fde6b2b86bc5569433eef6869bdb1adcb32c Mon Sep 17 00:00:00 2001 +Subject: mm: Fixup all fault handlers to check current->pagefault_disable From: Thomas Gleixner Date: Thu, 17 Mar 2011 11:32:28 +0100 -Subject: [PATCH 046/267] mm: Fixup all fault handlers to check - current->pagefault_disable Necessary for decoupling pagefault disable from preempt count. @@ -32,11 +30,11 @@ Signed-off-by: Thomas Gleixner arch/xtensa/mm/fault.c | 2 +- 22 files changed, 27 insertions(+), 24 deletions(-) -diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c -index fadd5f8..6d73e1b 100644 ---- a/arch/alpha/mm/fault.c -+++ b/arch/alpha/mm/fault.c -@@ -107,7 +107,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr, +Index: linux-3.4/arch/alpha/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/alpha/mm/fault.c ++++ linux-3.4/arch/alpha/mm/fault.c +@@ -106,7 +106,7 @@ do_page_fault(unsigned long address, uns /* If we're in an interrupt context, or have no user context, we must not take the fault. */ @@ -45,11 +43,11 @@ index fadd5f8..6d73e1b 100644 goto no_context; #ifdef CONFIG_ALPHA_LARGE_VMALLOC -diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c -index aa33949..c8dd303 100644 ---- a/arch/arm/mm/fault.c -+++ b/arch/arm/mm/fault.c -@@ -294,7 +294,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +Index: linux-3.4/arch/arm/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/arm/mm/fault.c ++++ linux-3.4/arch/arm/mm/fault.c +@@ -277,7 +277,7 @@ do_page_fault(unsigned long addr, unsign * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -58,11 +56,11 @@ index aa33949..c8dd303 100644 goto no_context; /* -diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c -index f7040a1..623a027 100644 ---- a/arch/avr32/mm/fault.c -+++ b/arch/avr32/mm/fault.c -@@ -81,7 +81,8 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) +Index: linux-3.4/arch/avr32/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/avr32/mm/fault.c ++++ linux-3.4/arch/avr32/mm/fault.c +@@ -81,7 +81,8 @@ asmlinkage void do_page_fault(unsigned l * If we're in an interrupt or have no user context, we must * not take the fault... */ @@ -72,11 +70,11 @@ index f7040a1..623a027 100644 goto no_context; local_irq_enable(); -diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c -index 9dcac8e..2b2c292 100644 ---- a/arch/cris/mm/fault.c -+++ b/arch/cris/mm/fault.c -@@ -111,7 +111,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, +Index: linux-3.4/arch/cris/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/cris/mm/fault.c ++++ linux-3.4/arch/cris/mm/fault.c +@@ -112,7 +112,7 @@ do_page_fault(unsigned long address, str * user context, we must not take the fault. */ @@ -85,11 +83,11 @@ index 9dcac8e..2b2c292 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c -index a325d57..3da8ec7 100644 ---- a/arch/frv/mm/fault.c -+++ b/arch/frv/mm/fault.c -@@ -79,7 +79,7 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear +Index: linux-3.4/arch/frv/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/frv/mm/fault.c ++++ linux-3.4/arch/frv/mm/fault.c +@@ -78,7 +78,7 @@ asmlinkage void do_page_fault(int datamm * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -98,11 +96,11 @@ index a325d57..3da8ec7 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c -index 20b3593..2a4e44f 100644 ---- a/arch/ia64/mm/fault.c -+++ b/arch/ia64/mm/fault.c -@@ -89,7 +89,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re +Index: linux-3.4/arch/ia64/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/ia64/mm/fault.c ++++ linux-3.4/arch/ia64/mm/fault.c +@@ -88,7 +88,7 @@ ia64_do_page_fault (unsigned long addres /* * If we're in an interrupt or have no user context, we must not take the fault.. */ @@ -111,11 +109,11 @@ index 20b3593..2a4e44f 100644 goto no_context; #ifdef CONFIG_VIRTUAL_MEM_MAP -diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c -index 2c9aeb4..16fa2c7 100644 ---- a/arch/m32r/mm/fault.c -+++ b/arch/m32r/mm/fault.c -@@ -115,7 +115,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, +Index: linux-3.4/arch/m32r/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/m32r/mm/fault.c ++++ linux-3.4/arch/m32r/mm/fault.c +@@ -114,7 +114,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user context or are running in an * atomic region then we must not take the fault.. */ @@ -124,11 +122,11 @@ index 2c9aeb4..16fa2c7 100644 goto bad_area_nosemaphore; /* When running in the kernel we expect faults to occur only to -diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c -index 2db6099..238ffc0 100644 ---- a/arch/m68k/mm/fault.c -+++ b/arch/m68k/mm/fault.c -@@ -85,7 +85,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, +Index: linux-3.4/arch/m68k/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/m68k/mm/fault.c ++++ linux-3.4/arch/m68k/mm/fault.c +@@ -84,7 +84,7 @@ int do_page_fault(struct pt_regs *regs, * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -137,11 +135,11 @@ index 2db6099..238ffc0 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c -index ae97d2c..c3f219c 100644 ---- a/arch/microblaze/mm/fault.c -+++ b/arch/microblaze/mm/fault.c -@@ -107,7 +107,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, +Index: linux-3.4/arch/microblaze/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/microblaze/mm/fault.c ++++ linux-3.4/arch/microblaze/mm/fault.c +@@ -106,7 +106,7 @@ void do_page_fault(struct pt_regs *regs, if ((error_code & 0x13) == 0x13 || (error_code & 0x11) == 0x11) is_write = 0; @@ -150,11 +148,11 @@ index ae97d2c..c3f219c 100644 if (kernel_mode(regs)) goto bad_area_nosemaphore; -diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c -index 937cf33..ce7e75e 100644 ---- a/arch/mips/mm/fault.c -+++ b/arch/mips/mm/fault.c -@@ -88,7 +88,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ +Index: linux-3.4/arch/mips/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/mips/mm/fault.c ++++ linux-3.4/arch/mips/mm/fault.c +@@ -89,7 +89,7 @@ asmlinkage void __kprobes do_page_fault( * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -162,12 +160,12 @@ index 937cf33..ce7e75e 100644 + if (in_atomic() || !mm || current->pagefault_disabled) goto bad_area_nosemaphore; - down_read(&mm->mmap_sem); -diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c -index 0945409..53c8d16 100644 ---- a/arch/mn10300/mm/fault.c -+++ b/arch/mn10300/mm/fault.c -@@ -168,7 +168,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code, + retry: +Index: linux-3.4/arch/mn10300/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/mn10300/mm/fault.c ++++ linux-3.4/arch/mn10300/mm/fault.c +@@ -167,7 +167,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -176,11 +174,11 @@ index 0945409..53c8d16 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c -index 18162ce..09ecc8a 100644 ---- a/arch/parisc/mm/fault.c -+++ b/arch/parisc/mm/fault.c -@@ -176,7 +176,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, +Index: linux-3.4/arch/parisc/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/parisc/mm/fault.c ++++ linux-3.4/arch/parisc/mm/fault.c +@@ -176,7 +176,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long acc_type; int fault; @@ -189,24 +187,24 @@ index 18162ce..09ecc8a 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c -index 5efe8c9..17f8bbe 100644 ---- a/arch/powerpc/mm/fault.c -+++ b/arch/powerpc/mm/fault.c -@@ -162,7 +162,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, - } - #endif +Index: linux-3.4/arch/powerpc/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/powerpc/mm/fault.c ++++ linux-3.4/arch/powerpc/mm/fault.c +@@ -261,7 +261,7 @@ int __kprobes do_page_fault(struct pt_re + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); - if (in_atomic() || mm == NULL) { + if (in_atomic() || mm == NULL || current->pagefault_disabled) { if (!user_mode(regs)) return SIGSEGV; /* in_atomic() in user mode is really bad, -diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c -index c7f0fbc..0d60168 100644 ---- a/arch/s390/mm/fault.c -+++ b/arch/s390/mm/fault.c -@@ -294,7 +294,8 @@ static inline int do_exception(struct pt_regs *regs, int access, +Index: linux-3.4/arch/s390/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/s390/mm/fault.c ++++ linux-3.4/arch/s390/mm/fault.c +@@ -283,7 +283,8 @@ static inline int do_exception(struct pt * user context. */ fault = VM_FAULT_BADCONTEXT; @@ -216,21 +214,21 @@ index c7f0fbc..0d60168 100644 goto out; address = trans_exc_code & __FAIL_ADDR_MASK; -@@ -425,7 +426,8 @@ void __kprobes do_asce_exception(struct pt_regs *regs, long pgm_int_code, - struct mm_struct *mm = current->mm; - struct vm_area_struct *vma; +@@ -415,7 +416,8 @@ void __kprobes do_asce_exception(struct + unsigned long trans_exc_code; + trans_exc_code = regs->int_parm_long; - if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm)) + if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm || -+ current->pagefault_disabled)) ++ current->pagefault_disabled)) goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/score/mm/fault.c b/arch/score/mm/fault.c -index 47b600e..4c12824 100644 ---- a/arch/score/mm/fault.c -+++ b/arch/score/mm/fault.c -@@ -72,7 +72,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, +Index: linux-3.4/arch/score/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/score/mm/fault.c ++++ linux-3.4/arch/score/mm/fault.c +@@ -72,7 +72,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -239,11 +237,11 @@ index 47b600e..4c12824 100644 goto bad_area_nosemaphore; down_read(&mm->mmap_sem); -diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c -index 7bebd04..a67ac56 100644 ---- a/arch/sh/mm/fault_32.c -+++ b/arch/sh/mm/fault_32.c -@@ -166,7 +166,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, +Index: linux-3.4/arch/sh/mm/fault_32.c +=================================================================== +--- linux-3.4.orig/arch/sh/mm/fault_32.c ++++ linux-3.4/arch/sh/mm/fault_32.c +@@ -166,7 +166,7 @@ asmlinkage void __kprobes do_page_fault( * If we're in an interrupt, have no user context or are running * in an atomic region then we must not take the fault: */ @@ -252,11 +250,11 @@ index 7bebd04..a67ac56 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c -index 8023fd7..e0742c1 100644 ---- a/arch/sparc/mm/fault_32.c -+++ b/arch/sparc/mm/fault_32.c -@@ -247,8 +247,8 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, +Index: linux-3.4/arch/sparc/mm/fault_32.c +=================================================================== +--- linux-3.4.orig/arch/sparc/mm/fault_32.c ++++ linux-3.4/arch/sparc/mm/fault_32.c +@@ -248,8 +248,8 @@ asmlinkage void do_sparc_fault(struct pt * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -267,11 +265,11 @@ index 8023fd7..e0742c1 100644 perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); -diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c -index 504c062..9d691a5 100644 ---- a/arch/sparc/mm/fault_64.c -+++ b/arch/sparc/mm/fault_64.c -@@ -322,7 +322,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) +Index: linux-3.4/arch/sparc/mm/fault_64.c +=================================================================== +--- linux-3.4.orig/arch/sparc/mm/fault_64.c ++++ linux-3.4/arch/sparc/mm/fault_64.c +@@ -323,7 +323,7 @@ asmlinkage void __kprobes do_sparc64_fau * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -280,11 +278,11 @@ index 504c062..9d691a5 100644 goto intr_or_no_mm; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); -diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c -index 25b7b90..ecdb016 100644 ---- a/arch/tile/mm/fault.c -+++ b/arch/tile/mm/fault.c -@@ -346,7 +346,7 @@ static int handle_page_fault(struct pt_regs *regs, +Index: linux-3.4/arch/tile/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/tile/mm/fault.c ++++ linux-3.4/arch/tile/mm/fault.c +@@ -355,7 +355,7 @@ static int handle_page_fault(struct pt_r * If we're in an interrupt, have no user context or are running in an * atomic region then we must not take the fault. */ @@ -293,11 +291,11 @@ index 25b7b90..ecdb016 100644 vma = NULL; /* happy compiler */ goto bad_area_nosemaphore; } -diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c -index dafc947..a283400 100644 ---- a/arch/um/kernel/trap.c -+++ b/arch/um/kernel/trap.c -@@ -37,7 +37,7 @@ int handle_page_fault(unsigned long address, unsigned long ip, +Index: linux-3.4/arch/um/kernel/trap.c +=================================================================== +--- linux-3.4.orig/arch/um/kernel/trap.c ++++ linux-3.4/arch/um/kernel/trap.c +@@ -37,7 +37,7 @@ int handle_page_fault(unsigned long addr * If the fault was during atomic operation, don't take the fault, just * fail. */ @@ -306,11 +304,11 @@ index dafc947..a283400 100644 goto out_nosemaphore; down_read(&mm->mmap_sem); -diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c -index 5db0490..191015f 100644 ---- a/arch/x86/mm/fault.c -+++ b/arch/x86/mm/fault.c -@@ -1084,7 +1084,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) +Index: linux-3.4/arch/x86/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/x86/mm/fault.c ++++ linux-3.4/arch/x86/mm/fault.c +@@ -1094,7 +1094,7 @@ do_page_fault(struct pt_regs *regs, unsi * If we're in an interrupt, have no user context or are running * in an atomic region then we must not take the fault: */ @@ -319,11 +317,11 @@ index 5db0490..191015f 100644 bad_area_nosemaphore(regs, error_code, address); return; } -diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c -index e367e30..705f483 100644 ---- a/arch/xtensa/mm/fault.c -+++ b/arch/xtensa/mm/fault.c -@@ -57,7 +57,7 @@ void do_page_fault(struct pt_regs *regs) +Index: linux-3.4/arch/xtensa/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/xtensa/mm/fault.c ++++ linux-3.4/arch/xtensa/mm/fault.c +@@ -56,7 +56,7 @@ void do_page_fault(struct pt_regs *regs) /* If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -332,6 +330,3 @@ index e367e30..705f483 100644 bad_page_fault(regs, address, SIGSEGV); return; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0028-arm-Allow-forced-irq-threading.patch b/debian/patches/features/all/rt/arm-allow-irq-threading.patch similarity index 52% rename from debian/patches/features/all/rt/0028-arm-Allow-forced-irq-threading.patch rename to debian/patches/features/all/rt/arm-allow-irq-threading.patch index 79fe56733..4b02b19de 100644 --- a/debian/patches/features/all/rt/0028-arm-Allow-forced-irq-threading.patch +++ b/debian/patches/features/all/rt/arm-allow-irq-threading.patch @@ -1,7 +1,6 @@ -From d24eb79d3953d59e4a232bb66d6182d00007c02d Mon Sep 17 00:00:00 2001 +Subject: arm: Allow forced irq threading From: Thomas Gleixner Date: Sat, 16 Jul 2011 13:15:20 +0200 -Subject: [PATCH 028/267] arm: Allow forced irq threading All timer interrupts and the perf interrupt are marked NO_THREAD, so its safe to allow forced interrupt threading. @@ -11,18 +10,15 @@ Signed-off-by: Thomas Gleixner arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index ab3740e..fc327b8 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -29,6 +29,7 @@ config ARM +Index: linux-3.4/arch/arm/Kconfig +=================================================================== +--- linux-3.4.orig/arch/arm/Kconfig ++++ linux-3.4/arch/arm/Kconfig +@@ -31,6 +31,7 @@ config ARM + select HAVE_C_RECORDMCOUNT select HAVE_GENERIC_HARDIRQS - select HAVE_SPARSE_IRQ select GENERIC_IRQ_SHOW + select IRQ_FORCED_THREADING select CPU_PM if (SUSPEND || CPU_IDLE) - help - The ARM series is a line of low-power-consumption RISC chip designs --- -1.7.10 - + select GENERIC_PCI_IOMAP + select HAVE_BPF_JIT if NET 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/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch new file mode 100644 index 000000000..c6cfd48da --- /dev/null +++ b/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch @@ -0,0 +1,58 @@ +From: Benedikt Spranger +Date: Sat, 6 Mar 2010 17:47:10 +0100 +Subject: ARM: AT91: PIT: Remove irq handler when clock event is unused + +Setup and remove the interrupt handler in clock event mode selection. +This avoids calling the (shared) interrupt handler when the device is +not used. + +Signed-off-by: Benedikt Spranger +Signed-off-by: Thomas Gleixner + +--- + arch/arm/mach-at91/at91rm9200_time.c | 1 + + arch/arm/mach-at91/at91sam926x_time.c | 5 ++++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +Index: linux-3.4/arch/arm/mach-at91/at91rm9200_time.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-at91/at91rm9200_time.c ++++ linux-3.4/arch/arm/mach-at91/at91rm9200_time.c +@@ -130,6 +130,7 @@ clkevt32k_mode(enum clock_event_mode mod + break; + case CLOCK_EVT_MODE_SHUTDOWN: + case CLOCK_EVT_MODE_UNUSED: ++ remove_irq(AT91_ID_SYS, &at91rm9200_timer_irq); + case CLOCK_EVT_MODE_RESUME: + irqmask = 0; + break; +Index: linux-3.4/arch/arm/mach-at91/at91sam926x_time.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-at91/at91sam926x_time.c ++++ linux-3.4/arch/arm/mach-at91/at91sam926x_time.c +@@ -67,7 +67,7 @@ static struct clocksource pit_clk = { + .flags = CLOCK_SOURCE_IS_CONTINUOUS, + }; + +- ++static struct irqaction at91sam926x_pit_irq; + /* + * Clockevent device: interrupts every 1/HZ (== pit_cycles * MCK/16) + */ +@@ -76,6 +76,8 @@ pit_clkevt_mode(enum clock_event_mode mo + { + switch (mode) { + case CLOCK_EVT_MODE_PERIODIC: ++ /* Set up irq handler */ ++ setup_irq(AT91_ID_SYS, &at91sam926x_pit_irq); + /* update clocksource counter */ + pit_cnt += pit_cycle * PIT_PICNT(pit_read(AT91_PIT_PIVR)); + pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN +@@ -88,6 +90,7 @@ pit_clkevt_mode(enum clock_event_mode mo + case CLOCK_EVT_MODE_UNUSED: + /* disable irq, leaving the clocksource active */ + pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN); ++ remove_irq(AT91_ID_SYS, &at91sam926x_pit_irq); + break; + case CLOCK_EVT_MODE_RESUME: + break; diff --git a/debian/patches/features/all/rt/0239-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch b/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch similarity index 68% rename from debian/patches/features/all/rt/0239-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch rename to debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch index 05bbebaf9..c61e1bb30 100644 --- a/debian/patches/features/all/rt/0239-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch +++ b/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch @@ -1,21 +1,21 @@ -From 7f2157307f760daa1eb214bbe42f6b128bde99b2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 1 May 2010 18:29:35 +0200 -Subject: [PATCH 239/267] ARM: at91: tclib: Default to tclib timer for RT +Subject: ARM: at91: tclib: Default to tclib timer for RT RT is not too happy about the shared timer interrupt in AT91 devices. Default to tclib timer for RT. Signed-off-by: Thomas Gleixner + --- drivers/misc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index 1cb530c..951ae6c 100644 ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -82,6 +82,7 @@ config AB8500_PWM +Index: linux-3.4/drivers/misc/Kconfig +=================================================================== +--- linux-3.4.orig/drivers/misc/Kconfig ++++ linux-3.4/drivers/misc/Kconfig +@@ -72,6 +72,7 @@ config AB8500_PWM config ATMEL_TCLIB bool "Atmel AT32/AT91 Timer/Counter Library" depends on (AVR32 || ARCH_AT91) @@ -23,7 +23,7 @@ index 1cb530c..951ae6c 100644 help Select this if you want a library to allocate the Timer/Counter blocks found on many Atmel processors. This facilitates using -@@ -114,7 +115,7 @@ config ATMEL_TCB_CLKSRC_BLOCK +@@ -104,7 +105,7 @@ config ATMEL_TCB_CLKSRC_BLOCK config ATMEL_TCB_CLKSRC_USE_SLOW_CLOCK bool "TC Block use 32 KiHz clock" depends on ATMEL_TCB_CLKSRC @@ -32,6 +32,3 @@ index 1cb530c..951ae6c 100644 help Select this to use 32 KiHz base clock rate as TC block clock source for clock events. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0029-preempt-rt-Convert-arm-boot_lock-to-raw.patch b/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch similarity index 55% rename from debian/patches/features/all/rt/0029-preempt-rt-Convert-arm-boot_lock-to-raw.patch rename to debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch index 92b11dd7f..4a6e44943 100644 --- a/debian/patches/features/all/rt/0029-preempt-rt-Convert-arm-boot_lock-to-raw.patch +++ b/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch @@ -1,7 +1,7 @@ -From b4413229a63e7c48b6f26a03eb74e418dce27d49 Mon Sep 17 00:00:00 2001 +Subject: preempt-rt: Convert arm boot_lock to raw From: Frank Rowand Date: Mon, 19 Sep 2011 14:51:14 -0700 -Subject: [PATCH 029/267] preempt-rt: Convert arm boot_lock to raw + 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. @@ -23,25 +23,24 @@ Signed-off-by: Thomas Gleixner arch/arm/mach-exynos/platsmp.c | 12 ++++++------ arch/arm/mach-msm/platsmp.c | 10 +++++----- arch/arm/mach-omap2/omap-smp.c | 10 +++++----- - arch/arm/mach-tegra/platsmp.c | 10 +++++----- arch/arm/mach-ux500/platsmp.c | 10 +++++----- arch/arm/plat-versatile/platsmp.c | 10 +++++----- - 6 files changed, 31 insertions(+), 31 deletions(-) + 5 files changed, 26 insertions(+), 26 deletions(-) -diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c -index 69ffb2f..fe321b0 100644 ---- a/arch/arm/mach-exynos/platsmp.c -+++ b/arch/arm/mach-exynos/platsmp.c -@@ -63,7 +63,7 @@ static void __iomem *scu_base_addr(void) +Index: linux-3.4/arch/arm/mach-exynos/platsmp.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-exynos/platsmp.c ++++ linux-3.4/arch/arm/mach-exynos/platsmp.c +@@ -62,7 +62,7 @@ static void __iomem *scu_base_addr(void) return (void __iomem *)(S5P_VA_SCU); } -static DEFINE_SPINLOCK(boot_lock); +static DEFINE_RAW_SPINLOCK(boot_lock); - static void __cpuinit exynos4_gic_secondary_init(void) + void __cpuinit platform_secondary_init(unsigned int cpu) { -@@ -108,8 +108,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) +@@ -82,8 +82,8 @@ void __cpuinit platform_secondary_init(u /* * Synchronise with the boot thread. */ @@ -52,7 +51,7 @@ index 69ffb2f..fe321b0 100644 } int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) -@@ -120,7 +120,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -94,7 +94,7 @@ int __cpuinit boot_secondary(unsigned in * Set synchronisation state between this boot processor * and the secondary one */ @@ -61,7 +60,7 @@ index 69ffb2f..fe321b0 100644 /* * The secondary processor is waiting to be released from -@@ -149,7 +149,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -123,7 +123,7 @@ int __cpuinit boot_secondary(unsigned in if (timeout == 0) { printk(KERN_ERR "cpu1 power enable failed"); @@ -70,7 +69,7 @@ index 69ffb2f..fe321b0 100644 return -ETIMEDOUT; } } -@@ -177,7 +177,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -151,7 +151,7 @@ int __cpuinit boot_secondary(unsigned in * now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ @@ -79,11 +78,11 @@ index 69ffb2f..fe321b0 100644 return pen_release != -1 ? -ENOSYS : 0; } -diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c -index fdec58a..cad6b81 100644 ---- a/arch/arm/mach-msm/platsmp.c -+++ b/arch/arm/mach-msm/platsmp.c -@@ -39,7 +39,7 @@ extern void msm_secondary_startup(void); +Index: linux-3.4/arch/arm/mach-msm/platsmp.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-msm/platsmp.c ++++ linux-3.4/arch/arm/mach-msm/platsmp.c +@@ -40,7 +40,7 @@ extern void msm_secondary_startup(void); */ volatile int pen_release = -1; @@ -92,7 +91,7 @@ index fdec58a..cad6b81 100644 static inline int get_core_count(void) { -@@ -69,8 +69,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) +@@ -70,8 +70,8 @@ void __cpuinit platform_secondary_init(u /* * Synchronise with the boot thread. */ @@ -103,7 +102,7 @@ index fdec58a..cad6b81 100644 } static __cpuinit void prepare_cold_cpu(unsigned int cpu) -@@ -107,7 +107,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -108,7 +108,7 @@ int __cpuinit boot_secondary(unsigned in * set synchronisation state between this boot processor * and the secondary one */ @@ -112,7 +111,7 @@ index fdec58a..cad6b81 100644 /* * The secondary processor is waiting to be released from -@@ -141,7 +141,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -142,7 +142,7 @@ int __cpuinit boot_secondary(unsigned in * now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ @@ -121,20 +120,20 @@ index fdec58a..cad6b81 100644 return pen_release != -1 ? -ENOSYS : 0; } -diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c -index 4412ddb..490de9c 100644 ---- a/arch/arm/mach-omap2/omap-smp.c -+++ b/arch/arm/mach-omap2/omap-smp.c -@@ -29,7 +29,7 @@ +Index: linux-3.4/arch/arm/mach-omap2/omap-smp.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-omap2/omap-smp.c ++++ linux-3.4/arch/arm/mach-omap2/omap-smp.c +@@ -34,7 +34,7 @@ /* SCU base address */ static void __iomem *scu_base; -static DEFINE_SPINLOCK(boot_lock); +static DEFINE_RAW_SPINLOCK(boot_lock); - void __cpuinit platform_secondary_init(unsigned int cpu) + void __iomem *omap4_get_scu_base(void) { -@@ -43,8 +43,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) +@@ -65,8 +65,8 @@ void __cpuinit platform_secondary_init(u /* * Synchronise with the boot thread. */ @@ -145,7 +144,7 @@ index 4412ddb..490de9c 100644 } int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) -@@ -53,7 +53,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -77,7 +77,7 @@ int __cpuinit boot_secondary(unsigned in * Set synchronisation state between this boot processor * and the secondary one */ @@ -154,7 +153,7 @@ index 4412ddb..490de9c 100644 /* * Update the AuxCoreBoot0 with boot state for secondary core. -@@ -70,7 +70,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -117,7 +117,7 @@ int __cpuinit boot_secondary(unsigned in * Now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ @@ -163,53 +162,11 @@ index 4412ddb..490de9c 100644 return 0; } -diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c -index 7d2b5d0..571f61a 100644 ---- a/arch/arm/mach-tegra/platsmp.c -+++ b/arch/arm/mach-tegra/platsmp.c -@@ -28,7 +28,7 @@ - - extern void tegra_secondary_startup(void); - --static DEFINE_SPINLOCK(boot_lock); -+static DEFINE_RAW_SPINLOCK(boot_lock); - static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); - - #define EVP_CPU_RESET_VECTOR \ -@@ -50,8 +50,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) - /* - * Synchronise with the boot thread. - */ -- spin_lock(&boot_lock); -- spin_unlock(&boot_lock); -+ raw_spin_lock(&boot_lock); -+ raw_spin_unlock(&boot_lock); - } - - int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) -@@ -65,7 +65,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) - * set synchronisation state between this boot processor - * and the secondary one - */ -- spin_lock(&boot_lock); -+ raw_spin_lock(&boot_lock); - - - /* set the reset vector to point to the secondary_startup routine */ -@@ -101,7 +101,7 @@ int __cpuinit 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 - */ -- spin_unlock(&boot_lock); -+ raw_spin_unlock(&boot_lock); - - return 0; - } -diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c -index a19e398..9e92c6c 100644 ---- a/arch/arm/mach-ux500/platsmp.c -+++ b/arch/arm/mach-ux500/platsmp.c -@@ -57,7 +57,7 @@ static void __iomem *scu_base_addr(void) +Index: linux-3.4/arch/arm/mach-ux500/platsmp.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-ux500/platsmp.c ++++ linux-3.4/arch/arm/mach-ux500/platsmp.c +@@ -58,7 +58,7 @@ static void __iomem *scu_base_addr(void) return NULL; } @@ -218,7 +175,7 @@ index a19e398..9e92c6c 100644 void __cpuinit platform_secondary_init(unsigned int cpu) { -@@ -77,8 +77,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) +@@ -78,8 +78,8 @@ void __cpuinit platform_secondary_init(u /* * Synchronise with the boot thread. */ @@ -229,7 +186,7 @@ index a19e398..9e92c6c 100644 } int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) -@@ -89,7 +89,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -90,7 +90,7 @@ int __cpuinit boot_secondary(unsigned in * set synchronisation state between this boot processor * and the secondary one */ @@ -238,7 +195,7 @@ index a19e398..9e92c6c 100644 /* * The secondary processor is waiting to be released from -@@ -110,7 +110,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -111,7 +111,7 @@ int __cpuinit boot_secondary(unsigned in * now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ @@ -247,11 +204,11 @@ index a19e398..9e92c6c 100644 return pen_release != -1 ? -ENOSYS : 0; } -diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c -index 92f18d3..287bbb5 100644 ---- a/arch/arm/plat-versatile/platsmp.c -+++ b/arch/arm/plat-versatile/platsmp.c -@@ -37,7 +37,7 @@ static void __cpuinit write_pen_release(int val) +Index: linux-3.4/arch/arm/plat-versatile/platsmp.c +=================================================================== +--- linux-3.4.orig/arch/arm/plat-versatile/platsmp.c ++++ linux-3.4/arch/arm/plat-versatile/platsmp.c +@@ -38,7 +38,7 @@ static void __cpuinit write_pen_release( outer_clean_range(__pa(&pen_release), __pa(&pen_release + 1)); } @@ -260,7 +217,7 @@ index 92f18d3..287bbb5 100644 void __cpuinit platform_secondary_init(unsigned int cpu) { -@@ -57,8 +57,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) +@@ -58,8 +58,8 @@ void __cpuinit platform_secondary_init(u /* * Synchronise with the boot thread. */ @@ -271,7 +228,7 @@ index 92f18d3..287bbb5 100644 } int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) -@@ -69,7 +69,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -70,7 +70,7 @@ int __cpuinit boot_secondary(unsigned in * Set synchronisation state between this boot processor * and the secondary one */ @@ -280,7 +237,7 @@ index 92f18d3..287bbb5 100644 /* * This is really belt and braces; we hold unintended secondary -@@ -99,7 +99,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) +@@ -100,7 +100,7 @@ int __cpuinit boot_secondary(unsigned in * now the secondary core is starting up let it run its * calibrations, then wait for it to finish */ @@ -289,6 +246,3 @@ index 92f18d3..287bbb5 100644 return pen_release != -1 ? -ENOSYS : 0; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0238-arm-disable-highmem-on-rt.patch.patch b/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch similarity index 59% rename from debian/patches/features/all/rt/0238-arm-disable-highmem-on-rt.patch.patch rename to debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch index 291018a58..0d0c20d49 100644 --- a/debian/patches/features/all/rt/0238-arm-disable-highmem-on-rt.patch.patch +++ b/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch @@ -1,18 +1,17 @@ -From 9b87c1e6e04a2419345383133d155c912ec6ae9f Mon Sep 17 00:00:00 2001 +Subject: arm-disable-highmem-on-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:09:28 +0200 -Subject: [PATCH 238/267] arm-disable-highmem-on-rt.patch Signed-off-by: Thomas Gleixner --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index fc327b8..0e53586 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -1668,7 +1668,7 @@ config HAVE_ARCH_PFN_VALID +Index: linux-3.4/arch/arm/Kconfig +=================================================================== +--- linux-3.4.orig/arch/arm/Kconfig ++++ linux-3.4/arch/arm/Kconfig +@@ -1716,7 +1716,7 @@ config HAVE_ARCH_PFN_VALID config HIGHMEM bool "High Memory Support" @@ -21,6 +20,3 @@ index fc327b8..0e53586 100644 help The address space of ARM processors is only 4 Gigabytes large and it has to accommodate user address space, kernel address --- -1.7.10 - diff --git a/debian/patches/features/all/rt/arm-enable-interrupts-in-signal-code.patch b/debian/patches/features/all/rt/arm-enable-interrupts-in-signal-code.patch new file mode 100644 index 000000000..11873303f --- /dev/null +++ b/debian/patches/features/all/rt/arm-enable-interrupts-in-signal-code.patch @@ -0,0 +1,23 @@ +Subject: arm-enable-interrupts-in-signal-code.patch +From: Thomas Gleixner +Date: Sat, 16 Jul 2011 16:27:13 +0200 + +Signed-off-by: Thomas Gleixner +--- + arch/arm/kernel/signal.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: linux-3.4/arch/arm/kernel/signal.c +=================================================================== +--- linux-3.4.orig/arch/arm/kernel/signal.c ++++ linux-3.4/arch/arm/kernel/signal.c +@@ -664,6 +664,9 @@ static void do_signal(struct pt_regs *re + if (!user_mode(regs)) + return; + ++ local_irq_enable(); ++ preempt_check_resched(); ++ + /* + * If we were from a system call, check for system call restarting... + */ diff --git a/debian/patches/features/all/rt/0027-arm-Mark-pmu-interupt-IRQF_NO_THREAD.patch b/debian/patches/features/all/rt/arm-mark-pmu-interupt-no-thread.patch similarity index 60% rename from debian/patches/features/all/rt/0027-arm-Mark-pmu-interupt-IRQF_NO_THREAD.patch rename to debian/patches/features/all/rt/arm-mark-pmu-interupt-no-thread.patch index 325c25752..d2076ca32 100644 --- a/debian/patches/features/all/rt/0027-arm-Mark-pmu-interupt-IRQF_NO_THREAD.patch +++ b/debian/patches/features/all/rt/arm-mark-pmu-interupt-no-thread.patch @@ -1,7 +1,6 @@ -From 8aa76e7290f80f472b9aebdaf8ae7d627d579359 Mon Sep 17 00:00:00 2001 +Subject: arm: Mark pmu interupt IRQF_NO_THREAD From: Thomas Gleixner Date: Wed, 16 Mar 2011 14:45:31 +0100 -Subject: [PATCH 027/267] arm: Mark pmu interupt IRQF_NO_THREAD PMU interrupt must not be threaded. Remove IRQF_DISABLED while at it as we run all handlers with interrupts disabled anyway. @@ -11,11 +10,11 @@ Signed-off-by: Thomas Gleixner arch/arm/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c -index ecebb89..e1286fb 100644 ---- a/arch/arm/kernel/perf_event.c -+++ b/arch/arm/kernel/perf_event.c -@@ -435,7 +435,7 @@ armpmu_reserve_hardware(struct arm_pmu *armpmu) +Index: linux-3.4/arch/arm/kernel/perf_event.c +=================================================================== +--- linux-3.4.orig/arch/arm/kernel/perf_event.c ++++ linux-3.4/arch/arm/kernel/perf_event.c +@@ -433,7 +433,7 @@ armpmu_reserve_hardware(struct arm_pmu * } err = request_irq(irq, handle_irq, @@ -24,6 +23,3 @@ index ecebb89..e1286fb 100644 "arm-pmu", armpmu); if (err) { pr_err("unable to request IRQ%d for ARM PMU counters\n", --- -1.7.10 - diff --git a/debian/patches/features/all/rt/arm-omap-make-wakeupgen_lock-raw.patch b/debian/patches/features/all/rt/arm-omap-make-wakeupgen_lock-raw.patch new file mode 100644 index 000000000..402197789 --- /dev/null +++ b/debian/patches/features/all/rt/arm-omap-make-wakeupgen_lock-raw.patch @@ -0,0 +1,64 @@ +Subject: arm-omap-make-wakeupgen_lock-raw.patch +From: Thomas Gleixner +Date: Wed, 11 Apr 2012 11:26:38 +0200 + +Signed-off-by: Thomas Gleixner +--- + arch/arm/mach-omap2/omap-wakeupgen.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +Index: linux-3.4/arch/arm/mach-omap2/omap-wakeupgen.c +=================================================================== +--- linux-3.4.orig/arch/arm/mach-omap2/omap-wakeupgen.c ++++ linux-3.4/arch/arm/mach-omap2/omap-wakeupgen.c +@@ -43,7 +43,7 @@ + + static void __iomem *wakeupgen_base; + static void __iomem *sar_base; +-static DEFINE_SPINLOCK(wakeupgen_lock); ++static DEFINE_RAW_SPINLOCK(wakeupgen_lock); + static unsigned int irq_target_cpu[NR_IRQS]; + + /* +@@ -128,9 +128,9 @@ static void wakeupgen_mask(struct irq_da + { + unsigned long flags; + +- spin_lock_irqsave(&wakeupgen_lock, flags); ++ raw_spin_lock_irqsave(&wakeupgen_lock, flags); + _wakeupgen_clear(d->irq, irq_target_cpu[d->irq]); +- spin_unlock_irqrestore(&wakeupgen_lock, flags); ++ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags); + } + + /* +@@ -140,9 +140,9 @@ static void wakeupgen_unmask(struct irq_ + { + unsigned long flags; + +- spin_lock_irqsave(&wakeupgen_lock, flags); ++ raw_spin_lock_irqsave(&wakeupgen_lock, flags); + _wakeupgen_set(d->irq, irq_target_cpu[d->irq]); +- spin_unlock_irqrestore(&wakeupgen_lock, flags); ++ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags); + } + + #ifdef CONFIG_HOTPLUG_CPU +@@ -183,7 +183,7 @@ static void wakeupgen_irqmask_all(unsign + { + unsigned long flags; + +- spin_lock_irqsave(&wakeupgen_lock, flags); ++ raw_spin_lock_irqsave(&wakeupgen_lock, flags); + if (set) { + _wakeupgen_save_masks(cpu); + _wakeupgen_set_all(cpu, WKG_MASK_ALL); +@@ -191,7 +191,7 @@ static void wakeupgen_irqmask_all(unsign + _wakeupgen_set_all(cpu, WKG_UNMASK_ALL); + _wakeupgen_restore_masks(cpu); + } +- spin_unlock_irqrestore(&wakeupgen_lock, flags); ++ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags); + } + #endif + diff --git a/debian/patches/features/all/rt/0080-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch b/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch similarity index 65% rename from debian/patches/features/all/rt/0080-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch rename to debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch index ffd8a2336..6d1446e46 100644 --- a/debian/patches/features/all/rt/0080-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch +++ b/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch @@ -1,23 +1,22 @@ -From 8568db0e556b5159c9c7d85ce78f66d1df5d50ee Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 3 Jul 2009 08:44:29 -0500 -Subject: [PATCH 080/267] ata: Do not disable interrupts in ide code for - preempt-rt +Subject: ata: Do not disable interrupts in ide code for preempt-rt Use the local_irq_*_nort variants. Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- 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 4cadfa2..100f85c 100644 ---- a/drivers/ata/libata-sff.c -+++ b/drivers/ata/libata-sff.c -@@ -678,9 +678,9 @@ unsigned int ata_sff_data_xfer_noirq(struct ata_device *dev, unsigned char *buf, +Index: linux-3.4/drivers/ata/libata-sff.c +=================================================================== +--- linux-3.4.orig/drivers/ata/libata-sff.c ++++ linux-3.4/drivers/ata/libata-sff.c +@@ -678,9 +678,9 @@ unsigned int ata_sff_data_xfer_noirq(str unsigned long flags; unsigned int consumed; @@ -29,19 +28,19 @@ index 4cadfa2..100f85c 100644 return consumed; } -@@ -719,7 +719,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) +@@ -719,7 +719,7 @@ static void ata_pio_sector(struct ata_qu unsigned long flags; /* FIXME: use a bounce buffer */ - local_irq_save(flags); + local_irq_save_nort(flags); - buf = kmap_atomic(page, KM_IRQ0); + buf = kmap_atomic(page); /* do the actual data transfer */ -@@ -727,7 +727,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) +@@ -727,7 +727,7 @@ static void ata_pio_sector(struct ata_qu do_write); - kunmap_atomic(buf, KM_IRQ0); + kunmap_atomic(buf); - local_irq_restore(flags); + local_irq_restore_nort(flags); } else { @@ -53,18 +52,15 @@ index 4cadfa2..100f85c 100644 /* FIXME: use bounce buffer */ - local_irq_save(flags); + local_irq_save_nort(flags); - buf = kmap_atomic(page, KM_IRQ0); + buf = kmap_atomic(page); /* do the actual data transfer */ @@ -872,7 +872,7 @@ next_sg: count, rw); - kunmap_atomic(buf, KM_IRQ0); + kunmap_atomic(buf); - local_irq_restore(flags); + local_irq_restore_nort(flags); } else { buf = page_address(page); consumed = ap->ops->sff_data_xfer(dev, buf + offset, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0005-block-Shorten-interrupt-disabled-regions.patch b/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch similarity index 77% rename from debian/patches/features/all/rt/0005-block-Shorten-interrupt-disabled-regions.patch rename to debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch index afa73d768..06cc09bc1 100644 --- a/debian/patches/features/all/rt/0005-block-Shorten-interrupt-disabled-regions.patch +++ b/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch @@ -1,7 +1,6 @@ -From e2c97e4d5da80e66340ea752cb33bf8802feaa53 Mon Sep 17 00:00:00 2001 +Subject: block: Shorten interrupt disabled regions From: Thomas Gleixner Date: Wed, 22 Jun 2011 19:47:02 +0200 -Subject: [PATCH 005/267] block: Shorten interrupt disabled regions Moving the blk_sched_flush_plug() call out of the interrupt/preempt disabled region in the scheduler allows us to replace @@ -47,11 +46,11 @@ Signed-off-by: Thomas Gleixner block/blk-core.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) -diff --git a/block/blk-core.c b/block/blk-core.c -index 15de223..7366ad4 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -300,7 +300,11 @@ void __blk_run_queue(struct request_queue *q) +Index: linux-3.4/block/blk-core.c +=================================================================== +--- linux-3.4.orig/block/blk-core.c ++++ linux-3.4/block/blk-core.c +@@ -302,7 +302,11 @@ void __blk_run_queue(struct request_queu { if (unlikely(blk_queue_stopped(q))) return; @@ -64,7 +63,7 @@ index 15de223..7366ad4 100644 q->request_fn(q); } EXPORT_SYMBOL(__blk_run_queue); -@@ -2745,11 +2749,11 @@ static void queue_unplugged(struct request_queue *q, unsigned int depth, +@@ -2779,11 +2783,11 @@ static void queue_unplugged(struct reque * this lock). */ if (from_schedule) { @@ -78,7 +77,7 @@ index 15de223..7366ad4 100644 } } -@@ -2775,7 +2779,6 @@ static void flush_plug_callbacks(struct blk_plug *plug) +@@ -2809,7 +2813,6 @@ static void flush_plug_callbacks(struct void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) { struct request_queue *q; @@ -86,7 +85,7 @@ index 15de223..7366ad4 100644 struct request *rq; LIST_HEAD(list); unsigned int depth; -@@ -2796,11 +2799,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) +@@ -2830,11 +2833,6 @@ void blk_flush_plug_list(struct blk_plug q = NULL; depth = 0; @@ -98,16 +97,16 @@ index 15de223..7366ad4 100644 while (!list_empty(&list)) { rq = list_entry_rq(list.next); list_del_init(&rq->queuelist); -@@ -2813,7 +2811,7 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) +@@ -2847,7 +2845,7 @@ void blk_flush_plug_list(struct blk_plug queue_unplugged(q, depth, from_schedule); q = rq->q; depth = 0; - spin_lock(q->queue_lock); + spin_lock_irq(q->queue_lock); } + /* - * rq is already accounted, so use raw insert -@@ -2831,8 +2829,6 @@ void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) +@@ -2874,8 +2872,6 @@ void blk_flush_plug_list(struct blk_plug */ if (q) queue_unplugged(q, depth, from_schedule); @@ -116,6 +115,3 @@ index 15de223..7366ad4 100644 } void blk_finish_plug(struct blk_plug *plug) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch b/debian/patches/features/all/rt/bug-rt-dependend-variants.patch similarity index 72% rename from debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch rename to debian/patches/features/all/rt/bug-rt-dependend-variants.patch index 45e44f247..99607594e 100644 --- a/debian/patches/features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch +++ b/debian/patches/features/all/rt/bug-rt-dependend-variants.patch @@ -1,18 +1,18 @@ -From 7258f0c5442a0dde07c06e12f431134e4b9bff47 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:58 -0500 -Subject: [PATCH 077/267] bug: BUG_ON/WARN_ON variants dependend on RT/!RT +Subject: bug: BUG_ON/WARN_ON variants dependend on RT/!RT Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/asm-generic/bug.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h -index 84458b0..97c1eaf 100644 ---- a/include/asm-generic/bug.h -+++ b/include/asm-generic/bug.h +Index: linux-3.4/include/asm-generic/bug.h +=================================================================== +--- linux-3.4.orig/include/asm-generic/bug.h ++++ linux-3.4/include/asm-generic/bug.h @@ -3,6 +3,10 @@ #include @@ -24,7 +24,7 @@ index 84458b0..97c1eaf 100644 #ifdef CONFIG_BUG #ifdef CONFIG_GENERIC_BUG -@@ -202,4 +206,18 @@ extern void warn_slowpath_null(const char *file, const int line); +@@ -202,4 +206,18 @@ extern void warn_slowpath_null(const cha # define WARN_ON_SMP(x) ({0;}) #endif @@ -43,6 +43,3 @@ index 84458b0..97c1eaf 100644 +#endif + #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0039-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch b/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch similarity index 75% rename from debian/patches/features/all/rt/0039-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch rename to debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch index 70a58a792..8beba2f4c 100644 --- a/debian/patches/features/all/rt/0039-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch +++ b/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch @@ -1,25 +1,24 @@ -From b4217e96b0c71c84b8edbca7b99813b5f0f72033 Mon Sep 17 00:00:00 2001 From: Benedikt Spranger Date: Mon, 8 Mar 2010 18:57:04 +0100 -Subject: [PATCH 039/267] clocksource: TCLIB: Allow higher clock rates for - clock events +Subject: clocksource: TCLIB: Allow higher clock rates for clock events As default the TCLIB uses the 32KiHz base clock rate for clock events. Add a compile time selection to allow higher clock resulution. Signed-off-by: Benedikt Spranger Signed-off-by: Thomas Gleixner + --- - drivers/clocksource/tcb_clksrc.c | 44 ++++++++++++++++++++++---------------- - drivers/misc/Kconfig | 11 ++++++++-- + drivers/clocksource/tcb_clksrc.c | 44 +++++++++++++++++++++++---------------- + drivers/misc/Kconfig | 11 +++++++-- 2 files changed, 35 insertions(+), 20 deletions(-) -diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c -index 79c47e8..8976b3d 100644 ---- a/drivers/clocksource/tcb_clksrc.c -+++ b/drivers/clocksource/tcb_clksrc.c -@@ -21,8 +21,7 @@ - * resolution better than 200 nsec). +Index: linux-3.4/drivers/clocksource/tcb_clksrc.c +=================================================================== +--- linux-3.4.orig/drivers/clocksource/tcb_clksrc.c ++++ linux-3.4/drivers/clocksource/tcb_clksrc.c +@@ -23,8 +23,7 @@ + * this 32 bit free-running counter. the second channel is not used. * * - The third channel may be used to provide a 16-bit clockevent - * source, used in either periodic or oneshot mode. This runs @@ -28,7 +27,7 @@ index 79c47e8..8976b3d 100644 * * A boot clocksource and clockevent source are also currently needed, * unless the relevant platforms (ARM/AT91, AVR32/AT32) are changed so -@@ -68,6 +67,7 @@ static struct clocksource clksrc = { +@@ -74,6 +73,7 @@ static struct clocksource clksrc = { struct tc_clkevt_device { struct clock_event_device clkevt; struct clk *clk; @@ -36,7 +35,7 @@ index 79c47e8..8976b3d 100644 void __iomem *regs; }; -@@ -76,13 +76,6 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt) +@@ -82,13 +82,6 @@ static struct tc_clkevt_device *to_tc_cl return container_of(clkevt, struct tc_clkevt_device, clkevt); } @@ -50,7 +49,7 @@ index 79c47e8..8976b3d 100644 static u32 timer_clock; static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) -@@ -105,11 +98,12 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) +@@ -111,11 +104,12 @@ static void tc_mode(enum clock_event_mod case CLOCK_EVT_MODE_PERIODIC: clk_enable(tcd->clk); @@ -65,7 +64,7 @@ index 79c47e8..8976b3d 100644 /* Enable clock and interrupts on RC compare */ __raw_writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER)); -@@ -122,7 +116,7 @@ static void tc_mode(enum clock_event_mode m, struct clock_event_device *d) +@@ -128,7 +122,7 @@ static void tc_mode(enum clock_event_mod case CLOCK_EVT_MODE_ONESHOT: clk_enable(tcd->clk); @@ -74,7 +73,7 @@ index 79c47e8..8976b3d 100644 __raw_writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE | ATMEL_TC_WAVESEL_UP_AUTO, regs + ATMEL_TC_REG(2, CMR)); -@@ -152,8 +146,12 @@ static struct tc_clkevt_device clkevt = { +@@ -158,8 +152,12 @@ static struct tc_clkevt_device clkevt = .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .shift = 32, @@ -87,7 +86,7 @@ index 79c47e8..8976b3d 100644 .set_next_event = tc_next_event, .set_mode = tc_mode, }, -@@ -179,8 +177,9 @@ static struct irqaction tc_irqaction = { +@@ -185,8 +183,9 @@ static struct irqaction tc_irqaction = { .handler = ch2_irq, }; @@ -98,7 +97,7 @@ index 79c47e8..8976b3d 100644 struct clk *t2_clk = tc->clk[2]; int irq = tc->irq[2]; -@@ -188,11 +187,17 @@ static void __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx) +@@ -194,11 +193,17 @@ static void __init setup_clkevents(struc clkevt.clk = t2_clk; tc_irqaction.dev_id = &clkevt; @@ -120,8 +119,8 @@ index 79c47e8..8976b3d 100644 clkevt.clkevt.min_delta_ns = clockevent_delta2ns(1, &clkevt.clkevt) + 1; clkevt.clkevt.cpumask = cpumask_of(0); -@@ -295,8 +300,11 @@ static int __init tcb_clksrc_init(void) - clocksource_register(&clksrc); +@@ -327,8 +332,11 @@ static int __init tcb_clksrc_init(void) + clocksource_register_hz(&clksrc, divided_rate); /* channel 2: periodic and oneshot timer support */ +#ifdef CONFIG_ATMEL_TCB_CLKSRC_USE_SLOW_CLOCK @@ -133,11 +132,11 @@ index 79c47e8..8976b3d 100644 return 0; } arch_initcall(tcb_clksrc_init); -diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index 5664696..f3031a4 100644 ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -97,8 +97,7 @@ config ATMEL_TCB_CLKSRC +Index: linux-3.4/drivers/misc/Kconfig +=================================================================== +--- linux-3.4.orig/drivers/misc/Kconfig ++++ linux-3.4/drivers/misc/Kconfig +@@ -87,8 +87,7 @@ config ATMEL_TCB_CLKSRC are combined to make a single 32-bit timer. When GENERIC_CLOCKEVENTS is defined, the third timer channel @@ -147,7 +146,7 @@ index 5664696..f3031a4 100644 config ATMEL_TCB_CLKSRC_BLOCK int -@@ -112,6 +111,14 @@ config ATMEL_TCB_CLKSRC_BLOCK +@@ -102,6 +101,14 @@ config ATMEL_TCB_CLKSRC_BLOCK TC can be used for other purposes, such as PWM generation and interval timing. @@ -162,6 +161,3 @@ index 5664696..f3031a4 100644 config IBM_ASM tristate "Device driver for IBM RSA service processor" depends on X86 && PCI && INPUT && EXPERIMENTAL --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0151-cond-resched-lock-rt-tweak.patch.patch b/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch similarity index 57% rename from debian/patches/features/all/rt/0151-cond-resched-lock-rt-tweak.patch.patch rename to debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch index 3815ab8f3..e387fdf93 100644 --- a/debian/patches/features/all/rt/0151-cond-resched-lock-rt-tweak.patch.patch +++ b/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch @@ -1,18 +1,17 @@ -From 5136313c61afded30a8da141ae60d4bca90b0cf2 Mon Sep 17 00:00:00 2001 +Subject: cond-resched-lock-rt-tweak.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:51:33 +0200 -Subject: [PATCH 151/267] cond-resched-lock-rt-tweak.patch Signed-off-by: Thomas Gleixner --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 99e7f8b..175aaee 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -2599,7 +2599,7 @@ extern int _cond_resched(void); +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -2689,7 +2689,7 @@ extern int _cond_resched(void); extern int __cond_resched_lock(spinlock_t *lock); @@ -21,6 +20,3 @@ index 99e7f8b..175aaee 100644 #define PREEMPT_LOCK_OFFSET PREEMPT_OFFSET #else #define PREEMPT_LOCK_OFFSET 0 --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0149-cond-resched-softirq-fix.patch.patch b/debian/patches/features/all/rt/cond-resched-softirq-rt.patch similarity index 57% rename from debian/patches/features/all/rt/0149-cond-resched-softirq-fix.patch.patch rename to debian/patches/features/all/rt/cond-resched-softirq-rt.patch index 7f0d77200..2f89bbc27 100644 --- a/debian/patches/features/all/rt/0149-cond-resched-softirq-fix.patch.patch +++ b/debian/patches/features/all/rt/cond-resched-softirq-rt.patch @@ -1,19 +1,18 @@ -From 1a9f6b8b37a41e2b59c1989b461bf5b1fbecb50e Mon Sep 17 00:00:00 2001 +Subject: cond-resched-softirq-fix.patch From: Thomas Gleixner Date: Thu, 14 Jul 2011 09:56:44 +0200 -Subject: [PATCH 149/267] cond-resched-softirq-fix.patch Signed-off-by: Thomas Gleixner --- include/linux/sched.h | 4 ++++ - kernel/sched.c | 2 ++ + kernel/sched/core.c | 2 ++ 2 files changed, 6 insertions(+) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 6c20349..38d78dc 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -2602,12 +2602,16 @@ extern int __cond_resched_lock(spinlock_t *lock); +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -2700,12 +2700,16 @@ extern int __cond_resched_lock(spinlock_ __cond_resched_lock(lock); \ }) @@ -30,11 +29,11 @@ index 6c20349..38d78dc 100644 /* * Does a critical section need to be broken due to another -diff --git a/kernel/sched.c b/kernel/sched.c -index 42d0003..af3883b 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -5826,6 +5826,7 @@ int __cond_resched_lock(spinlock_t *lock) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -4605,6 +4605,7 @@ int __cond_resched_lock(spinlock_t *lock } EXPORT_SYMBOL(__cond_resched_lock); @@ -42,7 +41,7 @@ index 42d0003..af3883b 100644 int __sched __cond_resched_softirq(void) { BUG_ON(!in_softirq()); -@@ -5839,6 +5840,7 @@ int __sched __cond_resched_softirq(void) +@@ -4618,6 +4619,7 @@ int __sched __cond_resched_softirq(void) return 0; } EXPORT_SYMBOL(__cond_resched_softirq); @@ -50,6 +49,3 @@ index 42d0003..af3883b 100644 /** * yield - yield the current processor to other threads. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0234-console-make-rt-friendly.patch.patch b/debian/patches/features/all/rt/console-make-rt-friendly.patch similarity index 75% rename from debian/patches/features/all/rt/0234-console-make-rt-friendly.patch.patch rename to debian/patches/features/all/rt/console-make-rt-friendly.patch index d6e1bc631..6cd247771 100644 --- a/debian/patches/features/all/rt/0234-console-make-rt-friendly.patch.patch +++ b/debian/patches/features/all/rt/console-make-rt-friendly.patch @@ -1,18 +1,17 @@ -From 7345e11db5653c75894b0a3d3cf2f0f380016b79 Mon Sep 17 00:00:00 2001 +Subject: console-make-rt-friendly.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:43:07 +0200 -Subject: [PATCH 234/267] console-make-rt-friendly.patch Signed-off-by: Thomas Gleixner --- kernel/printk.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) -diff --git a/kernel/printk.c b/kernel/printk.c -index 2b95bc0..fad23c8 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -504,6 +504,7 @@ static void __call_console_drivers(unsigned start, unsigned end) +Index: linux-3.4/kernel/printk.c +=================================================================== +--- linux-3.4.orig/kernel/printk.c ++++ linux-3.4/kernel/printk.c +@@ -507,6 +507,7 @@ static void __call_console_drivers(unsig { struct console *con; @@ -20,7 +19,7 @@ index 2b95bc0..fad23c8 100644 for_each_console(con) { if (exclusive_console && con != exclusive_console) continue; -@@ -512,6 +513,7 @@ static void __call_console_drivers(unsigned start, unsigned end) +@@ -515,6 +516,7 @@ static void __call_console_drivers(unsig (con->flags & CON_ANYTIME))) con->write(con, &LOG_BUF(start), end - start); } @@ -28,7 +27,7 @@ index 2b95bc0..fad23c8 100644 } #ifdef CONFIG_EARLY_PRINTK -@@ -827,12 +829,18 @@ static inline int can_use_console(unsigned int cpu) +@@ -839,12 +841,18 @@ static inline int can_use_console(unsign * interrupts disabled. It should return with 'lockbuf_lock' * released but interrupts still disabled. */ @@ -49,7 +48,7 @@ index 2b95bc0..fad23c8 100644 retval = 1; /* -@@ -1010,8 +1018,15 @@ asmlinkage int vprintk(const char *fmt, va_list args) +@@ -1021,8 +1029,15 @@ asmlinkage int vprintk(const char *fmt, * will release 'logbuf_lock' regardless of whether it * actually gets the semaphore or not. */ @@ -66,7 +65,7 @@ index 2b95bc0..fad23c8 100644 lockdep_on(); out_restore_irqs: -@@ -1321,11 +1336,16 @@ again: +@@ -1345,11 +1360,16 @@ again: _con_start = con_start; _log_end = log_end; con_start = log_end; /* Flush */ @@ -83,6 +82,3 @@ index 2b95bc0..fad23c8 100644 } console_locked = 0; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0259-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch similarity index 91% rename from debian/patches/features/all/rt/0259-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch rename to debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch index 43fd5fa4e..2f0c8791b 100644 --- a/debian/patches/features/all/rt/0259-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch +++ b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch @@ -1,7 +1,6 @@ -From 7414f6f107d40967dc5fe7339f11c70ce57e8b74 Mon Sep 17 00:00:00 2001 +Subject: cpu: Make hotplug.lock a "sleeping" spinlock on RT From: Steven Rostedt -Date: Fri, 2 Mar 2012 10:36:57 -0500 -Subject: [PATCH 259/267] cpu: Make hotplug.lock a "sleeping" spinlock on RT +Date: Fri, 02 Mar 2012 10:36:57 -0500 Tasks can block on hotplug.lock in pin_current_cpu(), but their state might be != RUNNING. So the mutex wakeup will set the state @@ -23,10 +22,10 @@ Signed-off-by: Thomas Gleixner kernel/cpu.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index fa40834..66dfb74 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c @@ -46,7 +46,12 @@ static int cpu_hotplug_disabled; static struct { @@ -122,6 +121,3 @@ index fa40834..66dfb74 100644 } #else /* #if CONFIG_HOTPLUG_CPU */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0105-cpu-rt-variants.patch.patch b/debian/patches/features/all/rt/cpu-rt-variants.patch similarity index 63% rename from debian/patches/features/all/rt/0105-cpu-rt-variants.patch.patch rename to debian/patches/features/all/rt/cpu-rt-variants.patch index d42cb13a9..0e49fdb4c 100644 --- a/debian/patches/features/all/rt/0105-cpu-rt-variants.patch.patch +++ b/debian/patches/features/all/rt/cpu-rt-variants.patch @@ -1,18 +1,17 @@ -From 4999ba9453b30762e55beaf253c8999c58266fc3 Mon Sep 17 00:00:00 2001 +Subject: cpu-rt-variants.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 15:42:38 +0200 -Subject: [PATCH 105/267] cpu-rt-variants.patch Signed-off-by: Thomas Gleixner --- include/linux/smp.h | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/include/linux/smp.h b/include/linux/smp.h -index 8cc38d3..e6c58d8 100644 ---- a/include/linux/smp.h -+++ b/include/linux/smp.h -@@ -173,6 +173,14 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, +Index: linux-3.4/include/linux/smp.h +=================================================================== +--- linux-3.4.orig/include/linux/smp.h ++++ linux-3.4/include/linux/smp.h +@@ -219,6 +219,14 @@ smp_call_function_any(const struct cpuma #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) #define put_cpu() preempt_enable() @@ -27,6 +26,3 @@ index 8cc38d3..e6c58d8 100644 /* * Callback to arch code if there's nosmp or maxcpus=0 on the * boot command line: --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0252-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch b/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch similarity index 66% rename from debian/patches/features/all/rt/0252-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch rename to debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch index 8804ef813..541a2da22 100644 --- a/debian/patches/features/all/rt/0252-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch +++ b/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch @@ -1,7 +1,6 @@ -From 113ec250cd47567fa333e584f5a210780df47ac7 Mon Sep 17 00:00:00 2001 +Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT From: Thomas Gleixner Date: Wed, 14 Dec 2011 01:03:49 +0100 -Subject: [PATCH 252/267] cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT We can't deal with the cpumask allocations which happen in atomic context (see arch/x86/kernel/apic/io_apic.c) on RT right now. @@ -12,11 +11,11 @@ Signed-off-by: Thomas Gleixner lib/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index e084a73..c42146e 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -730,7 +730,7 @@ config IOMMU_HELPER +Index: linux-3.4/arch/x86/Kconfig +=================================================================== +--- linux-3.4.orig/arch/x86/Kconfig ++++ linux-3.4/arch/x86/Kconfig +@@ -750,7 +750,7 @@ config IOMMU_HELPER config MAXSMP bool "Enable Maximum number of SMP Processors and NUMA Nodes" depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL @@ -25,11 +24,11 @@ index e084a73..c42146e 100644 ---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 32f3e5a..63d81e8 100644 ---- a/lib/Kconfig -+++ b/lib/Kconfig -@@ -231,6 +231,7 @@ config CHECK_SIGNATURE +Index: linux-3.4/lib/Kconfig +=================================================================== +--- linux-3.4.orig/lib/Kconfig ++++ linux-3.4/lib/Kconfig +@@ -303,6 +303,7 @@ config CHECK_SIGNATURE config CPUMASK_OFFSTACK bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS @@ -37,6 +36,3 @@ index 32f3e5a..63d81e8 100644 help Use dynamic allocation for cpumask_var_t, instead of putting them on the stack. This is a bit more expensive, but avoids --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0230-debugobjects-rt.patch.patch b/debian/patches/features/all/rt/debugobjects-rt.patch similarity index 60% rename from debian/patches/features/all/rt/0230-debugobjects-rt.patch.patch rename to debian/patches/features/all/rt/debugobjects-rt.patch index 33c563c75..cdbcddb5e 100644 --- a/debian/patches/features/all/rt/0230-debugobjects-rt.patch.patch +++ b/debian/patches/features/all/rt/debugobjects-rt.patch @@ -1,18 +1,17 @@ -From 0fbe4d83b24b5cb2db0da8b4ddd3fa545013bd93 Mon Sep 17 00:00:00 2001 +Subject: debugobjects-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:41:35 +0200 -Subject: [PATCH 230/267] debugobjects-rt.patch Signed-off-by: Thomas Gleixner --- lib/debugobjects.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -diff --git a/lib/debugobjects.c b/lib/debugobjects.c -index a78b7c6..9b622c9 100644 ---- a/lib/debugobjects.c -+++ b/lib/debugobjects.c -@@ -306,7 +306,10 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack) +Index: linux-3.4/lib/debugobjects.c +=================================================================== +--- linux-3.4.orig/lib/debugobjects.c ++++ linux-3.4/lib/debugobjects.c +@@ -310,7 +310,10 @@ __debug_object_init(void *addr, struct d struct debug_obj *obj; unsigned long flags; @@ -24,7 +23,7 @@ index a78b7c6..9b622c9 100644 db = get_bucket((unsigned long) addr); -@@ -1015,9 +1018,9 @@ static int __init debug_objects_replace_static_objects(void) +@@ -1053,9 +1056,9 @@ static int __init debug_objects_replace_ } } @@ -35,6 +34,3 @@ index a78b7c6..9b622c9 100644 return 0; free: hlist_for_each_entry_safe(obj, node, tmp, &objects, node) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0251-dm-Make-rt-aware.patch b/debian/patches/features/all/rt/dm-make-rt-aware.patch similarity index 76% rename from debian/patches/features/all/rt/0251-dm-Make-rt-aware.patch rename to debian/patches/features/all/rt/dm-make-rt-aware.patch index e0a2d0dcb..216853a53 100644 --- a/debian/patches/features/all/rt/0251-dm-Make-rt-aware.patch +++ b/debian/patches/features/all/rt/dm-make-rt-aware.patch @@ -1,7 +1,6 @@ -From 7c5e9c5bb3dbe26f8ecc18020a36ed55e99c6a25 Mon Sep 17 00:00:00 2001 +Subject: dm: Make rt aware From: Thomas Gleixner Date: Mon, 14 Nov 2011 23:06:09 +0100 -Subject: [PATCH 251/267] dm: Make rt aware Use the BUG_ON_NORT variant for the irq_disabled() checks. RT has interrupts legitimately enabled here as we cant deadlock against the @@ -14,11 +13,11 @@ Signed-off-by: Thomas Gleixner drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/drivers/md/dm.c b/drivers/md/dm.c -index 4720f68..b1eff42 100644 ---- a/drivers/md/dm.c -+++ b/drivers/md/dm.c -@@ -1648,14 +1648,14 @@ static void dm_request_fn(struct request_queue *q) +Index: linux-3.4/drivers/md/dm.c +=================================================================== +--- linux-3.4.orig/drivers/md/dm.c ++++ linux-3.4/drivers/md/dm.c +@@ -1648,14 +1648,14 @@ static void dm_request_fn(struct request if (map_request(ti, clone, md)) goto requeued; @@ -35,6 +34,3 @@ index 4720f68..b1eff42 100644 spin_lock(q->queue_lock); delay_and_out: --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0041-drivers-net-Use-disable_irq_nosync-in-8139too.patch b/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch similarity index 55% rename from debian/patches/features/all/rt/0041-drivers-net-Use-disable_irq_nosync-in-8139too.patch rename to debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch index e67863a8f..bb21575c5 100644 --- a/debian/patches/features/all/rt/0041-drivers-net-Use-disable_irq_nosync-in-8139too.patch +++ b/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch @@ -1,22 +1,22 @@ -From 4d7e0a71990ab73749dfde4f4cd201cf1bdb0f45 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:24 -0500 -Subject: [PATCH 041/267] drivers/net: Use disable_irq_nosync() in 8139too +Subject: drivers/net: Use disable_irq_nosync() in 8139too Use disable_irq_nosync() instead of disable_irq() as this might be called in atomic context with netpoll. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- 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 4d6b254..004c054 100644 ---- a/drivers/net/ethernet/realtek/8139too.c -+++ b/drivers/net/ethernet/realtek/8139too.c -@@ -2174,7 +2174,7 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance) +Index: linux-3.4/drivers/net/ethernet/realtek/8139too.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/realtek/8139too.c ++++ linux-3.4/drivers/net/ethernet/realtek/8139too.c +@@ -2240,7 +2240,7 @@ static irqreturn_t rtl8139_interrupt (in */ static void rtl8139_poll_controller(struct net_device *dev) { @@ -25,6 +25,3 @@ index 4d6b254..004c054 100644 rtl8139_interrupt(dev->irq, dev); enable_irq(dev->irq); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0043-drivers-net-at91_ether-Make-mdio-protection-rt-safe.patch b/debian/patches/features/all/rt/drivers-net-at91-make-mdio-protection-rt-safe.patch similarity index 69% rename from debian/patches/features/all/rt/0043-drivers-net-at91_ether-Make-mdio-protection-rt-safe.patch rename to debian/patches/features/all/rt/drivers-net-at91-make-mdio-protection-rt-safe.patch index d1e7934e9..fe76b65bc 100644 --- a/debian/patches/features/all/rt/0043-drivers-net-at91_ether-Make-mdio-protection-rt-safe.patch +++ b/debian/patches/features/all/rt/drivers-net-at91-make-mdio-protection-rt-safe.patch @@ -1,8 +1,6 @@ -From 2989477b9c1c1f9aa82a8db158ab3a03a4b7b2f5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 17 Nov 2009 12:02:43 +0100 -Subject: [PATCH 043/267] drivers: net: at91_ether: Make mdio protection -rt - safe +Subject: drivers: net: at91_ether: Make mdio protection -rt safe Neither the phy interrupt nor the timer callback which updates the link status in absense of a phy interrupt are taking lp->lock which @@ -15,15 +13,16 @@ Fix this by adding proper locking to at91ether_phy_interrupt() and at91_check_ether() which serializes the access on -rt. Signed-off-by: Thomas Gleixner + --- drivers/net/ethernet/cadence/at91_ether.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c -index 56624d3..ad4dbea 100644 ---- a/drivers/net/ethernet/cadence/at91_ether.c -+++ b/drivers/net/ethernet/cadence/at91_ether.c -@@ -200,7 +200,9 @@ static irqreturn_t at91ether_phy_interrupt(int irq, void *dev_id) +Index: linux-3.4/drivers/net/ethernet/cadence/at91_ether.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/cadence/at91_ether.c ++++ linux-3.4/drivers/net/ethernet/cadence/at91_ether.c +@@ -201,7 +201,9 @@ static irqreturn_t at91ether_phy_interru struct net_device *dev = (struct net_device *) dev_id; struct at91_private *lp = netdev_priv(dev); unsigned int phy; @@ -33,7 +32,7 @@ index 56624d3..ad4dbea 100644 /* * This hander is triggered on both edges, but the PHY chips expect * level-triggering. We therefore have to check if the PHY actually has -@@ -242,6 +244,7 @@ static irqreturn_t at91ether_phy_interrupt(int irq, void *dev_id) +@@ -243,6 +245,7 @@ static irqreturn_t at91ether_phy_interru done: disable_mdi(); @@ -41,7 +40,7 @@ index 56624d3..ad4dbea 100644 return IRQ_HANDLED; } -@@ -398,9 +401,11 @@ static void at91ether_check_link(unsigned long dev_id) +@@ -399,9 +402,11 @@ static void at91ether_check_link(unsigne struct net_device *dev = (struct net_device *) dev_id; struct at91_private *lp = netdev_priv(dev); @@ -53,6 +52,3 @@ index 56624d3..ad4dbea 100644 mod_timer(&lp->check_timer, jiffies + LINK_POLL_INTERVAL); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0042-drivers-net-ehea-Make-rx-irq-handler-non-threaded-IR.patch b/debian/patches/features/all/rt/drivers-net-ehea-mark-rx-irq-no-thread.patch similarity index 80% rename from debian/patches/features/all/rt/0042-drivers-net-ehea-Make-rx-irq-handler-non-threaded-IR.patch rename to debian/patches/features/all/rt/drivers-net-ehea-mark-rx-irq-no-thread.patch index f54ae5161..c7ec044a5 100644 --- a/debian/patches/features/all/rt/0042-drivers-net-ehea-Make-rx-irq-handler-non-threaded-IR.patch +++ b/debian/patches/features/all/rt/drivers-net-ehea-mark-rx-irq-no-thread.patch @@ -1,8 +1,6 @@ -From 1c36d3306722a2042bd4dc26baf20393c42c5b22 Mon Sep 17 00:00:00 2001 From: Darren Hart Date: Tue, 18 May 2010 14:33:07 -0700 -Subject: [PATCH 042/267] drivers: net: ehea: Make rx irq handler non-threaded - (IRQF_NO_THREAD) +Subject: drivers: net: ehea: Make rx irq handler non-threaded (IRQF_NO_THREAD) The underlying hardware is edge triggered but presented by XICS as level triggered. The edge triggered interrupts are not reissued after masking. This @@ -35,15 +33,16 @@ Cc: Michael Ellerman Cc: Doug Maxey LKML-Reference: <4BF30793.5070300@us.ibm.com> Signed-off-by: Thomas Gleixner + --- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c -index bfeccbf..fddfaf1 100644 ---- a/drivers/net/ethernet/ibm/ehea/ehea_main.c -+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c -@@ -1304,7 +1304,7 @@ static int ehea_reg_interrupts(struct net_device *dev) +Index: linux-3.4/drivers/net/ethernet/ibm/ehea/ehea_main.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/ibm/ehea/ehea_main.c ++++ linux-3.4/drivers/net/ethernet/ibm/ehea/ehea_main.c +@@ -1306,7 +1306,7 @@ static int ehea_reg_interrupts(struct ne "%s-queue%d", dev->name, i); ret = ibmebus_request_irq(pr->eq->attr.ist1, ehea_recv_irq_handler, @@ -52,6 +51,3 @@ index bfeccbf..fddfaf1 100644 pr); if (ret) { netdev_err(dev, "failed registering irq for ehea_queue port_res_nr:%d, ist=%X\n", --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0099-drivers-net-fix-livelock-issues.patch b/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch similarity index 58% rename from debian/patches/features/all/rt/0099-drivers-net-fix-livelock-issues.patch rename to debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch index b334fc342..4e133ee84 100644 --- a/debian/patches/features/all/rt/0099-drivers-net-fix-livelock-issues.patch +++ b/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch @@ -1,7 +1,6 @@ -From 91639026470adfb7ab98a86b62dfefedb485e3a4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 20 Jun 2009 11:36:54 +0200 -Subject: [PATCH 099/267] drivers/net: fix livelock issues +Subject: drivers/net: fix livelock issues Preempt-RT runs into a live lock issue with the NETDEV_TX_LOCKED micro optimization. The reason is that the softirq thread is rescheduling @@ -11,6 +10,7 @@ monoplize the CPU and livelock on UP systems. Remove it. Signed-off-by: Thomas Gleixner + --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 6 +----- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 3 +-- @@ -21,11 +21,11 @@ Signed-off-by: Thomas Gleixner drivers/net/rionet.c | 6 +----- 7 files changed, 10 insertions(+), 31 deletions(-) -diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -index eccdcff..ee8d8a2 100644 ---- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c -@@ -2236,11 +2236,7 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb, +Index: linux-3.4/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/atheros/atl1c/atl1c_main.c ++++ linux-3.4/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +@@ -2240,11 +2240,7 @@ static netdev_tx_t atl1c_xmit_frame(stru } tpd_req = atl1c_cal_tpd_req(skb); @@ -38,11 +38,11 @@ index eccdcff..ee8d8a2 100644 if (atl1c_tpd_avail(adapter, type) < tpd_req) { /* no enough descriptor, just stop queue */ -diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -index 95483bc..eaf84e9 100644 ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -@@ -1819,8 +1819,7 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb, +Index: linux-3.4/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/atheros/atl1e/atl1e_main.c ++++ linux-3.4/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +@@ -1822,8 +1822,7 @@ static netdev_tx_t atl1e_xmit_frame(stru return NETDEV_TX_OK; } tpd_req = atl1e_cal_tdp_req(skb); @@ -52,11 +52,11 @@ index 95483bc..eaf84e9 100644 if (atl1e_tpd_avail(adapter) < tpd_req) { /* no enough descriptor, just stop queue */ -diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c -index f9b6023..6d7412a 100644 ---- a/drivers/net/ethernet/chelsio/cxgb/sge.c -+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c -@@ -1678,8 +1678,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, +Index: linux-3.4/drivers/net/ethernet/chelsio/cxgb/sge.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/chelsio/cxgb/sge.c ++++ linux-3.4/drivers/net/ethernet/chelsio/cxgb/sge.c +@@ -1678,8 +1678,7 @@ static int t1_sge_tx(struct sk_buff *skb struct cmdQ *q = &sge->cmdQ[qid]; unsigned int credits, pidx, genbit, count, use_sched_skb = 0; @@ -66,11 +66,11 @@ index f9b6023..6d7412a 100644 reclaim_completed_tx(sge, q); -diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c -index c27fb3d..4624278 100644 ---- a/drivers/net/ethernet/neterion/s2io.c -+++ b/drivers/net/ethernet/neterion/s2io.c -@@ -4090,12 +4090,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev) +Index: linux-3.4/drivers/net/ethernet/neterion/s2io.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/neterion/s2io.c ++++ linux-3.4/drivers/net/ethernet/neterion/s2io.c +@@ -4089,12 +4089,7 @@ static netdev_tx_t s2io_xmit(struct sk_b [skb->priority & (MAX_TX_FIFOS - 1)]; fifo = &mac_control->fifos[queue]; @@ -84,11 +84,11 @@ index c27fb3d..4624278 100644 if (sp->config.multiq) { if (__netif_subqueue_stopped(dev, fifo->fifo_no)) { -diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c -index 43c7b25..c084bea 100644 ---- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c -+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c -@@ -1937,10 +1937,9 @@ static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev) +Index: linux-3.4/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c ++++ linux-3.4/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +@@ -2131,10 +2131,9 @@ static int pch_gbe_xmit_frame(struct sk_ adapter->stats.tx_length_errors++; return NETDEV_TX_OK; } @@ -102,11 +102,11 @@ index 43c7b25..c084bea 100644 if (unlikely(!PCH_GBE_DESC_UNUSED(tx_ring))) { netif_stop_queue(netdev); spin_unlock_irqrestore(&tx_ring->tx_lock, flags); -diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c -index 3a90af6..e2e930e 100644 ---- a/drivers/net/ethernet/tehuti/tehuti.c -+++ b/drivers/net/ethernet/tehuti/tehuti.c -@@ -1605,13 +1605,8 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb, +Index: linux-3.4/drivers/net/ethernet/tehuti/tehuti.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/tehuti/tehuti.c ++++ linux-3.4/drivers/net/ethernet/tehuti/tehuti.c +@@ -1606,13 +1606,8 @@ static netdev_tx_t bdx_tx_transmit(struc unsigned long flags; ENTER; @@ -122,11 +122,11 @@ index 3a90af6..e2e930e 100644 /* build tx descriptor */ BDX_ASSERT(f->m.wptr >= f->m.memsz); /* started with valid wptr */ -diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c -index 7145714..2a1ed18 100644 ---- a/drivers/net/rionet.c -+++ b/drivers/net/rionet.c -@@ -176,11 +176,7 @@ static int rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev) +Index: linux-3.4/drivers/net/rionet.c +=================================================================== +--- linux-3.4.orig/drivers/net/rionet.c ++++ linux-3.4/drivers/net/rionet.c +@@ -176,11 +176,7 @@ static int rionet_start_xmit(struct sk_b u16 destid; unsigned long flags; @@ -139,6 +139,3 @@ index 7145714..2a1ed18 100644 if ((rnet->tx_cnt + 1) > RIONET_TX_RING_SIZE) { netif_stop_queue(ndev); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0101-drivers-net-gianfar-Make-RT-aware.patch b/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch similarity index 66% rename from debian/patches/features/all/rt/0101-drivers-net-gianfar-Make-RT-aware.patch rename to debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch index a4d61cc0e..9bfc2b46c 100644 --- a/debian/patches/features/all/rt/0101-drivers-net-gianfar-Make-RT-aware.patch +++ b/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch @@ -1,7 +1,6 @@ -From f6a04ba9615eedce21fa38c8a9276c1c041f4535 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 1 Apr 2010 20:20:57 +0200 -Subject: [PATCH 101/267] drivers: net: gianfar: Make RT aware +Subject: drivers: net: gianfar: Make RT aware The adjust_link() disables interrupts before taking the queue locks. On RT those locks are converted to "sleeping" locks and @@ -11,15 +10,16 @@ local_irq_save/restore_nort. Reported-by: Xianghua Xiao Signed-off-by: Thomas Gleixner Tested-by: Xianghua Xiao + --- drivers/net/ethernet/freescale/gianfar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c -index 83199fd..97d238c 100644 ---- a/drivers/net/ethernet/freescale/gianfar.c -+++ b/drivers/net/ethernet/freescale/gianfar.c -@@ -1671,7 +1671,7 @@ void stop_gfar(struct net_device *dev) +Index: linux-3.4/drivers/net/ethernet/freescale/gianfar.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/freescale/gianfar.c ++++ linux-3.4/drivers/net/ethernet/freescale/gianfar.c +@@ -1643,7 +1643,7 @@ void stop_gfar(struct net_device *dev) /* Lock it down */ @@ -28,7 +28,7 @@ index 83199fd..97d238c 100644 lock_tx_qs(priv); lock_rx_qs(priv); -@@ -1679,7 +1679,7 @@ void stop_gfar(struct net_device *dev) +@@ -1651,7 +1651,7 @@ void stop_gfar(struct net_device *dev) unlock_rx_qs(priv); unlock_tx_qs(priv); @@ -37,7 +37,7 @@ index 83199fd..97d238c 100644 /* Free the IRQs */ if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) { -@@ -2949,7 +2949,7 @@ static void adjust_link(struct net_device *dev) +@@ -2948,7 +2948,7 @@ static void adjust_link(struct net_devic struct phy_device *phydev = priv->phydev; int new_state = 0; @@ -46,7 +46,7 @@ index 83199fd..97d238c 100644 lock_tx_qs(priv); if (phydev->link) { -@@ -3016,7 +3016,7 @@ static void adjust_link(struct net_device *dev) +@@ -3015,7 +3015,7 @@ static void adjust_link(struct net_devic if (new_state && netif_msg_link(priv)) phy_print_status(phydev); unlock_tx_qs(priv); @@ -55,6 +55,3 @@ index 83199fd..97d238c 100644 } /* Update the hash table based on the current list of multicast --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0040-drivers-net-tulip_remove_one-needs-to-call-pci_disab.patch b/debian/patches/features/all/rt/drivers-net-tulip-add-missing-pci-disable.patch similarity index 50% rename from debian/patches/features/all/rt/0040-drivers-net-tulip_remove_one-needs-to-call-pci_disab.patch rename to debian/patches/features/all/rt/drivers-net-tulip-add-missing-pci-disable.patch index 550da0877..3b993d427 100644 --- a/debian/patches/features/all/rt/0040-drivers-net-tulip_remove_one-needs-to-call-pci_disab.patch +++ b/debian/patches/features/all/rt/drivers-net-tulip-add-missing-pci-disable.patch @@ -1,22 +1,21 @@ -From 32a59ec7007ad587e8523ea3628b364c434d4c54 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:18 -0500 -Subject: [PATCH 040/267] drivers/net: tulip_remove_one needs to call - pci_disable_device() +Subject: drivers/net: tulip_remove_one needs to call pci_disable_device() Otherwise the device is not completely shut down. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- drivers/net/ethernet/dec/tulip/tulip_core.c | 1 + 1 file changed, 1 insertion(+) -diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c -index 9656dd0..ef7df09 100644 ---- a/drivers/net/ethernet/dec/tulip/tulip_core.c -+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c -@@ -1949,6 +1949,7 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev) +Index: linux-3.4/drivers/net/ethernet/dec/tulip/tulip_core.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/dec/tulip/tulip_core.c ++++ linux-3.4/drivers/net/ethernet/dec/tulip/tulip_core.c +@@ -1946,6 +1946,7 @@ static void __devexit tulip_remove_one ( pci_iounmap(pdev, tp->base_addr); free_netdev (dev); pci_release_regions (pdev); @@ -24,6 +23,3 @@ index 9656dd0..ef7df09 100644 pci_set_drvdata (pdev, NULL); /* pci_power_off (pdev, -1); */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0100-drivers-net-vortex-fix-locking-issues.patch b/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch similarity index 68% rename from debian/patches/features/all/rt/0100-drivers-net-vortex-fix-locking-issues.patch rename to debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch index 77b6f1e9b..5fbd0ee8c 100644 --- a/debian/patches/features/all/rt/0100-drivers-net-vortex-fix-locking-issues.patch +++ b/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch @@ -1,7 +1,6 @@ -From c9c1db28cb2aece6eeda56b86a309b2d564751b8 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 3 Jul 2009 08:30:00 -0500 -Subject: [PATCH 100/267] drivers/net: vortex fix locking issues +Subject: drivers/net: vortex fix locking issues Argh, cut and paste wasn't enough... @@ -17,15 +16,12 @@ Signed-off-by: Thomas Gleixner 1 file changed, 4 insertions(+), 4 deletions(-) Signed-off-by: Ingo Molnar ---- - 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 e0c5529..af31580 100644 ---- a/drivers/net/ethernet/3com/3c59x.c -+++ b/drivers/net/ethernet/3com/3c59x.c -@@ -843,9 +843,9 @@ static void poll_vortex(struct net_device *dev) +Index: linux-3.4/drivers/net/ethernet/3com/3c59x.c +=================================================================== +--- linux-3.4.orig/drivers/net/ethernet/3com/3c59x.c ++++ linux-3.4/drivers/net/ethernet/3com/3c59x.c +@@ -843,9 +843,9 @@ static void poll_vortex(struct net_devic { struct vortex_private *vp = netdev_priv(dev); unsigned long flags; @@ -37,7 +33,7 @@ index e0c5529..af31580 100644 } #endif -@@ -1921,12 +1921,12 @@ static void vortex_tx_timeout(struct net_device *dev) +@@ -1920,12 +1920,12 @@ static void vortex_tx_timeout(struct net * Block interrupts because vortex_interrupt does a bare spin_lock() */ unsigned long flags; @@ -52,6 +48,3 @@ index e0c5529..af31580 100644 } } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0037-drivers-random-Reduce-preempt-disabled-region.patch b/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch similarity index 61% rename from debian/patches/features/all/rt/0037-drivers-random-Reduce-preempt-disabled-region.patch rename to debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch index 220a9e8ec..227617836 100644 --- a/debian/patches/features/all/rt/0037-drivers-random-Reduce-preempt-disabled-region.patch +++ b/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch @@ -1,21 +1,21 @@ -From a908abba18460e32b36e6b183e77b6c7c1cceb94 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:30 -0500 -Subject: [PATCH 037/267] drivers: random: Reduce preempt disabled region +Subject: drivers: random: Reduce preempt disabled region No need to keep preemption disabled across the whole function. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- drivers/char/random.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -diff --git a/drivers/char/random.c b/drivers/char/random.c -index 6035ab8..786a856 100644 ---- a/drivers/char/random.c -+++ b/drivers/char/random.c -@@ -633,8 +633,11 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num) +Index: linux-3.4/drivers/char/random.c +=================================================================== +--- linux-3.4.orig/drivers/char/random.c ++++ linux-3.4/drivers/char/random.c +@@ -633,8 +633,11 @@ static void add_timer_randomness(struct preempt_disable(); /* if over the trickle threshold, use only 1 in 4096 samples */ if (input_pool.entropy_count > trickle_thresh && @@ -28,8 +28,8 @@ index 6035ab8..786a856 100644 + preempt_enable(); sample.jiffies = jiffies; - sample.cycles = get_cycles(); -@@ -676,8 +679,6 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num) + +@@ -680,8 +683,6 @@ static void add_timer_randomness(struct credit_entropy_bits(&input_pool, min_t(int, fls(delta>>1), 11)); } @@ -38,6 +38,3 @@ index 6035ab8..786a856 100644 } void add_input_randomness(unsigned int type, unsigned int code, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0212-serial-8250-Call-flush_to_ldisc-when-the-irq-is-thre.patch b/debian/patches/features/all/rt/drivers-serial-call-flush_to_ldisc-when-the-irq-is-t.patch similarity index 52% rename from debian/patches/features/all/rt/0212-serial-8250-Call-flush_to_ldisc-when-the-irq-is-thre.patch rename to debian/patches/features/all/rt/drivers-serial-call-flush_to_ldisc-when-the-irq-is-t.patch index c18db4dbf..95e225fd5 100644 --- a/debian/patches/features/all/rt/0212-serial-8250-Call-flush_to_ldisc-when-the-irq-is-thre.patch +++ b/debian/patches/features/all/rt/drivers-serial-call-flush_to_ldisc-when-the-irq-is-t.patch @@ -1,20 +1,19 @@ -From 4e5bbac0b9e6295553e4e4ddc234f1ccdb54f20d Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:01 -0500 -Subject: [PATCH 212/267] serial: 8250: Call flush_to_ldisc when the irq is - threaded +Subject: serial: 8250: Call flush_to_ldisc when the irq is threaded Signed-off-by: Ingo Molnar + --- - drivers/tty/serial/8250.c | 2 ++ - drivers/tty/tty_buffer.c | 4 ++++ + drivers/tty/serial/8250/8250.c | 2 ++ + drivers/tty/tty_buffer.c | 4 ++++ 2 files changed, 6 insertions(+) -diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c -index 43f7f46..687b1ad 100644 ---- a/drivers/tty/serial/8250.c -+++ b/drivers/tty/serial/8250.c -@@ -1631,12 +1631,14 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) +Index: linux-3.4/drivers/tty/serial/8250/8250.c +=================================================================== +--- linux-3.4.orig/drivers/tty/serial/8250/8250.c ++++ linux-3.4/drivers/tty/serial/8250/8250.c +@@ -1584,12 +1584,14 @@ static irqreturn_t serial8250_interrupt( l = l->next; @@ -29,11 +28,11 @@ index 43f7f46..687b1ad 100644 } while (l != end); spin_unlock(&i->lock); -diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c -index 6c9b7cd..a56c223 100644 ---- a/drivers/tty/tty_buffer.c -+++ b/drivers/tty/tty_buffer.c -@@ -493,10 +493,14 @@ void tty_flip_buffer_push(struct tty_struct *tty) +Index: linux-3.4/drivers/tty/tty_buffer.c +=================================================================== +--- linux-3.4.orig/drivers/tty/tty_buffer.c ++++ linux-3.4/drivers/tty/tty_buffer.c +@@ -493,10 +493,14 @@ void tty_flip_buffer_push(struct tty_str tty->buf.tail->commit = tty->buf.tail->used; spin_unlock_irqrestore(&tty->buf.lock, flags); @@ -48,6 +47,3 @@ index 6c9b7cd..a56c223 100644 } EXPORT_SYMBOL(tty_flip_buffer_push); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch b/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch new file mode 100644 index 000000000..216964943 --- /dev/null +++ b/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch @@ -0,0 +1,44 @@ +From: Ingo Molnar +Date: Fri, 3 Jul 2009 08:30:01 -0500 +Subject: serial: 8250: Clean up the locking for -rt + +Signed-off-by: Ingo Molnar +Signed-off-by: Thomas Gleixner + +--- + drivers/tty/serial/8250/8250.c | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +Index: linux-3.4/drivers/tty/serial/8250/8250.c +=================================================================== +--- linux-3.4.orig/drivers/tty/serial/8250/8250.c ++++ linux-3.4/drivers/tty/serial/8250/8250.c +@@ -2807,14 +2807,10 @@ serial8250_console_write(struct console + + touch_nmi_watchdog(); + +- local_irq_save(flags); +- if (port->sysrq) { +- /* serial8250_handle_irq() already took the lock */ +- locked = 0; +- } else if (oops_in_progress) { +- locked = spin_trylock(&port->lock); +- } else +- spin_lock(&port->lock); ++ if (port->sysrq || oops_in_progress) ++ locked = spin_trylock_irqsave(&port->lock, flags); ++ else ++ spin_lock_irqsave(&port->lock, flags); + + /* + * First save the IER then disable the interrupts +@@ -2846,8 +2842,7 @@ serial8250_console_write(struct console + serial8250_modem_status(up); + + if (locked) +- spin_unlock(&port->lock); +- local_irq_restore(flags); ++ spin_unlock_irqrestore(&port->lock, flags); + } + + static int __init serial8250_console_setup(struct console *co, char *options) diff --git a/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch new file mode 100644 index 000000000..a33e39c98 --- /dev/null +++ b/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch @@ -0,0 +1,40 @@ +Subject: drivers-tty-fix-omap-lock-crap.patch +From: Thomas Gleixner +Date: Thu, 28 Jul 2011 13:32:57 +0200 + +Signed-off-by: Thomas Gleixner +--- + drivers/tty/serial/omap-serial.c | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +Index: linux-3.4/drivers/tty/serial/omap-serial.c +=================================================================== +--- linux-3.4.orig/drivers/tty/serial/omap-serial.c ++++ linux-3.4/drivers/tty/serial/omap-serial.c +@@ -1064,13 +1064,10 @@ serial_omap_console_write(struct console + + pm_runtime_get_sync(&up->pdev->dev); + +- local_irq_save(flags); +- if (up->port.sysrq) +- locked = 0; +- else if (oops_in_progress) +- locked = spin_trylock(&up->port.lock); ++ if (up->port.sysrq || oops_in_progress) ++ locked = spin_trylock_irqsave(&up->port.lock, flags); + else +- spin_lock(&up->port.lock); ++ spin_lock_irqsave(&up->port.lock, flags); + + /* + * First save the IER then disable the interrupts +@@ -1099,8 +1096,7 @@ serial_omap_console_write(struct console + pm_runtime_mark_last_busy(&up->pdev->dev); + pm_runtime_put_autosuspend(&up->pdev->dev); + if (locked) +- spin_unlock(&up->port.lock); +- local_irq_restore(flags); ++ spin_unlock_irqrestore(&up->port.lock, flags); + } + + static int __init diff --git a/debian/patches/features/all/rt/0073-early-printk-consolidate.patch.patch b/debian/patches/features/all/rt/early-printk-consolidate.patch similarity index 67% rename from debian/patches/features/all/rt/0073-early-printk-consolidate.patch.patch rename to debian/patches/features/all/rt/early-printk-consolidate.patch index 554ef510e..47b9cd1ce 100644 --- a/debian/patches/features/all/rt/0073-early-printk-consolidate.patch.patch +++ b/debian/patches/features/all/rt/early-printk-consolidate.patch @@ -1,7 +1,6 @@ -From d6a466f7aef3ff53e864d1d0a8f5e93d61768714 Mon Sep 17 00:00:00 2001 +Subject: early-printk-consolidate.patch From: Thomas Gleixner Date: Sat, 23 Jul 2011 11:04:08 +0200 -Subject: [PATCH 073/267] early-printk-consolidate.patch Signed-off-by: Thomas Gleixner --- @@ -19,14 +18,14 @@ Signed-off-by: Thomas Gleixner arch/x86/kernel/early_printk.c | 21 ++------------------- include/linux/console.h | 1 + include/linux/printk.h | 5 +++++ - kernel/printk.c | 27 ++++++++++++++++++++------- - 15 files changed, 62 insertions(+), 110 deletions(-) + kernel/printk.c | 30 +++++++++++++++++++++++------- + 15 files changed, 65 insertions(+), 110 deletions(-) -diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c -index 85aa2b2..4307653 100644 ---- a/arch/arm/kernel/early_printk.c -+++ b/arch/arm/kernel/early_printk.c -@@ -29,28 +29,17 @@ static void early_console_write(struct console *con, const char *s, unsigned n) +Index: linux-3.4/arch/arm/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/arm/kernel/early_printk.c ++++ linux-3.4/arch/arm/kernel/early_printk.c +@@ -29,28 +29,17 @@ static void early_console_write(struct c early_write(s, n); } @@ -58,11 +57,11 @@ index 85aa2b2..4307653 100644 return 0; } -diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c -index 84ed837..61fbd2d 100644 ---- a/arch/blackfin/kernel/early_printk.c -+++ b/arch/blackfin/kernel/early_printk.c -@@ -25,8 +25,6 @@ extern struct console *bfin_earlyserial_init(unsigned int port, +Index: linux-3.4/arch/blackfin/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/blackfin/kernel/early_printk.c ++++ linux-3.4/arch/blackfin/kernel/early_printk.c +@@ -25,8 +25,6 @@ extern struct console *bfin_earlyserial_ extern struct console *bfin_jc_early_init(void); #endif @@ -71,10 +70,10 @@ index 84ed837..61fbd2d 100644 /* Default console */ #define DEFAULT_PORT 0 #define DEFAULT_CFLAG CS8|B57600 -diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c -index d26d92d..0420624 100644 ---- a/arch/microblaze/kernel/early_printk.c -+++ b/arch/microblaze/kernel/early_printk.c +Index: linux-3.4/arch/microblaze/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/microblaze/kernel/early_printk.c ++++ linux-3.4/arch/microblaze/kernel/early_printk.c @@ -21,7 +21,6 @@ #include #include @@ -83,7 +82,7 @@ index d26d92d..0420624 100644 static u32 base_addr; #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE -@@ -109,27 +108,11 @@ static struct console early_serial_uart16550_console = { +@@ -109,27 +108,11 @@ static struct console early_serial_uart1 }; #endif /* CONFIG_SERIAL_8250_CONSOLE */ @@ -127,9 +126,9 @@ index d26d92d..0420624 100644 - if (!early_console_initialized || !early_console) + if (!early_console) return; - printk(KERN_INFO "early_printk_console remaping from 0x%x to ", + printk(KERN_INFO "early_printk_console remapping from 0x%x to ", base_addr); -@@ -179,9 +161,9 @@ void __init remap_early_printk(void) +@@ -195,9 +177,9 @@ void __init remap_early_printk(void) void __init disable_early_printk(void) { @@ -141,11 +140,11 @@ index d26d92d..0420624 100644 - early_console_initialized = 0; + early_console = NULL; } -diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c -index 9ae813e..973c995 100644 ---- a/arch/mips/kernel/early_printk.c -+++ b/arch/mips/kernel/early_printk.c -@@ -25,20 +25,18 @@ early_console_write(struct console *con, const char *s, unsigned n) +Index: linux-3.4/arch/mips/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/mips/kernel/early_printk.c ++++ linux-3.4/arch/mips/kernel/early_printk.c +@@ -25,20 +25,18 @@ early_console_write(struct console *con, } } @@ -170,11 +169,11 @@ index 9ae813e..973c995 100644 - register_console(&early_console); + register_console(&early_console_prom); } -diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c -index 57fa2c0..1b9174d 100644 ---- a/arch/powerpc/kernel/udbg.c -+++ b/arch/powerpc/kernel/udbg.c -@@ -182,15 +182,13 @@ static struct console udbg_console = { +Index: linux-3.4/arch/powerpc/kernel/udbg.c +=================================================================== +--- linux-3.4.orig/arch/powerpc/kernel/udbg.c ++++ linux-3.4/arch/powerpc/kernel/udbg.c +@@ -179,15 +179,13 @@ static struct console udbg_console = { .index = 0, }; @@ -191,7 +190,7 @@ index 57fa2c0..1b9174d 100644 return; if (!udbg_putc) -@@ -200,7 +198,7 @@ void __init register_early_udbg_console(void) +@@ -197,7 +195,7 @@ void __init register_early_udbg_console( printk(KERN_INFO "early console immortal !\n"); udbg_console.flags &= ~CON_BOOT; } @@ -200,10 +199,10 @@ index 57fa2c0..1b9174d 100644 register_console(&udbg_console); } -diff --git a/arch/sh/kernel/sh_bios.c b/arch/sh/kernel/sh_bios.c -index 47475cc..a5b51b9 100644 ---- a/arch/sh/kernel/sh_bios.c -+++ b/arch/sh/kernel/sh_bios.c +Index: linux-3.4/arch/sh/kernel/sh_bios.c +=================================================================== +--- linux-3.4.orig/arch/sh/kernel/sh_bios.c ++++ linux-3.4/arch/sh/kernel/sh_bios.c @@ -144,8 +144,6 @@ static struct console bios_console = { .index = -1, }; @@ -213,10 +212,10 @@ index 47475cc..a5b51b9 100644 static int __init setup_early_printk(char *buf) { int keep_early = 0; -diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c -index fe1e3fc..e6475f0 100644 ---- a/arch/sparc/kernel/setup_32.c -+++ b/arch/sparc/kernel/setup_32.c +Index: linux-3.4/arch/sparc/kernel/setup_32.c +=================================================================== +--- linux-3.4.orig/arch/sparc/kernel/setup_32.c ++++ linux-3.4/arch/sparc/kernel/setup_32.c @@ -221,6 +221,7 @@ void __init setup_arch(char **cmdline_p) boot_flags_init(*cmdline_p); @@ -225,11 +224,11 @@ index fe1e3fc..e6475f0 100644 register_console(&prom_early_console); /* Set sparc_cpu_model */ -diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c -index a854a1c..b85d039 100644 ---- a/arch/sparc/kernel/setup_64.c -+++ b/arch/sparc/kernel/setup_64.c -@@ -487,6 +487,12 @@ static void __init init_sparc64_elf_hwcap(void) +Index: linux-3.4/arch/sparc/kernel/setup_64.c +=================================================================== +--- linux-3.4.orig/arch/sparc/kernel/setup_64.c ++++ linux-3.4/arch/sparc/kernel/setup_64.c +@@ -487,6 +487,12 @@ static void __init init_sparc64_elf_hwca popc_patch(); } @@ -251,11 +250,11 @@ index a854a1c..b85d039 100644 if (tlb_type == hypervisor) printk("ARCH: SUN4V\n"); -diff --git a/arch/tile/kernel/early_printk.c b/arch/tile/kernel/early_printk.c -index 493a0e6..ba2ac00 100644 ---- a/arch/tile/kernel/early_printk.c -+++ b/arch/tile/kernel/early_printk.c -@@ -32,25 +32,8 @@ static struct console early_hv_console = { +Index: linux-3.4/arch/tile/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/tile/kernel/early_printk.c ++++ linux-3.4/arch/tile/kernel/early_printk.c +@@ -33,25 +33,8 @@ static struct console early_hv_console = }; /* Direct interface for emergencies */ @@ -281,7 +280,7 @@ index 493a0e6..ba2ac00 100644 void early_panic(const char *fmt, ...) { va_list ap; -@@ -68,14 +51,13 @@ static int __initdata keep_early; +@@ -69,14 +52,13 @@ static int __initdata keep_early; static int __init setup_early_printk(char *str) { @@ -297,7 +296,7 @@ index 493a0e6..ba2ac00 100644 register_console(early_console); return 0; -@@ -84,12 +66,12 @@ static int __init setup_early_printk(char *str) +@@ -85,12 +67,12 @@ static int __init setup_early_printk(cha void __init disable_early_printk(void) { early_console_complete = 1; @@ -312,7 +311,7 @@ index 493a0e6..ba2ac00 100644 } else { early_printk("keeping early console\n"); } -@@ -97,7 +79,7 @@ void __init disable_early_printk(void) +@@ -98,7 +80,7 @@ void __init disable_early_printk(void) void warn_early_printk(void) { @@ -321,11 +320,11 @@ index 493a0e6..ba2ac00 100644 return; early_printk("\ Machine shutting down before console output is fully initialized.\n\ -diff --git a/arch/um/kernel/early_printk.c b/arch/um/kernel/early_printk.c -index ec649bf..183060f 100644 ---- a/arch/um/kernel/early_printk.c -+++ b/arch/um/kernel/early_printk.c -@@ -16,7 +16,7 @@ static void early_console_write(struct console *con, const char *s, unsigned int +Index: linux-3.4/arch/um/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/um/kernel/early_printk.c ++++ linux-3.4/arch/um/kernel/early_printk.c +@@ -16,7 +16,7 @@ static void early_console_write(struct c um_early_printk(s, n); } @@ -347,11 +346,11 @@ index ec649bf..183060f 100644 return 0; } -diff --git a/arch/unicore32/kernel/early_printk.c b/arch/unicore32/kernel/early_printk.c -index 3922255..9be0d5d 100644 ---- a/arch/unicore32/kernel/early_printk.c -+++ b/arch/unicore32/kernel/early_printk.c -@@ -33,21 +33,17 @@ static struct console early_ocd_console = { +Index: linux-3.4/arch/unicore32/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/unicore32/kernel/early_printk.c ++++ linux-3.4/arch/unicore32/kernel/early_printk.c +@@ -33,21 +33,17 @@ static struct console early_ocd_console .index = -1, }; @@ -377,11 +376,11 @@ index 3922255..9be0d5d 100644 if (keep_early) early_console->flags &= ~CON_BOOT; -diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c -index cd28a35..5f3d9c5 100644 ---- a/arch/x86/kernel/early_printk.c -+++ b/arch/x86/kernel/early_printk.c -@@ -169,25 +169,9 @@ static struct console early_serial_console = { +Index: linux-3.4/arch/x86/kernel/early_printk.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/early_printk.c ++++ linux-3.4/arch/x86/kernel/early_printk.c +@@ -169,25 +169,9 @@ static struct console early_serial_conso .index = -1, }; @@ -408,7 +407,7 @@ index cd28a35..5f3d9c5 100644 printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n", con->name); return; -@@ -207,9 +191,8 @@ static int __init setup_early_printk(char *buf) +@@ -207,9 +191,8 @@ static int __init setup_early_printk(cha if (!buf) return 0; @@ -419,10 +418,10 @@ index cd28a35..5f3d9c5 100644 keep = (strstr(buf, "keep") != NULL); -diff --git a/include/linux/console.h b/include/linux/console.h -index 7453cfd..e5b5dc0 100644 ---- a/include/linux/console.h -+++ b/include/linux/console.h +Index: linux-3.4/include/linux/console.h +=================================================================== +--- linux-3.4.orig/include/linux/console.h ++++ linux-3.4/include/linux/console.h @@ -133,6 +133,7 @@ struct console { for (con = console_drivers; con != NULL; con = con->next) @@ -431,10 +430,10 @@ index 7453cfd..e5b5dc0 100644 extern int add_preferred_console(char *name, int idx, char *options); extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); -diff --git a/include/linux/printk.h b/include/linux/printk.h -index f0e22f7..be10455 100644 ---- a/include/linux/printk.h -+++ b/include/linux/printk.h +Index: linux-3.4/include/linux/printk.h +=================================================================== +--- linux-3.4.orig/include/linux/printk.h ++++ linux-3.4/include/linux/printk.h @@ -88,8 +88,13 @@ int no_printk(const char *fmt, ...) return 0; } @@ -449,13 +448,13 @@ index f0e22f7..be10455 100644 extern int printk_needs_cpu(int cpu); extern void printk_tick(void); -diff --git a/kernel/printk.c b/kernel/printk.c -index 7982a0a..b7aa50e 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -44,13 +44,6 @@ - - #include +Index: linux-3.4/kernel/printk.c +=================================================================== +--- linux-3.4.orig/kernel/printk.c ++++ linux-3.4/kernel/printk.c +@@ -47,13 +47,6 @@ + #define CREATE_TRACE_POINTS + #include -/* - * Architectures can override it: @@ -467,7 +466,7 @@ index 7982a0a..b7aa50e 100644 #define __LOG_BUF_LEN (1 << CONFIG_LOG_BUF_SHIFT) /* printk's without a loglevel use this.. */ -@@ -521,6 +514,26 @@ static void __call_console_drivers(unsigned start, unsigned end) +@@ -524,6 +517,29 @@ static void __call_console_drivers(unsig } } @@ -476,24 +475,24 @@ index 7982a0a..b7aa50e 100644 + +static void early_vprintk(const char *fmt, va_list ap) +{ -+ char buf[512]; -+ int n = vscnprintf(buf, sizeof(buf), fmt, ap); -+ if (early_console) ++ if (early_console) { ++ char buf[512]; ++ int n = vscnprintf(buf, sizeof(buf), fmt, ap); ++ + early_console->write(early_console, buf, n); ++ } +} + +asmlinkage void early_printk(const char *fmt, ...) +{ + va_list ap; ++ + va_start(ap, fmt); + early_vprintk(fmt, ap); + va_end(ap); +} +#endif + - static int __read_mostly ignore_loglevel; + static bool __read_mostly ignore_loglevel; static int __init ignore_loglevel_setup(char *str) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0224-epoll.patch.patch b/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch similarity index 58% rename from debian/patches/features/all/rt/0224-epoll.patch.patch rename to debian/patches/features/all/rt/epoll-use-get-cpu-light.patch index 25d768edd..e706ea721 100644 --- a/debian/patches/features/all/rt/0224-epoll.patch.patch +++ b/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch @@ -1,18 +1,17 @@ -From b567a9a48741b5c6a271e478cc11149308ecd9b2 Mon Sep 17 00:00:00 2001 +Subject: epoll.patch From: Thomas Gleixner -Date: Fri, 8 Jul 2011 16:35:35 +0200 -Subject: [PATCH 224/267] epoll.patch +Date: Fri, 08 Jul 2011 16:35:35 +0200 Signed-off-by: Thomas Gleixner --- fs/eventpoll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/fs/eventpoll.c b/fs/eventpoll.c -index ea54cde..34294b9 100644 ---- a/fs/eventpoll.c -+++ b/fs/eventpoll.c -@@ -464,12 +464,12 @@ static int ep_poll_wakeup_proc(void *priv, void *cookie, int call_nests) +Index: linux-3.4/fs/eventpoll.c +=================================================================== +--- linux-3.4.orig/fs/eventpoll.c ++++ linux-3.4/fs/eventpoll.c +@@ -488,12 +488,12 @@ static int ep_poll_wakeup_proc(void *pri */ static void ep_poll_safewake(wait_queue_head_t *wq) { @@ -27,6 +26,3 @@ index ea54cde..34294b9 100644 } static void ep_remove_wait_queue(struct eppoll_entry *pwq) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0049-filemap-fix-up.patch.patch b/debian/patches/features/all/rt/filemap-fix-up.patch similarity index 57% rename from debian/patches/features/all/rt/0049-filemap-fix-up.patch.patch rename to debian/patches/features/all/rt/filemap-fix-up.patch index 8e903cde3..1c3b7223e 100644 --- a/debian/patches/features/all/rt/0049-filemap-fix-up.patch.patch +++ b/debian/patches/features/all/rt/filemap-fix-up.patch @@ -1,7 +1,6 @@ -From 90e4703e2535c334bf845c719179075440e4fdca Mon Sep 17 00:00:00 2001 +Subject: filemap-fix-up.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 18:56:24 +0200 -Subject: [PATCH 049/267] filemap-fix-up.patch Signed-off-by: Thomas Gleixner Wrecked-off-by: Peter Zijlstra @@ -10,19 +9,16 @@ Link: http://lkml.kernel.org/n/tip-m6yuzd6ul717hlnl2gj6p3ou@git.kernel.org mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/mm/filemap.c b/mm/filemap.c -index 03c5b0e..4a30d36 100644 ---- a/mm/filemap.c -+++ b/mm/filemap.c -@@ -2044,7 +2044,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, +Index: linux-3.4/mm/filemap.c +=================================================================== +--- linux-3.4.orig/mm/filemap.c ++++ linux-3.4/mm/filemap.c +@@ -2036,7 +2036,7 @@ size_t iov_iter_copy_from_user_atomic(st char *kaddr; size_t copied; - BUG_ON(!in_atomic()); + BUG_ON(!pagefault_disabled()); - kaddr = kmap_atomic(page, KM_USER0); + kaddr = kmap_atomic(page); if (likely(i->nr_segs == 1)) { int left; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/fix-printk-flush-of-messages-1.patch b/debian/patches/features/all/rt/fix-printk-flush-of-messages-1.patch new file mode 100644 index 000000000..093be03df --- /dev/null +++ b/debian/patches/features/all/rt/fix-printk-flush-of-messages-1.patch @@ -0,0 +1,65 @@ +Subject: fix printk flush of messages +From: Frank Rowand +Date: Wed, 16 May 2012 18:09:36 -0700 + + +Updates console-make-rt-friendly.patch + +#ifdef CONFIG_PREEMPT_RT_FULL, printk() output is never flushed by +printk() because: + + # some liberties taken in this pseudo-code to make it easier to follow + printk() + vprintk() + raw_spin_lock(&logbuf_lock) + # increment preempt_count(): + preempt_disable() + result = console_trylock_for_printk() + retval = 0 + # lock will always be false, because preempt_count() will be >= 1 + lock = ... && !preempt_count() + if (lock) + retval = 1 + return retval + # result will always be false since lock will always be false + if (result) + console_unlock() + # this is where the printk() output would be flushed + + +On system boot some printk() output is flushed because register_console() +and tty_open() call console_unlock(). + + +This change also fixes the problem that was previously fixed by +preempt-rt-allow-immediate-magic-sysrq-output-for-preempt_rt_full.patch + +Signed-off-by: Frank Rowand +Cc: Frank +Link: http://lkml.kernel.org/r/4FB44FD0.4090800@am.sony.com +Signed-off-by: Thomas Gleixner + +--- + kernel/printk.c | 2 1 + 1 - 0 ! + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/kernel/printk.c +=================================================================== +--- a/kernel/printk.c ++++ b/kernel/printk.c +@@ -847,7 +847,7 @@ static int console_trylock_for_printk(un + int retval = 0, wake = 0; + #ifdef CONFIG_PREEMPT_RT_FULL + int lock = !early_boot_irqs_disabled && !irqs_disabled_flags(flags) && +- !preempt_count(); ++ (preempt_count() <= 1); + #else + int lock = 1; + #endif + +-- +To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + + diff --git a/debian/patches/features/all/rt/0065-x86-Do-not-disable-preemption-in-int3-on-32bit.patch b/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch similarity index 69% rename from debian/patches/features/all/rt/0065-x86-Do-not-disable-preemption-in-int3-on-32bit.patch rename to debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch index c1e0d296c..3aa29129f 100644 --- a/debian/patches/features/all/rt/0065-x86-Do-not-disable-preemption-in-int3-on-32bit.patch +++ b/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch @@ -1,7 +1,5 @@ -From 31561541540fcec25c731c360a66fab17d50fa33 Mon Sep 17 00:00:00 2001 +Subject: x86: Do not disable preemption in int3 on 32bit From: Steven Rostedt -Date: Tue, 10 Apr 2012 14:33:57 -0400 -Subject: [PATCH 065/267] x86: Do not disable preemption in int3 on 32bit Preemption must be disabled before enabling interrupts in do_trap on x86_64 because the stack in use for int3 and debug is a per CPU @@ -19,15 +17,16 @@ when the stack is on the IST. Cc: stable-rt@vger.kernel.org Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner + --- arch/x86/kernel/traps.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) -diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c -index 31d9d0f..cc88aec 100644 ---- a/arch/x86/kernel/traps.c -+++ b/arch/x86/kernel/traps.c -@@ -87,9 +87,21 @@ static inline void conditional_sti(struct pt_regs *regs) +Index: linux-3.4/arch/x86/kernel/traps.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/traps.c ++++ linux-3.4/arch/x86/kernel/traps.c +@@ -87,9 +87,21 @@ static inline void conditional_sti(struc local_irq_enable(); } @@ -50,7 +49,7 @@ index 31d9d0f..cc88aec 100644 if (regs->flags & X86_EFLAGS_IF) local_irq_enable(); } -@@ -100,11 +112,13 @@ static inline void conditional_cli(struct pt_regs *regs) +@@ -100,11 +112,13 @@ static inline void conditional_cli(struc local_irq_disable(); } @@ -65,54 +64,51 @@ index 31d9d0f..cc88aec 100644 } static void __kprobes -@@ -222,9 +236,9 @@ dotraplinkage void do_stack_segment(struct pt_regs *regs, long error_code) +@@ -226,9 +240,9 @@ dotraplinkage void do_stack_segment(stru if (notify_die(DIE_TRAP, "stack segment", regs, error_code, - 12, SIGBUS) == NOTIFY_STOP) + X86_TRAP_SS, SIGBUS) == NOTIFY_STOP) return; - preempt_conditional_sti(regs); + conditional_sti_ist(regs); - do_trap(12, SIGBUS, "stack segment", regs, error_code, NULL); + do_trap(X86_TRAP_SS, SIGBUS, "stack segment", regs, error_code, NULL); - preempt_conditional_cli(regs); + conditional_cli_ist(regs); } dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code) -@@ -316,9 +330,9 @@ dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code) - return; - #endif - +@@ -320,9 +334,9 @@ dotraplinkage void __kprobes do_int3(str + * as we may switch to the interrupt stack. + */ + debug_stack_usage_inc(); - preempt_conditional_sti(regs); + conditional_sti_ist(regs); - do_trap(3, SIGTRAP, "int3", regs, error_code, NULL); + do_trap(X86_TRAP_BP, SIGTRAP, "int3", regs, error_code, NULL); - preempt_conditional_cli(regs); + conditional_cli_ist(regs); + debug_stack_usage_dec(); } - #ifdef CONFIG_X86_64 -@@ -412,12 +426,12 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) - return; +@@ -423,12 +437,12 @@ dotraplinkage void __kprobes do_debug(st + debug_stack_usage_inc(); /* It's safe to allow irq's after DR6 has been saved */ - preempt_conditional_sti(regs); + conditional_sti_ist(regs); if (regs->flags & X86_VM_MASK) { - handle_vm86_trap((struct kernel_vm86_regs *) regs, - error_code, 1); + handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, + X86_TRAP_DB); - preempt_conditional_cli(regs); + conditional_cli_ist(regs); + debug_stack_usage_dec(); return; } - -@@ -436,7 +450,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) +@@ -448,7 +462,7 @@ dotraplinkage void __kprobes do_debug(st si_code = get_si_code(tsk->thread.debugreg6); if (tsk->thread.debugreg6 & (DR_STEP | DR_TRAP_BITS) || user_icebp) send_sigtrap(tsk, regs, error_code, si_code); - preempt_conditional_cli(regs); + conditional_cli_ist(regs); + debug_stack_usage_dec(); return; - } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0217-fs-block-rt-support.patch.patch b/debian/patches/features/all/rt/fs-block-rt-support.patch similarity index 64% rename from debian/patches/features/all/rt/0217-fs-block-rt-support.patch.patch rename to debian/patches/features/all/rt/fs-block-rt-support.patch index 1874594d0..44f531e9c 100644 --- a/debian/patches/features/all/rt/0217-fs-block-rt-support.patch.patch +++ b/debian/patches/features/all/rt/fs-block-rt-support.patch @@ -1,7 +1,6 @@ -From cfc9b78fd05098f317db725a3054e58d16e0da5e Mon Sep 17 00:00:00 2001 +Subject: fs-block-rt-support.patch From: Thomas Gleixner Date: Tue, 14 Jun 2011 17:05:09 +0200 -Subject: [PATCH 217/267] fs-block-rt-support.patch Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner fs/file.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/block/blk-core.c b/block/blk-core.c -index 7366ad4..ca732c0 100644 ---- a/block/blk-core.c -+++ b/block/blk-core.c -@@ -235,7 +235,7 @@ EXPORT_SYMBOL(blk_delay_queue); +Index: linux-3.4/block/blk-core.c +=================================================================== +--- linux-3.4.orig/block/blk-core.c ++++ linux-3.4/block/blk-core.c +@@ -237,7 +237,7 @@ EXPORT_SYMBOL(blk_delay_queue); **/ void blk_start_queue(struct request_queue *q) { @@ -22,11 +21,11 @@ index 7366ad4..ca732c0 100644 queue_flag_clear(QUEUE_FLAG_STOPPED, q); __blk_run_queue(q); -diff --git a/fs/file.c b/fs/file.c -index 375472d..fd03258 100644 ---- a/fs/file.c -+++ b/fs/file.c -@@ -105,14 +105,14 @@ void free_fdtable_rcu(struct rcu_head *rcu) +Index: linux-3.4/fs/file.c +=================================================================== +--- linux-3.4.orig/fs/file.c ++++ linux-3.4/fs/file.c +@@ -105,14 +105,14 @@ void free_fdtable_rcu(struct rcu_head *r kfree(fdt->open_fds); kfree(fdt); } else { @@ -43,6 +42,3 @@ index 375472d..fd03258 100644 } } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0262-fs-dcache-Use-cpu_chill-in-trylock-loops.patch b/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch similarity index 57% rename from debian/patches/features/all/rt/0262-fs-dcache-Use-cpu_chill-in-trylock-loops.patch rename to debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch index d1e19475e..9cf4eb9de 100644 --- a/debian/patches/features/all/rt/0262-fs-dcache-Use-cpu_chill-in-trylock-loops.patch +++ b/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch @@ -1,7 +1,6 @@ -From 1f3745ebd019755db68c544e5c9792988feebf52 Mon Sep 17 00:00:00 2001 +Subject: fs: dcache: Use cpu_chill() in trylock loops From: Thomas Gleixner -Date: Wed, 7 Mar 2012 21:00:34 +0100 -Subject: [PATCH 262/267] fs: dcache: Use cpu_chill() in trylock loops +Date: Wed, 07 Mar 2012 21:00:34 +0100 Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system @@ -16,10 +15,10 @@ Cc: stable-rt@vger.kernel.org fs/namespace.c | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) -diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h -index 308a98b..67ed186 100644 ---- a/fs/autofs4/autofs_i.h -+++ b/fs/autofs4/autofs_i.h +Index: linux-3.4/fs/autofs4/autofs_i.h +=================================================================== +--- linux-3.4.orig/fs/autofs4/autofs_i.h ++++ linux-3.4/fs/autofs4/autofs_i.h @@ -34,6 +34,7 @@ #include #include @@ -28,11 +27,11 @@ index 308a98b..67ed186 100644 #include #include -diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c -index 450f529..43afbb0 100644 ---- a/fs/autofs4/expire.c -+++ b/fs/autofs4/expire.c -@@ -170,7 +170,7 @@ again: +Index: linux-3.4/fs/autofs4/expire.c +=================================================================== +--- linux-3.4.orig/fs/autofs4/expire.c ++++ linux-3.4/fs/autofs4/expire.c +@@ -171,7 +171,7 @@ again: parent = p->d_parent; if (!spin_trylock(&parent->d_lock)) { spin_unlock(&p->d_lock); @@ -41,19 +40,19 @@ index 450f529..43afbb0 100644 goto relock; } spin_unlock(&p->d_lock); -diff --git a/fs/dcache.c b/fs/dcache.c -index eb723d3..d47b266 100644 ---- a/fs/dcache.c -+++ b/fs/dcache.c +Index: linux-3.4/fs/dcache.c +=================================================================== +--- linux-3.4.orig/fs/dcache.c ++++ linux-3.4/fs/dcache.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "internal.h" + #include "mount.h" - /* -@@ -410,7 +411,7 @@ static inline struct dentry *dentry_kill(struct dentry *dentry, int ref) +@@ -454,7 +455,7 @@ static inline struct dentry *dentry_kill if (inode && !spin_trylock(&inode->i_lock)) { relock: spin_unlock(&dentry->d_lock); @@ -62,7 +61,7 @@ index eb723d3..d47b266 100644 return dentry; /* try again with same dentry */ } if (IS_ROOT(dentry)) -@@ -796,7 +797,7 @@ relock: +@@ -840,7 +841,7 @@ relock: if (!spin_trylock(&dentry->d_lock)) { spin_unlock(&dcache_lru_lock); @@ -71,7 +70,7 @@ index eb723d3..d47b266 100644 goto relock; } -@@ -1975,7 +1976,7 @@ again: +@@ -2022,7 +2023,7 @@ again: if (dentry->d_count == 1) { if (inode && !spin_trylock(&inode->i_lock)) { spin_unlock(&dentry->d_lock); @@ -80,27 +79,24 @@ index eb723d3..d47b266 100644 goto again; } dentry->d_flags &= ~DCACHE_CANT_MOUNT; -diff --git a/fs/namespace.c b/fs/namespace.c -index 63fd6d7..311264b 100644 ---- a/fs/namespace.c -+++ b/fs/namespace.c -@@ -31,6 +31,7 @@ - #include - #include - #include +Index: linux-3.4/fs/namespace.c +=================================================================== +--- linux-3.4.orig/fs/namespace.c ++++ linux-3.4/fs/namespace.c +@@ -20,6 +20,7 @@ + #include /* get_fs_root et.al. */ + #include /* fsnotify_vfsmount_delete */ + #include +#include - #include - #include #include "pnode.h" -@@ -346,7 +347,7 @@ int mnt_want_write(struct vfsmount *mnt) - */ - while (mnt->mnt_flags & MNT_WRITE_HOLD) { + #include "internal.h" + +@@ -315,7 +316,7 @@ int mnt_want_write(struct vfsmount *m) + smp_mb(); + while (mnt->mnt.mnt_flags & MNT_WRITE_HOLD) { preempt_enable(); - cpu_relax(); + cpu_chill(); preempt_disable(); } /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0094-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch b/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch similarity index 73% rename from debian/patches/features/all/rt/0094-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch rename to debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch index 5e82859ff..90a31fcfb 100644 --- a/debian/patches/features/all/rt/0094-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch +++ b/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch @@ -1,8 +1,6 @@ -From c9293d9a9b626e39108b276a74a6d4794374a973 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 18 Mar 2011 10:11:25 +0100 -Subject: [PATCH 094/267] fs: jbd/jbd2: Make state lock and journal head lock - rt safe +Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe bit_spin_locks break under RT. @@ -14,15 +12,11 @@ Signed-off-by: Thomas Gleixner include/linux/buffer_head.h | 10 ++++++++++ include/linux/jbd_common.h | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+) ---- - include/linux/buffer_head.h | 10 ++++++++++ - include/linux/jbd_common.h | 24 ++++++++++++++++++++++++ - 2 files changed, 34 insertions(+) -diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h -index 5c16cf1..3f8e27b 100644 ---- a/include/linux/buffer_head.h -+++ b/include/linux/buffer_head.h +Index: linux-3.4/include/linux/buffer_head.h +=================================================================== +--- linux-3.4.orig/include/linux/buffer_head.h ++++ linux-3.4/include/linux/buffer_head.h @@ -74,6 +74,11 @@ struct buffer_head { atomic_t b_count; /* users using this buffer_head */ #ifdef CONFIG_PREEMPT_RT_BASE @@ -35,7 +29,7 @@ index 5c16cf1..3f8e27b 100644 #endif }; -@@ -105,6 +110,11 @@ static inline void buffer_head_init_locks(struct buffer_head *bh) +@@ -105,6 +110,11 @@ static inline void buffer_head_init_lock { #ifdef CONFIG_PREEMPT_RT_BASE spin_lock_init(&bh->b_uptodate_lock); @@ -47,11 +41,11 @@ index 5c16cf1..3f8e27b 100644 #endif } -diff --git a/include/linux/jbd_common.h b/include/linux/jbd_common.h -index 6230f85..11c313e 100644 ---- a/include/linux/jbd_common.h -+++ b/include/linux/jbd_common.h -@@ -37,32 +37,56 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh) +Index: linux-3.4/include/linux/jbd_common.h +=================================================================== +--- linux-3.4.orig/include/linux/jbd_common.h ++++ linux-3.4/include/linux/jbd_common.h +@@ -37,32 +37,56 @@ static inline struct journal_head *bh2jh static inline void jbd_lock_bh_state(struct buffer_head *bh) { @@ -108,6 +102,3 @@ index 6230f85..11c313e 100644 } #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch b/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch new file mode 100644 index 000000000..398bebc0b --- /dev/null +++ b/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch @@ -0,0 +1,32 @@ +From: Thomas Gleixner +Date: Sun, 19 Jul 2009 08:44:27 -0500 +Subject: fs: namespace preemption fix + +On RT we cannot loop with preemption disabled here as +mnt_make_readonly() might have been preempted. We can safely enable +preemption while waiting for MNT_WRITE_HOLD to be cleared. Safe on !RT +as well. + +Signed-off-by: Thomas Gleixner + +--- + fs/namespace.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: linux-3.4/fs/namespace.c +=================================================================== +--- linux-3.4.orig/fs/namespace.c ++++ linux-3.4/fs/namespace.c +@@ -313,8 +313,11 @@ int mnt_want_write(struct vfsmount *m) + * incremented count after it has set MNT_WRITE_HOLD. + */ + smp_mb(); +- while (mnt->mnt.mnt_flags & MNT_WRITE_HOLD) ++ while (mnt->mnt.mnt_flags & MNT_WRITE_HOLD) { ++ preempt_enable(); + cpu_relax(); ++ preempt_disable(); ++ } + /* + * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will + * be set to match its requirements. So we must not load that until diff --git a/debian/patches/features/all/rt/0218-fs-ntfs-disable-interrupt-only-on-RT.patch b/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch similarity index 82% rename from debian/patches/features/all/rt/0218-fs-ntfs-disable-interrupt-only-on-RT.patch rename to debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch index f18212071..ea2d51226 100644 --- a/debian/patches/features/all/rt/0218-fs-ntfs-disable-interrupt-only-on-RT.patch +++ b/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch @@ -1,7 +1,6 @@ -From 9091cea711af39936f8b1378fdb38f616e1dd15d Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Fri, 3 Jul 2009 08:44:12 -0500 -Subject: [PATCH 218/267] fs: ntfs: disable interrupt only on !RT +Subject: fs: ntfs: disable interrupt only on !RT On Sat, 2007-10-27 at 11:44 +0200, Ingo Molnar wrote: > * Nick Piggin wrote: @@ -35,30 +34,28 @@ instead? Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- fs/ntfs/aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c -index 7fb7f1b..4c8095c 100644 ---- a/fs/ntfs/aops.c -+++ b/fs/ntfs/aops.c -@@ -144,13 +144,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) +Index: linux-3.4/fs/ntfs/aops.c +=================================================================== +--- linux-3.4.orig/fs/ntfs/aops.c ++++ linux-3.4/fs/ntfs/aops.c +@@ -144,13 +144,13 @@ static void ntfs_end_buffer_async_read(s recs = PAGE_CACHE_SIZE / rec_size; /* Should have been verified before we got here... */ BUG_ON(!recs); - local_irq_save(flags); + local_irq_save_nort(flags); - kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); + kaddr = kmap_atomic(page); for (i = 0; i < recs; i++) post_read_mst_fixup((NTFS_RECORD*)(kaddr + i * rec_size), rec_size); - kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); + kunmap_atomic(kaddr); - local_irq_restore(flags); + local_irq_restore_nort(flags); flush_dcache_page(page); if (likely(page_uptodate && !PageError(page))) SetPageUptodate(page); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0093-buffer_head-Replace-bh_uptodate_lock-for-rt.patch b/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch similarity index 74% rename from debian/patches/features/all/rt/0093-buffer_head-Replace-bh_uptodate_lock-for-rt.patch rename to debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch index c3b2ce001..100f00a6f 100644 --- a/debian/patches/features/all/rt/0093-buffer_head-Replace-bh_uptodate_lock-for-rt.patch +++ b/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch @@ -1,7 +1,6 @@ -From 0d6994d78eab6e6ebe324aa490ad10ddd2fc4e31 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 18 Mar 2011 09:18:52 +0100 -Subject: [PATCH 093/267] buffer_head: Replace bh_uptodate_lock for -rt +Subject: buffer_head: Replace bh_uptodate_lock for -rt Wrap the bit_spin_lock calls into a separate inline and add the RT replacements with a real spinlock. @@ -13,11 +12,11 @@ Signed-off-by: Thomas Gleixner include/linux/buffer_head.h | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 21 deletions(-) -diff --git a/fs/buffer.c b/fs/buffer.c -index 19d8eb7..32c4680 100644 ---- a/fs/buffer.c -+++ b/fs/buffer.c -@@ -331,8 +331,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate) +Index: linux-3.4/fs/buffer.c +=================================================================== +--- linux-3.4.orig/fs/buffer.c ++++ linux-3.4/fs/buffer.c +@@ -281,8 +281,7 @@ static void end_buffer_async_read(struct * decide that the page is now completely done. */ first = page_buffers(page); @@ -27,7 +26,7 @@ index 19d8eb7..32c4680 100644 clear_buffer_async_read(bh); unlock_buffer(bh); tmp = bh; -@@ -345,8 +344,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate) +@@ -295,8 +294,7 @@ static void end_buffer_async_read(struct } tmp = tmp->b_this_page; } while (tmp != bh); @@ -37,7 +36,7 @@ index 19d8eb7..32c4680 100644 /* * If none of the buffers had errors and they are all -@@ -358,9 +356,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate) +@@ -308,9 +306,7 @@ static void end_buffer_async_read(struct return; still_busy: @@ -48,7 +47,7 @@ index 19d8eb7..32c4680 100644 } /* -@@ -394,8 +390,7 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate) +@@ -344,8 +340,7 @@ void end_buffer_async_write(struct buffe } first = page_buffers(page); @@ -58,7 +57,7 @@ index 19d8eb7..32c4680 100644 clear_buffer_async_write(bh); unlock_buffer(bh); -@@ -407,15 +402,12 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate) +@@ -357,15 +352,12 @@ void end_buffer_async_write(struct buffe } tmp = tmp->b_this_page; } @@ -76,7 +75,7 @@ index 19d8eb7..32c4680 100644 } EXPORT_SYMBOL(end_buffer_async_write); -@@ -3223,6 +3215,7 @@ struct buffer_head *alloc_buffer_head(gfp_t gfp_flags) +@@ -3185,6 +3177,7 @@ struct buffer_head *alloc_buffer_head(gf struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags); if (ret) { INIT_LIST_HEAD(&ret->b_assoc_buffers); @@ -84,11 +83,11 @@ index 19d8eb7..32c4680 100644 preempt_disable(); __this_cpu_inc(bh_accounting.nr); recalc_bh_state(); -diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c -index 0b1e885b..7fb7f1b 100644 ---- a/fs/ntfs/aops.c -+++ b/fs/ntfs/aops.c -@@ -108,8 +108,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) +Index: linux-3.4/fs/ntfs/aops.c +=================================================================== +--- linux-3.4.orig/fs/ntfs/aops.c ++++ linux-3.4/fs/ntfs/aops.c +@@ -108,8 +108,7 @@ static void ntfs_end_buffer_async_read(s "0x%llx.", (unsigned long long)bh->b_blocknr); } first = page_buffers(page); @@ -98,7 +97,7 @@ index 0b1e885b..7fb7f1b 100644 clear_buffer_async_read(bh); unlock_buffer(bh); tmp = bh; -@@ -124,8 +123,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) +@@ -124,8 +123,7 @@ static void ntfs_end_buffer_async_read(s } tmp = tmp->b_this_page; } while (tmp != bh); @@ -108,7 +107,7 @@ index 0b1e885b..7fb7f1b 100644 /* * 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 -@@ -160,9 +158,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) +@@ -160,9 +158,7 @@ static void ntfs_end_buffer_async_read(s unlock_page(page); return; still_busy: @@ -119,10 +118,10 @@ index 0b1e885b..7fb7f1b 100644 } /** -diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h -index 458f497..5c16cf1 100644 ---- a/include/linux/buffer_head.h -+++ b/include/linux/buffer_head.h +Index: linux-3.4/include/linux/buffer_head.h +=================================================================== +--- linux-3.4.orig/include/linux/buffer_head.h ++++ linux-3.4/include/linux/buffer_head.h @@ -72,8 +72,42 @@ struct buffer_head { struct address_space *b_assoc_map; /* mapping this buffer is associated with */ @@ -166,6 +165,3 @@ index 458f497..5c16cf1 100644 /* * macro tricks to expand the set_buffer_foo(), clear_buffer_foo() * and buffer_foo() functions. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0175-ftrace-crap.patch.patch b/debian/patches/features/all/rt/ftrace-crap.patch similarity index 64% rename from debian/patches/features/all/rt/0175-ftrace-crap.patch.patch rename to debian/patches/features/all/rt/ftrace-crap.patch index a99f7ba14..88bee8374 100644 --- a/debian/patches/features/all/rt/0175-ftrace-crap.patch.patch +++ b/debian/patches/features/all/rt/ftrace-crap.patch @@ -1,7 +1,6 @@ -From 5af317e8a8abd8e488ee2a318229efc3177c81fc Mon Sep 17 00:00:00 2001 +Subject: ftrace-crap.patch From: Thomas Gleixner -Date: Fri, 9 Sep 2011 16:55:53 +0200 -Subject: [PATCH 175/267] ftrace-crap.patch +Date: Fri, 09 Sep 2011 16:55:53 +0200 Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/trace/trace.h | 1 - 2 files changed, 24 insertions(+), 3 deletions(-) -diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index ff03353..f4de7ab 100644 ---- a/kernel/trace/trace.c -+++ b/kernel/trace/trace.c -@@ -359,11 +359,13 @@ static DECLARE_DELAYED_WORK(wakeup_work, wakeup_work_handler); +Index: linux-3.4/kernel/trace/trace.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace.c ++++ linux-3.4/kernel/trace/trace.c +@@ -414,11 +414,13 @@ EXPORT_SYMBOL_GPL(tracing_is_on); */ void trace_wake_up(void) { @@ -27,7 +26,7 @@ index ff03353..f4de7ab 100644 } static int __init set_buf_size(char *str) -@@ -719,6 +721,12 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu) +@@ -775,6 +777,12 @@ update_max_tr_single(struct trace_array } #endif /* CONFIG_TRACER_MAX_TRACE */ @@ -40,7 +39,7 @@ index ff03353..f4de7ab 100644 /** * register_tracer - register a tracer with the ftrace system. * @type - the plugin for the tracer -@@ -3196,6 +3204,7 @@ static int tracing_release_pipe(struct inode *inode, struct file *file) +@@ -3303,6 +3311,7 @@ static int tracing_release_pipe(struct i return 0; } @@ -48,7 +47,7 @@ index ff03353..f4de7ab 100644 static unsigned int tracing_poll_pipe(struct file *filp, poll_table *poll_table) { -@@ -3217,8 +3226,7 @@ tracing_poll_pipe(struct file *filp, poll_table *poll_table) +@@ -3324,8 +3333,7 @@ tracing_poll_pipe(struct file *filp, pol } } @@ -58,7 +57,7 @@ index ff03353..f4de7ab 100644 { DEFINE_WAIT(wait); -@@ -3229,6 +3237,20 @@ void default_wait_pipe(struct trace_iterator *iter) +@@ -3336,6 +3344,20 @@ void default_wait_pipe(struct trace_iter finish_wait(&trace_wait, &wait); } @@ -79,11 +78,11 @@ index ff03353..f4de7ab 100644 /* * This is a make-shift waitqueue. -diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h -index 092e1f8..69b8700 100644 ---- a/kernel/trace/trace.h -+++ b/kernel/trace/trace.h -@@ -345,7 +345,6 @@ void trace_init_global_iter(struct trace_iterator *iter); +Index: linux-3.4/kernel/trace/trace.h +=================================================================== +--- linux-3.4.orig/kernel/trace/trace.h ++++ linux-3.4/kernel/trace/trace.h +@@ -354,7 +354,6 @@ void trace_init_global_iter(struct trace void tracing_iter_reset(struct trace_iterator *iter, int cpu); @@ -91,6 +90,3 @@ index 092e1f8..69b8700 100644 void poll_wait_pipe(struct trace_iterator *iter); void ftrace(struct trace_array *tr, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0164-ftrace-migrate-disable-tracing.patch.patch b/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch similarity index 62% rename from debian/patches/features/all/rt/0164-ftrace-migrate-disable-tracing.patch.patch rename to debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch index 019a6c5bd..e740ea3c3 100644 --- a/debian/patches/features/all/rt/0164-ftrace-migrate-disable-tracing.patch.patch +++ b/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch @@ -1,7 +1,6 @@ -From 14e283b0c6f5247b630dda78f0b4bb47c728dd7b Mon Sep 17 00:00:00 2001 +Subject: ftrace-migrate-disable-tracing.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:56:42 +0200 -Subject: [PATCH 164/267] ftrace-migrate-disable-tracing.patch Signed-off-by: Thomas Gleixner --- @@ -11,10 +10,10 @@ Signed-off-by: Thomas Gleixner kernel/trace/trace_output.c | 5 +++++ 4 files changed, 14 insertions(+), 4 deletions(-) -diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h -index c3da42d..7c5e176 100644 ---- a/include/linux/ftrace_event.h -+++ b/include/linux/ftrace_event.h +Index: linux-3.4/include/linux/ftrace_event.h +=================================================================== +--- linux-3.4.orig/include/linux/ftrace_event.h ++++ linux-3.4/include/linux/ftrace_event.h @@ -49,7 +49,8 @@ struct trace_entry { unsigned char flags; unsigned char preempt_count; @@ -25,11 +24,11 @@ index c3da42d..7c5e176 100644 }; #define FTRACE_MAX_EVENT \ -diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 697e49d..c44456b 100644 ---- a/kernel/trace/trace.c -+++ b/kernel/trace/trace.c -@@ -1123,6 +1123,8 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, +Index: linux-3.4/kernel/trace/trace.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace.c ++++ linux-3.4/kernel/trace/trace.c +@@ -1179,6 +1179,8 @@ tracing_generic_entry_update(struct trac ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); @@ -38,7 +37,7 @@ index 697e49d..c44456b 100644 } EXPORT_SYMBOL_GPL(tracing_generic_entry_update); -@@ -1854,9 +1856,10 @@ static void print_lat_help_header(struct seq_file *m) +@@ -1937,9 +1939,10 @@ static void print_lat_help_header(struct seq_puts(m, "# | / _----=> need-resched \n"); seq_puts(m, "# || / _---=> hardirq/softirq \n"); seq_puts(m, "# ||| / _--=> preempt-depth \n"); @@ -51,12 +50,12 @@ index 697e49d..c44456b 100644 + seq_puts(m, "# \\ / ||||| \\ | / \n"); } - static void print_func_help_header(struct seq_file *m) -diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c -index c212a7f..aca63cc 100644 ---- a/kernel/trace/trace_events.c -+++ b/kernel/trace/trace_events.c -@@ -116,6 +116,7 @@ static int trace_define_common_fields(void) + static void print_event_info(struct trace_array *tr, struct seq_file *m) +Index: linux-3.4/kernel/trace/trace_events.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace_events.c ++++ linux-3.4/kernel/trace/trace_events.c +@@ -116,6 +116,7 @@ static int trace_define_common_fields(vo __common_field(unsigned char, flags); __common_field(unsigned char, preempt_count); __common_field(int, pid); @@ -64,11 +63,11 @@ index c212a7f..aca63cc 100644 __common_field(int, padding); return ret; -diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c -index 5199930..c93de84 100644 ---- a/kernel/trace/trace_output.c -+++ b/kernel/trace/trace_output.c -@@ -591,6 +591,11 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) +Index: linux-3.4/kernel/trace/trace_output.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace_output.c ++++ linux-3.4/kernel/trace/trace_output.c +@@ -593,6 +593,11 @@ int trace_print_lat_fmt(struct trace_seq else ret = trace_seq_putc(s, '.'); @@ -80,6 +79,3 @@ index 5199930..c93de84 100644 return ret; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0193-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch b/debian/patches/features/all/rt/futex-requeue-pi-fix.patch similarity index 81% rename from debian/patches/features/all/rt/0193-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch rename to debian/patches/features/all/rt/futex-requeue-pi-fix.patch index f59357fff..cc22b0ca8 100644 --- a/debian/patches/features/all/rt/0193-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch +++ b/debian/patches/features/all/rt/futex-requeue-pi-fix.patch @@ -1,12 +1,11 @@ -From 3e18d19f9ef2d8e08827a5710c402485b169004c Mon Sep 17 00:00:00 2001 +Subject: futex: Fix bug on when a requeued RT task times out From: Steven Rostedt -Date: Tue, 10 Apr 2012 14:34:13 -0400 -Subject: [PATCH 193/267] futex: Fix bug on when a requeued RT task times out Requeue with timeout causes a bug with PREEMPT_RT_FULL. The bug comes from a timed out condition. + TASK 1 TASK 2 ------ ------ futex_wait_requeue_pi() @@ -16,12 +15,13 @@ 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); spin_lock(hb->lock); <-- blocked! + plist_for_each_entry_safe(this) { rt_mutex_start_proxy_lock(); task_blocks_on_rt_mutex(); @@ -47,16 +47,18 @@ appropriately. Cc: stable-rt@vger.kernel.org Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner + + --- kernel/rtmutex.c | 32 +++++++++++++++++++++++++++++++- kernel/rtmutex_common.h | 1 + 2 files changed, 32 insertions(+), 1 deletion(-) -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index 13b3c92..f8dcb7b 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c -@@ -69,7 +69,8 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock) +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c +@@ -69,7 +69,8 @@ static void fixup_rt_mutex_waiters(struc static int rt_mutex_real_waiter(struct rt_mutex_waiter *waiter) { @@ -66,7 +68,7 @@ index 13b3c92..f8dcb7b 100644 } /* -@@ -1010,6 +1011,35 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock, +@@ -1002,6 +1003,35 @@ int rt_mutex_start_proxy_lock(struct rt_ return 1; } @@ -102,11 +104,11 @@ index 13b3c92..f8dcb7b 100644 ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock); if (ret && !rt_mutex_owner(lock)) { -diff --git a/kernel/rtmutex_common.h b/kernel/rtmutex_common.h -index b43d832..47290ec 100644 ---- a/kernel/rtmutex_common.h -+++ b/kernel/rtmutex_common.h -@@ -104,6 +104,7 @@ static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) +Index: linux-3.4/kernel/rtmutex_common.h +=================================================================== +--- linux-3.4.orig/kernel/rtmutex_common.h ++++ linux-3.4/kernel/rtmutex_common.h +@@ -104,6 +104,7 @@ static inline struct task_struct *rt_mut * PI-futex support (proxy locking functions, etc.): */ #define PI_WAKEUP_INPROGRESS ((struct rt_mutex_waiter *) 1) @@ -114,6 +116,3 @@ index b43d832..47290ec 100644 extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0036-generic-Use-raw-local-irq-variant-for-generic-cmpxch.patch b/debian/patches/features/all/rt/generic-cmpxchg-use-raw-local-irq.patch similarity index 57% rename from debian/patches/features/all/rt/0036-generic-Use-raw-local-irq-variant-for-generic-cmpxch.patch rename to debian/patches/features/all/rt/generic-cmpxchg-use-raw-local-irq.patch index f700f863d..790548ac0 100644 --- a/debian/patches/features/all/rt/0036-generic-Use-raw-local-irq-variant-for-generic-cmpxch.patch +++ b/debian/patches/features/all/rt/generic-cmpxchg-use-raw-local-irq.patch @@ -1,22 +1,21 @@ -From f105d10b4701b0b44c781bc0c37379f3468521a3 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:30 -0500 -Subject: [PATCH 036/267] generic: Use raw local irq variant for generic - cmpxchg +Subject: generic: Use raw local irq variant for generic cmpxchg No point in tracing those. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/asm-generic/cmpxchg-local.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/include/asm-generic/cmpxchg-local.h b/include/asm-generic/cmpxchg-local.h -index 2533fdd..d8d4c89 100644 ---- a/include/asm-generic/cmpxchg-local.h -+++ b/include/asm-generic/cmpxchg-local.h -@@ -21,7 +21,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr, +Index: linux-3.4/include/asm-generic/cmpxchg-local.h +=================================================================== +--- linux-3.4.orig/include/asm-generic/cmpxchg-local.h ++++ linux-3.4/include/asm-generic/cmpxchg-local.h +@@ -21,7 +21,7 @@ static inline unsigned long __cmpxchg_lo if (size == 8 && sizeof(unsigned long) != 8) wrong_size_cmpxchg(ptr); @@ -25,7 +24,7 @@ index 2533fdd..d8d4c89 100644 switch (size) { case 1: prev = *(u8 *)ptr; if (prev == old) -@@ -42,7 +42,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr, +@@ -42,7 +42,7 @@ static inline unsigned long __cmpxchg_lo default: wrong_size_cmpxchg(ptr); } @@ -34,7 +33,7 @@ index 2533fdd..d8d4c89 100644 return prev; } -@@ -55,11 +55,11 @@ static inline u64 __cmpxchg64_local_generic(volatile void *ptr, +@@ -55,11 +55,11 @@ static inline u64 __cmpxchg64_local_gene u64 prev; unsigned long flags; @@ -48,6 +47,3 @@ index 2533fdd..d8d4c89 100644 return prev; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/genirq-add-default-mask-cmdline-option.patch b/debian/patches/features/all/rt/genirq-add-default-mask-cmdline-option.patch new file mode 100644 index 000000000..505e377ef --- /dev/null +++ b/debian/patches/features/all/rt/genirq-add-default-mask-cmdline-option.patch @@ -0,0 +1,70 @@ +Subject: genirq: Add default affinity mask command line option +From: Thomas Gleixner +Date: Fri, 25 May 2012 16:59:47 +0200 + +If we isolate CPUs, then we don't want random device interrupts on +them. Even w/o the user space irq balancer enabled we can end up with +irqs on non boot cpus. + +Allow to restrict the default irq affinity mask. + +Signed-off-by: Thomas Gleixner +--- + Documentation/kernel-parameters.txt | 9 +++++++++ + kernel/irq/irqdesc.c | 21 +++++++++++++++++++-- + 2 files changed, 28 insertions(+), 2 deletions(-) + +Index: linux-3.4/Documentation/kernel-parameters.txt +=================================================================== +--- linux-3.4.orig/Documentation/kernel-parameters.txt ++++ linux-3.4/Documentation/kernel-parameters.txt +@@ -1126,6 +1126,15 @@ bytes respectively. Such letter suffixes + See comment before ip2_setup() in + drivers/char/ip2/ip2base.c. + ++ irqaffinity= [SMP] Set the default irq affinity mask ++ Format: ++ ,..., ++ or ++ - ++ (must be a positive range in ascending order) ++ or a mixture ++ ,...,- ++ + irqfixup [HW] + When an interrupt is not handled search all handlers + for it. Intended to get systems with badly broken +Index: linux-3.4/kernel/irq/irqdesc.c +=================================================================== +--- linux-3.4.orig/kernel/irq/irqdesc.c ++++ linux-3.4/kernel/irq/irqdesc.c +@@ -23,10 +23,27 @@ + static struct lock_class_key irq_desc_lock_class; + + #if defined(CONFIG_SMP) ++static int __init irq_affinity_setup(char *str) ++{ ++ zalloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT); ++ cpulist_parse(str, irq_default_affinity); ++ /* ++ * Set at least the boot cpu. We don't want to end up with ++ * bugreports caused by random comandline masks ++ */ ++ cpumask_set_cpu(smp_processor_id(), irq_default_affinity); ++ return 1; ++} ++__setup("irqaffinity=", irq_affinity_setup); ++ + static void __init init_irq_default_affinity(void) + { +- alloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT); +- cpumask_setall(irq_default_affinity); ++#ifdef CONFIG_CPUMASK_OFFSTACK ++ if (!irq_default_affinity) ++ zalloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT); ++#endif ++ if (cpumask_empty(irq_default_affinity)) ++ cpumask_setall(irq_default_affinity); + } + #else + static void __init init_irq_default_affinity(void) diff --git a/debian/patches/features/all/rt/0097-genirq-disable-irqpoll-on-rt.patch b/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch similarity index 71% rename from debian/patches/features/all/rt/0097-genirq-disable-irqpoll-on-rt.patch rename to debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch index f32c398d9..5bddf233c 100644 --- a/debian/patches/features/all/rt/0097-genirq-disable-irqpoll-on-rt.patch +++ b/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch @@ -1,21 +1,21 @@ -From c52440d3a3faff677bbba7d09e44222de48b6cf2 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:57 -0500 -Subject: [PATCH 097/267] genirq: disable irqpoll on -rt +Subject: genirq: disable irqpoll on -rt Creates long latencies for no value Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/irq/spurious.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c -index dc813a9..d09e0f5 100644 ---- a/kernel/irq/spurious.c -+++ b/kernel/irq/spurious.c -@@ -341,6 +341,11 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true"); +Index: linux-3.4/kernel/irq/spurious.c +=================================================================== +--- linux-3.4.orig/kernel/irq/spurious.c ++++ linux-3.4/kernel/irq/spurious.c +@@ -341,6 +341,11 @@ MODULE_PARM_DESC(noirqdebug, "Disable ir static int __init irqfixup_setup(char *str) { @@ -39,6 +39,3 @@ index dc813a9..d09e0f5 100644 irqfixup = 2; printk(KERN_WARNING "Misrouted IRQ fixup and polling support " "enabled\n"); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0096-genirq-Disable-random-call-on-preempt-rt.patch b/debian/patches/features/all/rt/genirq-disable-random-call-on-preempt-rt.patch similarity index 58% rename from debian/patches/features/all/rt/0096-genirq-Disable-random-call-on-preempt-rt.patch rename to debian/patches/features/all/rt/genirq-disable-random-call-on-preempt-rt.patch index 2906e1977..bac9e80c6 100644 --- a/debian/patches/features/all/rt/0096-genirq-Disable-random-call-on-preempt-rt.patch +++ b/debian/patches/features/all/rt/genirq-disable-random-call-on-preempt-rt.patch @@ -1,21 +1,21 @@ -From f190b6f8506745170cbb3754f21ab36267847483 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 21 Jul 2009 16:07:37 +0200 -Subject: [PATCH 096/267] genirq: Disable random call on preempt-rt +Subject: genirq: Disable random call on preempt-rt The random call introduces high latencies and is almost unused. Disable it for -rt. Signed-off-by: Thomas Gleixner + --- kernel/irq/handle.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c -index 470d08c..634620c 100644 ---- a/kernel/irq/handle.c -+++ b/kernel/irq/handle.c -@@ -156,8 +156,11 @@ handle_irq_event_percpu(struct irq_desc *desc, struct irqaction *action) +Index: linux-3.4/kernel/irq/handle.c +=================================================================== +--- linux-3.4.orig/kernel/irq/handle.c ++++ linux-3.4/kernel/irq/handle.c +@@ -172,8 +172,11 @@ handle_irq_event_percpu(struct irq_desc action = action->next; } while (action); @@ -27,6 +27,3 @@ index 470d08c..634620c 100644 if (!noirqdebug) note_interrupt(irq, desc, retval); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0098-genirq-force-threading.patch.patch b/debian/patches/features/all/rt/genirq-force-threading.patch similarity index 57% rename from debian/patches/features/all/rt/0098-genirq-force-threading.patch.patch rename to debian/patches/features/all/rt/genirq-force-threading.patch index e20db5b0f..b841d8099 100644 --- a/debian/patches/features/all/rt/0098-genirq-force-threading.patch.patch +++ b/debian/patches/features/all/rt/genirq-force-threading.patch @@ -1,7 +1,6 @@ -From 63d0b60e274fb76c5b8b1a2fd74a5d93eacc656a Mon Sep 17 00:00:00 2001 +Subject: genirq-force-threading.patch From: Thomas Gleixner -Date: Sun, 3 Apr 2011 11:57:29 +0200 -Subject: [PATCH 098/267] genirq-force-threading.patch +Date: Sun, 03 Apr 2011 11:57:29 +0200 Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/irq/manage.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index ddd6b2a..b9162dc 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -396,9 +396,13 @@ static inline int disable_irq_wake(unsigned int irq) +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -394,9 +394,13 @@ static inline int disable_irq_wake(unsig #ifdef CONFIG_IRQ_FORCED_THREADING @@ -29,10 +28,10 @@ index ddd6b2a..b9162dc 100644 #endif #ifndef __ARCH_SET_SOFTIRQ_PENDING -diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c -index 7600092..b3e6228 100644 ---- a/kernel/irq/manage.c -+++ b/kernel/irq/manage.c +Index: linux-3.4/kernel/irq/manage.c +=================================================================== +--- linux-3.4.orig/kernel/irq/manage.c ++++ linux-3.4/kernel/irq/manage.c @@ -18,6 +18,7 @@ #include "internals.h" @@ -41,7 +40,7 @@ index 7600092..b3e6228 100644 __read_mostly bool force_irqthreads; static int __init setup_forced_irqthreads(char *arg) -@@ -26,6 +27,7 @@ static int __init setup_forced_irqthreads(char *arg) +@@ -26,6 +27,7 @@ static int __init setup_forced_irqthread return 0; } early_param("threadirqs", setup_forced_irqthreads); @@ -49,6 +48,3 @@ index 7600092..b3e6228 100644 #endif /** --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0095-genirq-Disable-DEBUG_SHIRQ-for-rt.patch b/debian/patches/features/all/rt/genirq-nodebug-shirq.patch similarity index 63% rename from debian/patches/features/all/rt/0095-genirq-Disable-DEBUG_SHIRQ-for-rt.patch rename to debian/patches/features/all/rt/genirq-nodebug-shirq.patch index b71cdf15d..e58f28758 100644 --- a/debian/patches/features/all/rt/0095-genirq-Disable-DEBUG_SHIRQ-for-rt.patch +++ b/debian/patches/features/all/rt/genirq-nodebug-shirq.patch @@ -1,17 +1,16 @@ -From 5b808390bbd3ef32efd5d44116bd0e5a17860200 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner -Date: Fri, 18 Mar 2011 10:22:04 +0100 -Subject: [PATCH 095/267] genirq: Disable DEBUG_SHIRQ for rt +Date: Sun, 18 Mar 2011 10:22:04 +0100 +Subject: genirq: Disable DEBUG_SHIRQ for rt Signed-off-by: Thomas Gleixner --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 82928f5..c347db3 100644 ---- a/lib/Kconfig.debug -+++ b/lib/Kconfig.debug +Index: linux-3.4/lib/Kconfig.debug +=================================================================== +--- linux-3.4.orig/lib/Kconfig.debug ++++ linux-3.4/lib/Kconfig.debug @@ -151,7 +151,7 @@ config DEBUG_KERNEL config DEBUG_SHIRQ @@ -21,6 +20,3 @@ index 82928f5..c347db3 100644 help Enable this to generate a spurious interrupt as soon as a shared interrupt handler is registered, and just before one is deregistered. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0183-hardirq.h-Define-softirq_count-as-OUL-to-kill-build-.patch b/debian/patches/features/all/rt/harirq-h-define-softirq_count-as-oul-to-kill-build-warning.patch similarity index 76% rename from debian/patches/features/all/rt/0183-hardirq.h-Define-softirq_count-as-OUL-to-kill-build-.patch rename to debian/patches/features/all/rt/harirq-h-define-softirq_count-as-oul-to-kill-build-warning.patch index b3515e37d..121237928 100644 --- a/debian/patches/features/all/rt/0183-hardirq.h-Define-softirq_count-as-OUL-to-kill-build-.patch +++ b/debian/patches/features/all/rt/harirq-h-define-softirq_count-as-oul-to-kill-build-warning.patch @@ -1,11 +1,6 @@ -From ac220f3571639b8a16d5df2a4fd438938d82afc6 Mon Sep 17 00:00:00 2001 +Subject: hardirq.h: Define softirq_count() as OUL to kill build warning From: Yong Zhang Date: Thu, 13 Oct 2011 17:19:09 +0800 -Subject: [PATCH 183/267] hardirq.h: Define softirq_count() as OUL to kill - build warning -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit kernel/lockdep.c: In function ‘print_bad_irq_dependency’: kernel/lockdep.c:1476:3: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ @@ -27,10 +22,10 @@ Signed-off-by: Thomas Gleixner include/linux/hardirq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h -index 2f5d318..7059ce2 100644 ---- a/include/linux/hardirq.h -+++ b/include/linux/hardirq.h +Index: linux-3.4/include/linux/hardirq.h +=================================================================== +--- linux-3.4.orig/include/linux/hardirq.h ++++ linux-3.4/include/linux/hardirq.h @@ -84,7 +84,7 @@ # define softirq_count() (preempt_count() & SOFTIRQ_MASK) # define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) @@ -40,6 +35,3 @@ index 2f5d318..7059ce2 100644 extern int in_serving_softirq(void); #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0163-hotplug-Call-cpu_unplug_begin-before-DOWN_PREPARE.patch b/debian/patches/features/all/rt/hotplug-call-cpu_unplug_begin-a-little-early.patch similarity index 84% rename from debian/patches/features/all/rt/0163-hotplug-Call-cpu_unplug_begin-before-DOWN_PREPARE.patch rename to debian/patches/features/all/rt/hotplug-call-cpu_unplug_begin-a-little-early.patch index 8ee815f25..15ae737e2 100644 --- a/debian/patches/features/all/rt/0163-hotplug-Call-cpu_unplug_begin-before-DOWN_PREPARE.patch +++ b/debian/patches/features/all/rt/hotplug-call-cpu_unplug_begin-a-little-early.patch @@ -1,7 +1,6 @@ -From 5ae4e8e90d2670164fa1450d8cdbf0067e6a608e Mon Sep 17 00:00:00 2001 +Subject: hotplug: Call cpu_unplug_begin() before DOWN_PREPARE From: Yong Zhang Date: Sun, 16 Oct 2011 18:56:44 +0800 -Subject: [PATCH 163/267] hotplug: Call cpu_unplug_begin() before DOWN_PREPARE cpu_unplug_begin() should be called before CPU_DOWN_PREPARE, because at CPU_DOWN_PREPARE cpu_active is cleared and sched_domain is @@ -26,11 +25,11 @@ Signed-off-by: Thomas Gleixner kernel/cpu.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index 2179062..fa40834 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -338,22 +338,20 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c +@@ -337,22 +337,20 @@ static int __ref _cpu_down(unsigned int return -EBUSY; } @@ -60,6 +59,3 @@ index 2179062..fa40834 100644 } err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0158-hotplug-Lightweight-get-online-cpus.patch b/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch similarity index 85% rename from debian/patches/features/all/rt/0158-hotplug-Lightweight-get-online-cpus.patch rename to debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch index e5eb6de76..1ea75afd7 100644 --- a/debian/patches/features/all/rt/0158-hotplug-Lightweight-get-online-cpus.patch +++ b/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch @@ -1,7 +1,6 @@ -From b01967c3f8b507c25b7dd2df09e92f24e303c8b5 Mon Sep 17 00:00:00 2001 +Subject: hotplug: Lightweight get online cpus From: Thomas Gleixner Date: Wed, 15 Jun 2011 12:36:06 +0200 -Subject: [PATCH 158/267] hotplug: Lightweight get online cpus get_online_cpus() is a heavy weight function which involves a global mutex. migrate_disable() wants a simpler construct which prevents only @@ -13,15 +12,15 @@ tasks on the cpu which should be brought down. Signed-off-by: Thomas Gleixner --- - include/linux/cpu.h | 4 ++ - kernel/cpu.c | 127 +++++++++++++++++++++++++++++++++++++++++++++++++-- + include/linux/cpu.h | 4 + + kernel/cpu.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 128 insertions(+), 3 deletions(-) -diff --git a/include/linux/cpu.h b/include/linux/cpu.h -index 6cb60fd..c46ec3e 100644 ---- a/include/linux/cpu.h -+++ b/include/linux/cpu.h -@@ -167,6 +167,8 @@ extern struct sysdev_class cpu_sysdev_class; +Index: linux-3.4/include/linux/cpu.h +=================================================================== +--- linux-3.4.orig/include/linux/cpu.h ++++ linux-3.4/include/linux/cpu.h +@@ -176,6 +176,8 @@ extern struct bus_type cpu_subsys; extern void get_online_cpus(void); extern void put_online_cpus(void); @@ -30,7 +29,7 @@ index 6cb60fd..c46ec3e 100644 #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) -@@ -189,6 +191,8 @@ static inline void cpu_hotplug_driver_unlock(void) +@@ -198,6 +200,8 @@ static inline void cpu_hotplug_driver_un #define get_online_cpus() do { } while (0) #define put_online_cpus() do { } while (0) @@ -39,10 +38,10 @@ index 6cb60fd..c46ec3e 100644 #define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0) /* These aren't inline functions due to a GCC bug. */ #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index 563f136..df0a2fc 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c @@ -58,6 +58,102 @@ static struct { .refcount = 0, }; @@ -146,7 +145,7 @@ index 563f136..df0a2fc 100644 void get_online_cpus(void) { might_sleep(); -@@ -211,13 +307,14 @@ static int __ref take_cpu_down(void *_param) +@@ -210,13 +306,14 @@ static int __ref take_cpu_down(void *_pa /* Requires cpu_add_remove_lock to be held */ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) { @@ -162,7 +161,7 @@ index 563f136..df0a2fc 100644 if (num_online_cpus() == 1) return -EBUSY; -@@ -225,7 +322,20 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +@@ -224,7 +321,20 @@ static int __ref _cpu_down(unsigned int if (!cpu_online(cpu)) return -EINVAL; @@ -184,7 +183,7 @@ index 563f136..df0a2fc 100644 err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); if (err) { -@@ -233,7 +343,16 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +@@ -232,7 +342,16 @@ static int __ref _cpu_down(unsigned int __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL); printk("%s: attempt to take down CPU %u failed\n", __func__, cpu); @@ -202,7 +201,7 @@ index 563f136..df0a2fc 100644 } err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu)); -@@ -264,6 +383,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +@@ -263,6 +382,8 @@ static int __ref _cpu_down(unsigned int check_for_tasks(cpu); out_release: @@ -211,6 +210,3 @@ index 563f136..df0a2fc 100644 cpu_hotplug_done(); if (!err) cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0159-hotplug-sync_unplug-No.patch b/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch similarity index 67% rename from debian/patches/features/all/rt/0159-hotplug-sync_unplug-No.patch rename to debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch index 4c3ad1b2e..9094f6086 100644 --- a/debian/patches/features/all/rt/0159-hotplug-sync_unplug-No.patch +++ b/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch @@ -1,7 +1,6 @@ -From 79cd77d112cf2d5886a420b0e3eb4b14a16715b8 Mon Sep 17 00:00:00 2001 +Subject: hotplug: sync_unplug: No "\n" in task name From: Yong Zhang Date: Sun, 16 Oct 2011 18:56:43 +0800 -Subject: [PATCH 159/267] hotplug: sync_unplug: No " " in task name Otherwise the output will look a little odd. @@ -12,11 +11,11 @@ Signed-off-by: Thomas Gleixner kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index df0a2fc..171cb6c 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -138,7 +138,7 @@ static int cpu_unplug_begin(unsigned int cpu) +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c +@@ -138,7 +138,7 @@ static int cpu_unplug_begin(unsigned int struct task_struct *tsk; init_completion(&hp->synced); @@ -25,6 +24,3 @@ index df0a2fc..171cb6c 100644 if (IS_ERR(tsk)) return (PTR_ERR(tsk)); kthread_bind(tsk, cpu); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0162-hotplug-use-migrate-disable.patch.patch b/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch similarity index 66% rename from debian/patches/features/all/rt/0162-hotplug-use-migrate-disable.patch.patch rename to debian/patches/features/all/rt/hotplug-use-migrate-disable.patch index e6588de5d..d818ae113 100644 --- a/debian/patches/features/all/rt/0162-hotplug-use-migrate-disable.patch.patch +++ b/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch @@ -1,18 +1,17 @@ -From 6fa1e82ad039567a6806728cb2c25e7070146962 Mon Sep 17 00:00:00 2001 +Subject: hotplug-use-migrate-disable.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 19:35:29 +0200 -Subject: [PATCH 162/267] hotplug-use-migrate-disable.patch Signed-off-by: Thomas Gleixner --- kernel/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index 80c72da..2179062 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -330,14 +330,13 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c +@@ -329,14 +329,13 @@ static int __ref _cpu_down(unsigned int cpumask_andnot(cpumask, cpu_online_mask, cpumask_of(cpu)); set_cpus_allowed_ptr(current, cpumask); free_cpumask_var(cpumask); @@ -29,7 +28,7 @@ index 80c72da..2179062 100644 err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); if (err) { -@@ -387,6 +386,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) +@@ -386,6 +385,7 @@ static int __ref _cpu_down(unsigned int out_release: cpu_unplug_done(cpu); out_cancel: @@ -37,6 +36,3 @@ index 80c72da..2179062 100644 cpu_hotplug_done(); if (!err) cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/hrtimer-add-missing-debug_activate-aid-was-re-announce-3-0-6-rt17.patch b/debian/patches/features/all/rt/hrtimer-add-missing-debug_activate-aid-was-re-announce-3-0-6-rt17.patch new file mode 100644 index 000000000..8e20b7370 --- /dev/null +++ b/debian/patches/features/all/rt/hrtimer-add-missing-debug_activate-aid-was-re-announce-3-0-6-rt17.patch @@ -0,0 +1,70 @@ +Subject: hrtimer: Add missing debug_activate() aid [Was: Re: [ANNOUNCE] 3.0.6-rt17] +From: Yong Zhang +Date: Thu, 13 Oct 2011 15:52:30 +0800 + +On Fri, Oct 07, 2011 at 10:25:25AM -0700, Fernando Lopez-Lezcano wrote: +> On 10/06/2011 06:15 PM, Thomas Gleixner wrote: +> >Dear RT Folks, +> > +> >I'm pleased to announce the 3.0.6-rt17 release. +> +> Hi and thanks again. So far this one is not hanging which is very +> good news. But I still see the hrtimer_fixup_activate warnings I +> reported for rt16... + +Hi Fernando, + +I think below patch will smooth your concern? + +Thanks, +Yong + +--- +From: Yong Zhang +Subject: [PATCH -rt] hrtimer: Add missing debug_activate() aid + +It will fix below warning, which is also reported by Fernando: + +[ 7.616090] ------------[ cut here ]------------ +[ 7.616093] WARNING: at kernel/hrtimer.c:391 hrtimer_fixup_activate+0x27/0x50() +[ 7.616094] Hardware name: OptiPlex 755 +[ 7.616096] Modules linked in: +[ 7.616099] Pid: 0, comm: kworker/0:0 Tainted: G W 3.0.6-rt17-00284-g9d73a61 #15 +[ 7.616100] Call Trace: +[ 7.616103] [] warn_slowpath_common+0x72/0xa0 +[ 7.616106] [] ? hrtimer_fixup_activate+0x27/0x50 +[ 7.616109] [] ? hrtimer_fixup_activate+0x27/0x50 +[ 7.616112] [] warn_slowpath_null+0x22/0x30 +[ 7.616115] [] hrtimer_fixup_activate+0x27/0x50 +[ 7.616118] [] debug_object_activate+0x100/0x130 +[ 7.616121] [] ? hrtimer_start_range_ns+0x26/0x30 +[ 7.616123] [] enqueue_hrtimer+0x19/0x100 +[ 7.616126] [] ? hrtimer_start_range_ns+0x26/0x30 +[ 7.616129] [] __hrtimer_start_range_ns+0x144/0x540 +[ 7.616132] [] ? _raw_spin_unlock_irqrestore+0x3a/0x80 +[ 7.616136] [] hrtimer_start_range_ns+0x26/0x30 +[ 7.616139] [] tick_nohz_restart_sched_tick+0x185/0x1b0 +[ 7.616142] [] cpu_idle+0x98/0xc0 +[ 7.616146] [] start_secondary+0x1d3/0x1da +[ 7.616148] ---[ end trace 0000000000000003 ]--- + +Reported-by: Fernando Lopez-Lezcano +Signed-off-by: Yong Zhang +Link: http://lkml.kernel.org/r/20111013075230.GA2740@zhy +Signed-off-by: Thomas Gleixner +--- + kernel/hrtimer.c | 1 + + 1 file changed, 1 insertion(+) + +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c +@@ -1042,6 +1042,7 @@ int __hrtimer_start_range_ns(struct hrti + * remove it again and report a failure. This avoids + * stale base->first entries. + */ ++ debug_deactivate(timer); + __remove_hrtimer(timer, new_base, + timer->state & HRTIMER_STATE_CALLBACK, 0); + } diff --git a/debian/patches/features/all/rt/0136-hrtimer-fix-reprogram-madness.patch.patch b/debian/patches/features/all/rt/hrtimer-fix-reprogram-madness.patch similarity index 64% rename from debian/patches/features/all/rt/0136-hrtimer-fix-reprogram-madness.patch.patch rename to debian/patches/features/all/rt/hrtimer-fix-reprogram-madness.patch index 38990f174..c257998b4 100644 --- a/debian/patches/features/all/rt/0136-hrtimer-fix-reprogram-madness.patch.patch +++ b/debian/patches/features/all/rt/hrtimer-fix-reprogram-madness.patch @@ -1,18 +1,17 @@ -From 11270c5af082cf02a5971fba8a5bb4bf6fe672e0 Mon Sep 17 00:00:00 2001 +Subject: hrtimer-fix-reprogram-madness.patch From: Thomas Gleixner Date: Wed, 14 Sep 2011 14:48:43 +0200 -Subject: [PATCH 136/267] hrtimer-fix-reprogram-madness.patch Signed-off-by: Thomas Gleixner --- kernel/hrtimer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index d363df8..3991464 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c -@@ -1317,7 +1317,11 @@ static void hrtimer_rt_reprogram(int restart, struct hrtimer *timer, +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c +@@ -1317,7 +1317,11 @@ static void hrtimer_rt_reprogram(int res if (!enqueue_hrtimer(timer, base)) return; @@ -25,7 +24,7 @@ index d363df8..3991464 100644 goto requeue; } else if (hrtimer_active(timer)) { -@@ -1326,6 +1330,7 @@ static void hrtimer_rt_reprogram(int restart, struct hrtimer *timer, +@@ -1326,6 +1330,7 @@ static void hrtimer_rt_reprogram(int res * the event device. */ if (&timer->node == base->active.next && @@ -41,6 +40,3 @@ index d363df8..3991464 100644 } /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0133-hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch b/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch similarity index 81% rename from debian/patches/features/all/rt/0133-hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch rename to debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch index ff511f987..ff50cc31c 100644 --- a/debian/patches/features/all/rt/0133-hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch +++ b/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch @@ -1,8 +1,6 @@ -From 4236c5bb70d033897f15142395e80b3b8f76a83c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:31 -0500 -Subject: [PATCH 133/267] hrtimer: fixup hrtimer callback changes for - preempt-rt +Subject: hrtimer: fixup hrtimer callback changes for preempt-rt In preempt-rt we can not call the callbacks which take sleeping locks from the timer interrupt context. @@ -12,18 +10,20 @@ delivery problem for real. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar ---- - include/linux/hrtimer.h | 3 + - kernel/hrtimer.c | 190 +++++++++++++++++++++++++++++++++++++++++----- - kernel/sched.c | 2 + - kernel/time/tick-sched.c | 1 + - kernel/watchdog.c | 1 + - 5 files changed, 179 insertions(+), 18 deletions(-) -diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h -index e8b395d..0e37086 100644 ---- a/include/linux/hrtimer.h -+++ b/include/linux/hrtimer.h +--- + include/linux/hrtimer.h | 3 + kernel/hrtimer.c | 190 ++++++++++++++++++++++++++++++++++++++++++----- + kernel/sched/core.c | 1 + kernel/sched/rt.c | 1 + kernel/time/tick-sched.c | 1 + kernel/watchdog.c | 1 + 6 files changed, 179 insertions(+), 18 deletions(-) + +Index: linux-3.4/include/linux/hrtimer.h +=================================================================== +--- linux-3.4.orig/include/linux/hrtimer.h ++++ linux-3.4/include/linux/hrtimer.h @@ -111,6 +111,8 @@ struct hrtimer { enum hrtimer_restart (*function)(struct hrtimer *); struct hrtimer_clock_base *base; @@ -41,11 +41,11 @@ index e8b395d..0e37086 100644 ktime_t resolution; ktime_t (*get_time)(void); ktime_t softirq_time; -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index 905e2cd..1dd627b 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c -@@ -589,8 +589,7 @@ static int hrtimer_reprogram(struct hrtimer *timer, +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c +@@ -589,8 +589,7 @@ static int hrtimer_reprogram(struct hrti * When the callback is running, we do not reprogram the clock event * device. The timer callback is either running on a different CPU or * the callback is executed in the hrtimer_interrupt context. The @@ -55,7 +55,7 @@ index 905e2cd..1dd627b 100644 */ if (hrtimer_callback_running(timer)) return 0; -@@ -625,6 +624,9 @@ static int hrtimer_reprogram(struct hrtimer *timer, +@@ -625,6 +624,9 @@ static int hrtimer_reprogram(struct hrti return res; } @@ -65,7 +65,7 @@ index 905e2cd..1dd627b 100644 /* * Initialize the high resolution related parts of cpu_base */ -@@ -644,7 +646,29 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer, +@@ -644,7 +646,29 @@ static inline int hrtimer_enqueue_reprog struct hrtimer_clock_base *base, int wakeup) { @@ -95,7 +95,7 @@ index 905e2cd..1dd627b 100644 if (wakeup) { raw_spin_unlock(&base->cpu_base->lock); raise_softirq_irqoff(HRTIMER_SOFTIRQ); -@@ -733,6 +757,11 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer, +@@ -733,6 +757,11 @@ static inline int hrtimer_enqueue_reprog } static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) { } static inline void retrigger_next_event(void *arg) { } @@ -107,7 +107,7 @@ index 905e2cd..1dd627b 100644 #endif /* CONFIG_HIGH_RES_TIMERS */ -@@ -864,9 +893,9 @@ void hrtimer_wait_for_timer(const struct hrtimer *timer) +@@ -864,9 +893,9 @@ void hrtimer_wait_for_timer(const struct { struct hrtimer_clock_base *base = timer->base; @@ -119,7 +119,7 @@ index 905e2cd..1dd627b 100644 } #else -@@ -916,6 +945,11 @@ static void __remove_hrtimer(struct hrtimer *timer, +@@ -916,6 +945,11 @@ static void __remove_hrtimer(struct hrti if (!(timer->state & HRTIMER_STATE_ENQUEUED)) goto out; @@ -131,7 +131,7 @@ index 905e2cd..1dd627b 100644 next_timer = timerqueue_getnext(&base->active); timerqueue_del(&base->active, &timer->node); if (&timer->node == next_timer) { -@@ -1178,6 +1212,7 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, +@@ -1178,6 +1212,7 @@ static void __hrtimer_init(struct hrtime base = hrtimer_clockid_to_base(clock_id); timer->base = &cpu_base->clock_base[base]; @@ -139,7 +139,7 @@ index 905e2cd..1dd627b 100644 timerqueue_init(&timer->node); #ifdef CONFIG_TIMER_STATS -@@ -1261,10 +1296,118 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) +@@ -1261,10 +1296,118 @@ static void __run_hrtimer(struct hrtimer timer->state &= ~HRTIMER_STATE_CALLBACK; } @@ -260,7 +260,7 @@ index 905e2cd..1dd627b 100644 /* * High resolution timer interrupt * Called with interrupts disabled -@@ -1273,7 +1416,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) +@@ -1273,7 +1416,7 @@ void hrtimer_interrupt(struct clock_even { struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); ktime_t expires_next, now, entry_time, delta; @@ -343,7 +343,7 @@ index 905e2cd..1dd627b 100644 } /* -@@ -1525,6 +1679,7 @@ static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer) +@@ -1525,6 +1679,7 @@ static enum hrtimer_restart hrtimer_wake void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, struct task_struct *task) { sl->timer.function = hrtimer_wakeup; @@ -351,7 +351,7 @@ index 905e2cd..1dd627b 100644 sl->task = task; } EXPORT_SYMBOL_GPL(hrtimer_init_sleeper); -@@ -1663,6 +1818,7 @@ static void __cpuinit init_hrtimers_cpu(int cpu) +@@ -1663,6 +1818,7 @@ static void __cpuinit init_hrtimers_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); @@ -369,19 +369,11 @@ index 905e2cd..1dd627b 100644 } /** -diff --git a/kernel/sched.c b/kernel/sched.c -index bb93b0b..c47e7a6 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -189,6 +189,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); -+ rt_b->rt_period_timer.irqsafe = 1; - rt_b->rt_period_timer.function = sched_rt_period_timer; - } - -@@ -1277,6 +1278,7 @@ static void init_rq_hrtick(struct rq *rq) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -480,6 +480,7 @@ static void init_rq_hrtick(struct rq *rq hrtimer_init(&rq->hrtick_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); rq->hrtick_timer.function = hrtick; @@ -389,11 +381,23 @@ index bb93b0b..c47e7a6 100644 } #else /* CONFIG_SCHED_HRTICK */ static inline void hrtick_clear(struct rq *rq) -diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c -index d7abd2f..a2c2a64 100644 ---- a/kernel/time/tick-sched.c -+++ b/kernel/time/tick-sched.c -@@ -802,6 +802,7 @@ void tick_setup_sched_timer(void) +Index: linux-3.4/kernel/sched/rt.c +=================================================================== +--- linux-3.4.orig/kernel/sched/rt.c ++++ linux-3.4/kernel/sched/rt.c +@@ -41,6 +41,7 @@ void init_rt_bandwidth(struct rt_bandwid + + hrtimer_init(&rt_b->rt_period_timer, + CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ rt_b->rt_period_timer.irqsafe = 1; + rt_b->rt_period_timer.function = sched_rt_period_timer; + } + +Index: linux-3.4/kernel/time/tick-sched.c +=================================================================== +--- linux-3.4.orig/kernel/time/tick-sched.c ++++ linux-3.4/kernel/time/tick-sched.c +@@ -830,6 +830,7 @@ void tick_setup_sched_timer(void) * Emulate tick processing via per-CPU hrtimers: */ hrtimer_init(&ts->sched_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); @@ -401,11 +405,11 @@ index d7abd2f..a2c2a64 100644 ts->sched_timer.function = tick_sched_timer; /* Get the next period (per cpu) */ -diff --git a/kernel/watchdog.c b/kernel/watchdog.c -index c7e2a2f..c0c47d7 100644 ---- a/kernel/watchdog.c -+++ b/kernel/watchdog.c -@@ -436,6 +436,7 @@ static void watchdog_prepare_cpu(int cpu) +Index: linux-3.4/kernel/watchdog.c +=================================================================== +--- linux-3.4.orig/kernel/watchdog.c ++++ linux-3.4/kernel/watchdog.c +@@ -441,6 +441,7 @@ static void watchdog_prepare_cpu(int cpu WARN_ON(per_cpu(softlockup_watchdog, cpu)); hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); hrtimer->function = watchdog_timer_fn; @@ -413,6 +417,3 @@ index c7e2a2f..c0c47d7 100644 } static int watchdog_enable(int cpu) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0132-hrtimers-prepare-full-preemption.patch b/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch similarity index 79% rename from debian/patches/features/all/rt/0132-hrtimers-prepare-full-preemption.patch rename to debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch index afa1843eb..7828640ff 100644 --- a/debian/patches/features/all/rt/0132-hrtimers-prepare-full-preemption.patch +++ b/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch @@ -1,13 +1,13 @@ -From 2b00756cd02a0dc8ecd990749a92742f6b71e931 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 -Subject: [PATCH 132/267] hrtimers: prepare full preemption +Subject: hrtimers: prepare full preemption Make cancellation of a running callback in softirq context safe against preemption. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/linux/hrtimer.h | 10 ++++++++++ kernel/hrtimer.c | 33 ++++++++++++++++++++++++++++++++- @@ -15,10 +15,10 @@ Signed-off-by: Thomas Gleixner kernel/posix-timers.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) -diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h -index fd0dc30..e8b395d 100644 ---- a/include/linux/hrtimer.h -+++ b/include/linux/hrtimer.h +Index: linux-3.4/include/linux/hrtimer.h +=================================================================== +--- linux-3.4.orig/include/linux/hrtimer.h ++++ linux-3.4/include/linux/hrtimer.h @@ -187,6 +187,9 @@ struct hrtimer_cpu_base { unsigned long nr_hangs; ktime_t max_hang_time; @@ -29,7 +29,7 @@ index fd0dc30..e8b395d 100644 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; }; -@@ -374,6 +377,13 @@ static inline int hrtimer_restart(struct hrtimer *timer) +@@ -374,6 +377,13 @@ static inline int hrtimer_restart(struct return hrtimer_start_expires(timer, HRTIMER_MODE_ABS); } @@ -43,11 +43,11 @@ index fd0dc30..e8b395d 100644 /* Query timers: */ extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index 1a3695e..905e2cd 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c -@@ -847,6 +847,32 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c +@@ -847,6 +847,32 @@ u64 hrtimer_forward(struct hrtimer *time } EXPORT_SYMBOL_GPL(hrtimer_forward); @@ -80,7 +80,7 @@ index 1a3695e..905e2cd 100644 /* * 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; @@ -98,7 +98,7 @@ index 1a3695e..905e2cd 100644 } /* -@@ -1638,6 +1666,9 @@ static void __cpuinit init_hrtimers_cpu(int cpu) +@@ -1638,6 +1666,9 @@ static void __cpuinit init_hrtimers_cpu( } hrtimer_init_hres(cpu_base); @@ -108,11 +108,11 @@ index 1a3695e..905e2cd 100644 } #ifdef CONFIG_HOTPLUG_CPU -diff --git a/kernel/itimer.c b/kernel/itimer.c -index d802883..2c582fc 100644 ---- a/kernel/itimer.c -+++ b/kernel/itimer.c -@@ -214,6 +214,7 @@ again: +Index: linux-3.4/kernel/itimer.c +=================================================================== +--- linux-3.4.orig/kernel/itimer.c ++++ linux-3.4/kernel/itimer.c +@@ -213,6 +213,7 @@ again: /* We are sharing ->siglock with it_real_fn() */ if (hrtimer_try_to_cancel(timer) < 0) { spin_unlock_irq(&tsk->sighand->siglock); @@ -120,11 +120,11 @@ index d802883..2c582fc 100644 goto again; } expires = timeval_to_ktime(value->it_value); -diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c -index 7b73c34..6a74800 100644 ---- a/kernel/posix-timers.c -+++ b/kernel/posix-timers.c -@@ -766,6 +766,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id) +Index: linux-3.4/kernel/posix-timers.c +=================================================================== +--- linux-3.4.orig/kernel/posix-timers.c ++++ linux-3.4/kernel/posix-timers.c +@@ -766,6 +766,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_ return overrun; } @@ -182,7 +182,7 @@ index 7b73c34..6a74800 100644 spin_lock(¤t->sighand->siglock); list_del(&timer->list); -@@ -920,8 +943,18 @@ static void itimer_delete(struct k_itimer *timer) +@@ -920,8 +943,18 @@ static void itimer_delete(struct k_itime retry_delete: spin_lock_irqsave(&timer->it_lock, flags); @@ -201,6 +201,3 @@ index 7b73c34..6a74800 100644 goto retry_delete; } list_del(&timer->list); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0071-hwlatdetect.patch.patch b/debian/patches/features/all/rt/hwlatdetect.patch similarity index 97% rename from debian/patches/features/all/rt/0071-hwlatdetect.patch.patch rename to debian/patches/features/all/rt/hwlatdetect.patch index f386bfdfe..e2e371aca 100644 --- a/debian/patches/features/all/rt/0071-hwlatdetect.patch.patch +++ b/debian/patches/features/all/rt/hwlatdetect.patch @@ -1,28 +1,25 @@ -From 64c6278c3b79d72e2992c767dca658f4c7f65739 Mon Sep 17 00:00:00 2001 +Subject: hwlatdetect.patch From: Carsten Emde Date: Tue, 19 Jul 2011 13:53:12 +0100 -Subject: [PATCH 071/267] hwlatdetect.patch Jon Masters developed this wonderful SMI detector. For details please consult Documentation/hwlat_detector.txt. It could be ported to Linux 3.0 RT without any major change. Signed-off-by: Carsten Emde + --- Documentation/hwlat_detector.txt | 64 ++ - MAINTAINERS | 9 + - drivers/misc/Kconfig | 29 + - drivers/misc/Makefile | 1 + - drivers/misc/hwlat_detector.c | 1212 ++++++++++++++++++++++++++++++++++++++ + MAINTAINERS | 9 + drivers/misc/Kconfig | 29 + drivers/misc/Makefile | 1 + drivers/misc/hwlat_detector.c | 1212 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 1315 insertions(+) - create mode 100644 Documentation/hwlat_detector.txt - create mode 100644 drivers/misc/hwlat_detector.c -diff --git a/Documentation/hwlat_detector.txt b/Documentation/hwlat_detector.txt -new file mode 100644 -index 0000000..cb61516 +Index: linux-3.4/Documentation/hwlat_detector.txt +=================================================================== --- /dev/null -+++ b/Documentation/hwlat_detector.txt ++++ linux-3.4/Documentation/hwlat_detector.txt @@ -0,0 +1,64 @@ +Introduction: +------------- @@ -88,11 +85,11 @@ index 0000000..cb61516 +observe any latencies that exceed the threshold (initially 100 usecs), +then we write to a global sample ring buffer of 8K samples, which is +consumed by reading from the "sample" (pipe) debugfs file interface. -diff --git a/MAINTAINERS b/MAINTAINERS -index f986e7d..b257477 100644 ---- a/MAINTAINERS -+++ b/MAINTAINERS -@@ -3008,6 +3008,15 @@ L: linuxppc-dev@lists.ozlabs.org +Index: linux-3.4/MAINTAINERS +=================================================================== +--- linux-3.4.orig/MAINTAINERS ++++ linux-3.4/MAINTAINERS +@@ -3082,6 +3082,15 @@ L: linuxppc-dev@lists.ozlabs.org S: Odd Fixes F: drivers/tty/hvc/ @@ -108,11 +105,11 @@ index f986e7d..b257477 100644 HARDWARE MONITORING M: Jean Delvare M: Guenter Roeck -diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig -index f3031a4..1cb530c 100644 ---- a/drivers/misc/Kconfig -+++ b/drivers/misc/Kconfig -@@ -140,6 +140,35 @@ config IBM_ASM +Index: linux-3.4/drivers/misc/Kconfig +=================================================================== +--- linux-3.4.orig/drivers/misc/Kconfig ++++ linux-3.4/drivers/misc/Kconfig +@@ -130,6 +130,35 @@ config IBM_ASM for information on the specific driver level and support statement for your IBM server. @@ -148,20 +145,19 @@ index f3031a4..1cb530c 100644 config PHANTOM tristate "Sensable PHANToM (PCI)" depends on PCI -diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile -index b26495a..84c4554 100644 ---- a/drivers/misc/Makefile -+++ b/drivers/misc/Makefile -@@ -48,3 +48,4 @@ obj-y += lis3lv02d/ - obj-y += carma/ +Index: linux-3.4/drivers/misc/Makefile +=================================================================== +--- linux-3.4.orig/drivers/misc/Makefile ++++ linux-3.4/drivers/misc/Makefile +@@ -49,3 +49,4 @@ obj-y += carma/ obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/ + obj-$(CONFIG_MAX8997_MUIC) += max8997-muic.o +obj-$(CONFIG_HWLAT_DETECTOR) += hwlat_detector.o -diff --git a/drivers/misc/hwlat_detector.c b/drivers/misc/hwlat_detector.c -new file mode 100644 -index 0000000..b7b7c90 +Index: linux-3.4/drivers/misc/hwlat_detector.c +=================================================================== --- /dev/null -+++ b/drivers/misc/hwlat_detector.c ++++ linux-3.4/drivers/misc/hwlat_detector.c @@ -0,0 +1,1212 @@ +/* + * hwlat_detector.c - A simple Hardware Latency detector. @@ -1375,6 +1371,3 @@ index 0000000..b7b7c90 + +module_init(detector_init); +module_exit(detector_exit); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0081-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch b/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch similarity index 58% rename from debian/patches/features/all/rt/0081-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch rename to debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch index 06f7334eb..59fa7f6e7 100644 --- a/debian/patches/features/all/rt/0081-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch +++ b/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch @@ -1,12 +1,12 @@ -From 56ffc28ceb835c0eb0bff7fb3395cd66ba0860b0 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:16 -0500 -Subject: [PATCH 081/267] ide: Do not disable interrupts for PREEMPT-RT +Subject: ide: Do not disable interrupts for PREEMPT-RT Use the local_irq_*_nort variants. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- drivers/ide/alim15x3.c | 4 ++-- drivers/ide/hpt366.c | 4 ++-- @@ -17,11 +17,11 @@ Signed-off-by: Thomas Gleixner 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 2c8016a..6fd6037 100644 ---- a/drivers/ide/alim15x3.c -+++ b/drivers/ide/alim15x3.c -@@ -234,7 +234,7 @@ static int init_chipset_ali15x3(struct pci_dev *dev) +Index: linux-3.4/drivers/ide/alim15x3.c +=================================================================== +--- linux-3.4.orig/drivers/ide/alim15x3.c ++++ linux-3.4/drivers/ide/alim15x3.c +@@ -234,7 +234,7 @@ static int init_chipset_ali15x3(struct p isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); @@ -39,11 +39,11 @@ index 2c8016a..6fd6037 100644 return 0; } -diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c -index 58c51cd..d2a4059 100644 ---- a/drivers/ide/hpt366.c -+++ b/drivers/ide/hpt366.c -@@ -1241,7 +1241,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif, +Index: linux-3.4/drivers/ide/hpt366.c +=================================================================== +--- linux-3.4.orig/drivers/ide/hpt366.c ++++ linux-3.4/drivers/ide/hpt366.c +@@ -1241,7 +1241,7 @@ static int __devinit init_dma_hpt366(ide dma_old = inb(base + 2); @@ -52,7 +52,7 @@ index 58c51cd..d2a4059 100644 dma_new = dma_old; pci_read_config_byte(dev, hwif->channel ? 0x4b : 0x43, &masterdma); -@@ -1252,7 +1252,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif, +@@ -1252,7 +1252,7 @@ static int __devinit init_dma_hpt366(ide if (dma_new != dma_old) outb(dma_new, base + 2); @@ -61,11 +61,11 @@ index 58c51cd..d2a4059 100644 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 1976397..4169433 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, struct ide_cmd *cmd, void *buf, +Index: linux-3.4/drivers/ide/ide-io-std.c +=================================================================== +--- linux-3.4.orig/drivers/ide/ide-io-std.c ++++ linux-3.4/drivers/ide/ide-io-std.c +@@ -175,7 +175,7 @@ void ide_input_data(ide_drive_t *drive, unsigned long uninitialized_var(flags); if ((io_32bit & 2) && !mmio) { @@ -74,7 +74,7 @@ index 1976397..4169433 100644 ata_vlb_sync(io_ports->nsect_addr); } -@@ -186,7 +186,7 @@ void ide_input_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf, +@@ -186,7 +186,7 @@ void ide_input_data(ide_drive_t *drive, insl(data_addr, buf, words); if ((io_32bit & 2) && !mmio) @@ -83,7 +83,7 @@ index 1976397..4169433 100644 if (((len + 1) & 3) < 2) return; -@@ -219,7 +219,7 @@ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf, +@@ -219,7 +219,7 @@ void ide_output_data(ide_drive_t *drive, unsigned long uninitialized_var(flags); if ((io_32bit & 2) && !mmio) { @@ -92,7 +92,7 @@ index 1976397..4169433 100644 ata_vlb_sync(io_ports->nsect_addr); } -@@ -230,7 +230,7 @@ void ide_output_data(ide_drive_t *drive, struct ide_cmd *cmd, void *buf, +@@ -230,7 +230,7 @@ void ide_output_data(ide_drive_t *drive, outsl(data_addr, buf, words); if ((io_32bit & 2) && !mmio) @@ -101,11 +101,11 @@ index 1976397..4169433 100644 if (((len + 1) & 3) < 2) return; -diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c -index 177db6d..079ae6b 100644 ---- a/drivers/ide/ide-io.c -+++ b/drivers/ide/ide-io.c -@@ -659,7 +659,7 @@ void ide_timer_expiry (unsigned long data) +Index: linux-3.4/drivers/ide/ide-io.c +=================================================================== +--- linux-3.4.orig/drivers/ide/ide-io.c ++++ linux-3.4/drivers/ide/ide-io.c +@@ -659,7 +659,7 @@ void ide_timer_expiry (unsigned long dat /* disable_irq_nosync ?? */ disable_irq(hwif->irq); /* local CPU only, as if we were handling an interrupt */ @@ -114,11 +114,11 @@ index 177db6d..079ae6b 100644 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 376f2dc..f014dd1 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, u8 good, u8 bad, +Index: linux-3.4/drivers/ide/ide-iops.c +=================================================================== +--- linux-3.4.orig/drivers/ide/ide-iops.c ++++ linux-3.4/drivers/ide/ide-iops.c +@@ -129,12 +129,12 @@ int __ide_wait_stat(ide_drive_t *drive, if ((stat & ATA_BUSY) == 0) break; @@ -133,11 +133,11 @@ index 376f2dc..f014dd1 100644 } /* * Allow status to settle, then read it again. -diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c -index 068cef0..38e69e1 100644 ---- a/drivers/ide/ide-probe.c -+++ b/drivers/ide/ide-probe.c -@@ -196,10 +196,10 @@ static void do_identify(ide_drive_t *drive, u8 cmd, u16 *id) +Index: linux-3.4/drivers/ide/ide-probe.c +=================================================================== +--- linux-3.4.orig/drivers/ide/ide-probe.c ++++ linux-3.4/drivers/ide/ide-probe.c +@@ -196,10 +196,10 @@ static void do_identify(ide_drive_t *dri int bswap = 1; /* local CPU only; some systems need this */ @@ -150,21 +150,21 @@ index 068cef0..38e69e1 100644 drive->dev_flags |= IDE_DFLAG_ID_READ; #ifdef DEBUG -diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c -index 5bc2839..da861a6 100644 ---- a/drivers/ide/ide-taskfile.c -+++ b/drivers/ide/ide-taskfile.c -@@ -251,7 +251,7 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd, +Index: linux-3.4/drivers/ide/ide-taskfile.c +=================================================================== +--- linux-3.4.orig/drivers/ide/ide-taskfile.c ++++ linux-3.4/drivers/ide/ide-taskfile.c +@@ -251,7 +251,7 @@ void ide_pio_bytes(ide_drive_t *drive, s page_is_high = PageHighMem(page); if (page_is_high) - local_irq_save(flags); + local_irq_save_nort(flags); - buf = kmap_atomic(page, KM_BIO_SRC_IRQ) + offset; + buf = kmap_atomic(page) + offset; -@@ -272,7 +272,7 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd, - kunmap_atomic(buf, KM_BIO_SRC_IRQ); +@@ -272,7 +272,7 @@ void ide_pio_bytes(ide_drive_t *drive, s + kunmap_atomic(buf); if (page_is_high) - local_irq_restore(flags); @@ -172,7 +172,7 @@ index 5bc2839..da861a6 100644 len -= nr_bytes; } -@@ -415,7 +415,7 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, +@@ -415,7 +415,7 @@ static ide_startstop_t pre_task_out_intr } if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0) @@ -181,6 +181,3 @@ index 5bc2839..da861a6 100644 ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0082-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch b/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch similarity index 64% rename from debian/patches/features/all/rt/0082-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch rename to debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch index de35bc6dd..7be626676 100644 --- a/debian/patches/features/all/rt/0082-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch +++ b/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch @@ -1,8 +1,6 @@ -From cd9cb9fbaf1df154b72fa6be9a3665ba7ad81433 Mon Sep 17 00:00:00 2001 From: Sven-Thorsten Dietrich Date: Fri, 3 Jul 2009 08:30:35 -0500 -Subject: [PATCH 082/267] infiniband: Mellanox IB driver patch use _nort() - primitives +Subject: infiniband: Mellanox IB driver patch use _nort() primitives Fixes in_atomic stack-dump, when Mellanox module is loaded into the RT Kernel. @@ -15,15 +13,16 @@ changes." Signed-off-by: Sven-Thorsten Dietrich Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- 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 e5069b4..2683192 100644 ---- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c -+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c -@@ -799,7 +799,7 @@ void ipoib_mcast_restart_task(struct work_struct *work) +Index: linux-3.4/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +=================================================================== +--- linux-3.4.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ++++ linux-3.4/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +@@ -798,7 +798,7 @@ void ipoib_mcast_restart_task(struct wor ipoib_mcast_stop_thread(dev, 0); @@ -32,7 +31,7 @@ index e5069b4..2683192 100644 netif_addr_lock(dev); spin_lock(&priv->lock); -@@ -881,7 +881,7 @@ void ipoib_mcast_restart_task(struct work_struct *work) +@@ -880,7 +880,7 @@ void ipoib_mcast_restart_task(struct wor spin_unlock(&priv->lock); netif_addr_unlock(dev); @@ -41,6 +40,3 @@ index e5069b4..2683192 100644 /* We have to cancel outside of the spinlock */ list_for_each_entry_safe(mcast, tmcast, &remove_list, list) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0083-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch b/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch similarity index 64% rename from debian/patches/features/all/rt/0083-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch rename to debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch index f968ab24c..b1b6784f9 100644 --- a/debian/patches/features/all/rt/0083-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch +++ b/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch @@ -1,22 +1,21 @@ -From 359b7e30fef466df9d38227b1f570e21fcb37b5e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:16 -0500 -Subject: [PATCH 083/267] input: gameport: Do not disable interrupts on - PREEMPT_RT +Subject: input: gameport: Do not disable interrupts on PREEMPT_RT Use the _nort() primitives. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- drivers/input/gameport/gameport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c -index c351aa4..1ecaf60 100644 ---- a/drivers/input/gameport/gameport.c -+++ b/drivers/input/gameport/gameport.c -@@ -87,12 +87,12 @@ static int gameport_measure_speed(struct gameport *gameport) +Index: linux-3.4/drivers/input/gameport/gameport.c +=================================================================== +--- linux-3.4.orig/drivers/input/gameport/gameport.c ++++ linux-3.4/drivers/input/gameport/gameport.c +@@ -87,12 +87,12 @@ static int gameport_measure_speed(struct tx = 1 << 30; for(i = 0; i < 50; i++) { @@ -31,7 +30,7 @@ index c351aa4..1ecaf60 100644 udelay(i * 10); if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t; } -@@ -111,11 +111,11 @@ static int gameport_measure_speed(struct gameport *gameport) +@@ -111,11 +111,11 @@ static int gameport_measure_speed(struct tx = 1 << 30; for(i = 0; i < 50; i++) { @@ -45,6 +44,3 @@ index c351aa4..1ecaf60 100644 udelay(i * 10); if (t2 - t1 < tx) tx = t2 - t1; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0023-intel_idle-Convert-i7300_idle_lock-to-raw-spinlock.patch b/debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch similarity index 77% rename from debian/patches/features/all/rt/0023-intel_idle-Convert-i7300_idle_lock-to-raw-spinlock.patch rename to debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch index 1c9579928..9406b3a7d 100644 --- a/debian/patches/features/all/rt/0023-intel_idle-Convert-i7300_idle_lock-to-raw-spinlock.patch +++ b/debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch @@ -1,7 +1,6 @@ -From 7e4c6f7de42bc1567381698fc906cc2ad9c2e593 Mon Sep 17 00:00:00 2001 +Subject: intel_idle: Convert i7300_idle_lock to raw spinlock From: Mike Galbraith -Date: Wed, 7 Dec 2011 12:48:42 +0100 -Subject: [PATCH 023/267] intel_idle: Convert i7300_idle_lock to raw spinlock +Date: Wed, 07 Dec 2011 12:48:42 +0100 24 core Intel box's first exposure to 3.0.12-rt30-rc3 didn't go well. @@ -23,14 +22,15 @@ Signed-off-by: Mike Galbraith Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1323258522.5057.73.camel@marge.simson.net Signed-off-by: Thomas Gleixner + --- drivers/idle/i7300_idle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c -index c976285..5537d7c 100644 ---- a/drivers/idle/i7300_idle.c -+++ b/drivers/idle/i7300_idle.c +Index: linux-3.4/drivers/idle/i7300_idle.c +=================================================================== +--- linux-3.4.orig/drivers/idle/i7300_idle.c ++++ linux-3.4/drivers/idle/i7300_idle.c @@ -75,7 +75,7 @@ static unsigned long past_skip; static struct pci_dev *fbd_dev; @@ -40,7 +40,7 @@ index c976285..5537d7c 100644 static int i7300_idle_active; static u8 i7300_idle_thrtctl_saved; -@@ -457,7 +457,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val, +@@ -457,7 +457,7 @@ static int i7300_idle_notifier(struct no idle_begin_time = ktime_get(); } @@ -49,7 +49,7 @@ index c976285..5537d7c 100644 if (val == IDLE_START) { cpumask_set_cpu(smp_processor_id(), idle_cpumask); -@@ -506,7 +506,7 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val, +@@ -506,7 +506,7 @@ static int i7300_idle_notifier(struct no } } end: @@ -58,7 +58,7 @@ index c976285..5537d7c 100644 return 0; } -@@ -554,7 +554,7 @@ struct debugfs_file_info { +@@ -548,7 +548,7 @@ struct debugfs_file_info { static int __init i7300_idle_init(void) { @@ -67,6 +67,3 @@ index c976285..5537d7c 100644 total_us = 0; if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload)) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0120-ipc-Make-the-ipc-code-rt-aware.patch b/debian/patches/features/all/rt/ipc-make-rt-aware.patch similarity index 71% rename from debian/patches/features/all/rt/0120-ipc-Make-the-ipc-code-rt-aware.patch rename to debian/patches/features/all/rt/ipc-make-rt-aware.patch index 50a2b99b8..2a4736be8 100644 --- a/debian/patches/features/all/rt/0120-ipc-Make-the-ipc-code-rt-aware.patch +++ b/debian/patches/features/all/rt/ipc-make-rt-aware.patch @@ -1,7 +1,6 @@ -From 378334b7268973bf4c06bdc47df4d640bb1185cc Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:12 -0500 -Subject: [PATCH 120/267] ipc: Make the ipc code -rt aware +Subject: ipc: Make the ipc code -rt aware RT serializes the code with the (rt)spinlock but keeps preemption enabled. Some parts of the code need to be atomic nevertheless. @@ -10,16 +9,17 @@ Protect it with preempt_disable/enable_rt pairts. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- ipc/mqueue.c | 5 +++++ ipc/msg.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) -diff --git a/ipc/mqueue.c b/ipc/mqueue.c -index 5b4293d..2d06b54 100644 ---- a/ipc/mqueue.c -+++ b/ipc/mqueue.c -@@ -820,12 +820,17 @@ static inline void pipelined_send(struct mqueue_inode_info *info, +Index: linux-3.4/ipc/mqueue.c +=================================================================== +--- linux-3.4.orig/ipc/mqueue.c ++++ linux-3.4/ipc/mqueue.c +@@ -813,12 +813,17 @@ static inline void pipelined_send(struct struct msg_msg *message, struct ext_wait_queue *receiver) { @@ -37,11 +37,11 @@ index 5b4293d..2d06b54 100644 } /* pipelined_receive() - if there is task waiting in sys_mq_timedsend() -diff --git a/ipc/msg.c b/ipc/msg.c -index 7385de2..06642ac 100644 ---- a/ipc/msg.c -+++ b/ipc/msg.c -@@ -259,12 +259,20 @@ static void expunge_all(struct msg_queue *msq, int res) +Index: linux-3.4/ipc/msg.c +=================================================================== +--- linux-3.4.orig/ipc/msg.c ++++ linux-3.4/ipc/msg.c +@@ -259,12 +259,20 @@ static void expunge_all(struct msg_queue while (tmp != &msq->q_receivers) { struct msg_receiver *msr; @@ -62,7 +62,7 @@ index 7385de2..06642ac 100644 } } -@@ -611,6 +619,12 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) +@@ -611,6 +619,12 @@ static inline int pipelined_send(struct !security_msg_queue_msgrcv(msq, msg, msr->r_tsk, msr->r_msgtype, msr->r_mode)) { @@ -75,7 +75,7 @@ index 7385de2..06642ac 100644 list_del(&msr->r_list); if (msr->r_maxsize < msg->m_ts) { msr->r_msg = NULL; -@@ -624,9 +638,11 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg) +@@ -624,9 +638,11 @@ static inline int pipelined_send(struct wake_up_process(msr->r_tsk); smp_mb(); msr->r_msg = msg; @@ -87,6 +87,3 @@ index 7385de2..06642ac 100644 } } return 0; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0121-ipc-mqueue-Add-a-critical-section-to-avoid-a-deadloc.patch b/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch similarity index 84% rename from debian/patches/features/all/rt/0121-ipc-mqueue-Add-a-critical-section-to-avoid-a-deadloc.patch rename to debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch index 235dee412..96d7b3662 100644 --- a/debian/patches/features/all/rt/0121-ipc-mqueue-Add-a-critical-section-to-avoid-a-deadloc.patch +++ b/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch @@ -1,8 +1,6 @@ -From f2eccdab1889ef7f58daa7e374866d437a78c761 Mon Sep 17 00:00:00 2001 +Subject: ipc/mqueue: Add a critical section to avoid a deadlock From: KOBAYASHI Yoshitake Date: Sat, 23 Jul 2011 11:57:36 +0900 -Subject: [PATCH 121/267] ipc/mqueue: Add a critical section to avoid a - deadlock (Repost for v3.0-rt1 and changed the distination addreses) I have tested the following patch on v3.0-rt1 with PREEMPT_RT_FULL. @@ -23,6 +21,7 @@ Description of the problem *. receiver will never wake up and cannot change sender's state to STATE_READY because sender has higher priority + Signed-off-by: Yoshitake Kobayashi Cc: viro@zeniv.linux.org.uk Cc: dchinner@redhat.com @@ -35,11 +34,11 @@ Signed-off-by: Thomas Gleixner ipc/mqueue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -diff --git a/ipc/mqueue.c b/ipc/mqueue.c -index 2d06b54..eec1d99 100644 ---- a/ipc/mqueue.c -+++ b/ipc/mqueue.c -@@ -844,15 +844,19 @@ static inline void pipelined_receive(struct mqueue_inode_info *info) +Index: linux-3.4/ipc/mqueue.c +=================================================================== +--- linux-3.4.orig/ipc/mqueue.c ++++ linux-3.4/ipc/mqueue.c +@@ -837,15 +837,19 @@ static inline void pipelined_receive(str wake_up_interruptible(&info->wait_q); return; } @@ -61,6 +60,3 @@ index 2d06b54..eec1d99 100644 size_t, msg_len, unsigned int, msg_prio, const struct timespec __user *, u_abs_timeout) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0246-ipc-sem-Rework-semaphore-wakeups.patch b/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch similarity index 74% rename from debian/patches/features/all/rt/0246-ipc-sem-Rework-semaphore-wakeups.patch rename to debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch index 4ffd210c0..09849452d 100644 --- a/debian/patches/features/all/rt/0246-ipc-sem-Rework-semaphore-wakeups.patch +++ b/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch @@ -1,7 +1,10 @@ -From 80ce0fb657b9f51f428417cb7e955d69235fa708 Mon Sep 17 00:00:00 2001 +Subject: ipc/sem: Rework semaphore wakeups +From: Peter Zijlstra +Date: Wed, 14 Sep 2011 11:57:04 +0200 + +Subject: ipc/sem: Rework semaphore wakeups From: Peter Zijlstra -Date: Tue, 13 Sep 2011 15:09:40 +0200 -Subject: [PATCH 246/267] ipc/sem: Rework semaphore wakeups +Date: Tue Sep 13 15:09:40 CEST 2011 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 @@ -28,10 +31,10 @@ Signed-off-by: Thomas Gleixner ipc/sem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -diff --git a/ipc/sem.c b/ipc/sem.c -index 5215a81..5eaf684 100644 ---- a/ipc/sem.c -+++ b/ipc/sem.c +Index: linux-3.4/ipc/sem.c +=================================================================== +--- linux-3.4.orig/ipc/sem.c ++++ linux-3.4/ipc/sem.c @@ -461,6 +461,13 @@ undo: static void wake_up_sem_queue_prepare(struct list_head *pt, struct sem_queue *q, int error) @@ -46,7 +49,7 @@ index 5215a81..5eaf684 100644 if (list_empty(pt)) { /* * Hold preempt off so that we don't get preempted and have the -@@ -472,6 +479,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt, +@@ -472,6 +479,7 @@ static void wake_up_sem_queue_prepare(st q->pid = error; list_add_tail(&q->simple_list, pt); @@ -54,7 +57,7 @@ index 5215a81..5eaf684 100644 } /** -@@ -485,6 +493,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt, +@@ -485,6 +493,7 @@ static void wake_up_sem_queue_prepare(st */ static void wake_up_sem_queue_do(struct list_head *pt) { @@ -62,7 +65,7 @@ index 5215a81..5eaf684 100644 struct sem_queue *q, *t; int did_something; -@@ -497,6 +506,7 @@ static void wake_up_sem_queue_do(struct list_head *pt) +@@ -497,6 +506,7 @@ static void wake_up_sem_queue_do(struct } if (did_something) preempt_enable(); @@ -70,6 +73,3 @@ index 5215a81..5eaf684 100644 } static void unlink_queue(struct sem_array *sma, struct sem_queue *q) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0188-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch b/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch similarity index 73% rename from debian/patches/features/all/rt/0188-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch rename to debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch index 07de292ea..2d1919832 100644 --- a/debian/patches/features/all/rt/0188-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch +++ b/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch @@ -1,8 +1,6 @@ -From 921c2222f2e604f5e5ac0953d21b0db3d92b1eae Mon Sep 17 00:00:00 2001 +Subject: genirq: Allow disabling of softirq processing in irq thread context From: Thomas Gleixner Date: Tue, 31 Jan 2012 13:01:27 +0100 -Subject: [PATCH 188/267] genirq: Allow disabling of softirq processing in irq - thread context 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 @@ -20,11 +18,11 @@ Cc: stable-rt@vger.kernel.org kernel/softirq.c | 7 +++++++ 5 files changed, 37 insertions(+), 2 deletions(-) -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index bb4b441..f70a65b 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -61,6 +61,7 @@ +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -59,6 +59,7 @@ * IRQF_NO_THREAD - Interrupt cannot be threaded * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device * resume time. @@ -32,7 +30,7 @@ index bb4b441..f70a65b 100644 */ #define IRQF_DISABLED 0x00000020 #define IRQF_SAMPLE_RANDOM 0x00000040 -@@ -75,6 +76,7 @@ +@@ -73,6 +74,7 @@ #define IRQF_FORCE_RESUME 0x00008000 #define IRQF_NO_THREAD 0x00010000 #define IRQF_EARLY_RESUME 0x00020000 @@ -40,11 +38,11 @@ index bb4b441..f70a65b 100644 #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) -diff --git a/include/linux/irq.h b/include/linux/irq.h -index bff29c5..3838b53 100644 ---- a/include/linux/irq.h -+++ b/include/linux/irq.h -@@ -67,6 +67,7 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); +Index: linux-3.4/include/linux/irq.h +=================================================================== +--- linux-3.4.orig/include/linux/irq.h ++++ linux-3.4/include/linux/irq.h +@@ -73,6 +73,7 @@ typedef void (*irq_preflow_handler_t)(st * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context * IRQ_NESTED_TRHEAD - Interrupt nests into another thread * IRQ_PER_CPU_DEVID - Dev_id is a per-cpu variable @@ -52,7 +50,7 @@ index bff29c5..3838b53 100644 */ enum { IRQ_TYPE_NONE = 0x00000000, -@@ -90,12 +91,14 @@ enum { +@@ -97,12 +98,14 @@ enum { IRQ_NESTED_THREAD = (1 << 15), IRQ_NOTHREAD = (1 << 16), IRQ_PER_CPU_DEVID = (1 << 17), @@ -68,14 +66,14 @@ index bff29c5..3838b53 100644 #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) -diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c -index b3e6228..87dc053 100644 ---- a/kernel/irq/manage.c -+++ b/kernel/irq/manage.c -@@ -742,7 +742,15 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) +Index: linux-3.4/kernel/irq/manage.c +=================================================================== +--- linux-3.4.orig/kernel/irq/manage.c ++++ linux-3.4/kernel/irq/manage.c +@@ -749,7 +749,15 @@ irq_forced_thread_fn(struct irq_desc *de local_bh_disable(); ret = action->thread_fn(action->irq, action->dev_id); - irq_finalize_oneshot(desc, action, false); + irq_finalize_oneshot(desc, action); - local_bh_enable(); + /* + * Interrupts which have real time requirements can be set up @@ -89,7 +87,7 @@ index b3e6228..87dc053 100644 return ret; } -@@ -1072,6 +1080,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) +@@ -1071,6 +1079,9 @@ __setup_irq(unsigned int irq, struct irq irqd_set(&desc->irq_data, IRQD_NO_BALANCING); } @@ -99,10 +97,10 @@ index b3e6228..87dc053 100644 /* Set default affinity mask once everything is setup */ setup_affinity(irq, desc, mask); -diff --git a/kernel/irq/settings.h b/kernel/irq/settings.h -index 1162f10..0d2c381 100644 ---- a/kernel/irq/settings.h -+++ b/kernel/irq/settings.h +Index: linux-3.4/kernel/irq/settings.h +=================================================================== +--- linux-3.4.orig/kernel/irq/settings.h ++++ linux-3.4/kernel/irq/settings.h @@ -14,6 +14,7 @@ enum { _IRQ_NO_BALANCING = IRQ_NO_BALANCING, _IRQ_NESTED_THREAD = IRQ_NESTED_THREAD, @@ -119,7 +117,7 @@ index 1162f10..0d2c381 100644 #undef IRQF_MODIFY_MASK #define IRQF_MODIFY_MASK GOT_YOU_MORON -@@ -36,6 +38,16 @@ irq_settings_clr_and_set(struct irq_desc *desc, u32 clr, u32 set) +@@ -36,6 +38,16 @@ irq_settings_clr_and_set(struct irq_desc desc->status_use_accessors |= (set & _IRQF_MODIFY_MASK); } @@ -136,11 +134,11 @@ index 1162f10..0d2c381 100644 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 92b4ca3..bef08f3 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -425,6 +425,13 @@ void local_bh_enable_ip(unsigned long ip) +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c +@@ -425,6 +425,13 @@ void local_bh_enable_ip(unsigned long ip } EXPORT_SYMBOL(local_bh_enable_ip); @@ -154,6 +152,3 @@ index 92b4ca3..bef08f3 100644 /* For tracing */ int notrace __in_softirq(void) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/jump-label-rt.patch b/debian/patches/features/all/rt/jump-label-rt.patch new file mode 100644 index 000000000..f141dc1aa --- /dev/null +++ b/debian/patches/features/all/rt/jump-label-rt.patch @@ -0,0 +1,23 @@ +Subject: jump-label-rt.patch +From: Thomas Gleixner +Date: Wed, 13 Jul 2011 11:03:16 +0200 + +Signed-off-by: Thomas Gleixner +--- + include/linux/jump_label.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: linux-3.4/include/linux/jump_label.h +=================================================================== +--- linux-3.4.orig/include/linux/jump_label.h ++++ linux-3.4/include/linux/jump_label.h +@@ -51,7 +51,8 @@ + #include + #include + +-#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) ++#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) && \ ++ !defined(CONFIG_PREEMPT_BASE) + + struct static_key { + atomic_t enabled; diff --git a/debian/patches/features/all/rt/0264-kconfig-disable-a-few-options-rt.patch.patch b/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch similarity index 61% rename from debian/patches/features/all/rt/0264-kconfig-disable-a-few-options-rt.patch.patch rename to debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch index 1e38376e5..44ebc868d 100644 --- a/debian/patches/features/all/rt/0264-kconfig-disable-a-few-options-rt.patch.patch +++ b/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch @@ -1,7 +1,6 @@ -From fd921ea52d724779a8ce5f6d7e1941090a3f6694 Mon Sep 17 00:00:00 2001 +Subject: kconfig-disable-a-few-options-rt.patch From: Thomas Gleixner Date: Sun, 24 Jul 2011 12:11:43 +0200 -Subject: [PATCH 264/267] kconfig-disable-a-few-options-rt.patch Disable stuff which is known to have issues on RT @@ -12,10 +11,10 @@ Signed-off-by: Thomas Gleixner mm/Kconfig | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) -diff --git a/arch/Kconfig b/arch/Kconfig -index 4b0669c..73fc7cd 100644 ---- a/arch/Kconfig -+++ b/arch/Kconfig +Index: linux-3.4/arch/Kconfig +=================================================================== +--- linux-3.4.orig/arch/Kconfig ++++ linux-3.4/arch/Kconfig @@ -6,6 +6,7 @@ config OPROFILE tristate "OProfile system profiling" depends on PROFILING @@ -24,11 +23,11 @@ index 4b0669c..73fc7cd 100644 select RING_BUFFER select RING_BUFFER_ALLOW_SWAP help -diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig -index 654a5e9..0f5149d 100644 ---- a/drivers/net/Kconfig -+++ b/drivers/net/Kconfig -@@ -154,6 +154,7 @@ config MACVTAP +Index: linux-3.4/drivers/net/Kconfig +=================================================================== +--- linux-3.4.orig/drivers/net/Kconfig ++++ linux-3.4/drivers/net/Kconfig +@@ -156,6 +156,7 @@ config MACVTAP config NETCONSOLE tristate "Network console logging support" @@ -36,11 +35,11 @@ index 654a5e9..0f5149d 100644 ---help--- If you want to log kernel messages over the network, enable this. See for details. -diff --git a/mm/Kconfig b/mm/Kconfig -index 011b110..0526445 100644 ---- a/mm/Kconfig -+++ b/mm/Kconfig -@@ -307,7 +307,7 @@ config NOMMU_INITIAL_TRIM_EXCESS +Index: linux-3.4/mm/Kconfig +=================================================================== +--- linux-3.4.orig/mm/Kconfig ++++ linux-3.4/mm/Kconfig +@@ -313,7 +313,7 @@ config NOMMU_INITIAL_TRIM_EXCESS config TRANSPARENT_HUGEPAGE bool "Transparent Hugepage Support" @@ -49,6 +48,3 @@ index 011b110..0526445 100644 select COMPACTION help Transparent Hugepages allows the kernel to use huge pages and --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0265-kconfig-preempt-rt-full.patch.patch b/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch similarity index 69% rename from debian/patches/features/all/rt/0265-kconfig-preempt-rt-full.patch.patch rename to debian/patches/features/all/rt/kconfig-preempt-rt-full.patch index 693edf7a9..cb75d7de4 100644 --- a/debian/patches/features/all/rt/0265-kconfig-preempt-rt-full.patch.patch +++ b/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch @@ -1,7 +1,6 @@ -From 8305d95e93afe96c3b198b6381433f360fcdccfa Mon Sep 17 00:00:00 2001 +Subject: kconfig-preempt-rt-full.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 14:58:57 +0200 -Subject: [PATCH 265/267] kconfig-preempt-rt-full.patch Signed-off-by: Thomas Gleixner --- @@ -10,21 +9,21 @@ Signed-off-by: Thomas Gleixner scripts/mkcompile_h | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) -diff --git a/init/Makefile b/init/Makefile -index 0bf677a..6b473cd 100644 ---- a/init/Makefile -+++ b/init/Makefile +Index: linux-3.4/init/Makefile +=================================================================== +--- linux-3.4.orig/init/Makefile ++++ linux-3.4/init/Makefile @@ -29,4 +29,4 @@ silent_chk_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 35c6f20..d0e9372 100644 ---- a/kernel/Kconfig.preempt -+++ b/kernel/Kconfig.preempt -@@ -66,6 +66,13 @@ config PREEMPT_RTB +Index: linux-3.4/kernel/Kconfig.preempt +=================================================================== +--- linux-3.4.orig/kernel/Kconfig.preempt ++++ linux-3.4/kernel/Kconfig.preempt +@@ -67,6 +67,13 @@ config PREEMPT_RTB enables changes which are preliminary for the full preemptiple RT kernel. @@ -38,10 +37,10 @@ index 35c6f20..d0e9372 100644 endchoice config PREEMPT_COUNT -diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h -index f221ddf..5f44009 100755 ---- a/scripts/mkcompile_h -+++ b/scripts/mkcompile_h +Index: linux-3.4/scripts/mkcompile_h +=================================================================== +--- linux-3.4.orig/scripts/mkcompile_h ++++ linux-3.4/scripts/mkcompile_h @@ -4,7 +4,8 @@ TARGET=$1 ARCH=$2 SMP=$3 @@ -60,6 +59,3 @@ index f221ddf..5f44009 100755 UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" # Truncate to maximum length --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0243-kgdb-serial-Short-term-workaround.patch b/debian/patches/features/all/rt/kgb-serial-hackaround.patch similarity index 55% rename from debian/patches/features/all/rt/0243-kgdb-serial-Short-term-workaround.patch rename to debian/patches/features/all/rt/kgb-serial-hackaround.patch index 960c2af36..c2d58678a 100644 --- a/debian/patches/features/all/rt/0243-kgdb-serial-Short-term-workaround.patch +++ b/debian/patches/features/all/rt/kgb-serial-hackaround.patch @@ -1,7 +1,6 @@ -From 888b45eebcdd0027b04d6d90da56c7cb9686010b Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Thu, 28 Jul 2011 12:42:23 -0500 -Subject: [PATCH 243/267] kgdb/serial: Short term workaround +Subject: kgdb/serial: Short term workaround On 07/27/2011 04:37 PM, Thomas Gleixner wrote: > - KGDB (not yet disabled) is reportedly unusable on -rt right now due @@ -17,48 +16,39 @@ change separation between the console and the HW to have a polled mode Thanks, Jason. ---- - drivers/tty/serial/8250.c | 13 +++++++++---- - include/linux/kdb.h | 2 ++ - kernel/debug/kdb/kdb_io.c | 6 ++---- - 3 files changed, 13 insertions(+), 8 deletions(-) -diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c -index 3bf482c..0596a35 100644 ---- a/drivers/tty/serial/8250.c -+++ b/drivers/tty/serial/8250.c +--- + drivers/tty/serial/8250/8250.c | 3 ++- + include/linux/kdb.h | 2 ++ + kernel/debug/kdb/kdb_io.c | 6 ++---- + 3 files changed, 6 insertions(+), 5 deletions(-) + +Index: linux-3.4/drivers/tty/serial/8250/8250.c +=================================================================== +--- linux-3.4.orig/drivers/tty/serial/8250/8250.c ++++ linux-3.4/drivers/tty/serial/8250/8250.c @@ -38,6 +38,7 @@ #include #include #include +#include - - #include - #include -@@ -2855,10 +2856,14 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) + #ifdef CONFIG_SPARC + #include + #endif +@@ -2816,7 +2817,7 @@ serial8250_console_write(struct console touch_nmi_watchdog(); -- if (up->port.sysrq || oops_in_progress) -- locked = spin_trylock_irqsave(&up->port.lock, flags); -- else -- spin_lock_irqsave(&up->port.lock, flags); -+ if (unlikely(in_kdb_printk())) { -+ locked = 0; -+ } else { -+ if (up->port.sysrq || oops_in_progress) -+ locked = spin_trylock_irqsave(&up->port.lock, flags); -+ else -+ spin_lock_irqsave(&up->port.lock, flags); -+ } - - /* - * First save the IER then disable the interrupts -diff --git a/include/linux/kdb.h b/include/linux/kdb.h -index 0647258..0d1ebfc 100644 ---- a/include/linux/kdb.h -+++ b/include/linux/kdb.h -@@ -150,12 +150,14 @@ extern int kdb_register(char *, kdb_func_t, char *, char *, short); +- if (port->sysrq || oops_in_progress) ++ if (port->sysrq || oops_in_progress || in_kdb_printk()) + locked = spin_trylock_irqsave(&port->lock, flags); + else + spin_lock_irqsave(&port->lock, flags); +Index: linux-3.4/include/linux/kdb.h +=================================================================== +--- linux-3.4.orig/include/linux/kdb.h ++++ linux-3.4/include/linux/kdb.h +@@ -150,12 +150,14 @@ extern int kdb_register(char *, kdb_func extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, short, kdb_repeat_t); extern int kdb_unregister(char *); @@ -73,11 +63,11 @@ index 0647258..0d1ebfc 100644 #endif /* CONFIG_KGDB_KDB */ enum { KDB_NOT_INITIALIZED, -diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c -index 4802eb5..5b7455f 100644 ---- a/kernel/debug/kdb/kdb_io.c -+++ b/kernel/debug/kdb/kdb_io.c -@@ -553,7 +553,6 @@ int vkdb_printf(const char *fmt, va_list ap) +Index: linux-3.4/kernel/debug/kdb/kdb_io.c +=================================================================== +--- linux-3.4.orig/kernel/debug/kdb/kdb_io.c ++++ linux-3.4/kernel/debug/kdb/kdb_io.c +@@ -553,7 +553,6 @@ int vkdb_printf(const char *fmt, va_list int diag; int linecount; int logging, saved_loglevel = 0; @@ -85,7 +75,7 @@ index 4802eb5..5b7455f 100644 int got_printf_lock = 0; int retlen = 0; int fnd, len; -@@ -564,8 +563,6 @@ int vkdb_printf(const char *fmt, va_list ap) +@@ -564,8 +563,6 @@ int vkdb_printf(const char *fmt, va_list unsigned long uninitialized_var(flags); preempt_disable(); @@ -114,6 +104,3 @@ index 4802eb5..5b7455f 100644 return r; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0070-latency-hist.patch.patch b/debian/patches/features/all/rt/latency-hist.patch similarity index 95% rename from debian/patches/features/all/rt/0070-latency-hist.patch.patch rename to debian/patches/features/all/rt/latency-hist.patch index ae37e5990..61f2b9074 100644 --- a/debian/patches/features/all/rt/0070-latency-hist.patch.patch +++ b/debian/patches/features/all/rt/latency-hist.patch @@ -1,7 +1,6 @@ -From e14a7c82d8bd43fbda64e57a9cae2a4fff5cb7fb Mon Sep 17 00:00:00 2001 +Subject: latency-hist.patch From: Carsten Emde Date: Tue, 19 Jul 2011 14:03:41 +0100 -Subject: [PATCH 070/267] latency-hist.patch This patch provides a recording mechanism to store data of potential sources of system latencies. The recordings separately determine the @@ -12,27 +11,23 @@ filesystem. For details please consult Documentation/trace/histograms.txt. Signed-off-by: Carsten Emde Signed-off-by: Thomas Gleixner ---- - Documentation/trace/histograms.txt | 186 ++++++ - include/linux/sched.h | 6 + - include/trace/events/hist.h | 69 +++ - include/trace/events/latency_hist.h | 30 + - kernel/hrtimer.c | 11 + - kernel/trace/Kconfig | 104 ++++ - kernel/trace/Makefile | 4 + - kernel/trace/latency_hist.c | 1170 +++++++++++++++++++++++++++++++++++ - kernel/trace/trace_irqsoff.c | 11 + - 9 files changed, 1591 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 0000000..6f2aeab +--- + Documentation/trace/histograms.txt | 186 +++++ + include/linux/sched.h | 6 + include/trace/events/hist.h | 69 ++ + include/trace/events/latency_hist.h | 30 + kernel/hrtimer.c | 11 + kernel/trace/Kconfig | 104 +++ + kernel/trace/Makefile | 4 + kernel/trace/latency_hist.c | 1170 ++++++++++++++++++++++++++++++++++++ + kernel/trace/trace_irqsoff.c | 11 + 9 files changed, 1591 insertions(+) + +Index: linux-3.4/Documentation/trace/histograms.txt +=================================================================== --- /dev/null -+++ b/Documentation/trace/histograms.txt ++++ linux-3.4/Documentation/trace/histograms.txt @@ -0,0 +1,186 @@ + Using the Linux Kernel Latency Histograms + @@ -220,11 +215,11 @@ index 0000000..6f2aeab +is provided. + +These data are also reset when the wakeup histogram is reset. -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 8cb4365..30ac0b5 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1570,6 +1570,12 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1614,6 +1614,12 @@ struct task_struct { unsigned long trace; /* bitmask and counter of trace recursion */ unsigned long trace_recursion; @@ -237,11 +232,10 @@ index 8cb4365..30ac0b5 100644 #endif /* CONFIG_TRACING */ #ifdef CONFIG_CGROUP_MEM_RES_CTLR /* memcg uses this to do batch job */ struct memcg_batch_info { -diff --git a/include/trace/events/hist.h b/include/trace/events/hist.h -new file mode 100644 -index 0000000..28646db +Index: linux-3.4/include/trace/events/hist.h +=================================================================== --- /dev/null -+++ b/include/trace/events/hist.h ++++ linux-3.4/include/trace/events/hist.h @@ -0,0 +1,69 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hist @@ -312,11 +306,10 @@ index 0000000..28646db + +/* This part must be outside protection */ +#include -diff --git a/include/trace/events/latency_hist.h b/include/trace/events/latency_hist.h -new file mode 100644 -index 0000000..d6b5d77 +Index: linux-3.4/include/trace/events/latency_hist.h +=================================================================== --- /dev/null -+++ b/include/trace/events/latency_hist.h ++++ linux-3.4/include/trace/events/latency_hist.h @@ -0,0 +1,30 @@ +#ifndef _LATENCY_HIST_H +#define _LATENCY_HIST_H @@ -348,10 +341,10 @@ index 0000000..d6b5d77 + +#endif /* _LATENCY_HIST_H */ + -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index ae34bf5..1a3695e 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c @@ -49,6 +49,7 @@ #include @@ -360,7 +353,7 @@ index ae34bf5..1a3695e 100644 /* * The timer bases: -@@ -1236,6 +1237,8 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) +@@ -1236,6 +1237,8 @@ static void __run_hrtimer(struct hrtimer #ifdef CONFIG_HIGH_RES_TIMERS @@ -384,10 +377,10 @@ index ae34bf5..1a3695e 100644 /* * 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 cd31345..2685322 100644 ---- a/kernel/trace/Kconfig -+++ b/kernel/trace/Kconfig +Index: linux-3.4/kernel/trace/Kconfig +=================================================================== +--- linux-3.4.orig/kernel/trace/Kconfig ++++ linux-3.4/kernel/trace/Kconfig @@ -192,6 +192,24 @@ config IRQSOFF_TRACER enabled. This option and the preempt-off timing option can be used together or separately.) @@ -513,11 +506,11 @@ index cd31345..2685322 100644 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 5f39a07..108a387 100644 ---- a/kernel/trace/Makefile -+++ b/kernel/trace/Makefile -@@ -36,6 +36,10 @@ obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o +Index: linux-3.4/kernel/trace/Makefile +=================================================================== +--- linux-3.4.orig/kernel/trace/Makefile ++++ linux-3.4/kernel/trace/Makefile +@@ -36,6 +36,10 @@ obj-$(CONFIG_FUNCTION_TRACER) += trace_f obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o obj-$(CONFIG_SCHED_TRACER) += trace_sched_wakeup.o @@ -528,11 +521,10 @@ index 5f39a07..108a387 100644 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 0000000..9d49fcb +Index: linux-3.4/kernel/trace/latency_hist.c +=================================================================== --- /dev/null -+++ b/kernel/trace/latency_hist.c ++++ linux-3.4/kernel/trace/latency_hist.c @@ -0,0 +1,1170 @@ +/* + * kernel/trace/latency_hist.c @@ -1704,10 +1696,10 @@ index 0000000..9d49fcb +} + +__initcall(latency_hist_init); -diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c -index 20dad0d..1e6c33e 100644 ---- a/kernel/trace/trace_irqsoff.c -+++ b/kernel/trace/trace_irqsoff.c +Index: linux-3.4/kernel/trace/trace_irqsoff.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace_irqsoff.c ++++ linux-3.4/kernel/trace/trace_irqsoff.c @@ -17,6 +17,7 @@ #include @@ -1716,7 +1708,7 @@ index 20dad0d..1e6c33e 100644 static struct trace_array *irqsoff_trace __read_mostly; static int tracer_enabled __read_mostly; -@@ -426,11 +427,13 @@ void start_critical_timings(void) +@@ -437,11 +438,13 @@ void start_critical_timings(void) { if (preempt_trace() || irq_trace()) start_critical_timing(CALLER_ADDR0, CALLER_ADDR1); @@ -1730,7 +1722,7 @@ index 20dad0d..1e6c33e 100644 if (preempt_trace() || irq_trace()) stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1); } -@@ -440,6 +443,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings); +@@ -451,6 +454,7 @@ EXPORT_SYMBOL_GPL(stop_critical_timings) #ifdef CONFIG_PROVE_LOCKING void time_hardirqs_on(unsigned long a0, unsigned long a1) { @@ -1738,7 +1730,7 @@ index 20dad0d..1e6c33e 100644 if (!preempt_trace() && irq_trace()) stop_critical_timing(a0, a1); } -@@ -448,6 +452,7 @@ void time_hardirqs_off(unsigned long a0, unsigned long a1) +@@ -459,6 +463,7 @@ void time_hardirqs_off(unsigned long a0, { if (!preempt_trace() && irq_trace()) start_critical_timing(a0, a1); @@ -1746,7 +1738,7 @@ index 20dad0d..1e6c33e 100644 } #else /* !CONFIG_PROVE_LOCKING */ -@@ -473,6 +478,7 @@ inline void print_irqtrace_events(struct task_struct *curr) +@@ -484,6 +489,7 @@ inline void print_irqtrace_events(struct */ void trace_hardirqs_on(void) { @@ -1754,7 +1746,7 @@ index 20dad0d..1e6c33e 100644 if (!preempt_trace() && irq_trace()) stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1); } -@@ -482,11 +488,13 @@ void trace_hardirqs_off(void) +@@ -493,11 +499,13 @@ void trace_hardirqs_off(void) { if (!preempt_trace() && irq_trace()) start_critical_timing(CALLER_ADDR0, CALLER_ADDR1); @@ -1768,7 +1760,7 @@ index 20dad0d..1e6c33e 100644 if (!preempt_trace() && irq_trace()) stop_critical_timing(CALLER_ADDR0, caller_addr); } -@@ -496,6 +504,7 @@ void trace_hardirqs_off_caller(unsigned long caller_addr) +@@ -507,6 +515,7 @@ void trace_hardirqs_off_caller(unsigned { if (!preempt_trace() && irq_trace()) start_critical_timing(CALLER_ADDR0, caller_addr); @@ -1776,7 +1768,7 @@ index 20dad0d..1e6c33e 100644 } EXPORT_SYMBOL(trace_hardirqs_off_caller); -@@ -505,12 +514,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller); +@@ -516,12 +525,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller) #ifdef CONFIG_PREEMPT_TRACER void trace_preempt_on(unsigned long a0, unsigned long a1) { @@ -1791,6 +1783,3 @@ index 20dad0d..1e6c33e 100644 if (preempt_trace() && !irq_trace()) start_critical_timing(a0, a1); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0210-lglocks-rt.patch.patch b/debian/patches/features/all/rt/lglocks-rt.patch similarity index 92% rename from debian/patches/features/all/rt/0210-lglocks-rt.patch.patch rename to debian/patches/features/all/rt/lglocks-rt.patch index 829ca2358..47e23cdc4 100644 --- a/debian/patches/features/all/rt/0210-lglocks-rt.patch.patch +++ b/debian/patches/features/all/rt/lglocks-rt.patch @@ -1,17 +1,16 @@ -From 679164e5bf04233a02450afb26640259b300763d Mon Sep 17 00:00:00 2001 +Subject: lglocks-rt.patch From: Thomas Gleixner Date: Wed, 15 Jun 2011 11:02:21 +0200 -Subject: [PATCH 210/267] lglocks-rt.patch Signed-off-by: Thomas Gleixner --- - include/linux/lglock.h | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ + include/linux/lglock.h | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) -diff --git a/include/linux/lglock.h b/include/linux/lglock.h -index 87f402c..52b289f 100644 ---- a/include/linux/lglock.h -+++ b/include/linux/lglock.h +Index: linux-3.4/include/linux/lglock.h +=================================================================== +--- linux-3.4.orig/include/linux/lglock.h ++++ linux-3.4/include/linux/lglock.h @@ -71,6 +71,8 @@ extern void name##_global_lock_online(void); \ extern void name##_global_unlock_online(void); \ @@ -123,6 +122,3 @@ index 87f402c..52b289f 100644 +#endif /* PRREMPT_RT_FULL */ + #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0055-list-add-list-last-entry.patch.patch b/debian/patches/features/all/rt/list-add-list-last-entry.patch similarity index 67% rename from debian/patches/features/all/rt/0055-list-add-list-last-entry.patch.patch rename to debian/patches/features/all/rt/list-add-list-last-entry.patch index 94eaaa88c..a1442d864 100644 --- a/debian/patches/features/all/rt/0055-list-add-list-last-entry.patch.patch +++ b/debian/patches/features/all/rt/list-add-list-last-entry.patch @@ -1,18 +1,17 @@ -From cbf1e12f91e468d580db7a5ecefa0bdab8021cdf Mon Sep 17 00:00:00 2001 +Subject: list-add-list-last-entry.patch From: Peter Zijlstra Date: Tue, 21 Jun 2011 11:22:36 +0200 -Subject: [PATCH 055/267] list-add-list-last-entry.patch Signed-off-by: Thomas Gleixner --- include/linux/list.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -diff --git a/include/linux/list.h b/include/linux/list.h -index cc6d2aa..7a9851b 100644 ---- a/include/linux/list.h -+++ b/include/linux/list.h -@@ -362,6 +362,17 @@ static inline void list_splice_tail_init(struct list_head *list, +Index: linux-3.4/include/linux/list.h +=================================================================== +--- linux-3.4.orig/include/linux/list.h ++++ linux-3.4/include/linux/list.h +@@ -362,6 +362,17 @@ static inline void list_splice_tail_init list_entry((ptr)->next, type, member) /** @@ -30,6 +29,3 @@ index cc6d2aa..7a9851b 100644 * list_for_each - iterate over a list * @pos: the &struct list_head to use as a loop cursor. * @head: the head for your list. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0078-rt-local_irq_-variants-depending-on-RT-RT.patch b/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch similarity index 73% rename from debian/patches/features/all/rt/0078-rt-local_irq_-variants-depending-on-RT-RT.patch rename to debian/patches/features/all/rt/local-irq-rt-depending-variants.patch index 2ffd82674..96c8fb7c5 100644 --- a/debian/patches/features/all/rt/0078-rt-local_irq_-variants-depending-on-RT-RT.patch +++ b/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch @@ -1,23 +1,23 @@ -From 7ff90eac6ba7e1e5fefaf931f42ec83ed6534a7c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 21 Jul 2009 22:34:14 +0200 -Subject: [PATCH 078/267] rt: local_irq_* variants depending on RT/!RT +Subject: rt: local_irq_* variants depending on RT/!RT 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 + --- 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 21b94de..ddd6b2a 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -219,7 +219,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -217,7 +217,7 @@ extern void devm_free_irq(struct device #ifdef CONFIG_LOCKDEP # define local_irq_enable_in_hardirq() do { } while (0) #else @@ -26,10 +26,10 @@ index 21b94de..ddd6b2a 100644 #endif extern void disable_irq_nosync(unsigned int irq); -diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h -index d176d65..37b13c4 100644 ---- a/include/linux/irqflags.h -+++ b/include/linux/irqflags.h +Index: linux-3.4/include/linux/irqflags.h +=================================================================== +--- linux-3.4.orig/include/linux/irqflags.h ++++ linux-3.4/include/linux/irqflags.h @@ -147,4 +147,23 @@ #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ @@ -54,6 +54,3 @@ index d176d65..37b13c4 100644 +#endif + #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0103-local-var.patch.patch b/debian/patches/features/all/rt/local-var.patch similarity index 67% rename from debian/patches/features/all/rt/0103-local-var.patch.patch rename to debian/patches/features/all/rt/local-var.patch index 884570a27..3ba067b5a 100644 --- a/debian/patches/features/all/rt/0103-local-var.patch.patch +++ b/debian/patches/features/all/rt/local-var.patch @@ -1,17 +1,16 @@ -From 3793609307ab5253ec11f9dce682be647d12f927 Mon Sep 17 00:00:00 2001 +Subject: local-var.patch From: Thomas Gleixner Date: Fri, 24 Jun 2011 18:40:37 +0200 -Subject: [PATCH 103/267] local-var.patch Signed-off-by: Thomas Gleixner --- include/linux/percpu.h | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/include/linux/percpu.h b/include/linux/percpu.h -index 9ca008f..3941ea4 100644 ---- a/include/linux/percpu.h -+++ b/include/linux/percpu.h +Index: linux-3.4/include/linux/percpu.h +=================================================================== +--- linux-3.4.orig/include/linux/percpu.h ++++ linux-3.4/include/linux/percpu.h @@ -48,6 +48,11 @@ preempt_enable(); \ } while (0) @@ -24,6 +23,3 @@ index 9ca008f..3941ea4 100644 /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0189-local-vars-migrate-disable.patch.patch b/debian/patches/features/all/rt/local-vars-migrate-disable.patch similarity index 80% rename from debian/patches/features/all/rt/0189-local-vars-migrate-disable.patch.patch rename to debian/patches/features/all/rt/local-vars-migrate-disable.patch index 5f7a69f49..92c68b80c 100644 --- a/debian/patches/features/all/rt/0189-local-vars-migrate-disable.patch.patch +++ b/debian/patches/features/all/rt/local-vars-migrate-disable.patch @@ -1,17 +1,16 @@ -From 8ec660e9168d77128ee8ed90fb0812b696e77a1f Mon Sep 17 00:00:00 2001 +Subject: local-vars-migrate-disable.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 20:42:16 +0200 -Subject: [PATCH 189/267] local-vars-migrate-disable.patch Signed-off-by: Thomas Gleixner --- include/linux/percpu.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) -diff --git a/include/linux/percpu.h b/include/linux/percpu.h -index 3941ea4..58163cd 100644 ---- a/include/linux/percpu.h -+++ b/include/linux/percpu.h +Index: linux-3.4/include/linux/percpu.h +=================================================================== +--- linux-3.4.orig/include/linux/percpu.h ++++ linux-3.4/include/linux/percpu.h @@ -48,10 +48,30 @@ preempt_enable(); \ } while (0) @@ -47,6 +46,3 @@ index 3941ea4..58163cd 100644 /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/localversion.patch b/debian/patches/features/all/rt/localversion.patch new file mode 100644 index 000000000..c708adacf --- /dev/null +++ b/debian/patches/features/all/rt/localversion.patch @@ -0,0 +1,17 @@ +Subject: localversion.patch +From: Thomas Gleixner +Date: Fri, 08 Jul 2011 20:25:16 +0200 + +Signed-off-by: Thomas Gleixner +Signed-off-by: Peter Zijlstra +Link: http://lkml.kernel.org/n/tip-8vdw4bfcsds27cvox6rpb334@git.kernel.org +--- + localversion-rt | 1 + + 1 file changed, 1 insertion(+) + +Index: linux-3.4/localversion-rt +=================================================================== +--- /dev/null ++++ linux-3.4/localversion-rt +@@ -0,0 +1 @@ ++-rt8 diff --git a/debian/patches/features/all/rt/0179-lockdep-rt.patch.patch b/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch similarity index 75% rename from debian/patches/features/all/rt/0179-lockdep-rt.patch.patch rename to debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch index f209d6be9..b9155a4c4 100644 --- a/debian/patches/features/all/rt/0179-lockdep-rt.patch.patch +++ b/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch @@ -1,7 +1,6 @@ -From 712a75e468585397a31981e506a5525decc70e49 Mon Sep 17 00:00:00 2001 +Subject: lockdep-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 18:51:23 +0200 -Subject: [PATCH 179/267] lockdep-rt.patch Signed-off-by: Thomas Gleixner --- @@ -9,10 +8,10 @@ Signed-off-by: Thomas Gleixner kernel/lockdep.c | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) -diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h -index 37b13c4..a52b35d 100644 ---- a/include/linux/irqflags.h -+++ b/include/linux/irqflags.h +Index: linux-3.4/include/linux/irqflags.h +=================================================================== +--- linux-3.4.orig/include/linux/irqflags.h ++++ linux-3.4/include/linux/irqflags.h @@ -25,8 +25,6 @@ # define trace_softirqs_enabled(p) ((p)->softirqs_enabled) # define trace_hardirq_enter() do { current->hardirq_context++; } while (0) @@ -39,11 +38,11 @@ index 37b13c4..a52b35d 100644 #endif #if defined(CONFIG_IRQSOFF_TRACER) || \ -diff --git a/kernel/lockdep.c b/kernel/lockdep.c -index b2e08c9..334d3c0 100644 ---- a/kernel/lockdep.c -+++ b/kernel/lockdep.c -@@ -3494,6 +3494,7 @@ static void check_flags(unsigned long flags) +Index: linux-3.4/kernel/lockdep.c +=================================================================== +--- linux-3.4.orig/kernel/lockdep.c ++++ linux-3.4/kernel/lockdep.c +@@ -3495,6 +3495,7 @@ static void check_flags(unsigned long fl } } @@ -51,7 +50,7 @@ index b2e08c9..334d3c0 100644 /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -3508,6 +3509,7 @@ static void check_flags(unsigned long flags) +@@ -3509,6 +3510,7 @@ static void check_flags(unsigned long fl DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } @@ -59,6 +58,3 @@ index b2e08c9..334d3c0 100644 if (!debug_locks) print_irqtrace_events(current); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/lockdep-selftest-convert-spinlock-to-raw-spinlock.patch b/debian/patches/features/all/rt/lockdep-selftest-convert-spinlock-to-raw-spinlock.patch new file mode 100644 index 000000000..d721a1793 --- /dev/null +++ b/debian/patches/features/all/rt/lockdep-selftest-convert-spinlock-to-raw-spinlock.patch @@ -0,0 +1,101 @@ +Subject: lockdep: Selftest: convert spinlock to raw spinlock +From: Yong Zhang +Date: Mon, 16 Apr 2012 15:01:55 +0800 + +From: Yong Zhang + +spinlock is sleepable on -rt and can not be used in +interrupt context. + +Signed-off-by: Yong Zhang +Cc: Yong Zhang +Link: http://lkml.kernel.org/r/1334559716-18447-2-git-send-email-yong.zhang0@gmail.com +Signed-off-by: Thomas Gleixner +--- + lib/locking-selftest.c | 34 +++++++++++++++++----------------- + 1 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index 7aae0f2..c3eb261 100644 +--- a/lib/locking-selftest.c ++++ b/lib/locking-selftest.c +@@ -47,10 +47,10 @@ __setup("debug_locks_verbose=", setup_debug_locks_verbose); + * Normal standalone locks, for the circular and irq-context + * dependency tests: + */ +-static DEFINE_SPINLOCK(lock_A); +-static DEFINE_SPINLOCK(lock_B); +-static DEFINE_SPINLOCK(lock_C); +-static DEFINE_SPINLOCK(lock_D); ++static DEFINE_RAW_SPINLOCK(lock_A); ++static DEFINE_RAW_SPINLOCK(lock_B); ++static DEFINE_RAW_SPINLOCK(lock_C); ++static DEFINE_RAW_SPINLOCK(lock_D); + + static DEFINE_RWLOCK(rwlock_A); + static DEFINE_RWLOCK(rwlock_B); +@@ -73,12 +73,12 @@ static DECLARE_RWSEM(rwsem_D); + * but X* and Y* are different classes. We do this so that + * we do not trigger a real lockup: + */ +-static DEFINE_SPINLOCK(lock_X1); +-static DEFINE_SPINLOCK(lock_X2); +-static DEFINE_SPINLOCK(lock_Y1); +-static DEFINE_SPINLOCK(lock_Y2); +-static DEFINE_SPINLOCK(lock_Z1); +-static DEFINE_SPINLOCK(lock_Z2); ++static DEFINE_RAW_SPINLOCK(lock_X1); ++static DEFINE_RAW_SPINLOCK(lock_X2); ++static DEFINE_RAW_SPINLOCK(lock_Y1); ++static DEFINE_RAW_SPINLOCK(lock_Y2); ++static DEFINE_RAW_SPINLOCK(lock_Z1); ++static DEFINE_RAW_SPINLOCK(lock_Z2); + + static DEFINE_RWLOCK(rwlock_X1); + static DEFINE_RWLOCK(rwlock_X2); +@@ -107,10 +107,10 @@ static DECLARE_RWSEM(rwsem_Z2); + */ + #define INIT_CLASS_FUNC(class) \ + static noinline void \ +-init_class_##class(spinlock_t *lock, rwlock_t *rwlock, struct mutex *mutex, \ +- struct rw_semaphore *rwsem) \ ++init_class_##class(raw_spinlock_t *lock, rwlock_t *rwlock, \ ++ struct mutex *mutex, struct rw_semaphore *rwsem)\ + { \ +- spin_lock_init(lock); \ ++ raw_spin_lock_init(lock); \ + rwlock_init(rwlock); \ + mutex_init(mutex); \ + init_rwsem(rwsem); \ +@@ -168,10 +168,10 @@ static void init_shared_classes(void) + * Shortcuts for lock/unlock API variants, to keep + * the testcases compact: + */ +-#define L(x) spin_lock(&lock_##x) +-#define U(x) spin_unlock(&lock_##x) ++#define L(x) raw_spin_lock(&lock_##x) ++#define U(x) raw_spin_unlock(&lock_##x) + #define LU(x) L(x); U(x) +-#define SI(x) spin_lock_init(&lock_##x) ++#define SI(x) raw_spin_lock_init(&lock_##x) + + #define WL(x) write_lock(&rwlock_##x) + #define WU(x) write_unlock(&rwlock_##x) +@@ -911,7 +911,7 @@ GENERATE_PERMUTATIONS_3_EVENTS(irq_read_recursion_soft) + + #define I2(x) \ + do { \ +- spin_lock_init(&lock_##x); \ ++ raw_spin_lock_init(&lock_##x); \ + rwlock_init(&rwlock_##x); \ + mutex_init(&mutex_##x); \ + init_rwsem(&rwsem_##x); \ +-- +1.7.5.4 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + + 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/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch new file mode 100644 index 000000000..3299fdc4b --- /dev/null +++ b/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch @@ -0,0 +1,67 @@ +Subject: lockdep: Selftest: Only do hardirq context test for raw spinlock +From: Yong Zhang +Date: Mon, 16 Apr 2012 15:01:56 +0800 + +From: Yong Zhang + +On -rt there is no softirq context any more and rwlock is sleepable, +disable softirq context test and rwlock+irq test. + +Signed-off-by: Yong Zhang +Cc: Yong Zhang +Link: http://lkml.kernel.org/r/1334559716-18447-3-git-send-email-yong.zhang0@gmail.com +Signed-off-by: Thomas Gleixner +--- + lib/locking-selftest.c | 23 +++++++++++++++++++++++ + 1 files changed, 23 insertions(+), 0 deletions(-) + +diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c +index c3eb261..23b8564 100644 +--- a/lib/locking-selftest.c ++++ b/lib/locking-selftest.c +@@ -1175,6 +1175,7 @@ void locking_selftest(void) + + printk(" --------------------------------------------------------------------------\n"); + ++#ifndef CONFIG_PREEMPT_RT_FULL + /* + * irq-context testcases: + */ +@@ -1187,6 +1188,28 @@ void locking_selftest(void) + + DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion); + // DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2); ++#else ++ /* On -rt, we only do hardirq context test for raw spinlock */ ++ DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 12); ++ DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 21); ++ ++ DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 12); ++ DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 21); ++ ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 123); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 132); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 213); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 231); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 312); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 321); ++ ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 123); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 132); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 213); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 231); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 312); ++ DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 321); ++#endif + + if (unexpected_testcase_failures) { + printk("-----------------------------------------------------------------\n"); +-- +1.7.5.4 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + + diff --git a/debian/patches/features/all/rt/0067-locking-various-init-fixes.patch.patch b/debian/patches/features/all/rt/locking-various-init-fixes.patch similarity index 57% rename from debian/patches/features/all/rt/0067-locking-various-init-fixes.patch.patch rename to debian/patches/features/all/rt/locking-various-init-fixes.patch index bc525b7ff..358eec475 100644 --- a/debian/patches/features/all/rt/0067-locking-various-init-fixes.patch.patch +++ b/debian/patches/features/all/rt/locking-various-init-fixes.patch @@ -1,7 +1,6 @@ -From dc11bfa3d93805ee1ad47b3b449f2ca456b2abd0 Mon Sep 17 00:00:00 2001 +Subject: locking-various-init-fixes.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:25:03 +0200 -Subject: [PATCH 067/267] locking-various-init-fixes.patch Signed-off-by: Thomas Gleixner --- @@ -12,11 +11,11 @@ Signed-off-by: Thomas Gleixner kernel/cred.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -diff --git a/drivers/char/random.c b/drivers/char/random.c -index 786a856..026bdbb 100644 ---- a/drivers/char/random.c -+++ b/drivers/char/random.c -@@ -433,7 +433,7 @@ static struct entropy_store input_pool = { +Index: linux-3.4/drivers/char/random.c +=================================================================== +--- linux-3.4.orig/drivers/char/random.c ++++ linux-3.4/drivers/char/random.c +@@ -433,7 +433,7 @@ static struct entropy_store input_pool = .poolinfo = &poolinfo_table[0], .name = "input", .limit = 1, @@ -25,7 +24,7 @@ index 786a856..026bdbb 100644 .pool = input_pool_data }; -@@ -442,7 +442,7 @@ static struct entropy_store blocking_pool = { +@@ -442,7 +442,7 @@ static struct entropy_store blocking_poo .name = "blocking", .limit = 1, .pull = &input_pool, @@ -34,7 +33,7 @@ index 786a856..026bdbb 100644 .pool = blocking_pool_data }; -@@ -450,7 +450,7 @@ static struct entropy_store nonblocking_pool = { +@@ -450,7 +450,7 @@ static struct entropy_store nonblocking_ .poolinfo = &poolinfo_table[1], .name = "nonblocking", .pull = &input_pool, @@ -43,11 +42,11 @@ index 786a856..026bdbb 100644 .pool = nonblocking_pool_data }; -diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c -index 9a0c397..f526873 100644 ---- a/drivers/usb/gadget/ci13xxx_udc.c -+++ b/drivers/usb/gadget/ci13xxx_udc.c -@@ -819,7 +819,7 @@ static struct { +Index: linux-3.4/drivers/usb/gadget/ci13xxx_udc.c +=================================================================== +--- linux-3.4.orig/drivers/usb/gadget/ci13xxx_udc.c ++++ linux-3.4/drivers/usb/gadget/ci13xxx_udc.c +@@ -834,7 +834,7 @@ static struct { } dbg_data = { .idx = 0, .tty = 0, @@ -56,23 +55,23 @@ index 9a0c397..f526873 100644 }; /** -diff --git a/fs/file.c b/fs/file.c -index 4c6992d..375472d 100644 ---- a/fs/file.c -+++ b/fs/file.c -@@ -422,7 +422,7 @@ struct files_struct init_files = { - .close_on_exec = (fd_set *)&init_files.close_on_exec_init, - .open_fds = (fd_set *)&init_files.open_fds_init, +Index: linux-3.4/fs/file.c +=================================================================== +--- linux-3.4.orig/fs/file.c ++++ linux-3.4/fs/file.c +@@ -421,7 +421,7 @@ struct files_struct init_files = { + .close_on_exec = init_files.close_on_exec_init, + .open_fds = init_files.open_fds_init, }, - .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), + .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock), }; /* -diff --git a/include/linux/idr.h b/include/linux/idr.h -index 255491c..4eaacf0 100644 ---- a/include/linux/idr.h -+++ b/include/linux/idr.h +Index: linux-3.4/include/linux/idr.h +=================================================================== +--- linux-3.4.orig/include/linux/idr.h ++++ linux-3.4/include/linux/idr.h @@ -136,7 +136,7 @@ struct ida { struct ida_bitmap *free_bitmap; }; @@ -82,11 +81,11 @@ index 255491c..4eaacf0 100644 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) int ida_pre_get(struct ida *ida, gfp_t gfp_mask); -diff --git a/kernel/cred.c b/kernel/cred.c -index 48c6fd3..482a0e3 100644 ---- a/kernel/cred.c -+++ b/kernel/cred.c -@@ -35,7 +35,7 @@ static struct kmem_cache *cred_jar; +Index: linux-3.4/kernel/cred.c +=================================================================== +--- linux-3.4.orig/kernel/cred.c ++++ linux-3.4/kernel/cred.c +@@ -36,7 +36,7 @@ static struct kmem_cache *cred_jar; static struct thread_group_cred init_tgcred = { .usage = ATOMIC_INIT(2), .tgid = 0, @@ -95,6 +94,3 @@ index 48c6fd3..482a0e3 100644 }; #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0190-md-raid5-Make-raid5_percpu-handling-RT-aware.patch b/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch similarity index 68% rename from debian/patches/features/all/rt/0190-md-raid5-Make-raid5_percpu-handling-RT-aware.patch rename to debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch index 9378d7734..c1ee398a7 100644 --- a/debian/patches/features/all/rt/0190-md-raid5-Make-raid5_percpu-handling-RT-aware.patch +++ b/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch @@ -1,7 +1,6 @@ -From a925e22d397c9740d9ba558b622b7b4904d19932 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 6 Apr 2010 16:51:31 +0200 -Subject: [PATCH 190/267] md: raid5: Make raid5_percpu handling RT aware +Subject: md: raid5: Make raid5_percpu handling RT aware __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic @@ -13,16 +12,17 @@ preemptible. Reported-by: Udo van den Heuvel Signed-off-by: Thomas Gleixner Tested-by: Udo van den Heuvel + --- drivers/md/raid5.c | 7 +++++-- drivers/md/raid5.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) -diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c -index 858fdbb..c2401e8 100644 ---- a/drivers/md/raid5.c -+++ b/drivers/md/raid5.c -@@ -1245,8 +1245,9 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request) +Index: linux-3.4/drivers/md/raid5.c +=================================================================== +--- linux-3.4.orig/drivers/md/raid5.c ++++ linux-3.4/drivers/md/raid5.c +@@ -1309,8 +1309,9 @@ static void __raid_run_ops(struct stripe struct raid5_percpu *percpu; unsigned long cpu; @@ -33,7 +33,7 @@ index 858fdbb..c2401e8 100644 if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { ops_run_biofill(sh); overlap_clear++; -@@ -1298,7 +1299,8 @@ static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request) +@@ -1362,7 +1363,8 @@ static void __raid_run_ops(struct stripe if (test_and_clear_bit(R5_Overlap, &dev->flags)) wake_up(&sh->raid_conf->wait_for_overlap); } @@ -43,7 +43,7 @@ index 858fdbb..c2401e8 100644 } #ifdef CONFIG_MULTICORE_RAID456 -@@ -4539,6 +4541,7 @@ static int raid5_alloc_percpu(struct r5conf *conf) +@@ -4758,6 +4760,7 @@ static int raid5_alloc_percpu(struct r5c break; } per_cpu_ptr(conf->percpu, cpu)->scribble = scribble; @@ -51,11 +51,11 @@ index 858fdbb..c2401e8 100644 } #ifdef CONFIG_HOTPLUG_CPU conf->cpu_notify.notifier_call = raid456_cpu_notify; -diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h -index e10c553..010a969 100644 ---- a/drivers/md/raid5.h -+++ b/drivers/md/raid5.h -@@ -405,6 +405,7 @@ struct r5conf { +Index: linux-3.4/drivers/md/raid5.h +=================================================================== +--- linux-3.4.orig/drivers/md/raid5.h ++++ linux-3.4/drivers/md/raid5.h +@@ -417,6 +417,7 @@ struct r5conf { int recovery_disabled; /* per cpu variables */ struct raid5_percpu { @@ -63,6 +63,3 @@ index e10c553..010a969 100644 struct page *spare_page; /* Used when checking P/Q in raid6 */ void *scribble; /* space for constructing buffer * lists and performing address --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0166-migrate-disable-rt-variant.patch.patch b/debian/patches/features/all/rt/migrate-disable-rt-variant.patch similarity index 74% rename from debian/patches/features/all/rt/0166-migrate-disable-rt-variant.patch.patch rename to debian/patches/features/all/rt/migrate-disable-rt-variant.patch index 3e9604d86..e27d9c8f5 100644 --- a/debian/patches/features/all/rt/0166-migrate-disable-rt-variant.patch.patch +++ b/debian/patches/features/all/rt/migrate-disable-rt-variant.patch @@ -1,17 +1,16 @@ -From 8a8ab8319933fe832517b715190e8b2f15059f43 Mon Sep 17 00:00:00 2001 +Subject: migrate-disable-rt-variant.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 19:48:20 +0200 -Subject: [PATCH 166/267] migrate-disable-rt-variant.patch Signed-off-by: Thomas Gleixner --- include/linux/preempt.h | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 363e5e2..5aa7916 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h +Index: linux-3.4/include/linux/preempt.h +=================================================================== +--- linux-3.4.orig/include/linux/preempt.h ++++ linux-3.4/include/linux/preempt.h @@ -121,11 +121,15 @@ extern void migrate_enable(void); # define preempt_enable_rt() preempt_enable() # define preempt_disable_nort() do { } while (0) @@ -28,6 +27,3 @@ index 363e5e2..5aa7916 100644 #endif #ifdef CONFIG_PREEMPT_NOTIFIERS --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0240-mips-disable-highmem-on-rt.patch.patch b/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch similarity index 58% rename from debian/patches/features/all/rt/0240-mips-disable-highmem-on-rt.patch.patch rename to debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch index e1155183f..305d3c701 100644 --- a/debian/patches/features/all/rt/0240-mips-disable-highmem-on-rt.patch.patch +++ b/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch @@ -1,18 +1,17 @@ -From da5946af5b91abe1264c94f7d308ad7bca51a1af Mon Sep 17 00:00:00 2001 +Subject: mips-disable-highmem-on-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:10:12 +0200 -Subject: [PATCH 240/267] mips-disable-highmem-on-rt.patch Signed-off-by: Thomas Gleixner --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig -index d46f1da..9f02e8b 100644 ---- a/arch/mips/Kconfig -+++ b/arch/mips/Kconfig -@@ -2040,7 +2040,7 @@ config CPU_R4400_WORKAROUNDS +Index: linux-3.4/arch/mips/Kconfig +=================================================================== +--- linux-3.4.orig/arch/mips/Kconfig ++++ linux-3.4/arch/mips/Kconfig +@@ -2081,7 +2081,7 @@ config CPU_R4400_WORKAROUNDS # config HIGHMEM bool "High Memory Support" @@ -21,6 +20,3 @@ index d46f1da..9f02e8b 100644 config CPU_SUPPORTS_HIGHMEM bool --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0007-mips-enable-interrupts-in-signal.patch.patch b/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch similarity index 50% rename from debian/patches/features/all/rt/0007-mips-enable-interrupts-in-signal.patch.patch rename to debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch index fec2afeac..bcb2d4bbc 100644 --- a/debian/patches/features/all/rt/0007-mips-enable-interrupts-in-signal.patch.patch +++ b/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch @@ -1,18 +1,17 @@ -From 7a4fa0630cdf29e9fd81872ae02888121ffe3564 Mon Sep 17 00:00:00 2001 +Subject: mips-enable-interrupts-in-signal.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 21:32:10 +0200 -Subject: [PATCH 007/267] mips-enable-interrupts-in-signal.patch Signed-off-by: Thomas Gleixner --- arch/mips/kernel/signal.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c -index f852400..1c8f34c 100644 ---- a/arch/mips/kernel/signal.c -+++ b/arch/mips/kernel/signal.c -@@ -604,6 +604,9 @@ static void do_signal(struct pt_regs *regs) +Index: linux-3.4/arch/mips/kernel/signal.c +=================================================================== +--- linux-3.4.orig/arch/mips/kernel/signal.c ++++ linux-3.4/arch/mips/kernel/signal.c +@@ -605,6 +605,9 @@ static void do_signal(struct pt_regs *re if (!user_mode(regs)) return; @@ -22,6 +21,3 @@ index f852400..1c8f34c 100644 if (test_thread_flag(TIF_RESTORE_SIGMASK)) oldset = ¤t->saved_sigmask; else --- -1.7.10 - diff --git a/debian/patches/features/all/rt/mips-remove-smp-reserve-lock.patch b/debian/patches/features/all/rt/mips-remove-smp-reserve-lock.patch new file mode 100644 index 000000000..70c0d005f --- /dev/null +++ b/debian/patches/features/all/rt/mips-remove-smp-reserve-lock.patch @@ -0,0 +1,43 @@ +Subject: mips-remove-smp-reserve-lock.patch +From: Thomas Gleixner +Date: Tue, 22 May 2012 21:15:10 +0200 + +Instead of making the lock raw, remove it as it protects nothing. + +Signed-off-by: Thomas Gleixner +Cc: stable-rt@vger.kernel.org +--- + arch/mips/cavium-octeon/smp.c | 6 ------ + 1 file changed, 6 deletions(-) + +Index: linux-3.4/arch/mips/cavium-octeon/smp.c +=================================================================== +--- linux-3.4.orig/arch/mips/cavium-octeon/smp.c ++++ linux-3.4/arch/mips/cavium-octeon/smp.c +@@ -257,8 +257,6 @@ DEFINE_PER_CPU(int, cpu_state); + + extern void fixup_irqs(void); + +-static DEFINE_SPINLOCK(smp_reserve_lock); +- + static int octeon_cpu_disable(void) + { + unsigned int cpu = smp_processor_id(); +@@ -266,8 +264,6 @@ static int octeon_cpu_disable(void) + if (cpu == 0) + return -EBUSY; + +- spin_lock(&smp_reserve_lock); +- + set_cpu_online(cpu, false); + cpu_clear(cpu, cpu_callin_map); + local_irq_disable(); +@@ -277,8 +273,6 @@ static int octeon_cpu_disable(void) + flush_cache_all(); + local_flush_tlb_all(); + +- spin_unlock(&smp_reserve_lock); +- + return 0; + } + diff --git a/debian/patches/features/all/rt/0117-mm-Allow-only-slab-on-RT.patch b/debian/patches/features/all/rt/mm-allow-slab-rt.patch similarity index 68% rename from debian/patches/features/all/rt/0117-mm-Allow-only-slab-on-RT.patch rename to debian/patches/features/all/rt/mm-allow-slab-rt.patch index 1450694de..12c9ecc07 100644 --- a/debian/patches/features/all/rt/0117-mm-Allow-only-slab-on-RT.patch +++ b/debian/patches/features/all/rt/mm-allow-slab-rt.patch @@ -1,19 +1,19 @@ -From 6b31e9b35429b064973433ebd20b7e79b02cc5f8 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:03 -0500 -Subject: [PATCH 117/267] mm: Allow only slab on RT +Subject: mm: Allow only slab on RT Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- init/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/init/Kconfig b/init/Kconfig -index 43298f9..dbc82d0 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1239,6 +1239,7 @@ config SLAB +Index: linux-3.4/init/Kconfig +=================================================================== +--- linux-3.4.orig/init/Kconfig ++++ linux-3.4/init/Kconfig +@@ -1265,6 +1265,7 @@ config SLAB config SLUB bool "SLUB (Unqueued Allocator)" @@ -21,7 +21,7 @@ index 43298f9..dbc82d0 100644 help SLUB is a slab allocator that minimizes cache line usage instead of managing queues of cached objects (SLAB approach). -@@ -1250,6 +1251,7 @@ config SLUB +@@ -1276,6 +1277,7 @@ config SLUB config SLOB depends on EXPERT bool "SLOB (Simple Allocator)" @@ -29,6 +29,3 @@ index 43298f9..dbc82d0 100644 help SLOB replaces the stock allocator with a drastically simpler allocator. SLOB is generally more space efficient but --- -1.7.10 - diff --git a/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch b/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch new file mode 100644 index 000000000..1d7ed9fc3 --- /dev/null +++ b/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch @@ -0,0 +1,95 @@ +From: Thomas Gleixner +Date: Wed, 19 Aug 2009 09:56:42 +0200 +Subject: mm: Replace cgroup_page bit spinlock + +Bit spinlocks are not working on RT. Replace them. + +Signed-off-by: Thomas Gleixner + +--- + include/linux/page_cgroup.h | 15 +++++++++++++++ + mm/page_cgroup.c | 11 +++++++++++ + 2 files changed, 26 insertions(+) + +Index: linux-3.4/include/linux/page_cgroup.h +=================================================================== +--- linux-3.4.orig/include/linux/page_cgroup.h ++++ linux-3.4/include/linux/page_cgroup.h +@@ -24,6 +24,9 @@ enum { + */ + struct page_cgroup { + unsigned long flags; ++#ifdef CONFIG_PREEMPT_RT_BASE ++ spinlock_t pcg_lock; ++#endif + struct mem_cgroup *mem_cgroup; + }; + +@@ -74,12 +77,20 @@ static inline void lock_page_cgroup(stru + * Don't take this lock in IRQ context. + * This lock is for pc->mem_cgroup, USED, MIGRATION + */ ++#ifndef CONFIG_PREEMPT_RT_BASE + bit_spin_lock(PCG_LOCK, &pc->flags); ++#else ++ spin_lock(&pc->pcg_lock); ++#endif + } + + static inline void unlock_page_cgroup(struct page_cgroup *pc) + { ++#ifndef CONFIG_PREEMPT_RT_BASE + bit_spin_unlock(PCG_LOCK, &pc->flags); ++#else ++ spin_unlock(&pc->pcg_lock); ++#endif + } + + #else /* CONFIG_CGROUP_MEM_RES_CTLR */ +@@ -102,6 +113,10 @@ static inline void __init page_cgroup_in + { + } + ++static inline void page_cgroup_lock_init(struct page_cgroup *pc) ++{ ++} ++ + #endif /* CONFIG_CGROUP_MEM_RES_CTLR */ + + #include +Index: linux-3.4/mm/page_cgroup.c +=================================================================== +--- linux-3.4.orig/mm/page_cgroup.c ++++ linux-3.4/mm/page_cgroup.c +@@ -13,6 +13,14 @@ + + static unsigned long total_usage; + ++static void page_cgroup_lock_init(struct page_cgroup *pc, int nr_pages) ++{ ++#ifdef CONFIG_PREEMPT_RT_BASE ++ for (; nr_pages; nr_pages--, pc++) ++ spin_lock_init(&pc->pcg_lock); ++#endif ++} ++ + #if !defined(CONFIG_SPARSEMEM) + + +@@ -60,6 +68,7 @@ static int __init alloc_node_page_cgroup + return -ENOMEM; + NODE_DATA(nid)->node_page_cgroup = base; + total_usage += table_size; ++ page_cgroup_lock_init(base, nr_pages); + return 0; + } + +@@ -150,6 +159,8 @@ static int __meminit init_section_page_c + return -ENOMEM; + } + ++ page_cgroup_lock_init(base, PAGES_PER_SECTION); ++ + /* + * The passed "pfn" may not be aligned to SECTION. For the calculation + * we need to apply a mask. diff --git a/debian/patches/features/all/rt/0112-mm-convert-swap-to-percpu-locked.patch b/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch similarity index 79% rename from debian/patches/features/all/rt/0112-mm-convert-swap-to-percpu-locked.patch rename to debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch index 11ce3f132..220d0b780 100644 --- a/debian/patches/features/all/rt/0112-mm-convert-swap-to-percpu-locked.patch +++ b/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch @@ -1,19 +1,19 @@ -From 1331dc423f906395d863d3097374bcd042001d1b Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:51 -0500 -Subject: [PATCH 112/267] mm: convert swap to percpu locked +Subject: mm: convert swap to percpu locked Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- mm/swap.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) -diff --git a/mm/swap.c b/mm/swap.c -index 55b266d..e3f7d6f 100644 ---- a/mm/swap.c -+++ b/mm/swap.c -@@ -31,6 +31,7 @@ +Index: linux-3.4/mm/swap.c +=================================================================== +--- linux-3.4.orig/mm/swap.c ++++ linux-3.4/mm/swap.c +@@ -30,6 +30,7 @@ #include #include #include @@ -21,7 +21,7 @@ index 55b266d..e3f7d6f 100644 #include "internal.h" -@@ -41,6 +42,9 @@ static DEFINE_PER_CPU(struct pagevec[NR_LRU_LISTS], lru_add_pvecs); +@@ -40,6 +41,9 @@ static DEFINE_PER_CPU(struct pagevec[NR_ static DEFINE_PER_CPU(struct pagevec, lru_rotate_pvecs); static DEFINE_PER_CPU(struct pagevec, lru_deactivate_pvecs); @@ -31,7 +31,7 @@ index 55b266d..e3f7d6f 100644 /* * This path almost never happens for VM activity - pages are normally * freed via pagevecs. But it gets used by networking. -@@ -267,11 +271,11 @@ void rotate_reclaimable_page(struct page *page) +@@ -268,11 +272,11 @@ void rotate_reclaimable_page(struct page unsigned long flags; page_cache_get(page); @@ -45,7 +45,7 @@ index 55b266d..e3f7d6f 100644 } } -@@ -327,12 +331,13 @@ static void activate_page_drain(int cpu) +@@ -328,12 +332,13 @@ static void activate_page_drain(int cpu) void activate_page(struct page *page) { if (PageLRU(page) && !PageActive(page) && !PageUnevictable(page)) { @@ -70,13 +70,13 @@ index 55b266d..e3f7d6f 100644 page_cache_get(page); if (!pagevec_add(pvec, page)) - ____pagevec_lru_add(pvec, lru); + __pagevec_lru_add(pvec, lru); - put_cpu_var(lru_add_pvecs); + put_locked_var(swap_lock, lru_add_pvecs); } EXPORT_SYMBOL(__lru_cache_add); -@@ -512,9 +517,9 @@ static void drain_cpu_pagevecs(int cpu) +@@ -513,9 +518,9 @@ void lru_add_drain_cpu(int cpu) unsigned long flags; /* No harm done if a racing interrupt already did this */ @@ -88,7 +88,7 @@ index 55b266d..e3f7d6f 100644 } pvec = &per_cpu(lru_deactivate_pvecs, cpu); -@@ -542,18 +547,19 @@ void deactivate_page(struct page *page) +@@ -543,18 +548,19 @@ void deactivate_page(struct page *page) return; if (likely(get_page_unless_zero(page))) { @@ -105,14 +105,14 @@ index 55b266d..e3f7d6f 100644 void lru_add_drain(void) { -- drain_cpu_pagevecs(get_cpu()); +- lru_add_drain_cpu(get_cpu()); - put_cpu(); -+ drain_cpu_pagevecs(local_lock_cpu(swap_lock)); ++ lru_add_drain_cpu(local_lock_cpu(swap_lock)); + local_unlock_cpu(swap_lock); } static void lru_add_drain_per_cpu(struct work_struct *dummy) -@@ -783,6 +789,9 @@ void __init swap_setup(void) +@@ -768,6 +774,9 @@ void __init swap_setup(void) { unsigned long megs = totalram_pages >> (20 - PAGE_SHIFT); @@ -122,6 +122,3 @@ index 55b266d..e3f7d6f 100644 #ifdef CONFIG_SWAP bdi_init(swapper_space.backing_dev_info); #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0114-mm-make-vmstat-rt-aware.patch b/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch similarity index 62% rename from debian/patches/features/all/rt/0114-mm-make-vmstat-rt-aware.patch rename to debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch index 80d36d411..8792ceb1b 100644 --- a/debian/patches/features/all/rt/0114-mm-make-vmstat-rt-aware.patch +++ b/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch @@ -1,20 +1,20 @@ -From 52ce12b4ef668a3ce5788ea1f3015d60b8f4dd24 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:13 -0500 -Subject: [PATCH 114/267] mm: make vmstat -rt aware +Subject: [PATCH] mm: make vmstat -rt aware Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/linux/vmstat.h | 4 ++++ mm/vmstat.c | 6 ++++++ 2 files changed, 10 insertions(+) -diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h -index 65efb92..1b3f2ef 100644 ---- a/include/linux/vmstat.h -+++ b/include/linux/vmstat.h -@@ -29,7 +29,9 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states); +Index: linux-3.4/include/linux/vmstat.h +=================================================================== +--- linux-3.4.orig/include/linux/vmstat.h ++++ linux-3.4/include/linux/vmstat.h +@@ -29,7 +29,9 @@ DECLARE_PER_CPU(struct vm_event_state, v static inline void __count_vm_event(enum vm_event_item item) { @@ -24,7 +24,7 @@ index 65efb92..1b3f2ef 100644 } static inline void count_vm_event(enum vm_event_item item) -@@ -39,7 +41,9 @@ static inline void count_vm_event(enum vm_event_item item) +@@ -39,7 +41,9 @@ static inline void count_vm_event(enum v static inline void __count_vm_events(enum vm_event_item item, long delta) { @@ -34,11 +34,11 @@ index 65efb92..1b3f2ef 100644 } static inline void count_vm_events(enum vm_event_item item, long delta) -diff --git a/mm/vmstat.c b/mm/vmstat.c -index 8fd603b..726f0b6 100644 ---- a/mm/vmstat.c -+++ b/mm/vmstat.c -@@ -216,6 +216,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, +Index: linux-3.4/mm/vmstat.c +=================================================================== +--- linux-3.4.orig/mm/vmstat.c ++++ linux-3.4/mm/vmstat.c +@@ -216,6 +216,7 @@ void __mod_zone_page_state(struct zone * long x; long t; @@ -46,7 +46,7 @@ index 8fd603b..726f0b6 100644 x = delta + __this_cpu_read(*p); t = __this_cpu_read(pcp->stat_threshold); -@@ -225,6 +226,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item, +@@ -225,6 +226,7 @@ void __mod_zone_page_state(struct zone * x = 0; } __this_cpu_write(*p, x); @@ -54,7 +54,7 @@ index 8fd603b..726f0b6 100644 } EXPORT_SYMBOL(__mod_zone_page_state); -@@ -257,6 +259,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item) +@@ -257,6 +259,7 @@ void __inc_zone_state(struct zone *zone, s8 __percpu *p = pcp->vm_stat_diff + item; s8 v, t; @@ -62,7 +62,7 @@ index 8fd603b..726f0b6 100644 v = __this_cpu_inc_return(*p); t = __this_cpu_read(pcp->stat_threshold); if (unlikely(v > t)) { -@@ -265,6 +268,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item) +@@ -265,6 +268,7 @@ void __inc_zone_state(struct zone *zone, zone_page_state_add(v + overstep, zone, item); __this_cpu_write(*p, -overstep); } @@ -70,7 +70,7 @@ index 8fd603b..726f0b6 100644 } void __inc_zone_page_state(struct page *page, enum zone_stat_item item) -@@ -279,6 +283,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item) +@@ -279,6 +283,7 @@ void __dec_zone_state(struct zone *zone, s8 __percpu *p = pcp->vm_stat_diff + item; s8 v, t; @@ -78,7 +78,7 @@ index 8fd603b..726f0b6 100644 v = __this_cpu_dec_return(*p); t = __this_cpu_read(pcp->stat_threshold); if (unlikely(v < - t)) { -@@ -287,6 +292,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item) +@@ -287,6 +292,7 @@ void __dec_zone_state(struct zone *zone, zone_page_state_add(v - overstep, zone, item); __this_cpu_write(*p, overstep); } @@ -86,6 +86,3 @@ index 8fd603b..726f0b6 100644 } void __dec_zone_page_state(struct page *page, enum zone_stat_item item) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0111-mm-page-alloc-fix.patch.patch b/debian/patches/features/all/rt/mm-page-alloc-fix.patch similarity index 60% rename from debian/patches/features/all/rt/0111-mm-page-alloc-fix.patch.patch rename to debian/patches/features/all/rt/mm-page-alloc-fix.patch index 45c29b37c..1356b1867 100644 --- a/debian/patches/features/all/rt/0111-mm-page-alloc-fix.patch.patch +++ b/debian/patches/features/all/rt/mm-page-alloc-fix.patch @@ -1,18 +1,17 @@ -From 56dddacff93fc987ea0b6076d087388e5be72cf2 Mon Sep 17 00:00:00 2001 +Subject: mm-page-alloc-fix.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 16:47:49 +0200 -Subject: [PATCH 111/267] mm-page-alloc-fix.patch Signed-off-by: Thomas Gleixner --- 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 5124fb0..49675c7 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -1960,8 +1960,8 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, +Index: linux-3.4/mm/page_alloc.c +=================================================================== +--- linux-3.4.orig/mm/page_alloc.c ++++ linux-3.4/mm/page_alloc.c +@@ -2095,8 +2095,8 @@ __alloc_pages_direct_compact(gfp_t gfp_m if (*did_some_progress != COMPACT_SKIPPED) { /* Page migration frees to the PCP lists but we want merging */ @@ -23,6 +22,3 @@ index 5124fb0..49675c7 100644 page = get_page_from_freelist(gfp_mask, nodemask, order, zonelist, high_zoneidx, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0056-mm-page-alloc-use-list-last-entry.patch.patch b/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch similarity index 58% rename from debian/patches/features/all/rt/0056-mm-page-alloc-use-list-last-entry.patch.patch rename to debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch index b7d5ea9e0..99caee233 100644 --- a/debian/patches/features/all/rt/0056-mm-page-alloc-use-list-last-entry.patch.patch +++ b/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch @@ -1,18 +1,17 @@ -From eadff32638247080501a10cd5294d86e535c0019 Mon Sep 17 00:00:00 2001 +Subject: mm-page-alloc-use-list-last-entry.patch From: Peter Zijlstra Date: Tue, 21 Jun 2011 11:24:35 +0200 -Subject: [PATCH 056/267] mm-page-alloc-use-list-last-entry.patch Signed-off-by: Thomas Gleixner --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 485be89..3344154 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -625,7 +625,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, +Index: linux-3.4/mm/page_alloc.c +=================================================================== +--- linux-3.4.orig/mm/page_alloc.c ++++ linux-3.4/mm/page_alloc.c +@@ -663,7 +663,7 @@ static void free_pcppages_bulk(struct zo batch_free = to_free; do { @@ -21,6 +20,3 @@ index 485be89..3344154 100644 /* must delete as __free_one_page list manipulates */ list_del(&page->lru); /* MIGRATE_MOVABLE list may include MIGRATE_RESERVEs */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0110-mm-page_alloc-reduce-lock-sections-further.patch b/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch similarity index 83% rename from debian/patches/features/all/rt/0110-mm-page_alloc-reduce-lock-sections-further.patch rename to debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch index fe9937adc..52527faf9 100644 --- a/debian/patches/features/all/rt/0110-mm-page_alloc-reduce-lock-sections-further.patch +++ b/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch @@ -1,7 +1,6 @@ -From ad25d05c1f0d21df637fb891ca1c7afa3a35a822 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 3 Jul 2009 08:44:37 -0500 -Subject: [PATCH 110/267] mm: page_alloc reduce lock sections further +Subject: mm: page_alloc reduce lock sections further 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,14 +8,14 @@ call free_pages_bulk() outside of the percpu page allocator locks. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner --- - mm/page_alloc.c | 77 +++++++++++++++++++++++++++++++++++++++++-------------- + mm/page_alloc.c | 77 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 19 deletions(-) -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 27865c9..5124fb0 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -594,7 +594,7 @@ static inline int free_pages_check(struct page *page) +Index: linux-3.4/mm/page_alloc.c +=================================================================== +--- linux-3.4.orig/mm/page_alloc.c ++++ linux-3.4/mm/page_alloc.c +@@ -632,7 +632,7 @@ static inline int free_pages_check(struc } /* @@ -25,7 +24,7 @@ index 27865c9..5124fb0 100644 * Assumes all pages on list are in same zone, and of same order. * count is the number of pages to free. * -@@ -605,16 +605,42 @@ static inline int free_pages_check(struct page *page) +@@ -643,16 +643,42 @@ static inline int free_pages_check(struc * pinned" detection logic. */ static void free_pcppages_bulk(struct zone *zone, int count, @@ -72,7 +71,7 @@ index 27865c9..5124fb0 100644 while (to_free) { struct page *page; struct list_head *list; -@@ -630,7 +656,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, +@@ -668,7 +694,7 @@ static void free_pcppages_bulk(struct zo batch_free++; if (++migratetype == MIGRATE_PCPTYPES) migratetype = 0; @@ -81,7 +80,7 @@ index 27865c9..5124fb0 100644 } while (list_empty(list)); /* This is the only non-empty list. Free them all. */ -@@ -639,27 +665,24 @@ static void free_pcppages_bulk(struct zone *zone, int count, +@@ -677,27 +703,24 @@ static void free_pcppages_bulk(struct zo do { page = list_last_entry(list, struct page, lru); @@ -114,7 +113,7 @@ index 27865c9..5124fb0 100644 } static bool free_pages_prepare(struct page *page, unsigned int order) -@@ -1078,6 +1101,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, +@@ -1124,6 +1147,7 @@ static int rmqueue_bulk(struct zone *zon void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp) { unsigned long flags; @@ -122,7 +121,7 @@ index 27865c9..5124fb0 100644 int to_drain; local_lock_irqsave(pa_lock, flags); -@@ -1085,9 +1109,10 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp) +@@ -1131,9 +1155,10 @@ void drain_zone_pages(struct zone *zone, to_drain = pcp->batch; else to_drain = pcp->count; @@ -134,7 +133,7 @@ index 27865c9..5124fb0 100644 } #endif -@@ -1106,16 +1131,21 @@ static void drain_pages(unsigned int cpu) +@@ -1152,16 +1177,21 @@ static void drain_pages(unsigned int cpu for_each_populated_zone(zone) { struct per_cpu_pageset *pset; struct per_cpu_pages *pcp; @@ -158,7 +157,7 @@ index 27865c9..5124fb0 100644 } } -@@ -1222,8 +1252,15 @@ void free_hot_cold_page(struct page *page, int cold) +@@ -1302,8 +1332,15 @@ void free_hot_cold_page(struct page *pag list_add(&page->lru, &pcp->lists[migratetype]); pcp->count++; if (pcp->count >= pcp->high) { @@ -175,7 +174,7 @@ index 27865c9..5124fb0 100644 } out: -@@ -3702,12 +3739,14 @@ static int __zone_pcp_update(void *data) +@@ -3874,12 +3911,14 @@ static int __zone_pcp_update(void *data) for_each_possible_cpu(cpu) { struct per_cpu_pageset *pset; struct per_cpu_pages *pcp; @@ -191,6 +190,3 @@ index 27865c9..5124fb0 100644 setup_pageset(pset, batch); cpu_unlock_irqrestore(cpu, flags); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0109-mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch similarity index 74% rename from debian/patches/features/all/rt/0109-mm-page_alloc-rt-friendly-per-cpu-pages.patch rename to debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch index 500c4e303..8222bfb63 100644 --- a/debian/patches/features/all/rt/0109-mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,6 @@ -From 560edaa7b6a73cfc4d3c8241f072268a999ca3d4 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:37 -0500 -Subject: [PATCH 109/267] mm: page_alloc: rt-friendly per-cpu pages +Subject: mm: page_alloc: rt-friendly per-cpu pages rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. @@ -12,23 +11,24 @@ Contains fixes from: Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner ---- - mm/page_alloc.c | 55 +++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 39 insertions(+), 16 deletions(-) -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 3344154..27865c9 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c +--- + mm/page_alloc.c | 53 +++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 37 insertions(+), 16 deletions(-) + +Index: linux-3.4/mm/page_alloc.c +=================================================================== +--- linux-3.4.orig/mm/page_alloc.c ++++ linux-3.4/mm/page_alloc.c @@ -57,6 +57,7 @@ #include #include #include +#include + #include #include - #include -@@ -222,6 +223,18 @@ EXPORT_SYMBOL(nr_node_ids); +@@ -216,6 +217,18 @@ EXPORT_SYMBOL(nr_node_ids); EXPORT_SYMBOL(nr_online_nodes); #endif @@ -47,7 +47,7 @@ index 3344154..27865c9 100644 int page_group_by_mobility_disabled __read_mostly; static void set_pageblock_migratetype(struct page *page, int migratetype) -@@ -683,13 +696,13 @@ static void __free_pages_ok(struct page *page, unsigned int order) +@@ -721,13 +734,13 @@ static void __free_pages_ok(struct page if (!free_pages_prepare(page, order)) return; @@ -62,8 +62,8 @@ index 3344154..27865c9 100644 + local_unlock_irqrestore(pa_lock, flags); } - /* -@@ -1067,14 +1080,14 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp) + void __meminit __free_pages_bootmem(struct page *page, unsigned int order) +@@ -1113,14 +1126,14 @@ void drain_zone_pages(struct zone *zone, unsigned long flags; int to_drain; @@ -80,7 +80,7 @@ index 3344154..27865c9 100644 } #endif -@@ -1094,7 +1107,7 @@ static void drain_pages(unsigned int cpu) +@@ -1140,7 +1153,7 @@ static void drain_pages(unsigned int cpu struct per_cpu_pageset *pset; struct per_cpu_pages *pcp; @@ -89,7 +89,7 @@ index 3344154..27865c9 100644 pset = per_cpu_ptr(zone->pageset, cpu); pcp = &pset->pcp; -@@ -1102,7 +1115,7 @@ static void drain_pages(unsigned int cpu) +@@ -1148,7 +1161,7 @@ static void drain_pages(unsigned int cpu free_pcppages_bulk(zone, pcp->count, pcp); pcp->count = 0; } @@ -98,22 +98,20 @@ index 3344154..27865c9 100644 } } -@@ -1119,7 +1132,14 @@ void drain_local_pages(void *arg) - */ - void drain_all_pages(void) - { +@@ -1201,7 +1214,12 @@ void drain_all_pages(void) + else + cpumask_clear_cpu(cpu, &cpus_with_pcps); + } +#ifndef CONFIG_PREEMPT_RT_BASE - on_each_cpu(drain_local_pages, NULL, 1); + on_each_cpu_mask(&cpus_with_pcps, drain_local_pages, NULL, 1); +#else -+ int i; -+ -+ for_each_online_cpu(i) -+ drain_pages(i); ++ for_each_cpu(cpu, &cpus_with_pcps) ++ drain_pages(cpu); +#endif } #ifdef CONFIG_HIBERNATION -@@ -1175,7 +1195,7 @@ void free_hot_cold_page(struct page *page, int cold) +@@ -1257,7 +1275,7 @@ void free_hot_cold_page(struct page *pag migratetype = get_pageblock_migratetype(page); set_page_private(page, migratetype); @@ -122,7 +120,7 @@ index 3344154..27865c9 100644 if (unlikely(wasMlocked)) free_page_mlock(page); __count_vm_event(PGFREE); -@@ -1207,7 +1227,7 @@ void free_hot_cold_page(struct page *page, int cold) +@@ -1289,7 +1307,7 @@ void free_hot_cold_page(struct page *pag } out: @@ -131,7 +129,7 @@ index 3344154..27865c9 100644 } /* -@@ -1302,7 +1322,7 @@ again: +@@ -1397,7 +1415,7 @@ again: struct per_cpu_pages *pcp; struct list_head *list; @@ -140,7 +138,7 @@ index 3344154..27865c9 100644 pcp = &this_cpu_ptr(zone->pageset)->pcp; list = &pcp->lists[migratetype]; if (list_empty(list)) { -@@ -1334,17 +1354,19 @@ again: +@@ -1429,17 +1447,19 @@ again: */ WARN_ON_ONCE(order > 1); } @@ -164,7 +162,7 @@ index 3344154..27865c9 100644 VM_BUG_ON(bad_range(zone, page)); if (prep_new_page(page, order, gfp_flags)) -@@ -1352,7 +1374,7 @@ again: +@@ -1447,7 +1467,7 @@ again: return page; failed: @@ -173,7 +171,7 @@ index 3344154..27865c9 100644 return NULL; } -@@ -3684,10 +3706,10 @@ static int __zone_pcp_update(void *data) +@@ -3858,10 +3878,10 @@ static int __zone_pcp_update(void *data) pset = per_cpu_ptr(zone->pageset, cpu); pcp = &pset->pcp; @@ -186,7 +184,7 @@ index 3344154..27865c9 100644 } return 0; } -@@ -5053,6 +5075,7 @@ static int page_alloc_cpu_notify(struct notifier_block *self, +@@ -4892,6 +4912,7 @@ static int page_alloc_cpu_notify(struct void __init page_alloc_init(void) { hotcpu_notifier(page_alloc_cpu_notify, 0); @@ -194,6 +192,3 @@ index 3344154..27865c9 100644 } /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0045-mm-Prepare-decoupling-the-page-fault-disabling-logic.patch b/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch similarity index 74% rename from debian/patches/features/all/rt/0045-mm-Prepare-decoupling-the-page-fault-disabling-logic.patch rename to debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch index 1453ae53a..2cc41c8a5 100644 --- a/debian/patches/features/all/rt/0045-mm-Prepare-decoupling-the-page-fault-disabling-logic.patch +++ b/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch @@ -1,14 +1,13 @@ -From 53e45a133e1f67b90e680878517ce10dc5c0d04b Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:37 -0500 -Subject: [PATCH 045/267] mm: Prepare decoupling the page fault disabling - logic +Subject: mm: Prepare decoupling the page fault disabling logic Add a pagefault_disabled variable to task_struct to allow decoupling the pagefault-disabled logic from the preempt count. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/linux/sched.h | 1 + include/linux/uaccess.h | 33 +++------------------------------ @@ -16,11 +15,11 @@ Signed-off-by: Thomas Gleixner mm/memory.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 30 deletions(-) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index ed2b9f9..bce86f9 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1435,6 +1435,7 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1478,6 +1478,7 @@ struct task_struct { /* mutex deadlock detection */ struct mutex_waiter *blocked_on; #endif @@ -28,10 +27,10 @@ index ed2b9f9..bce86f9 100644 #ifdef CONFIG_TRACE_IRQFLAGS unsigned int irq_events; unsigned long hardirq_enable_ip; -diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h -index 5ca0951..9414a1b 100644 ---- a/include/linux/uaccess.h -+++ b/include/linux/uaccess.h +Index: linux-3.4/include/linux/uaccess.h +=================================================================== +--- linux-3.4.orig/include/linux/uaccess.h ++++ linux-3.4/include/linux/uaccess.h @@ -6,37 +6,10 @@ /* @@ -73,11 +72,11 @@ index 5ca0951..9414a1b 100644 #ifndef ARCH_HAS_NOCACHE_UACCESS -diff --git a/kernel/fork.c b/kernel/fork.c -index d8aa0c7..a17bc75 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -1196,6 +1196,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -1263,6 +1263,7 @@ static struct task_struct *copy_process( p->hardirq_context = 0; p->softirq_context = 0; #endif @@ -85,11 +84,11 @@ index d8aa0c7..a17bc75 100644 #ifdef CONFIG_LOCKDEP p->lockdep_depth = 0; /* no locks held yet */ p->curr_chain_key = 0; -diff --git a/mm/memory.c b/mm/memory.c -index 1b1ca17..454ad3f 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3444,6 +3444,35 @@ unlock: +Index: linux-3.4/mm/memory.c +=================================================================== +--- linux-3.4.orig/mm/memory.c ++++ linux-3.4/mm/memory.c +@@ -3467,6 +3467,35 @@ unlock: return 0; } @@ -125,6 +124,3 @@ index 1b1ca17..454ad3f 100644 /* * By the time we get here, we already hold the mm semaphore */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0216-mm-protect-activate-switch-mm.patch.patch b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch similarity index 63% rename from debian/patches/features/all/rt/0216-mm-protect-activate-switch-mm.patch.patch rename to debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch index 8944fa84f..fa18bfa1a 100644 --- a/debian/patches/features/all/rt/0216-mm-protect-activate-switch-mm.patch.patch +++ b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch @@ -1,7 +1,6 @@ -From d487b5d66ab6a586d14e072a12cb2e61f9ec5716 Mon Sep 17 00:00:00 2001 +Subject: mm-protect-activate-switch-mm.patch From: Thomas Gleixner -Date: Mon, 4 Jul 2011 09:48:40 +0200 -Subject: [PATCH 216/267] mm-protect-activate-switch-mm.patch +Date: Mon, 04 Jul 2011 09:48:40 +0200 Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner mm/mmu_context.c | 2 ++ 2 files changed, 4 insertions(+) -diff --git a/fs/exec.c b/fs/exec.c -index 3625464..aabd97d 100644 ---- a/fs/exec.c -+++ b/fs/exec.c -@@ -837,10 +837,12 @@ static int exec_mmap(struct mm_struct *mm) +Index: linux-3.4/fs/exec.c +=================================================================== +--- linux-3.4.orig/fs/exec.c ++++ linux-3.4/fs/exec.c +@@ -840,10 +840,12 @@ static int exec_mmap(struct mm_struct *m } } task_lock(tsk); @@ -26,10 +25,10 @@ index 3625464..aabd97d 100644 task_unlock(tsk); arch_pick_mmap_layout(mm); if (old_mm) { -diff --git a/mm/mmu_context.c b/mm/mmu_context.c -index cf332bc..64ce279 100644 ---- a/mm/mmu_context.c -+++ b/mm/mmu_context.c +Index: linux-3.4/mm/mmu_context.c +=================================================================== +--- linux-3.4.orig/mm/mmu_context.c ++++ linux-3.4/mm/mmu_context.c @@ -26,6 +26,7 @@ void use_mm(struct mm_struct *mm) struct task_struct *tsk = current; @@ -46,6 +45,3 @@ index cf332bc..64ce279 100644 task_unlock(tsk); if (active_mm != mm) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/mm-protect-activate_mm-by-preempt_-disable-7cenable-_rt.patch b/debian/patches/features/all/rt/mm-protect-activate_mm-by-preempt_-disable-7cenable-_rt.patch new file mode 100644 index 000000000..9d08ba688 --- /dev/null +++ b/debian/patches/features/all/rt/mm-protect-activate_mm-by-preempt_-disable-7cenable-_rt.patch @@ -0,0 +1,89 @@ +Subject: mm: Protect activate_mm() by preempt_[disable%7Cenable]_rt() +From: Yong Zhang +Date: Tue, 15 May 2012 13:53:56 +0800 + +From: Yong Zhang + +Otherwise there will be warning on ARM like below: + +WARNING: at build/linux/kernel/smp.c:459 smp_call_function_many+0x98/0x264() +Modules linked in: +[] (unwind_backtrace+0x0/0xe4) from [] (warn_slowpath_common+0x4c/0x64) +[] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c) +[] (warn_slowpath_null+0x18/0x1c) from [](smp_call_function_many+0x98/0x264) +[] (smp_call_function_many+0x98/0x264) from [] (smp_call_function+0x44/0x6c) +[] (smp_call_function+0x44/0x6c) from [] (__new_context+0xbc/0x124) +[] (__new_context+0xbc/0x124) from [] (flush_old_exec+0x460/0x5e4) +[] (flush_old_exec+0x460/0x5e4) from [] (load_elf_binary+0x2e0/0x11ac) +[] (load_elf_binary+0x2e0/0x11ac) from [] (search_binary_handler+0x94/0x2a4) +[] (search_binary_handler+0x94/0x2a4) from [] (do_execve+0x254/0x364) +[] (do_execve+0x254/0x364) from [] (sys_execve+0x34/0x54) +[] (sys_execve+0x34/0x54) from [] (ret_fast_syscall+0x0/0x30) +---[ end trace 0000000000000002 ]--- + +The reason is that ARM need irq enabled when doing activate_mm(). +According to mm-protect-activate-switch-mm.patch, actually +preempt_[disable|enable]_rt() is sufficient. + +Inspired-by: Steven Rostedt +Signed-off-by: Yong Zhang +Cc: Steven Rostedt +Link: http://lkml.kernel.org/r/1337061236-1766-1-git-send-email-yong.zhang0@gmail.com +Signed-off-by: Thomas Gleixner +Cc: Steven Rostedt +Cc: Thomas Gleixner +--- + fs/exec.c | 4 ++-- + mm/mmu_context.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/fs/exec.c b/fs/exec.c +index db02d76..9384953 100644 +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -840,12 +840,12 @@ static int exec_mmap(struct mm_struct *mm) + } + } + task_lock(tsk); +- local_irq_disable_rt(); ++ preempt_disable_rt(); + active_mm = tsk->active_mm; + tsk->mm = mm; + tsk->active_mm = mm; + activate_mm(active_mm, mm); +- local_irq_enable_rt(); ++ preempt_enable_rt(); + task_unlock(tsk); + arch_pick_mmap_layout(mm); + if (old_mm) { +diff --git a/mm/mmu_context.c b/mm/mmu_context.c +index 8ca7e6b..1385e48 100644 +--- a/mm/mmu_context.c ++++ b/mm/mmu_context.c +@@ -26,7 +26,7 @@ void use_mm(struct mm_struct *mm) + struct task_struct *tsk = current; + + task_lock(tsk); +- local_irq_disable_rt(); ++ preempt_disable_rt(); + active_mm = tsk->active_mm; + if (active_mm != mm) { + atomic_inc(&mm->mm_count); +@@ -34,7 +34,7 @@ void use_mm(struct mm_struct *mm) + } + tsk->mm = mm; + switch_mm(active_mm, mm, tsk); +- local_irq_enable_rt(); ++ preempt_enable_rt(); + task_unlock(tsk); + + if (active_mm != mm) +-- +1.7.5.4 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + + diff --git a/debian/patches/features/all/rt/0050-mm-Remove-preempt-count-from-pagefault-disable-enabl.patch b/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch similarity index 65% rename from debian/patches/features/all/rt/0050-mm-Remove-preempt-count-from-pagefault-disable-enabl.patch rename to debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch index 3da34653e..704087cc7 100644 --- a/debian/patches/features/all/rt/0050-mm-Remove-preempt-count-from-pagefault-disable-enabl.patch +++ b/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch @@ -1,8 +1,6 @@ -From d7f4a8b96d5578399fab50795bb26568d3a4a1dc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 25 Jul 2009 22:06:27 +0200 -Subject: [PATCH 050/267] mm: Remove preempt count from pagefault - disable/enable +Subject: mm: Remove preempt count from pagefault disable/enable Now that all users are cleaned up, we can remove the preemption count. @@ -11,11 +9,11 @@ Signed-off-by: Thomas Gleixner mm/memory.c | 7 ------- 1 file changed, 7 deletions(-) -diff --git a/mm/memory.c b/mm/memory.c -index a3f7ed8..7fa62d9 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3447,7 +3447,6 @@ unlock: +Index: linux-3.4/mm/memory.c +=================================================================== +--- linux-3.4.orig/mm/memory.c ++++ linux-3.4/mm/memory.c +@@ -3470,7 +3470,6 @@ unlock: #ifdef CONFIG_PREEMPT_RT_FULL void pagefault_disable(void) { @@ -23,7 +21,7 @@ index a3f7ed8..7fa62d9 100644 current->pagefault_disabled++; /* * make sure to have issued the store before a pagefault -@@ -3465,12 +3464,6 @@ void pagefault_enable(void) +@@ -3488,12 +3487,6 @@ void pagefault_enable(void) */ barrier(); current->pagefault_disabled--; @@ -36,6 +34,3 @@ index a3f7ed8..7fa62d9 100644 } EXPORT_SYMBOL_GPL(pagefault_enable); #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0089-mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch similarity index 54% rename from debian/patches/features/all/rt/0089-mm-scatterlist-dont-disable-irqs-on-RT.patch rename to debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index 417c0d479..3d3f2b979 100644 --- a/debian/patches/features/all/rt/0089-mm-scatterlist-dont-disable-irqs-on-RT.patch +++ b/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -1,27 +1,26 @@ -From 2d38de27401078dc4dce8c56993479d6e1dac21c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:34 -0500 -Subject: [PATCH 089/267] mm: scatterlist dont disable irqs on RT +Subject: mm: scatterlist dont disable irqs on RT Signed-off-by: Thomas Gleixner --- lib/scatterlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/lib/scatterlist.c b/lib/scatterlist.c -index 4ceb05d..181f364 100644 ---- a/lib/scatterlist.c -+++ b/lib/scatterlist.c -@@ -423,7 +423,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter) +Index: linux-3.4/lib/scatterlist.c +=================================================================== +--- linux-3.4.orig/lib/scatterlist.c ++++ linux-3.4/lib/scatterlist.c +@@ -423,7 +423,7 @@ void sg_miter_stop(struct sg_mapping_ite flush_kernel_dcache_page(miter->page); if (miter->__flags & SG_MITER_ATOMIC) { - WARN_ON(!irqs_disabled()); + WARN_ON_NONRT(!irqs_disabled()); - kunmap_atomic(miter->addr, KM_BIO_SRC_IRQ); + kunmap_atomic(miter->addr); } else kunmap(miter->page); -@@ -463,7 +463,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, +@@ -463,7 +463,7 @@ static size_t sg_copy_buffer(struct scat sg_miter_start(&miter, sgl, nents, sg_flags); @@ -30,7 +29,7 @@ index 4ceb05d..181f364 100644 while (sg_miter_next(&miter) && offset < buflen) { unsigned int len; -@@ -480,7 +480,7 @@ static size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, +@@ -480,7 +480,7 @@ static size_t sg_copy_buffer(struct scat sg_miter_stop(&miter); @@ -39,6 +38,3 @@ index 4ceb05d..181f364 100644 return offset; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0115-mm-shrink-the-page-frame-to-rt-size.patch b/debian/patches/features/all/rt/mm-shrink-the-page-frame-to-rt-size.patch similarity index 83% rename from debian/patches/features/all/rt/0115-mm-shrink-the-page-frame-to-rt-size.patch rename to debian/patches/features/all/rt/mm-shrink-the-page-frame-to-rt-size.patch index 7e705524d..5b756e1c7 100644 --- a/debian/patches/features/all/rt/0115-mm-shrink-the-page-frame-to-rt-size.patch +++ b/debian/patches/features/all/rt/mm-shrink-the-page-frame-to-rt-size.patch @@ -1,7 +1,6 @@ -From 0cff0b3fe59f78698ae5cd2e3efff5fb9e81d67f Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 3 Jul 2009 08:44:54 -0500 -Subject: [PATCH 115/267] mm: shrink the page frame to !-rt size +Subject: mm: shrink the page frame to !-rt size He below is a boot-tested hack to shrink the page frame size back to normal. @@ -11,17 +10,18 @@ page-frames. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner + --- include/linux/mm.h | 46 +++++++++++++++++++++++++++++++++++++++------- include/linux/mm_types.h | 6 +++++- mm/memory.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 8 deletions(-) -diff --git a/include/linux/mm.h b/include/linux/mm.h -index 4baadd1..c9e64e5 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -1195,27 +1195,59 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a +Index: linux-3.4/include/linux/mm.h +=================================================================== +--- linux-3.4.orig/include/linux/mm.h ++++ linux-3.4/include/linux/mm.h +@@ -1200,27 +1200,59 @@ static inline pmd_t *pmd_alloc(struct mm * overflow into the next struct page (as it might with DEBUG_SPINLOCK). * When freeing, reset page->mapping so free_pages_check won't complain. */ @@ -88,10 +88,10 @@ index 4baadd1..c9e64e5 100644 static inline void pgtable_page_dtor(struct page *page) { pte_lock_deinit(page); -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 5b42f1b..1ec126f 100644 ---- a/include/linux/mm_types.h -+++ b/include/linux/mm_types.h +Index: linux-3.4/include/linux/mm_types.h +=================================================================== +--- linux-3.4.orig/include/linux/mm_types.h ++++ linux-3.4/include/linux/mm_types.h @@ -118,7 +118,11 @@ struct page { * system if PG_buddy is set. */ @@ -105,11 +105,11 @@ index 5b42f1b..1ec126f 100644 #endif struct kmem_cache *slab; /* SLUB: Pointer to slab */ struct page *first_page; /* Compound tail pages */ -diff --git a/mm/memory.c b/mm/memory.c -index 7fa62d9..af0df1a 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -4016,3 +4016,35 @@ void copy_user_huge_page(struct page *dst, struct page *src, +Index: linux-3.4/mm/memory.c +=================================================================== +--- linux-3.4.orig/mm/memory.c ++++ linux-3.4/mm/memory.c +@@ -4033,3 +4033,35 @@ void copy_user_huge_page(struct page *ds } } #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ @@ -145,6 +145,3 @@ index 7fa62d9..af0df1a 100644 +} + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0108-mm-More-lock-breaks-in-slab.c.patch b/debian/patches/features/all/rt/mm-slab-more-lock-breaks.patch similarity index 78% rename from debian/patches/features/all/rt/0108-mm-More-lock-breaks-in-slab.c.patch rename to debian/patches/features/all/rt/mm-slab-more-lock-breaks.patch index fd62ce9b3..3eb1a6e9b 100644 --- a/debian/patches/features/all/rt/0108-mm-More-lock-breaks-in-slab.c.patch +++ b/debian/patches/features/all/rt/mm-slab-more-lock-breaks.patch @@ -1,22 +1,22 @@ -From 9ba3ab7f8fd636fe3e06efa974f9768b5804037f Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 3 Jul 2009 08:44:43 -0500 -Subject: [PATCH 108/267] mm: More lock breaks in slab.c +Subject: mm: More lock breaks in slab.c Handle __free_pages outside of the locked regions. This reduces the lock contention on the percpu slab locks in -rt significantly. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner + --- - mm/slab.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++--------------- + mm/slab.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 22 deletions(-) -diff --git a/mm/slab.c b/mm/slab.c -index 5b63148..5f0c5ef 100644 ---- a/mm/slab.c -+++ b/mm/slab.c -@@ -723,6 +723,7 @@ static void slab_set_debugobj_lock_classes(struct kmem_cache *cachep) +Index: linux-3.4/mm/slab.c +=================================================================== +--- linux-3.4.orig/mm/slab.c ++++ linux-3.4/mm/slab.c +@@ -727,6 +727,7 @@ static void slab_set_debugobj_lock_class #endif static DEFINE_PER_CPU(struct delayed_work, slab_reap_work); @@ -24,7 +24,7 @@ index 5b63148..5f0c5ef 100644 static DEFINE_LOCAL_IRQ_LOCK(slab_lock); #ifndef CONFIG_PREEMPT_RT_BASE -@@ -738,14 +739,39 @@ slab_on_each_cpu(void (*func)(void *arg, int this_cpu), void *arg) +@@ -742,14 +743,39 @@ slab_on_each_cpu(void (*func)(void *arg, { unsigned int i; @@ -68,7 +68,7 @@ index 5b63148..5f0c5ef 100644 static inline struct array_cache *cpu_cache_get(struct kmem_cache *cachep) { return cachep->array[smp_processor_id()]; -@@ -1230,7 +1256,7 @@ static void __cpuinit cpuup_canceled(long cpu) +@@ -1245,7 +1271,7 @@ static void __cpuinit cpuup_canceled(lon free_block(cachep, nc->entry, nc->avail, node); if (!cpumask_empty(mask)) { @@ -77,7 +77,7 @@ index 5b63148..5f0c5ef 100644 goto free_array_cache; } -@@ -1244,7 +1270,7 @@ static void __cpuinit cpuup_canceled(long cpu) +@@ -1259,7 +1285,7 @@ static void __cpuinit cpuup_canceled(lon alien = l3->alien; l3->alien = NULL; @@ -86,7 +86,7 @@ index 5b63148..5f0c5ef 100644 kfree(shared); if (alien) { -@@ -1525,6 +1551,8 @@ void __init kmem_cache_init(void) +@@ -1540,6 +1566,8 @@ void __init kmem_cache_init(void) use_alien_caches = 0; local_irq_lock_init(slab_lock); @@ -95,7 +95,7 @@ index 5b63148..5f0c5ef 100644 for (i = 0; i < NUM_INIT_LISTS; i++) { kmem_list3_init(&initkmem_list3[i]); -@@ -1803,12 +1831,14 @@ static void *kmem_getpages(struct kmem_cache *cachep, gfp_t flags, int nodeid) +@@ -1868,12 +1896,14 @@ static void *kmem_getpages(struct kmem_c /* * Interface to system's page release. */ @@ -112,7 +112,7 @@ index 5b63148..5f0c5ef 100644 kmemcheck_free_shadow(page, cachep->gfporder); if (cachep->flags & SLAB_RECLAIM_ACCOUNT) -@@ -1824,7 +1854,13 @@ static void kmem_freepages(struct kmem_cache *cachep, void *addr) +@@ -1889,7 +1919,13 @@ static void kmem_freepages(struct kmem_c } if (current->reclaim_state) current->reclaim_state->reclaimed_slab += nr_freed; @@ -127,7 +127,7 @@ index 5b63148..5f0c5ef 100644 } static void kmem_rcu_free(struct rcu_head *head) -@@ -1832,7 +1868,7 @@ static void kmem_rcu_free(struct rcu_head *head) +@@ -1897,7 +1933,7 @@ static void kmem_rcu_free(struct rcu_hea struct slab_rcu *slab_rcu = (struct slab_rcu *)head; struct kmem_cache *cachep = slab_rcu->cachep; @@ -136,7 +136,7 @@ index 5b63148..5f0c5ef 100644 if (OFF_SLAB(cachep)) kmem_cache_free(cachep->slabp_cache, slab_rcu); } -@@ -2051,7 +2087,8 @@ static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slab +@@ -2116,7 +2152,8 @@ static void slab_destroy_debugcheck(stru * Before calling the slab must have been unlinked from the cache. The * cache-lock is not held/needed. */ @@ -146,7 +146,7 @@ index 5b63148..5f0c5ef 100644 { void *addr = slabp->s_mem - slabp->colouroff; -@@ -2064,7 +2101,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp) +@@ -2129,7 +2166,7 @@ static void slab_destroy(struct kmem_cac slab_rcu->addr = addr; call_rcu(&slab_rcu->head, kmem_rcu_free); } else { @@ -155,7 +155,7 @@ index 5b63148..5f0c5ef 100644 if (OFF_SLAB(cachep)) kmem_cache_free(cachep->slabp_cache, slabp); } -@@ -2586,9 +2623,15 @@ static void do_drain(void *arg) +@@ -2651,9 +2688,15 @@ static void do_drain(void *arg) __do_drain(arg, smp_processor_id()); } #else @@ -173,7 +173,7 @@ index 5b63148..5f0c5ef 100644 } #endif -@@ -2646,7 +2689,7 @@ static int drain_freelist(struct kmem_cache *cache, +@@ -2711,7 +2754,7 @@ static int drain_freelist(struct kmem_ca */ l3->free_objects -= cache->num; local_spin_unlock_irq(slab_lock, &l3->list_lock); @@ -182,7 +182,7 @@ index 5b63148..5f0c5ef 100644 nr_freed++; } out: -@@ -2981,7 +3024,7 @@ static int cache_grow(struct kmem_cache *cachep, +@@ -3046,7 +3089,7 @@ static int cache_grow(struct kmem_cache spin_unlock(&l3->list_lock); return 1; opps1: @@ -191,7 +191,7 @@ index 5b63148..5f0c5ef 100644 failed: if (local_flags & __GFP_WAIT) local_lock_irq(slab_lock); -@@ -3631,7 +3674,7 @@ static void free_block(struct kmem_cache *cachep, void **objpp, int nr_objects, +@@ -3700,7 +3743,7 @@ static void free_block(struct kmem_cache * a different cache, refer to comments before * alloc_slabmgmt. */ @@ -200,7 +200,7 @@ index 5b63148..5f0c5ef 100644 } else { list_add(&slabp->list, &l3->slabs_free); } -@@ -3899,7 +3942,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) +@@ -3967,7 +4010,7 @@ void kmem_cache_free(struct kmem_cache * debug_check_no_obj_freed(objp, obj_size(cachep)); local_lock_irqsave(slab_lock, flags); __cache_free(cachep, objp, __builtin_return_address(0)); @@ -209,7 +209,7 @@ index 5b63148..5f0c5ef 100644 trace_kmem_cache_free(_RET_IP_, objp); } -@@ -3929,7 +3972,7 @@ void kfree(const void *objp) +@@ -3997,7 +4040,7 @@ void kfree(const void *objp) debug_check_no_obj_freed(objp, obj_size(c)); local_lock_irqsave(slab_lock, flags); __cache_free(c, (void *)objp, __builtin_return_address(0)); @@ -218,7 +218,7 @@ index 5b63148..5f0c5ef 100644 } EXPORT_SYMBOL(kfree); -@@ -3985,7 +4028,8 @@ static int alloc_kmemlist(struct kmem_cache *cachep, gfp_t gfp) +@@ -4053,7 +4096,8 @@ static int alloc_kmemlist(struct kmem_ca } l3->free_limit = (1 + nr_cpus_node(node)) * cachep->batchcount + cachep->num; @@ -228,7 +228,7 @@ index 5b63148..5f0c5ef 100644 kfree(shared); free_alien_cache(new_alien); continue; -@@ -4051,7 +4095,9 @@ static void do_ccupdate_local(void *info) +@@ -4119,7 +4163,9 @@ static void do_ccupdate_local(void *info #else static void do_ccupdate_local(void *info, int cpu) { @@ -238,7 +238,7 @@ index 5b63148..5f0c5ef 100644 } #endif -@@ -4093,8 +4139,8 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, +@@ -4161,8 +4207,8 @@ static int do_tune_cpucache(struct kmem_ local_spin_lock_irq(slab_lock, &cachep->nodelists[cpu_to_mem(i)]->list_lock); free_block(cachep, ccold->entry, ccold->avail, cpu_to_mem(i)); @@ -249,6 +249,3 @@ index 5b63148..5f0c5ef 100644 kfree(ccold); } kfree(new); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0057-mm-slab-move-debug-out.patch.patch b/debian/patches/features/all/rt/mm-slab-move-debug-out.patch similarity index 70% rename from debian/patches/features/all/rt/0057-mm-slab-move-debug-out.patch.patch rename to debian/patches/features/all/rt/mm-slab-move-debug-out.patch index c00b4cec1..6071f1ed6 100644 --- a/debian/patches/features/all/rt/0057-mm-slab-move-debug-out.patch.patch +++ b/debian/patches/features/all/rt/mm-slab-move-debug-out.patch @@ -1,18 +1,17 @@ -From a04f0b4dea8eaefdb1f1c10122a74aee2875b1f0 Mon Sep 17 00:00:00 2001 +Subject: mm-slab-move-debug-out.patch From: Thomas Gleixner Date: Mon, 20 Jun 2011 10:42:04 +0200 -Subject: [PATCH 057/267] mm-slab-move-debug-out.patch Signed-off-by: Thomas Gleixner --- mm/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/mm/slab.c b/mm/slab.c -index b76905e..1fd9983 100644 ---- a/mm/slab.c -+++ b/mm/slab.c -@@ -3851,10 +3851,10 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) +Index: linux-3.4/mm/slab.c +=================================================================== +--- linux-3.4.orig/mm/slab.c ++++ linux-3.4/mm/slab.c +@@ -3919,10 +3919,10 @@ void kmem_cache_free(struct kmem_cache * { unsigned long flags; @@ -24,7 +23,7 @@ index b76905e..1fd9983 100644 __cache_free(cachep, objp, __builtin_return_address(0)); local_irq_restore(flags); -@@ -3880,11 +3880,11 @@ void kfree(const void *objp) +@@ -3948,11 +3948,11 @@ void kfree(const void *objp) if (unlikely(ZERO_OR_NULL_PTR(objp))) return; @@ -37,6 +36,3 @@ index b76905e..1fd9983 100644 __cache_free(c, (void *)objp, __builtin_return_address(0)); local_irq_restore(flags); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0106-mm-slab-wrap-functions.patch.patch b/debian/patches/features/all/rt/mm-slab-wrap-functions.patch similarity index 80% rename from debian/patches/features/all/rt/0106-mm-slab-wrap-functions.patch.patch rename to debian/patches/features/all/rt/mm-slab-wrap-functions.patch index 2547d7577..6392b20a8 100644 --- a/debian/patches/features/all/rt/0106-mm-slab-wrap-functions.patch.patch +++ b/debian/patches/features/all/rt/mm-slab-wrap-functions.patch @@ -1,17 +1,16 @@ -From ef8087f5fb338634be3a34608166e3d61b664ff7 Mon Sep 17 00:00:00 2001 +Subject: mm-slab-wrap-functions.patch From: Thomas Gleixner Date: Sat, 18 Jun 2011 19:44:43 +0200 -Subject: [PATCH 106/267] mm-slab-wrap-functions.patch Signed-off-by: Thomas Gleixner --- - mm/slab.c | 152 ++++++++++++++++++++++++++++++++++++++++++------------------- + mm/slab.c | 152 ++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 104 insertions(+), 48 deletions(-) -diff --git a/mm/slab.c b/mm/slab.c -index 1fd9983..38575a8 100644 ---- a/mm/slab.c -+++ b/mm/slab.c +Index: linux-3.4/mm/slab.c +=================================================================== +--- linux-3.4.orig/mm/slab.c ++++ linux-3.4/mm/slab.c @@ -116,6 +116,7 @@ #include #include @@ -20,7 +19,7 @@ index 1fd9983..38575a8 100644 #include #include -@@ -722,12 +723,40 @@ static void slab_set_debugobj_lock_classes(struct kmem_cache *cachep) +@@ -726,12 +727,40 @@ static void slab_set_debugobj_lock_class #endif static DEFINE_PER_CPU(struct delayed_work, slab_reap_work); @@ -61,7 +60,7 @@ index 1fd9983..38575a8 100644 static inline struct kmem_cache *__find_general_cachep(size_t size, gfp_t gfpflags) { -@@ -1065,9 +1094,10 @@ static void reap_alien(struct kmem_cache *cachep, struct kmem_list3 *l3) +@@ -1080,9 +1109,10 @@ static void reap_alien(struct kmem_cache if (l3->alien) { struct array_cache *ac = l3->alien[node]; @@ -74,7 +73,7 @@ index 1fd9983..38575a8 100644 } } } -@@ -1082,9 +1112,9 @@ static void drain_alien_cache(struct kmem_cache *cachep, +@@ -1097,9 +1127,9 @@ static void drain_alien_cache(struct kme for_each_online_node(i) { ac = alien[i]; if (ac) { @@ -86,7 +85,7 @@ index 1fd9983..38575a8 100644 } } } -@@ -1163,11 +1193,11 @@ static int init_cache_nodelists_node(int node) +@@ -1178,11 +1208,11 @@ static int init_cache_nodelists_node(int cachep->nodelists[node] = l3; } @@ -100,7 +99,7 @@ index 1fd9983..38575a8 100644 } return 0; } -@@ -1192,7 +1222,7 @@ static void __cpuinit cpuup_canceled(long cpu) +@@ -1207,7 +1237,7 @@ static void __cpuinit cpuup_canceled(lon if (!l3) goto free_array_cache; @@ -109,7 +108,7 @@ index 1fd9983..38575a8 100644 /* Free limit for this kmem_list3 */ l3->free_limit -= cachep->batchcount; -@@ -1200,7 +1230,7 @@ static void __cpuinit cpuup_canceled(long cpu) +@@ -1215,7 +1245,7 @@ static void __cpuinit cpuup_canceled(lon free_block(cachep, nc->entry, nc->avail, node); if (!cpumask_empty(mask)) { @@ -118,7 +117,7 @@ index 1fd9983..38575a8 100644 goto free_array_cache; } -@@ -1214,7 +1244,7 @@ static void __cpuinit cpuup_canceled(long cpu) +@@ -1229,7 +1259,7 @@ static void __cpuinit cpuup_canceled(lon alien = l3->alien; l3->alien = NULL; @@ -127,7 +126,7 @@ index 1fd9983..38575a8 100644 kfree(shared); if (alien) { -@@ -1288,7 +1318,7 @@ static int __cpuinit cpuup_prepare(long cpu) +@@ -1303,7 +1333,7 @@ static int __cpuinit cpuup_prepare(long l3 = cachep->nodelists[node]; BUG_ON(!l3); @@ -136,7 +135,7 @@ index 1fd9983..38575a8 100644 if (!l3->shared) { /* * We are serialised from CPU_DEAD or -@@ -1303,7 +1333,7 @@ static int __cpuinit cpuup_prepare(long cpu) +@@ -1318,7 +1348,7 @@ static int __cpuinit cpuup_prepare(long alien = NULL; } #endif @@ -145,7 +144,7 @@ index 1fd9983..38575a8 100644 kfree(shared); free_alien_cache(alien); if (cachep->flags & SLAB_DEBUG_OBJECTS) -@@ -1494,6 +1524,8 @@ void __init kmem_cache_init(void) +@@ -1509,6 +1539,8 @@ void __init kmem_cache_init(void) if (num_possible_nodes() == 1) use_alien_caches = 0; @@ -154,7 +153,7 @@ index 1fd9983..38575a8 100644 for (i = 0; i < NUM_INIT_LISTS; i++) { kmem_list3_init(&initkmem_list3[i]); if (i < MAX_NUMNODES) -@@ -2500,7 +2532,7 @@ EXPORT_SYMBOL(kmem_cache_create); +@@ -2565,7 +2597,7 @@ EXPORT_SYMBOL(kmem_cache_create); #if DEBUG static void check_irq_off(void) { @@ -163,7 +162,7 @@ index 1fd9983..38575a8 100644 } static void check_irq_on(void) -@@ -2535,13 +2567,12 @@ static void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, +@@ -2600,13 +2632,12 @@ static void drain_array(struct kmem_cach struct array_cache *ac, int force, int node); @@ -179,7 +178,7 @@ index 1fd9983..38575a8 100644 ac = cpu_cache_get(cachep); spin_lock(&cachep->nodelists[node]->list_lock); free_block(cachep, ac->entry, ac->avail, node); -@@ -2549,12 +2580,24 @@ static void do_drain(void *arg) +@@ -2614,12 +2645,24 @@ static void do_drain(void *arg) ac->avail = 0; } @@ -205,7 +204,7 @@ index 1fd9983..38575a8 100644 check_irq_on(); for_each_online_node(node) { l3 = cachep->nodelists[node]; -@@ -2585,10 +2628,10 @@ static int drain_freelist(struct kmem_cache *cache, +@@ -2650,10 +2693,10 @@ static int drain_freelist(struct kmem_ca nr_freed = 0; while (nr_freed < tofree && !list_empty(&l3->slabs_free)) { @@ -218,7 +217,7 @@ index 1fd9983..38575a8 100644 goto out; } -@@ -2602,7 +2645,7 @@ static int drain_freelist(struct kmem_cache *cache, +@@ -2667,7 +2710,7 @@ static int drain_freelist(struct kmem_ca * to the cache. */ l3->free_objects -= cache->num; @@ -227,7 +226,7 @@ index 1fd9983..38575a8 100644 slab_destroy(cache, slabp); nr_freed++; } -@@ -2897,7 +2940,7 @@ static int cache_grow(struct kmem_cache *cachep, +@@ -2962,7 +3005,7 @@ static int cache_grow(struct kmem_cache offset *= cachep->colour_off; if (local_flags & __GFP_WAIT) @@ -236,7 +235,7 @@ index 1fd9983..38575a8 100644 /* * The test for missing atomic flag is performed here, rather than -@@ -2927,7 +2970,7 @@ static int cache_grow(struct kmem_cache *cachep, +@@ -2992,7 +3035,7 @@ static int cache_grow(struct kmem_cache cache_init_objs(cachep, slabp); if (local_flags & __GFP_WAIT) @@ -245,7 +244,7 @@ index 1fd9983..38575a8 100644 check_irq_off(); spin_lock(&l3->list_lock); -@@ -2941,7 +2984,7 @@ opps1: +@@ -3006,7 +3049,7 @@ opps1: kmem_freepages(cachep, objp); failed: if (local_flags & __GFP_WAIT) @@ -254,7 +253,7 @@ index 1fd9983..38575a8 100644 return 0; } -@@ -3333,11 +3376,11 @@ retry: +@@ -3400,11 +3443,11 @@ retry: * set and go into memory reserves if necessary. */ if (local_flags & __GFP_WAIT) @@ -268,7 +267,7 @@ index 1fd9983..38575a8 100644 if (obj) { /* * Insert into the appropriate per node queues -@@ -3453,7 +3496,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, +@@ -3522,7 +3565,7 @@ __cache_alloc_node(struct kmem_cache *ca return NULL; cache_alloc_debugcheck_before(cachep, flags); @@ -277,7 +276,7 @@ index 1fd9983..38575a8 100644 if (nodeid == NUMA_NO_NODE) nodeid = slab_node; -@@ -3478,7 +3521,7 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, +@@ -3547,7 +3590,7 @@ __cache_alloc_node(struct kmem_cache *ca /* ___cache_alloc_node can fall back to other nodes */ ptr = ____cache_alloc_node(cachep, flags, nodeid); out: @@ -286,7 +285,7 @@ index 1fd9983..38575a8 100644 ptr = cache_alloc_debugcheck_after(cachep, flags, ptr, caller); kmemleak_alloc_recursive(ptr, obj_size(cachep), 1, cachep->flags, flags); -@@ -3538,9 +3581,9 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller) +@@ -3607,9 +3650,9 @@ __cache_alloc(struct kmem_cache *cachep, return NULL; cache_alloc_debugcheck_before(cachep, flags); @@ -298,7 +297,7 @@ index 1fd9983..38575a8 100644 objp = cache_alloc_debugcheck_after(cachep, flags, objp, caller); kmemleak_alloc_recursive(objp, obj_size(cachep), 1, cachep->flags, flags); -@@ -3854,9 +3897,9 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp) +@@ -3922,9 +3965,9 @@ void kmem_cache_free(struct kmem_cache * debug_check_no_locks_freed(objp, obj_size(cachep)); if (!(cachep->flags & SLAB_DEBUG_OBJECTS)) debug_check_no_obj_freed(objp, obj_size(cachep)); @@ -310,7 +309,7 @@ index 1fd9983..38575a8 100644 trace_kmem_cache_free(_RET_IP_, objp); } -@@ -3884,9 +3927,9 @@ void kfree(const void *objp) +@@ -3952,9 +3995,9 @@ void kfree(const void *objp) c = virt_to_cache(objp); debug_check_no_locks_freed(objp, obj_size(c)); debug_check_no_obj_freed(objp, obj_size(c)); @@ -322,7 +321,7 @@ index 1fd9983..38575a8 100644 } EXPORT_SYMBOL(kfree); -@@ -3929,7 +3972,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep, gfp_t gfp) +@@ -3997,7 +4040,7 @@ static int alloc_kmemlist(struct kmem_ca if (l3) { struct array_cache *shared = l3->shared; @@ -331,7 +330,7 @@ index 1fd9983..38575a8 100644 if (shared) free_block(cachep, shared->entry, -@@ -3942,7 +3985,7 @@ static int alloc_kmemlist(struct kmem_cache *cachep, gfp_t gfp) +@@ -4010,7 +4053,7 @@ static int alloc_kmemlist(struct kmem_ca } l3->free_limit = (1 + nr_cpus_node(node)) * cachep->batchcount + cachep->num; @@ -340,7 +339,7 @@ index 1fd9983..38575a8 100644 kfree(shared); free_alien_cache(new_alien); continue; -@@ -3989,17 +4032,28 @@ struct ccupdate_struct { +@@ -4057,17 +4100,28 @@ struct ccupdate_struct { struct array_cache *new[0]; }; @@ -374,7 +373,7 @@ index 1fd9983..38575a8 100644 /* Always called with the cache_chain_mutex held */ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, -@@ -4025,7 +4079,7 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, +@@ -4093,7 +4147,7 @@ static int do_tune_cpucache(struct kmem_ } new->cachep = cachep; @@ -383,7 +382,7 @@ index 1fd9983..38575a8 100644 check_irq_on(); cachep->batchcount = batchcount; -@@ -4036,9 +4090,11 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit, +@@ -4104,9 +4158,11 @@ static int do_tune_cpucache(struct kmem_ struct array_cache *ccold = new->new[i]; if (!ccold) continue; @@ -397,7 +396,7 @@ index 1fd9983..38575a8 100644 kfree(ccold); } kfree(new); -@@ -4114,7 +4170,7 @@ static void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, +@@ -4182,7 +4238,7 @@ static void drain_array(struct kmem_cach if (ac->touched && !force) { ac->touched = 0; } else { @@ -406,7 +405,7 @@ index 1fd9983..38575a8 100644 if (ac->avail) { tofree = force ? ac->avail : (ac->limit + 4) / 5; if (tofree > ac->avail) -@@ -4124,7 +4180,7 @@ static void drain_array(struct kmem_cache *cachep, struct kmem_list3 *l3, +@@ -4192,7 +4248,7 @@ static void drain_array(struct kmem_cach memmove(ac->entry, &(ac->entry[tofree]), sizeof(void *) * ac->avail); } @@ -415,7 +414,7 @@ index 1fd9983..38575a8 100644 } } -@@ -4263,7 +4319,7 @@ static int s_show(struct seq_file *m, void *p) +@@ -4331,7 +4387,7 @@ static int s_show(struct seq_file *m, vo continue; check_irq_on(); @@ -424,7 +423,7 @@ index 1fd9983..38575a8 100644 list_for_each_entry(slabp, &l3->slabs_full, list) { if (slabp->inuse != cachep->num && !error) -@@ -4288,7 +4344,7 @@ static int s_show(struct seq_file *m, void *p) +@@ -4356,7 +4412,7 @@ static int s_show(struct seq_file *m, vo if (l3->shared) shared_avail += l3->shared->avail; @@ -433,7 +432,7 @@ index 1fd9983..38575a8 100644 } num_slabs += active_slabs; num_objs = num_slabs * cachep->num; -@@ -4517,13 +4573,13 @@ static int leaks_show(struct seq_file *m, void *p) +@@ -4585,13 +4641,13 @@ static int leaks_show(struct seq_file *m continue; check_irq_on(); @@ -449,6 +448,3 @@ index 1fd9983..38575a8 100644 } name = cachep->name; if (n[0] == n[1]) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0225-mm-vmalloc.patch.patch b/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch similarity index 69% rename from debian/patches/features/all/rt/0225-mm-vmalloc.patch.patch rename to debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch index 2608068e3..82c485e1d 100644 --- a/debian/patches/features/all/rt/0225-mm-vmalloc.patch.patch +++ b/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch @@ -1,18 +1,17 @@ -From c3c1151199a7fdb1daf2a026f16684bee49ec26d Mon Sep 17 00:00:00 2001 +Subject: mm-vmalloc.patch From: Thomas Gleixner Date: Tue, 12 Jul 2011 11:39:36 +0200 -Subject: [PATCH 225/267] mm-vmalloc.patch Signed-off-by: Thomas Gleixner --- mm/vmalloc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -diff --git a/mm/vmalloc.c b/mm/vmalloc.c -index 27be2f0..071155a 100644 ---- a/mm/vmalloc.c -+++ b/mm/vmalloc.c -@@ -782,7 +782,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) +Index: linux-3.4/mm/vmalloc.c +=================================================================== +--- linux-3.4.orig/mm/vmalloc.c ++++ linux-3.4/mm/vmalloc.c +@@ -782,7 +782,7 @@ static struct vmap_block *new_vmap_block struct vmap_block *vb; struct vmap_area *va; unsigned long vb_idx; @@ -21,7 +20,7 @@ index 27be2f0..071155a 100644 node = numa_node_id(); -@@ -821,12 +821,13 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) +@@ -821,12 +821,13 @@ static struct vmap_block *new_vmap_block BUG_ON(err); radix_tree_preload_end(); @@ -37,7 +36,7 @@ index 27be2f0..071155a 100644 return vb; } -@@ -900,7 +901,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask) +@@ -900,7 +901,7 @@ static void *vb_alloc(unsigned long size struct vmap_block *vb; unsigned long addr = 0; unsigned int order; @@ -46,7 +45,7 @@ index 27be2f0..071155a 100644 BUG_ON(size & ~PAGE_MASK); BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC); -@@ -908,7 +909,8 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask) +@@ -908,7 +909,8 @@ static void *vb_alloc(unsigned long size again: rcu_read_lock(); @@ -65,6 +64,3 @@ index 27be2f0..071155a 100644 rcu_read_unlock(); if (!addr) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0180-mutex-no-spin-on-rt.patch.patch b/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch similarity index 62% rename from debian/patches/features/all/rt/0180-mutex-no-spin-on-rt.patch.patch rename to debian/patches/features/all/rt/mutex-no-spin-on-rt.patch index f39745419..1af4bb437 100644 --- a/debian/patches/features/all/rt/0180-mutex-no-spin-on-rt.patch.patch +++ b/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch @@ -1,23 +1,19 @@ -From 5607758a2f07ffc4d0ee4c90d4a53a4090e38905 Mon Sep 17 00:00:00 2001 +Subject: mutex-no-spin-on-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:51:45 +0200 -Subject: [PATCH 180/267] mutex-no-spin-on-rt.patch Signed-off-by: Thomas Gleixner --- kernel/Kconfig.locks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks -index 5068e2a..7bd0598 100644 ---- a/kernel/Kconfig.locks -+++ b/kernel/Kconfig.locks +Index: linux-3.4/kernel/Kconfig.locks +=================================================================== +--- linux-3.4.orig/kernel/Kconfig.locks ++++ linux-3.4/kernel/Kconfig.locks @@ -199,4 +199,4 @@ config INLINE_WRITE_UNLOCK_IRQRESTORE def_bool !DEBUG_SPINLOCK && ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE config MUTEX_SPIN_ON_OWNER - def_bool SMP && !DEBUG_MUTEXES + def_bool SMP && !DEBUG_MUTEXES && !PREEMPT_RT_FULL --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0060-net-flip-lock-dep-thingy.patch.patch b/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch similarity index 92% rename from debian/patches/features/all/rt/0060-net-flip-lock-dep-thingy.patch.patch rename to debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch index 02ce22c73..68d5ab63e 100644 --- a/debian/patches/features/all/rt/0060-net-flip-lock-dep-thingy.patch.patch +++ b/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch @@ -1,7 +1,6 @@ -From 7f2038cd9f9a170fb63f0ab16d1ff7a8b9ee92cf Mon Sep 17 00:00:00 2001 +Subject: net-flip-lock-dep-thingy.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 10:59:58 +0200 -Subject: [PATCH 060/267] net-flip-lock-dep-thingy.patch ======================================================= [ INFO: possible circular locking dependency detected ] @@ -15,6 +14,7 @@ but task is already holding lock: which lock already depends on the new lock. + the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+...}: @@ -87,16 +87,17 @@ Call Trace: [] sys_close+0xf8/0x13d [] system_call_fastpath+0x16/0x1b + Signed-off-by: Thomas Gleixner --- 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 b23f174..a87eb16 100644 ---- a/net/core/sock.c -+++ b/net/core/sock.c -@@ -2031,12 +2031,11 @@ void lock_sock_nested(struct sock *sk, int subclass) +Index: linux-3.4/net/core/sock.c +=================================================================== +--- linux-3.4.orig/net/core/sock.c ++++ linux-3.4/net/core/sock.c +@@ -2139,12 +2139,11 @@ void lock_sock_nested(struct sock *sk, i if (sk->sk_lock.owned) __lock_sock(sk); sk->sk_lock.owned = 1; @@ -110,6 +111,3 @@ index b23f174..a87eb16 100644 } EXPORT_SYMBOL(lock_sock_nested); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0123-net-ipv4-route-use-locks-on-up-rt.patch.patch b/debian/patches/features/all/rt/net-ipv4-route-use-locks-on-up-rt.patch similarity index 63% rename from debian/patches/features/all/rt/0123-net-ipv4-route-use-locks-on-up-rt.patch.patch rename to debian/patches/features/all/rt/net-ipv4-route-use-locks-on-up-rt.patch index 4b56b6001..a99156803 100644 --- a/debian/patches/features/all/rt/0123-net-ipv4-route-use-locks-on-up-rt.patch.patch +++ b/debian/patches/features/all/rt/net-ipv4-route-use-locks-on-up-rt.patch @@ -1,18 +1,17 @@ -From d0061bd859e53b1ca699fb341a43f3911ab18c57 Mon Sep 17 00:00:00 2001 +Subject: net-ipv4-route-use-locks-on-up-rt.patch From: Thomas Gleixner Date: Fri, 15 Jul 2011 16:24:45 +0200 -Subject: [PATCH 123/267] net-ipv4-route-use-locks-on-up-rt.patch Signed-off-by: Thomas Gleixner --- net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/net/ipv4/route.c b/net/ipv4/route.c -index 94cdbc5..5cb9301 100644 ---- a/net/ipv4/route.c -+++ b/net/ipv4/route.c -@@ -251,7 +251,7 @@ struct rt_hash_bucket { +Index: linux-3.4/net/ipv4/route.c +=================================================================== +--- linux-3.4.orig/net/ipv4/route.c ++++ linux-3.4/net/ipv4/route.c +@@ -250,7 +250,7 @@ struct rt_hash_bucket { }; #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) || \ @@ -21,6 +20,3 @@ index 94cdbc5..5cb9301 100644 /* * Instead of using one spinlock for each rt_hash_bucket, we use a table of spinlocks * The size of this table is a power of two and depends on the number of CPUS. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0177-net-netif_rx_ni-migrate-disable.patch.patch b/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch similarity index 55% rename from debian/patches/features/all/rt/0177-net-netif_rx_ni-migrate-disable.patch.patch rename to debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch index 8d45ec1de..007147d50 100644 --- a/debian/patches/features/all/rt/0177-net-netif_rx_ni-migrate-disable.patch.patch +++ b/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch @@ -1,18 +1,17 @@ -From da9e78fe5c96c817502207c8345edc939ed193e7 Mon Sep 17 00:00:00 2001 +Subject: net-netif_rx_ni-migrate-disable.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 16:29:27 +0200 -Subject: [PATCH 177/267] net-netif_rx_ni-migrate-disable.patch Signed-off-by: Thomas Gleixner --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/net/core/dev.c b/net/core/dev.c -index c28987a..517b488 100644 ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -3034,11 +3034,11 @@ int netif_rx_ni(struct sk_buff *skb) +Index: linux-3.4/net/core/dev.c +=================================================================== +--- linux-3.4.orig/net/core/dev.c ++++ linux-3.4/net/core/dev.c +@@ -2986,11 +2986,11 @@ int netif_rx_ni(struct sk_buff *skb) { int err; @@ -26,6 +25,3 @@ index c28987a..517b488 100644 return err; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0241-net-Avoid-livelock-in-net_tx_action-on-RT.patch b/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch similarity index 87% rename from debian/patches/features/all/rt/0241-net-Avoid-livelock-in-net_tx_action-on-RT.patch rename to debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch index 7c5e488c6..5219bfd13 100644 --- a/debian/patches/features/all/rt/0241-net-Avoid-livelock-in-net_tx_action-on-RT.patch +++ b/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch @@ -1,7 +1,6 @@ -From 4bb6ba21dff8a44363b012ed9cf7e881d52cb46d Mon Sep 17 00:00:00 2001 +Subject: net: Avoid livelock in net_tx_action() on RT From: Steven Rostedt -Date: Thu, 6 Oct 2011 10:48:39 -0400 -Subject: [PATCH 241/267] net: Avoid livelock in net_tx_action() on RT +Date: Thu, 06 Oct 2011 10:48:39 -0400 qdisc_lock is taken w/o disabling interrupts or bottom halfs. So code holding a qdisc_lock() can be interrupted and softirqs can run on the @@ -38,15 +37,16 @@ Cc: Clark Williams Cc: John Kacur Cc: Luis Claudio R. Goncalves Signed-off-by: Thomas Gleixner + --- net/core/dev.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) -diff --git a/net/core/dev.c b/net/core/dev.c -index d030f8d..ae4fd5e 100644 ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -3044,6 +3044,36 @@ int netif_rx_ni(struct sk_buff *skb) +Index: linux-3.4/net/core/dev.c +=================================================================== +--- linux-3.4.orig/net/core/dev.c ++++ linux-3.4/net/core/dev.c +@@ -2996,6 +2996,36 @@ int netif_rx_ni(struct sk_buff *skb) } EXPORT_SYMBOL(netif_rx_ni); @@ -83,7 +83,7 @@ index d030f8d..ae4fd5e 100644 static void net_tx_action(struct softirq_action *h) { struct softnet_data *sd = &__get_cpu_var(softnet_data); -@@ -3082,7 +3112,7 @@ static void net_tx_action(struct softirq_action *h) +@@ -3034,7 +3064,7 @@ static void net_tx_action(struct softirq head = head->next_sched; root_lock = qdisc_lock(q); @@ -92,6 +92,3 @@ index d030f8d..ae4fd5e 100644 smp_mb__before_clear_bit(); clear_bit(__QDISC_STATE_SCHED, &q->state); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0263-net-Use-cpu_chill-instead-of-cpu_relax.patch b/debian/patches/features/all/rt/net-use-cpu-chill.patch similarity index 64% rename from debian/patches/features/all/rt/0263-net-Use-cpu_chill-instead-of-cpu_relax.patch rename to debian/patches/features/all/rt/net-use-cpu-chill.patch index 1d22092f0..f26203858 100644 --- a/debian/patches/features/all/rt/0263-net-Use-cpu_chill-instead-of-cpu_relax.patch +++ b/debian/patches/features/all/rt/net-use-cpu-chill.patch @@ -1,7 +1,6 @@ -From e2d058a316dbb69d978d84769ae3e3a2783ff9f2 Mon Sep 17 00:00:00 2001 +Subject: net: Use cpu_chill() instead of cpu_relax() From: Thomas Gleixner -Date: Wed, 7 Mar 2012 21:10:04 +0100 -Subject: [PATCH 263/267] net: Use cpu_chill() instead of cpu_relax() +Date: Wed, 07 Mar 2012 21:10:04 +0100 Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system @@ -14,11 +13,11 @@ Cc: stable-rt@vger.kernel.org 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 d9d4970..ed8ef1e 100644 ---- a/net/packet/af_packet.c -+++ b/net/packet/af_packet.c -@@ -89,6 +89,7 @@ +Index: linux-3.4/net/packet/af_packet.c +=================================================================== +--- linux-3.4.orig/net/packet/af_packet.c ++++ linux-3.4/net/packet/af_packet.c +@@ -88,6 +88,7 @@ #include #include #include @@ -26,7 +25,7 @@ index d9d4970..ed8ef1e 100644 #ifdef CONFIG_INET #include -@@ -673,7 +674,7 @@ static void prb_retire_rx_blk_timer_expired(unsigned long data) +@@ -672,7 +673,7 @@ static void prb_retire_rx_blk_timer_expi if (BLOCK_NUM_PKTS(pbd)) { while (atomic_read(&pkc->blk_fill_in_prog)) { /* Waiting for skb_copy_bits to finish... */ @@ -35,7 +34,7 @@ index d9d4970..ed8ef1e 100644 } } -@@ -928,7 +929,7 @@ static void prb_retire_current_block(struct tpacket_kbdq_core *pkc, +@@ -927,7 +928,7 @@ static void prb_retire_current_block(str if (!(status & TP_STATUS_BLK_TMO)) { while (atomic_read(&pkc->blk_fill_in_prog)) { /* Waiting for skb_copy_bits to finish... */ @@ -44,10 +43,10 @@ index d9d4970..ed8ef1e 100644 } } prb_close_block(pkc, pbd, po, status); -diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c -index e8fdb17..5a44c6e 100644 ---- a/net/rds/ib_rdma.c -+++ b/net/rds/ib_rdma.c +Index: linux-3.4/net/rds/ib_rdma.c +=================================================================== +--- linux-3.4.orig/net/rds/ib_rdma.c ++++ linux-3.4/net/rds/ib_rdma.c @@ -34,6 +34,7 @@ #include #include @@ -56,7 +55,7 @@ index e8fdb17..5a44c6e 100644 #include "rds.h" #include "ib.h" -@@ -286,7 +287,7 @@ static inline void wait_clean_list_grace(void) +@@ -286,7 +287,7 @@ static inline void wait_clean_list_grace for_each_online_cpu(cpu) { flag = &per_cpu(clean_list_grace, cpu); while (test_bit(CLEAN_LIST_BUSY_BIT, flag)) @@ -65,6 +64,3 @@ index e8fdb17..5a44c6e 100644 } } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0091-net-wireless-warn-nort.patch.patch b/debian/patches/features/all/rt/net-wireless-warn-nort.patch similarity index 57% rename from debian/patches/features/all/rt/0091-net-wireless-warn-nort.patch.patch rename to debian/patches/features/all/rt/net-wireless-warn-nort.patch index a070c1021..ef38c04ce 100644 --- a/debian/patches/features/all/rt/0091-net-wireless-warn-nort.patch.patch +++ b/debian/patches/features/all/rt/net-wireless-warn-nort.patch @@ -1,18 +1,17 @@ -From 384bc8236ecff10777676ea6f2e5cc5d03fbe2c4 Mon Sep 17 00:00:00 2001 +Subject: net-wireless-warn-nort.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 21:05:33 +0200 -Subject: [PATCH 091/267] net-wireless-warn-nort.patch Signed-off-by: Thomas Gleixner --- 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 064d20f..642d96c 100644 ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -2958,7 +2958,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) +Index: linux-3.4/net/mac80211/rx.c +=================================================================== +--- linux-3.4.orig/net/mac80211/rx.c ++++ linux-3.4/net/mac80211/rx.c +@@ -3015,7 +3015,7 @@ void ieee80211_rx(struct ieee80211_hw *h struct ieee80211_supported_band *sband; struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); @@ -21,6 +20,3 @@ index 064d20f..642d96c 100644 if (WARN_ON(status->band < 0 || status->band >= IEEE80211_NUM_BANDS)) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/ntp-make-ntp-lock-raw-sigh.patch b/debian/patches/features/all/rt/ntp-make-ntp-lock-raw-sigh.patch new file mode 100644 index 000000000..28d3f19c3 --- /dev/null +++ b/debian/patches/features/all/rt/ntp-make-ntp-lock-raw-sigh.patch @@ -0,0 +1,127 @@ +Subject: ntp: Make ntp_lock raw. +From: Thomas Gleixner +Date: Tue, 10 Apr 2012 11:14:55 +0200 + +This needs to be revisited. Not sure whether we can avoid to make this +lock raw, but it'd really like to. + +Signed-off-by: Thomas Gleixner +--- + kernel/time/ntp.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +Index: linux-3.4/kernel/time/ntp.c +=================================================================== +--- linux-3.4.orig/kernel/time/ntp.c ++++ linux-3.4/kernel/time/ntp.c +@@ -22,7 +22,7 @@ + * NTP timekeeping variables: + */ + +-DEFINE_SPINLOCK(ntp_lock); ++DEFINE_RAW_SPINLOCK(ntp_lock); + + + /* USER_HZ period (usecs): */ +@@ -347,7 +347,7 @@ void ntp_clear(void) + { + unsigned long flags; + +- spin_lock_irqsave(&ntp_lock, flags); ++ raw_spin_lock_irqsave(&ntp_lock, flags); + + time_adjust = 0; /* stop active adjtime() */ + time_status |= STA_UNSYNC; +@@ -361,7 +361,7 @@ void ntp_clear(void) + + /* Clear PPS state variables */ + pps_clear(); +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + + } + +@@ -371,9 +371,9 @@ u64 ntp_tick_length(void) + unsigned long flags; + s64 ret; + +- spin_lock_irqsave(&ntp_lock, flags); ++ raw_spin_lock_irqsave(&ntp_lock, flags); + ret = tick_length; +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + return ret; + } + +@@ -394,7 +394,7 @@ int second_overflow(unsigned long secs) + int leap = 0; + unsigned long flags; + +- spin_lock_irqsave(&ntp_lock, flags); ++ raw_spin_lock_irqsave(&ntp_lock, flags); + + /* + * Leap second processing. If in leap-insert state at the end of the +@@ -476,7 +476,7 @@ int second_overflow(unsigned long secs) + + + out: +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + + return leap; + } +@@ -658,7 +658,7 @@ int do_adjtimex(struct timex *txc) + + getnstimeofday(&ts); + +- spin_lock_irq(&ntp_lock); ++ raw_spin_lock_irq(&ntp_lock); + + if (txc->modes & ADJ_ADJTIME) { + long save_adjust = time_adjust; +@@ -700,7 +700,7 @@ int do_adjtimex(struct timex *txc) + /* fill PPS status fields */ + pps_fill_timex(txc); + +- spin_unlock_irq(&ntp_lock); ++ raw_spin_unlock_irq(&ntp_lock); + + txc->time.tv_sec = ts.tv_sec; + txc->time.tv_usec = ts.tv_nsec; +@@ -898,7 +898,7 @@ void hardpps(const struct timespec *phas + + pts_norm = pps_normalize_ts(*phase_ts); + +- spin_lock_irqsave(&ntp_lock, flags); ++ raw_spin_lock_irqsave(&ntp_lock, flags); + + /* clear the error bits, they will be set again if needed */ + time_status &= ~(STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR); +@@ -911,7 +911,7 @@ void hardpps(const struct timespec *phas + * just start the frequency interval */ + if (unlikely(pps_fbase.tv_sec == 0)) { + pps_fbase = *raw_ts; +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + return; + } + +@@ -926,7 +926,7 @@ void hardpps(const struct timespec *phas + time_status |= STA_PPSJITTER; + /* restart the frequency calibration interval */ + pps_fbase = *raw_ts; +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + pr_err("hardpps: PPSJITTER: bad pulse\n"); + return; + } +@@ -943,7 +943,7 @@ void hardpps(const struct timespec *phas + + hardpps_update_phase(pts_norm.nsec); + +- spin_unlock_irqrestore(&ntp_lock, flags); ++ raw_spin_unlock_irqrestore(&ntp_lock, flags); + } + EXPORT_SYMBOL(hardpps); + diff --git a/debian/patches/features/all/rt/0054-of-convert-devtree-lock.patch.patch b/debian/patches/features/all/rt/of-convert-devtree-lock.patch similarity index 77% rename from debian/patches/features/all/rt/0054-of-convert-devtree-lock.patch.patch rename to debian/patches/features/all/rt/of-convert-devtree-lock.patch index ca2214ad1..865a78d7e 100644 --- a/debian/patches/features/all/rt/0054-of-convert-devtree-lock.patch.patch +++ b/debian/patches/features/all/rt/of-convert-devtree-lock.patch @@ -1,20 +1,19 @@ -From 580a4dd59597f8d389ab340f87ebb0ad654db7e3 Mon Sep 17 00:00:00 2001 +Subject: of-convert-devtree-lock.patch From: Thomas Gleixner Date: Mon, 21 Mar 2011 14:35:34 +0100 -Subject: [PATCH 054/267] of-convert-devtree-lock.patch Signed-off-by: Thomas Gleixner --- - arch/sparc/kernel/prom_common.c | 4 +- - drivers/of/base.c | 92 ++++++++++++++++++++++----------------- - include/linux/of.h | 2 +- + arch/sparc/kernel/prom_common.c | 4 - + drivers/of/base.c | 92 ++++++++++++++++++++++------------------ + include/linux/of.h | 2 3 files changed, 55 insertions(+), 43 deletions(-) -diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c -index 741df91..ca73a28 100644 ---- a/arch/sparc/kernel/prom_common.c -+++ b/arch/sparc/kernel/prom_common.c -@@ -65,7 +65,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len +Index: linux-3.4/arch/sparc/kernel/prom_common.c +=================================================================== +--- linux-3.4.orig/arch/sparc/kernel/prom_common.c ++++ linux-3.4/arch/sparc/kernel/prom_common.c +@@ -65,7 +65,7 @@ int of_set_property(struct device_node * err = -ENODEV; mutex_lock(&of_set_property_mutex); @@ -23,7 +22,7 @@ index 741df91..ca73a28 100644 prevp = &dp->properties; while (*prevp) { struct property *prop = *prevp; -@@ -92,7 +92,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len +@@ -92,7 +92,7 @@ int of_set_property(struct device_node * } prevp = &(*prevp)->next; } @@ -32,10 +31,10 @@ index 741df91..ca73a28 100644 mutex_unlock(&of_set_property_mutex); /* XXX Upate procfs if necessary... */ -diff --git a/drivers/of/base.c b/drivers/of/base.c -index 200f2dd..becc6ca 100644 ---- a/drivers/of/base.c -+++ b/drivers/of/base.c +Index: linux-3.4/drivers/of/base.c +=================================================================== +--- linux-3.4.orig/drivers/of/base.c ++++ linux-3.4/drivers/of/base.c @@ -54,7 +54,7 @@ static DEFINE_MUTEX(of_aliases_mutex); /* use when traversing tree through the allnext, child, sibling, * or parent members of struct device_node. @@ -45,7 +44,7 @@ index 200f2dd..becc6ca 100644 int of_n_addr_cells(struct device_node *np) { -@@ -187,10 +187,11 @@ struct property *of_find_property(const struct device_node *np, +@@ -187,10 +187,11 @@ struct property *of_find_property(const int *lenp) { struct property *pp; @@ -59,7 +58,7 @@ index 200f2dd..becc6ca 100644 return pp; } -@@ -208,13 +209,13 @@ struct device_node *of_find_all_nodes(struct device_node *prev) +@@ -208,13 +209,13 @@ struct device_node *of_find_all_nodes(st { struct device_node *np; @@ -75,7 +74,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_all_nodes); -@@ -273,11 +274,12 @@ static int __of_device_is_compatible(const struct device_node *device, +@@ -273,11 +274,12 @@ static int __of_device_is_compatible(con int of_device_is_compatible(const struct device_node *device, const char *compat) { @@ -125,7 +124,7 @@ index 200f2dd..becc6ca 100644 return parent; } -@@ -387,14 +391,15 @@ struct device_node *of_get_next_child(const struct device_node *node, +@@ -387,14 +391,15 @@ struct device_node *of_get_next_child(co struct device_node *prev) { struct device_node *next; @@ -161,7 +160,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_node_by_path); -@@ -436,15 +442,16 @@ struct device_node *of_find_node_by_name(struct device_node *from, +@@ -436,15 +442,16 @@ struct device_node *of_find_node_by_name const char *name) { struct device_node *np; @@ -180,7 +179,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_node_by_name); -@@ -465,15 +472,16 @@ struct device_node *of_find_node_by_type(struct device_node *from, +@@ -465,15 +472,16 @@ struct device_node *of_find_node_by_type const char *type) { struct device_node *np; @@ -199,7 +198,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_node_by_type); -@@ -496,8 +504,9 @@ struct device_node *of_find_compatible_node(struct device_node *from, +@@ -496,8 +504,9 @@ struct device_node *of_find_compatible_n const char *type, const char *compatible) { struct device_node *np; @@ -210,7 +209,7 @@ index 200f2dd..becc6ca 100644 np = from ? from->allnext : allnodes; for (; np; np = np->allnext) { if (type -@@ -508,7 +517,7 @@ struct device_node *of_find_compatible_node(struct device_node *from, +@@ -508,7 +517,7 @@ struct device_node *of_find_compatible_n break; } of_node_put(from); @@ -219,7 +218,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_compatible_node); -@@ -530,8 +539,9 @@ struct device_node *of_find_node_with_property(struct device_node *from, +@@ -530,8 +539,9 @@ struct device_node *of_find_node_with_pr { struct device_node *np; struct property *pp; @@ -230,7 +229,7 @@ index 200f2dd..becc6ca 100644 np = from ? from->allnext : allnodes; for (; np; np = np->allnext) { for (pp = np->properties; pp != 0; pp = pp->next) { -@@ -543,7 +553,7 @@ struct device_node *of_find_node_with_property(struct device_node *from, +@@ -543,7 +553,7 @@ struct device_node *of_find_node_with_pr } out: of_node_put(from); @@ -239,7 +238,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_node_with_property); -@@ -584,10 +594,11 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, +@@ -584,10 +594,11 @@ const struct of_device_id *of_match_node const struct device_node *node) { const struct of_device_id *match; @@ -253,7 +252,7 @@ index 200f2dd..becc6ca 100644 return match; } EXPORT_SYMBOL(of_match_node); -@@ -608,15 +619,16 @@ struct device_node *of_find_matching_node(struct device_node *from, +@@ -608,15 +619,16 @@ struct device_node *of_find_matching_nod const struct of_device_id *matches) { struct device_node *np; @@ -272,7 +271,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_matching_node); -@@ -659,12 +671,12 @@ struct device_node *of_find_node_by_phandle(phandle handle) +@@ -659,12 +671,12 @@ struct device_node *of_find_node_by_phan { struct device_node *np; @@ -287,7 +286,7 @@ index 200f2dd..becc6ca 100644 return np; } EXPORT_SYMBOL(of_find_node_by_phandle); -@@ -998,18 +1010,18 @@ int prom_add_property(struct device_node *np, struct property *prop) +@@ -1036,18 +1048,18 @@ int prom_add_property(struct device_node unsigned long flags; prop->next = NULL; @@ -309,7 +308,7 @@ index 200f2dd..becc6ca 100644 #ifdef CONFIG_PROC_DEVICETREE /* try to add to proc as well if it was initialized */ -@@ -1034,7 +1046,7 @@ int prom_remove_property(struct device_node *np, struct property *prop) +@@ -1072,7 +1084,7 @@ int prom_remove_property(struct device_n unsigned long flags; int found = 0; @@ -318,7 +317,7 @@ index 200f2dd..becc6ca 100644 next = &np->properties; while (*next) { if (*next == prop) { -@@ -1047,7 +1059,7 @@ int prom_remove_property(struct device_node *np, struct property *prop) +@@ -1085,7 +1097,7 @@ int prom_remove_property(struct device_n } next = &(*next)->next; } @@ -327,7 +326,7 @@ index 200f2dd..becc6ca 100644 if (!found) return -ENODEV; -@@ -1077,7 +1089,7 @@ int prom_update_property(struct device_node *np, +@@ -1115,7 +1127,7 @@ int prom_update_property(struct device_n unsigned long flags; int found = 0; @@ -336,7 +335,7 @@ index 200f2dd..becc6ca 100644 next = &np->properties; while (*next) { if (*next == oldprop) { -@@ -1091,7 +1103,7 @@ int prom_update_property(struct device_node *np, +@@ -1129,7 +1141,7 @@ int prom_update_property(struct device_n } next = &(*next)->next; } @@ -345,7 +344,7 @@ index 200f2dd..becc6ca 100644 if (!found) return -ENODEV; -@@ -1121,12 +1133,12 @@ void of_attach_node(struct device_node *np) +@@ -1159,12 +1171,12 @@ void of_attach_node(struct device_node * { unsigned long flags; @@ -360,7 +359,7 @@ index 200f2dd..becc6ca 100644 } /** -@@ -1140,7 +1152,7 @@ void of_detach_node(struct device_node *np) +@@ -1178,7 +1190,7 @@ void of_detach_node(struct device_node * struct device_node *parent; unsigned long flags; @@ -369,7 +368,7 @@ index 200f2dd..becc6ca 100644 parent = np->parent; if (!parent) -@@ -1171,7 +1183,7 @@ void of_detach_node(struct device_node *np) +@@ -1209,7 +1221,7 @@ void of_detach_node(struct device_node * of_node_set_flag(np, OF_DETACHED); out_unlock: @@ -378,11 +377,11 @@ index 200f2dd..becc6ca 100644 } #endif /* defined(CONFIG_OF_DYNAMIC) */ -diff --git a/include/linux/of.h b/include/linux/of.h -index 4948552..e87303d 100644 ---- a/include/linux/of.h -+++ b/include/linux/of.h -@@ -71,7 +71,7 @@ struct device_node { +Index: linux-3.4/include/linux/of.h +=================================================================== +--- linux-3.4.orig/include/linux/of.h ++++ linux-3.4/include/linux/of.h +@@ -90,7 +90,7 @@ static inline void of_node_put(struct de extern struct device_node *allnodes; extern struct device_node *of_chosen; extern struct device_node *of_aliases; @@ -391,6 +390,3 @@ index 4948552..e87303d 100644 static inline bool of_have_populated_dt(void) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0053-OF-Fixup-resursive-locking-code-paths.patch b/debian/patches/features/all/rt/of-fixup-recursive-locking.patch similarity index 85% rename from debian/patches/features/all/rt/0053-OF-Fixup-resursive-locking-code-paths.patch rename to debian/patches/features/all/rt/of-fixup-recursive-locking.patch index de4a7415e..58d059e8e 100644 --- a/debian/patches/features/all/rt/0053-OF-Fixup-resursive-locking-code-paths.patch +++ b/debian/patches/features/all/rt/of-fixup-recursive-locking.patch @@ -1,7 +1,6 @@ -From 417e0d7c3de36b87075e446b0920e480fb96a871 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 13 Aug 2009 09:04:10 +0200 -Subject: [PATCH 053/267] OF: Fixup resursive locking code paths +Subject: OF: Fixup resursive locking code paths There is no real reason to use a rwlock for devtree_lock. It even could be a mutex, but unfortunately it's locked from cpu hotplug @@ -13,17 +12,18 @@ recursive locking pathes which allows us to convert devtree_lock to a read_lock. Signed-off-by: Thomas Gleixner + --- - drivers/of/base.c | 93 ++++++++++++++++++++++++++++++++++++++++------------- + drivers/of/base.c | 93 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 22 deletions(-) -diff --git a/drivers/of/base.c b/drivers/of/base.c -index 9b6588e..200f2dd 100644 ---- a/drivers/of/base.c -+++ b/drivers/of/base.c -@@ -163,16 +163,14 @@ void of_node_put(struct device_node *node) +Index: linux-3.4/drivers/of/base.c +=================================================================== +--- linux-3.4.orig/drivers/of/base.c ++++ linux-3.4/drivers/of/base.c +@@ -163,16 +163,14 @@ void of_node_put(struct device_node *nod EXPORT_SYMBOL(of_node_put); - #endif /* !CONFIG_SPARC */ + #endif /* CONFIG_OF_DYNAMIC */ -struct property *of_find_property(const struct device_node *np, - const char *name, @@ -40,7 +40,7 @@ index 9b6588e..200f2dd 100644 for (pp = np->properties; pp != 0; pp = pp->next) { if (of_prop_cmp(pp->name, name) == 0) { if (lenp != 0) -@@ -180,6 +178,18 @@ struct property *of_find_property(const struct device_node *np, +@@ -180,6 +178,18 @@ struct property *of_find_property(const break; } } @@ -99,7 +99,7 @@ index 9b6588e..200f2dd 100644 if (cp == NULL) return 0; while (cplen > 0) { -@@ -244,6 +266,20 @@ int of_device_is_compatible(const struct device_node *device, +@@ -244,6 +266,20 @@ int of_device_is_compatible(const struct return 0; } @@ -120,7 +120,7 @@ index 9b6588e..200f2dd 100644 EXPORT_SYMBOL(of_device_is_compatible); /** -@@ -467,7 +503,8 @@ struct device_node *of_find_compatible_node(struct device_node *from, +@@ -467,7 +503,8 @@ struct device_node *of_find_compatible_n if (type && !(np->type && (of_node_cmp(np->type, type) == 0))) continue; @@ -149,7 +149,7 @@ index 9b6588e..200f2dd 100644 { if (!matches) return NULL; -@@ -533,14 +564,32 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, +@@ -533,14 +564,32 @@ const struct of_device_id *of_match_node match &= node->type && !strcmp(matches->type, node->type); if (matches->compatible[0]) @@ -184,7 +184,7 @@ index 9b6588e..200f2dd 100644 EXPORT_SYMBOL(of_match_node); /** -@@ -563,7 +612,7 @@ struct device_node *of_find_matching_node(struct device_node *from, +@@ -563,7 +612,7 @@ struct device_node *of_find_matching_nod read_lock(&devtree_lock); np = from ? from->allnext : allnodes; for (; np; np = np->allnext) { @@ -193,6 +193,3 @@ index 9b6588e..200f2dd 100644 break; } of_node_put(from); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0035-signal-x86-Delay-calling-signals-in-atomic.patch b/debian/patches/features/all/rt/oleg-signal-rt-fix.patch similarity index 79% rename from debian/patches/features/all/rt/0035-signal-x86-Delay-calling-signals-in-atomic.patch rename to debian/patches/features/all/rt/oleg-signal-rt-fix.patch index 594a7a475..fe8ce82d4 100644 --- a/debian/patches/features/all/rt/0035-signal-x86-Delay-calling-signals-in-atomic.patch +++ b/debian/patches/features/all/rt/oleg-signal-rt-fix.patch @@ -1,7 +1,5 @@ -From 1c54a96e16e5e6f3e9978d231c9db374a68f968e Mon Sep 17 00:00:00 2001 +Subject: signal/x86: Delay calling signals in atomic From: Oleg Nesterov -Date: Tue, 10 Apr 2012 14:33:53 -0400 -Subject: [PATCH 035/267] signal/x86: Delay calling signals in atomic 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 +28,17 @@ Signed-off-by: Oleg Nesterov Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner --- + arch/x86/include/asm/signal.h | 13 +++++++++++++ arch/x86/kernel/signal.c | 9 +++++++++ include/linux/sched.h | 4 ++++ kernel/signal.c | 37 +++++++++++++++++++++++++++++++++++-- 4 files changed, 61 insertions(+), 2 deletions(-) -diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h -index 598457c..1213ebd 100644 ---- a/arch/x86/include/asm/signal.h -+++ b/arch/x86/include/asm/signal.h +Index: linux-3.4/arch/x86/include/asm/signal.h +=================================================================== +--- linux-3.4.orig/arch/x86/include/asm/signal.h ++++ linux-3.4/arch/x86/include/asm/signal.h @@ -31,6 +31,19 @@ typedef struct { unsigned long sig[_NSIG_WORDS]; } sigset_t; @@ -60,11 +59,11 @@ index 598457c..1213ebd 100644 #else /* Here we must cater to libcs that poke about in kernel headers. */ -diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c -index 54ddaeb2..12c4d53 100644 ---- a/arch/x86/kernel/signal.c -+++ b/arch/x86/kernel/signal.c -@@ -820,6 +820,15 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) +Index: linux-3.4/arch/x86/kernel/signal.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/signal.c ++++ linux-3.4/arch/x86/kernel/signal.c +@@ -824,6 +824,15 @@ do_notify_resume(struct pt_regs *regs, v mce_notify_process(); #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ @@ -80,11 +79,11 @@ index 54ddaeb2..12c4d53 100644 /* deal with pending signal delivery */ if (thread_info_flags & _TIF_SIGPENDING) do_signal(regs); -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 7268acf..ed2b9f9 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1392,6 +1392,10 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1440,6 +1440,10 @@ struct task_struct { sigset_t blocked, real_blocked; sigset_t saved_sigmask; /* restored if set_restore_sigmask() was used */ struct sigpending pending; @@ -95,11 +94,11 @@ index 7268acf..ed2b9f9 100644 unsigned long sas_ss_sp; size_t sas_ss_size; -diff --git a/kernel/signal.c b/kernel/signal.c -index fc1a67a..c8b1bc1 100644 ---- a/kernel/signal.c -+++ b/kernel/signal.c -@@ -1273,8 +1273,8 @@ int do_send_sig_info(int sig, struct siginfo *info, struct task_struct *p, +Index: linux-3.4/kernel/signal.c +=================================================================== +--- linux-3.4.orig/kernel/signal.c ++++ linux-3.4/kernel/signal.c +@@ -1312,8 +1312,8 @@ int do_send_sig_info(int sig, struct sig * We don't want to have recursive SIGSEGV's etc, for example, * that is why we also clear SIGNAL_UNKILLABLE. */ @@ -110,7 +109,7 @@ index fc1a67a..c8b1bc1 100644 { unsigned long int flags; int ret, blocked, ignored; -@@ -1299,6 +1299,39 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) +@@ -1338,6 +1338,39 @@ force_sig_info(int sig, struct siginfo * return ret; } @@ -150,6 +149,3 @@ index fc1a67a..c8b1bc1 100644 /* * Nuke all other threads in the group. */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch b/debian/patches/features/all/rt/panic-disable-random-on-rt.patch new file mode 100644 index 000000000..56135a72e --- /dev/null +++ b/debian/patches/features/all/rt/panic-disable-random-on-rt.patch @@ -0,0 +1,22 @@ +From: Thomas Gleixner + +--- + kernel/panic.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: linux-3.4/kernel/panic.c +=================================================================== +--- linux-3.4.orig/kernel/panic.c ++++ linux-3.4/kernel/panic.c +@@ -363,9 +363,11 @@ static u64 oops_id; + + static int init_oops_id(void) + { ++#ifndef CONFIG_PREEMPT_RT_FULL + if (!oops_id) + get_random_bytes(&oops_id, sizeof(oops_id)); + else ++#endif + oops_id++; + + return 0; diff --git a/debian/patches/features/all/rt/0208-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch b/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch similarity index 74% rename from debian/patches/features/all/rt/0208-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch rename to debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch index cf2a98f93..f116bc739 100644 --- a/debian/patches/features/all/rt/0208-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch +++ b/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch @@ -1,7 +1,6 @@ -From da57a08d2eecd5624429f11ee27b91fb12fc345b Mon Sep 17 00:00:00 2001 +Subject: rcu: Make ksoftirqd do RCU quiescent states From: "Paul E. McKenney" Date: Wed, 5 Oct 2011 11:45:18 -0700 -Subject: [PATCH 208/267] rcu: Make ksoftirqd do RCU quiescent states Implementing RCU-bh in terms of RCU-preempt makes the system vulnerable to network-based denial-of-service attacks. This patch therefore @@ -22,6 +21,7 @@ in cases where __do_softirq() is invoked directly from ksoftirqd. Signed-off-by: Paul E. McKenney Link: http://lkml.kernel.org/r/20111005184518.GA21601@linux.vnet.ibm.com Signed-off-by: Thomas Gleixner + --- include/linux/rcupdate.h | 6 ------ kernel/rcutree.c | 7 ++++++- @@ -30,11 +30,11 @@ Signed-off-by: Thomas Gleixner kernel/softirq.c | 20 +++++++++++++------- 5 files changed, 21 insertions(+), 15 deletions(-) -diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h -index 7c31d86..0e6fb5c 100644 ---- a/include/linux/rcupdate.h -+++ b/include/linux/rcupdate.h -@@ -185,13 +185,7 @@ static inline int rcu_preempt_depth(void) +Index: linux-3.4/include/linux/rcupdate.h +=================================================================== +--- linux-3.4.orig/include/linux/rcupdate.h ++++ linux-3.4/include/linux/rcupdate.h +@@ -194,13 +194,7 @@ static inline int rcu_preempt_depth(void /* Internal to kernel */ extern void rcu_sched_qs(int cpu); @@ -47,12 +47,12 @@ index 7c31d86..0e6fb5c 100644 - extern void rcu_check_callbacks(int cpu, int user); struct notifier_block; - -diff --git a/kernel/rcutree.c b/kernel/rcutree.c -index 3afb0fd..3118218 100644 ---- a/kernel/rcutree.c -+++ b/kernel/rcutree.c -@@ -170,7 +170,12 @@ void rcu_sched_qs(int cpu) + extern void rcu_idle_enter(void); +Index: linux-3.4/kernel/rcutree.c +=================================================================== +--- linux-3.4.orig/kernel/rcutree.c ++++ linux-3.4/kernel/rcutree.c +@@ -172,7 +172,12 @@ void rcu_sched_qs(int cpu) rdp->passed_quiesce = 1; } @@ -66,11 +66,11 @@ index 3afb0fd..3118218 100644 void rcu_bh_qs(int cpu) { struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu); -diff --git a/kernel/rcutree.h b/kernel/rcutree.h -index dca495d..b522273 100644 ---- a/kernel/rcutree.h -+++ b/kernel/rcutree.h -@@ -430,6 +430,7 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work); +Index: linux-3.4/kernel/rcutree.h +=================================================================== +--- linux-3.4.orig/kernel/rcutree.h ++++ linux-3.4/kernel/rcutree.h +@@ -423,6 +423,7 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work); /* Forward declarations for rcutree_plugin.h */ static void rcu_bootup_announce(void); long rcu_batches_completed(void); @@ -78,23 +78,23 @@ index dca495d..b522273 100644 static void rcu_preempt_note_context_switch(int cpu); static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp); #ifdef CONFIG_HOTPLUG_CPU -diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h -index 2e63942..936441d 100644 ---- a/kernel/rcutree_plugin.h -+++ b/kernel/rcutree_plugin.h -@@ -1933,7 +1933,7 @@ EXPORT_SYMBOL_GPL(synchronize_sched_expedited); +Index: linux-3.4/kernel/rcutree_plugin.h +=================================================================== +--- linux-3.4.orig/kernel/rcutree_plugin.h ++++ linux-3.4/kernel/rcutree_plugin.h +@@ -1899,7 +1899,7 @@ static void __cpuinit rcu_prepare_kthrea - #endif /* #else #ifndef CONFIG_SMP */ + #endif /* #else #ifdef CONFIG_RCU_BOOST */ -#if !defined(CONFIG_RCU_FAST_NO_HZ) -+#if 1 /* !defined(CONFIG_RCU_FAST_NO_HZ) */ ++#if !defined(CONFIG_RCU_FAST_NO_HZ) || defined(CONFIG_PREEMPT_RT_FULL) /* * Check to see if any future RCU-related work will need to be done -diff --git a/kernel/softirq.c b/kernel/softirq.c -index bef08f3..ca00a68 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -139,7 +139,7 @@ static void wakeup_softirqd(void) wake_up_process(tsk); } @@ -104,7 +104,7 @@ index bef08f3..ca00a68 100644 { struct softirq_action *h = softirq_vec; unsigned int prev_count = preempt_count(); -@@ -162,7 +162,8 @@ static void handle_pending_softirqs(u32 pending, int cpu) +@@ -162,7 +162,8 @@ static void handle_pending_softirqs(u32 prev_count, (unsigned int) preempt_count()); preempt_count() = prev_count; } @@ -123,7 +123,7 @@ index bef08f3..ca00a68 100644 pending = local_softirq_pending(); if (pending && --max_restart) -@@ -384,7 +385,12 @@ static inline void ksoftirqd_clr_sched_params(void) { } +@@ -384,7 +385,12 @@ static inline void ksoftirqd_clr_sched_p static DEFINE_LOCAL_IRQ_LOCK(local_softirq_lock); static DEFINE_PER_CPU(struct task_struct *, local_softirq_runner); @@ -164,6 +164,3 @@ index bef08f3..ca00a68 100644 local_unlock(local_softirq_lock); unpin_current_cpu(); preempt_disable(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch b/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch new file mode 100644 index 000000000..1e54a8be1 --- /dev/null +++ b/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch @@ -0,0 +1,27 @@ +Subject: pci: Use __wake_up_all_locked pci_unblock_user_cfg_access() +From: Thomas Gleixner +Date: Thu, 01 Dec 2011 00:07:16 +0100 + +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 +Cc: stable-rt@vger.kernel.org +--- + drivers/pci/access.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: linux-3.4/drivers/pci/access.c +=================================================================== +--- linux-3.4.orig/drivers/pci/access.c ++++ linux-3.4/drivers/pci/access.c +@@ -463,7 +463,7 @@ void pci_cfg_access_unlock(struct pci_de + WARN_ON(!dev->block_cfg_access); + + dev->block_cfg_access = 0; +- wake_up_all(&pci_cfg_wait); ++ wake_up_all_locked(&pci_cfg_wait); + raw_spin_unlock_irqrestore(&pci_lock, flags); + } + EXPORT_SYMBOL_GPL(pci_cfg_access_unlock); diff --git a/debian/patches/features/all/rt/0233-x86-no-perf-irq-work-rt.patch.patch b/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch similarity index 58% rename from debian/patches/features/all/rt/0233-x86-no-perf-irq-work-rt.patch.patch rename to debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch index 06f91ee52..982fb01d5 100644 --- a/debian/patches/features/all/rt/0233-x86-no-perf-irq-work-rt.patch.patch +++ b/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch @@ -1,7 +1,6 @@ -From 5f961ab6d0984d6e06bf2e58b1cecc2f9637cfd0 Mon Sep 17 00:00:00 2001 +Subject: x86-no-perf-irq-work-rt.patch From: Thomas Gleixner Date: Wed, 13 Jul 2011 14:05:05 +0200 -Subject: [PATCH 233/267] x86-no-perf-irq-work-rt.patch Signed-off-by: Thomas Gleixner --- @@ -10,11 +9,11 @@ Signed-off-by: Thomas Gleixner kernel/timer.c | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) -diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c -index ca8f703..129b8bb 100644 ---- a/arch/x86/kernel/irq_work.c -+++ b/arch/x86/kernel/irq_work.c -@@ -18,6 +18,7 @@ void smp_irq_work_interrupt(struct pt_regs *regs) +Index: linux-3.4/arch/x86/kernel/irq_work.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/irq_work.c ++++ linux-3.4/arch/x86/kernel/irq_work.c +@@ -18,6 +18,7 @@ void smp_irq_work_interrupt(struct pt_re irq_exit(); } @@ -27,11 +26,11 @@ index ca8f703..129b8bb 100644 #endif } +#endif -diff --git a/kernel/irq_work.c b/kernel/irq_work.c -index c3c46c7..727ba59 100644 ---- a/kernel/irq_work.c -+++ b/kernel/irq_work.c -@@ -105,8 +105,10 @@ void irq_work_run(void) +Index: linux-3.4/kernel/irq_work.c +=================================================================== +--- linux-3.4.orig/kernel/irq_work.c ++++ linux-3.4/kernel/irq_work.c +@@ -107,8 +107,10 @@ void irq_work_run(void) if (llist_empty(this_list)) return; @@ -42,11 +41,11 @@ index c3c46c7..727ba59 100644 llnode = llist_del_all(this_list); while (llnode != NULL) { -diff --git a/kernel/timer.c b/kernel/timer.c -index 7ea787b..a791a43 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1362,7 +1362,7 @@ void update_process_times(int user_tick) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1412,7 +1412,7 @@ void update_process_times(int user_tick) scheduler_tick(); run_local_timers(); rcu_check_callbacks(cpu, user_tick); @@ -55,7 +54,7 @@ index 7ea787b..a791a43 100644 if (in_irq()) irq_work_run(); #endif -@@ -1376,6 +1376,10 @@ static void run_timer_softirq(struct softirq_action *h) +@@ -1426,6 +1426,10 @@ static void run_timer_softirq(struct sof { struct tvec_base *base = __this_cpu_read(tvec_bases); @@ -66,6 +65,3 @@ index 7ea787b..a791a43 100644 printk_tick(); hrtimer_run_pending(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0134-hrtimer-Don-t-call-the-timer-handler-from-hrtimer_st.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-hrtimer.patch similarity index 86% rename from debian/patches/features/all/rt/0134-hrtimer-Don-t-call-the-timer-handler-from-hrtimer_st.patch rename to debian/patches/features/all/rt/peter_zijlstra-frob-hrtimer.patch index 712bd0feb..c9a877268 100644 --- a/debian/patches/features/all/rt/0134-hrtimer-Don-t-call-the-timer-handler-from-hrtimer_st.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-hrtimer.patch @@ -1,8 +1,6 @@ -From 93372bd3d6ccc46305bf60c940da0a85f8c4674f Mon Sep 17 00:00:00 2001 +Subject: hrtimer: Don't call the timer handler from hrtimer_start From: Peter Zijlstra -Date: Fri, 12 Aug 2011 17:39:54 +0200 -Subject: [PATCH 134/267] hrtimer: Don't call the timer handler from - hrtimer_start +Date: Fri Aug 12 17:39:54 CEST 2011 [] __delay+0xf/0x11 [] do_raw_spin_lock+0xd2/0x13c @@ -32,11 +30,11 @@ Signed-off-by: Peter Zijlstra kernel/hrtimer.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) -diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c -index 1dd627b..358442b 100644 ---- a/kernel/hrtimer.c -+++ b/kernel/hrtimer.c -@@ -646,37 +646,24 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer, +Index: linux-3.4/kernel/hrtimer.c +=================================================================== +--- linux-3.4.orig/kernel/hrtimer.c ++++ linux-3.4/kernel/hrtimer.c +@@ -646,37 +646,24 @@ static inline int hrtimer_enqueue_reprog struct hrtimer_clock_base *base, int wakeup) { @@ -84,7 +82,7 @@ index 1dd627b..358442b 100644 } return 0; -@@ -1046,8 +1033,19 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, +@@ -1046,8 +1033,19 @@ int __hrtimer_start_range_ns(struct hrti * * XXX send_remote_softirq() ? */ @@ -106,6 +104,3 @@ index 1dd627b..358442b 100644 unlock_hrtimer_base(timer, &flags); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0168-sched-Generic-migrate_disable.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch similarity index 73% rename from debian/patches/features/all/rt/0168-sched-Generic-migrate_disable.patch rename to debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch index 0786057f4..9b3ac5938 100644 --- a/debian/patches/features/all/rt/0168-sched-Generic-migrate_disable.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch @@ -1,7 +1,6 @@ -From 9d70554016b846bb8452972d05f111017dd45a4c Mon Sep 17 00:00:00 2001 +Subject: sched: Generic migrate_disable From: Peter Zijlstra -Date: Thu, 11 Aug 2011 15:14:58 +0200 -Subject: [PATCH 168/267] sched: Generic migrate_disable +Date: Thu Aug 11 15:14:58 CEST 2011 Make migrate_disable() be a preempt_disable() for !rt kernels. This allows generic code to use it but still enforces that these code @@ -17,15 +16,15 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org include/linux/preempt.h | 21 +++++++++------------ include/linux/sched.h | 13 +++++++++++++ include/linux/smp.h | 9 ++------- - kernel/sched.c | 6 ++++-- + kernel/sched/core.c | 6 ++++-- kernel/trace/trace.c | 2 +- lib/smp_processor_id.c | 2 +- 6 files changed, 30 insertions(+), 23 deletions(-) -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 5aa7916..6450c01 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h +Index: linux-3.4/include/linux/preempt.h +=================================================================== +--- linux-3.4.orig/include/linux/preempt.h ++++ linux-3.4/include/linux/preempt.h @@ -108,28 +108,25 @@ do { \ #endif /* CONFIG_PREEMPT_COUNT */ @@ -64,11 +63,11 @@ index 5aa7916..6450c01 100644 #endif #ifdef CONFIG_PREEMPT_NOTIFIERS -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 712e991..32e9e3f 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1259,7 +1259,9 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1302,7 +1302,9 @@ struct task_struct { #endif unsigned int policy; @@ -78,7 +77,7 @@ index 712e991..32e9e3f 100644 cpumask_t cpus_allowed; #ifdef CONFIG_PREEMPT_RCU -@@ -2681,11 +2683,22 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) +@@ -2771,11 +2773,22 @@ static inline void set_task_cpu(struct t #endif /* CONFIG_SMP */ @@ -101,11 +100,11 @@ index 712e991..32e9e3f 100644 return &p->cpus_allowed; } -diff --git a/include/linux/smp.h b/include/linux/smp.h -index 94c8430..78fd0a2 100644 ---- a/include/linux/smp.h -+++ b/include/linux/smp.h -@@ -172,13 +172,8 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, +Index: linux-3.4/include/linux/smp.h +=================================================================== +--- linux-3.4.orig/include/linux/smp.h ++++ linux-3.4/include/linux/smp.h +@@ -218,13 +218,8 @@ smp_call_function_any(const struct cpuma #define get_cpu() ({ preempt_disable(); smp_processor_id(); }) #define put_cpu() preempt_enable() @@ -121,11 +120,11 @@ index 94c8430..78fd0a2 100644 /* * Callback to arch code if there's nosmp or maxcpus=0 on the -diff --git a/kernel/sched.c b/kernel/sched.c -index ebdf95d..eff6bbe2 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -6224,7 +6224,7 @@ static inline void sched_init_granularity(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -4976,7 +4976,7 @@ void __cpuinit init_idle(struct task_str #ifdef CONFIG_SMP void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -134,7 +133,7 @@ index ebdf95d..eff6bbe2 100644 if (p->sched_class && p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, new_mask); p->rt.nr_cpus_allowed = cpumask_weight(new_mask); -@@ -6280,7 +6280,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) +@@ -5032,7 +5032,7 @@ int set_cpus_allowed_ptr(struct task_str do_set_cpus_allowed(p, new_mask); /* Can the task run on the task's current CPU? If so, we're done */ @@ -143,7 +142,7 @@ index ebdf95d..eff6bbe2 100644 goto out; dest_cpu = cpumask_any_and(cpu_active_mask, new_mask); -@@ -6299,6 +6299,7 @@ out: +@@ -5051,6 +5051,7 @@ out: } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); @@ -151,19 +150,19 @@ index ebdf95d..eff6bbe2 100644 void migrate_disable(void) { struct task_struct *p = current; -@@ -6391,6 +6392,7 @@ void migrate_enable(void) +@@ -5143,6 +5144,7 @@ void migrate_enable(void) preempt_enable(); } - EXPORT_SYMBOL_GPL(migrate_enable); + EXPORT_SYMBOL(migrate_enable); +#endif /* CONFIG_PREEMPT_RT_FULL */ /* * Move (not current) task off this cpu, onto dest cpu. We're doing -diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index c44456b..ff03353 100644 ---- a/kernel/trace/trace.c -+++ b/kernel/trace/trace.c -@@ -1124,7 +1124,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, +Index: linux-3.4/kernel/trace/trace.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace.c ++++ linux-3.4/kernel/trace/trace.c +@@ -1180,7 +1180,7 @@ tracing_generic_entry_update(struct trac ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); @@ -172,11 +171,11 @@ index c44456b..ff03353 100644 } EXPORT_SYMBOL_GPL(tracing_generic_entry_update); -diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c -index 60a7569..b5e9241 100644 ---- a/lib/smp_processor_id.c -+++ b/lib/smp_processor_id.c -@@ -41,7 +41,7 @@ notrace unsigned int debug_smp_processor_id(void) +Index: linux-3.4/lib/smp_processor_id.c +=================================================================== +--- linux-3.4.orig/lib/smp_processor_id.c ++++ linux-3.4/lib/smp_processor_id.c +@@ -41,7 +41,7 @@ notrace unsigned int debug_smp_processor printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x %08x] " "code: %s/%d\n", preempt_count() - 1, @@ -185,6 +184,3 @@ index 60a7569..b5e9241 100644 print_symbol("caller is %s\n", (long)__builtin_return_address(0)); dump_stack(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0167-sched-Optimize-migrate_disable.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch similarity index 73% rename from debian/patches/features/all/rt/0167-sched-Optimize-migrate_disable.patch rename to debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch index 726051346..083eca443 100644 --- a/debian/patches/features/all/rt/0167-sched-Optimize-migrate_disable.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch @@ -1,7 +1,6 @@ -From 32f2af645de68529b86b266508f886996396a772 Mon Sep 17 00:00:00 2001 +Subject: sched: Optimize migrate_disable From: Peter Zijlstra -Date: Thu, 11 Aug 2011 15:03:35 +0200 -Subject: [PATCH 167/267] sched: Optimize migrate_disable +Date: Thu Aug 11 15:03:35 CEST 2011 Change from task_rq_lock() to raw_spin_lock(&rq->lock) to avoid a few atomic ops. See comment on why it should be safe. @@ -9,14 +8,14 @@ atomic ops. See comment on why it should be safe. Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-cbz6hkl5r5mvwtx5s3tor2y6@git.kernel.org --- - kernel/sched.c | 24 ++++++++++++++++++++---- + kernel/sched/core.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index 8ceb0af..ebdf95d 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -6319,7 +6319,19 @@ void migrate_disable(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -5071,7 +5071,19 @@ void migrate_disable(void) preempt_enable(); return; } @@ -37,7 +36,7 @@ index 8ceb0af..ebdf95d 100644 p->migrate_disable = 1; mask = tsk_cpus_allowed(p); -@@ -6330,7 +6342,7 @@ void migrate_disable(void) +@@ -5082,7 +5094,7 @@ void migrate_disable(void) p->sched_class->set_cpus_allowed(p, mask); p->rt.nr_cpus_allowed = cpumask_weight(mask); } @@ -45,8 +44,8 @@ index 8ceb0af..ebdf95d 100644 + raw_spin_unlock_irqrestore(&rq->lock, flags); preempt_enable(); } - EXPORT_SYMBOL_GPL(migrate_disable); -@@ -6358,7 +6370,11 @@ void migrate_enable(void) + EXPORT_SYMBOL(migrate_disable); +@@ -5110,7 +5122,11 @@ void migrate_enable(void) return; } @@ -59,7 +58,7 @@ index 8ceb0af..ebdf95d 100644 p->migrate_disable = 0; mask = tsk_cpus_allowed(p); -@@ -6370,7 +6386,7 @@ void migrate_enable(void) +@@ -5122,7 +5138,7 @@ void migrate_enable(void) p->rt.nr_cpus_allowed = cpumask_weight(mask); } @@ -68,6 +67,3 @@ index 8ceb0af..ebdf95d 100644 unpin_current_cpu(); preempt_enable(); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0047-mm-pagefault_disabled.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch similarity index 55% rename from debian/patches/features/all/rt/0047-mm-pagefault_disabled.patch rename to debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch index 42b378cdb..1f2d738c0 100644 --- a/debian/patches/features/all/rt/0047-mm-pagefault_disabled.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch @@ -1,7 +1,6 @@ -From 2ee27c95145e16e1c9cff6bc19ae777e55269863 Mon Sep 17 00:00:00 2001 +Subject: mm: pagefault_disabled() From: Peter Zijlstra -Date: Thu, 11 Aug 2011 15:31:31 +0200 -Subject: [PATCH 047/267] mm: pagefault_disabled() +Date: Thu Aug 11 15:31:31 CEST 2011 Wrap the test for pagefault_disabled() into a helper, this allows us to remove the need for current->pagefault_disabled on !-rt kernels. @@ -22,7 +21,7 @@ Link: http://lkml.kernel.org/n/tip-3yy517m8zsi9fpsf14xfaqkw@git.kernel.org arch/mn10300/mm/fault.c | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/mm/fault.c | 2 +- - arch/s390/mm/fault.c | 8 ++++---- + arch/s390/mm/fault.c | 6 +++--- arch/score/mm/fault.c | 2 +- arch/sh/mm/fault_32.c | 2 +- arch/sparc/mm/fault_32.c | 2 +- @@ -33,13 +32,13 @@ Link: http://lkml.kernel.org/n/tip-3yy517m8zsi9fpsf14xfaqkw@git.kernel.org arch/xtensa/mm/fault.c | 2 +- include/linux/sched.h | 14 ++++++++++++++ kernel/fork.c | 2 ++ - 24 files changed, 41 insertions(+), 26 deletions(-) + 24 files changed, 40 insertions(+), 25 deletions(-) -diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c -index 6d73e1b..4a0a0af 100644 ---- a/arch/alpha/mm/fault.c -+++ b/arch/alpha/mm/fault.c -@@ -107,7 +107,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr, +Index: linux-3.4/arch/alpha/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/alpha/mm/fault.c ++++ linux-3.4/arch/alpha/mm/fault.c +@@ -106,7 +106,7 @@ do_page_fault(unsigned long address, uns /* If we're in an interrupt context, or have no user context, we must not take the fault. */ @@ -48,11 +47,11 @@ index 6d73e1b..4a0a0af 100644 goto no_context; #ifdef CONFIG_ALPHA_LARGE_VMALLOC -diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c -index c8dd303..d717bd3 100644 ---- a/arch/arm/mm/fault.c -+++ b/arch/arm/mm/fault.c -@@ -294,7 +294,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) +Index: linux-3.4/arch/arm/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/arm/mm/fault.c ++++ linux-3.4/arch/arm/mm/fault.c +@@ -277,7 +277,7 @@ do_page_fault(unsigned long addr, unsign * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -61,11 +60,11 @@ index c8dd303..d717bd3 100644 goto no_context; /* -diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c -index 623a027..155ad8d 100644 ---- a/arch/avr32/mm/fault.c -+++ b/arch/avr32/mm/fault.c -@@ -81,8 +81,7 @@ asmlinkage void do_page_fault(unsigned long ecr, struct pt_regs *regs) +Index: linux-3.4/arch/avr32/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/avr32/mm/fault.c ++++ linux-3.4/arch/avr32/mm/fault.c +@@ -81,8 +81,7 @@ asmlinkage void do_page_fault(unsigned l * If we're in an interrupt or have no user context, we must * not take the fault... */ @@ -75,11 +74,11 @@ index 623a027..155ad8d 100644 goto no_context; local_irq_enable(); -diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c -index 2b2c292..ba9cfbe 100644 ---- a/arch/cris/mm/fault.c -+++ b/arch/cris/mm/fault.c -@@ -111,7 +111,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, +Index: linux-3.4/arch/cris/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/cris/mm/fault.c ++++ linux-3.4/arch/cris/mm/fault.c +@@ -112,7 +112,7 @@ do_page_fault(unsigned long address, str * user context, we must not take the fault. */ @@ -88,11 +87,11 @@ index 2b2c292..ba9cfbe 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/frv/mm/fault.c b/arch/frv/mm/fault.c -index 3da8ec7..a9ce0f0 100644 ---- a/arch/frv/mm/fault.c -+++ b/arch/frv/mm/fault.c -@@ -79,7 +79,7 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear +Index: linux-3.4/arch/frv/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/frv/mm/fault.c ++++ linux-3.4/arch/frv/mm/fault.c +@@ -78,7 +78,7 @@ asmlinkage void do_page_fault(int datamm * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -101,11 +100,11 @@ index 3da8ec7..a9ce0f0 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c -index 2a4e44f..05946c2 100644 ---- a/arch/ia64/mm/fault.c -+++ b/arch/ia64/mm/fault.c -@@ -89,7 +89,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re +Index: linux-3.4/arch/ia64/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/ia64/mm/fault.c ++++ linux-3.4/arch/ia64/mm/fault.c +@@ -88,7 +88,7 @@ ia64_do_page_fault (unsigned long addres /* * If we're in an interrupt or have no user context, we must not take the fault.. */ @@ -114,11 +113,11 @@ index 2a4e44f..05946c2 100644 goto no_context; #ifdef CONFIG_VIRTUAL_MEM_MAP -diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c -index 16fa2c7..6d763f6 100644 ---- a/arch/m32r/mm/fault.c -+++ b/arch/m32r/mm/fault.c -@@ -115,7 +115,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, +Index: linux-3.4/arch/m32r/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/m32r/mm/fault.c ++++ linux-3.4/arch/m32r/mm/fault.c +@@ -114,7 +114,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user context or are running in an * atomic region then we must not take the fault.. */ @@ -127,11 +126,11 @@ index 16fa2c7..6d763f6 100644 goto bad_area_nosemaphore; /* When running in the kernel we expect faults to occur only to -diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c -index 238ffc0..74fe559 100644 ---- a/arch/m68k/mm/fault.c -+++ b/arch/m68k/mm/fault.c -@@ -85,7 +85,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address, +Index: linux-3.4/arch/m68k/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/m68k/mm/fault.c ++++ linux-3.4/arch/m68k/mm/fault.c +@@ -84,7 +84,7 @@ int do_page_fault(struct pt_regs *regs, * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -140,11 +139,11 @@ index 238ffc0..74fe559 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c -index c3f219c..4cdd84d 100644 ---- a/arch/microblaze/mm/fault.c -+++ b/arch/microblaze/mm/fault.c -@@ -107,7 +107,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, +Index: linux-3.4/arch/microblaze/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/microblaze/mm/fault.c ++++ linux-3.4/arch/microblaze/mm/fault.c +@@ -106,7 +106,7 @@ void do_page_fault(struct pt_regs *regs, if ((error_code & 0x13) == 0x13 || (error_code & 0x11) == 0x11) is_write = 0; @@ -153,11 +152,11 @@ index c3f219c..4cdd84d 100644 if (kernel_mode(regs)) goto bad_area_nosemaphore; -diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c -index ce7e75e..7ade72b 100644 ---- a/arch/mips/mm/fault.c -+++ b/arch/mips/mm/fault.c -@@ -88,7 +88,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ +Index: linux-3.4/arch/mips/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/mips/mm/fault.c ++++ linux-3.4/arch/mips/mm/fault.c +@@ -89,7 +89,7 @@ asmlinkage void __kprobes do_page_fault( * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -165,12 +164,12 @@ index ce7e75e..7ade72b 100644 + if (!mm || pagefault_disabled()) goto bad_area_nosemaphore; - down_read(&mm->mmap_sem); -diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c -index 53c8d16..2fea01c 100644 ---- a/arch/mn10300/mm/fault.c -+++ b/arch/mn10300/mm/fault.c -@@ -168,7 +168,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code, + retry: +Index: linux-3.4/arch/mn10300/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/mn10300/mm/fault.c ++++ linux-3.4/arch/mn10300/mm/fault.c +@@ -167,7 +167,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -179,11 +178,11 @@ index 53c8d16..2fea01c 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c -index 09ecc8a..df22f39 100644 ---- a/arch/parisc/mm/fault.c -+++ b/arch/parisc/mm/fault.c -@@ -176,7 +176,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, +Index: linux-3.4/arch/parisc/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/parisc/mm/fault.c ++++ linux-3.4/arch/parisc/mm/fault.c +@@ -176,7 +176,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long acc_type; int fault; @@ -192,24 +191,24 @@ index 09ecc8a..df22f39 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c -index 17f8bbe..94bedd4 100644 ---- a/arch/powerpc/mm/fault.c -+++ b/arch/powerpc/mm/fault.c -@@ -162,7 +162,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address, - } - #endif +Index: linux-3.4/arch/powerpc/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/powerpc/mm/fault.c ++++ linux-3.4/arch/powerpc/mm/fault.c +@@ -261,7 +261,7 @@ int __kprobes do_page_fault(struct pt_re + if (!arch_irq_disabled_regs(regs)) + local_irq_enable(); - if (in_atomic() || mm == NULL || current->pagefault_disabled) { + if (!mm || pagefault_disabled()) { if (!user_mode(regs)) return SIGSEGV; /* in_atomic() in user mode is really bad, -diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c -index 0d60168..a68d836 100644 ---- a/arch/s390/mm/fault.c -+++ b/arch/s390/mm/fault.c -@@ -294,8 +294,8 @@ static inline int do_exception(struct pt_regs *regs, int access, +Index: linux-3.4/arch/s390/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/s390/mm/fault.c ++++ linux-3.4/arch/s390/mm/fault.c +@@ -283,8 +283,8 @@ static inline int do_exception(struct pt * user context. */ fault = VM_FAULT_BADCONTEXT; @@ -220,22 +219,20 @@ index 0d60168..a68d836 100644 goto out; address = trans_exc_code & __FAIL_ADDR_MASK; -@@ -426,8 +426,8 @@ void __kprobes do_asce_exception(struct pt_regs *regs, long pgm_int_code, - struct mm_struct *mm = current->mm; - struct vm_area_struct *vma; +@@ -417,7 +417,7 @@ void __kprobes do_asce_exception(struct -- if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm || -- current->pagefault_disabled)) -+ if (unlikely(!user_space_fault(trans_exc_code) || -+ !mm || pagefault_disabled())) + trans_exc_code = regs->int_parm_long; + if (unlikely(!user_space_fault(trans_exc_code) || in_atomic() || !mm || +- current->pagefault_disabled)) ++ pagefault_disabled())) goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/score/mm/fault.c b/arch/score/mm/fault.c -index 4c12824..59fccbe 100644 ---- a/arch/score/mm/fault.c -+++ b/arch/score/mm/fault.c -@@ -72,7 +72,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, +Index: linux-3.4/arch/score/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/score/mm/fault.c ++++ linux-3.4/arch/score/mm/fault.c +@@ -72,7 +72,7 @@ asmlinkage void do_page_fault(struct pt_ * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -244,11 +241,11 @@ index 4c12824..59fccbe 100644 goto bad_area_nosemaphore; down_read(&mm->mmap_sem); -diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c -index a67ac56..643670d 100644 ---- a/arch/sh/mm/fault_32.c -+++ b/arch/sh/mm/fault_32.c -@@ -166,7 +166,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, +Index: linux-3.4/arch/sh/mm/fault_32.c +=================================================================== +--- linux-3.4.orig/arch/sh/mm/fault_32.c ++++ linux-3.4/arch/sh/mm/fault_32.c +@@ -166,7 +166,7 @@ asmlinkage void __kprobes do_page_fault( * If we're in an interrupt, have no user context or are running * in an atomic region then we must not take the fault: */ @@ -257,11 +254,11 @@ index a67ac56..643670d 100644 goto no_context; down_read(&mm->mmap_sem); -diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c -index e0742c1..054cf56 100644 ---- a/arch/sparc/mm/fault_32.c -+++ b/arch/sparc/mm/fault_32.c -@@ -247,7 +247,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write, +Index: linux-3.4/arch/sparc/mm/fault_32.c +=================================================================== +--- linux-3.4.orig/arch/sparc/mm/fault_32.c ++++ linux-3.4/arch/sparc/mm/fault_32.c +@@ -248,7 +248,7 @@ asmlinkage void do_sparc_fault(struct pt * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -270,11 +267,11 @@ index e0742c1..054cf56 100644 goto no_context; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); -diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c -index 9d691a5..f6572f8 100644 ---- a/arch/sparc/mm/fault_64.c -+++ b/arch/sparc/mm/fault_64.c -@@ -322,7 +322,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) +Index: linux-3.4/arch/sparc/mm/fault_64.c +=================================================================== +--- linux-3.4.orig/arch/sparc/mm/fault_64.c ++++ linux-3.4/arch/sparc/mm/fault_64.c +@@ -323,7 +323,7 @@ asmlinkage void __kprobes do_sparc64_fau * If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -283,11 +280,11 @@ index 9d691a5..f6572f8 100644 goto intr_or_no_mm; perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); -diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c -index ecdb016..1b6fa51 100644 ---- a/arch/tile/mm/fault.c -+++ b/arch/tile/mm/fault.c -@@ -346,7 +346,7 @@ static int handle_page_fault(struct pt_regs *regs, +Index: linux-3.4/arch/tile/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/tile/mm/fault.c ++++ linux-3.4/arch/tile/mm/fault.c +@@ -355,7 +355,7 @@ static int handle_page_fault(struct pt_r * If we're in an interrupt, have no user context or are running in an * atomic region then we must not take the fault. */ @@ -296,11 +293,11 @@ index ecdb016..1b6fa51 100644 vma = NULL; /* happy compiler */ goto bad_area_nosemaphore; } -diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c -index a283400..7878069 100644 ---- a/arch/um/kernel/trap.c -+++ b/arch/um/kernel/trap.c -@@ -37,7 +37,7 @@ int handle_page_fault(unsigned long address, unsigned long ip, +Index: linux-3.4/arch/um/kernel/trap.c +=================================================================== +--- linux-3.4.orig/arch/um/kernel/trap.c ++++ linux-3.4/arch/um/kernel/trap.c +@@ -37,7 +37,7 @@ int handle_page_fault(unsigned long addr * If the fault was during atomic operation, don't take the fault, just * fail. */ @@ -309,11 +306,11 @@ index a283400..7878069 100644 goto out_nosemaphore; down_read(&mm->mmap_sem); -diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c -index 191015f..b567837 100644 ---- a/arch/x86/mm/fault.c -+++ b/arch/x86/mm/fault.c -@@ -1084,7 +1084,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) +Index: linux-3.4/arch/x86/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/x86/mm/fault.c ++++ linux-3.4/arch/x86/mm/fault.c +@@ -1094,7 +1094,7 @@ do_page_fault(struct pt_regs *regs, unsi * If we're in an interrupt, have no user context or are running * in an atomic region then we must not take the fault: */ @@ -322,11 +319,11 @@ index 191015f..b567837 100644 bad_area_nosemaphore(regs, error_code, address); return; } -diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c -index 705f483..8f3f52a 100644 ---- a/arch/xtensa/mm/fault.c -+++ b/arch/xtensa/mm/fault.c -@@ -57,7 +57,7 @@ void do_page_fault(struct pt_regs *regs) +Index: linux-3.4/arch/xtensa/mm/fault.c +=================================================================== +--- linux-3.4.orig/arch/xtensa/mm/fault.c ++++ linux-3.4/arch/xtensa/mm/fault.c +@@ -56,7 +56,7 @@ void do_page_fault(struct pt_regs *regs) /* If we're in an interrupt or have no user * context, we must not take the fault.. */ @@ -335,11 +332,11 @@ index 705f483..8f3f52a 100644 bad_page_fault(regs, address, SIGSEGV); return; } -diff --git a/include/linux/sched.h b/include/linux/sched.h -index bce86f9..8cb4365 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -91,6 +91,7 @@ struct sched_param { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -90,6 +90,7 @@ struct sched_param { #include #include #include @@ -347,7 +344,7 @@ index bce86f9..8cb4365 100644 #include -@@ -1435,7 +1436,9 @@ struct task_struct { +@@ -1478,7 +1479,9 @@ struct task_struct { /* mutex deadlock detection */ struct mutex_waiter *blocked_on; #endif @@ -357,7 +354,7 @@ index bce86f9..8cb4365 100644 #ifdef CONFIG_TRACE_IRQFLAGS unsigned int irq_events; unsigned long hardirq_enable_ip; -@@ -1584,6 +1587,17 @@ struct task_struct { +@@ -1628,6 +1631,17 @@ struct task_struct { /* Future-safe accessor for struct task_struct's cpus_allowed. */ #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) @@ -375,11 +372,11 @@ index bce86f9..8cb4365 100644 /* * Priority of a process goes from 0..MAX_PRIO-1, valid RT * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH -diff --git a/kernel/fork.c b/kernel/fork.c -index a17bc75..7992f54 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -1196,7 +1196,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -1263,7 +1263,9 @@ static struct task_struct *copy_process( p->hardirq_context = 0; p->softirq_context = 0; #endif @@ -389,6 +386,3 @@ index a17bc75..7992f54 100644 #ifdef CONFIG_LOCKDEP p->lockdep_depth = 0; /* no locks held yet */ p->curr_chain_key = 0; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0204-rcu-Frob-softirq-test.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch similarity index 92% rename from debian/patches/features/all/rt/0204-rcu-Frob-softirq-test.patch rename to debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch index f766fbb8e..4b51fb72e 100644 --- a/debian/patches/features/all/rt/0204-rcu-Frob-softirq-test.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch @@ -1,7 +1,6 @@ -From 8c6a476b1515046c8e5fef4ed3a9da5ad3addad7 Mon Sep 17 00:00:00 2001 +Subject: rcu: Frob softirq test From: Peter Zijlstra -Date: Sat, 13 Aug 2011 00:23:17 +0200 -Subject: [PATCH 204/267] rcu: Frob softirq test +Date: Sat Aug 13 00:23:17 CEST 2011 With RT_FULL we get the below wreckage: @@ -11,15 +10,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: [] rt_mutex_slowunlock+0x16/0x55 -[ 126.060503] +[ 126.060503] [ 126.060504] but task is already holding lock: [ 126.060506] (&p->pi_lock){-...-.}, at: [] 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] [] lock_acquire+0x145/0x18a [ 126.060524] [] _raw_spin_lock_irqsave+0x4b/0x85 @@ -30,7 +29,7 @@ With RT_FULL we get the below wreckage: [ 126.060541] [] rcu_boost_kthread+0x7d/0x9b [ 126.060544] [] kthread+0x99/0xa1 [ 126.060547] [] kernel_thread_helper+0x4/0x10 -[ 126.060551] +[ 126.060551] [ 126.060552] -> #0 (&(lock)->wait_lock#2){+.+...}: [ 126.060555] [] __lock_acquire+0x1157/0x1816 [ 126.060558] [] lock_acquire+0x145/0x18a @@ -50,23 +49,23 @@ With RT_FULL we get the below wreckage: [ 126.060603] [] irq_thread+0xde/0x1af [ 126.060606] [] kthread+0x99/0xa1 [ 126.060608] [] 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: [] 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: @@ -154,11 +153,11 @@ Signed-off-by: Peter Zijlstra kernel/rcutree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h -index 73cab33..2e63942 100644 ---- a/kernel/rcutree_plugin.h -+++ b/kernel/rcutree_plugin.h -@@ -336,7 +336,7 @@ static noinline void rcu_read_unlock_special(struct task_struct *t) +Index: linux-3.4/kernel/rcutree_plugin.h +=================================================================== +--- linux-3.4.orig/kernel/rcutree_plugin.h ++++ linux-3.4/kernel/rcutree_plugin.h +@@ -339,7 +339,7 @@ static noinline void rcu_read_unlock_spe } /* Hardware IRQ handlers cannot block. */ @@ -167,6 +166,3 @@ index 73cab33..2e63942 100644 local_irq_restore(flags); return; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0245-mm-rt-kmap_atomic-scheduling.patch b/debian/patches/features/all/rt/peter_zijlstra-re-_3_0-rt4.patch similarity index 75% rename from debian/patches/features/all/rt/0245-mm-rt-kmap_atomic-scheduling.patch rename to debian/patches/features/all/rt/peter_zijlstra-re-_3_0-rt4.patch index bb96997fd..c2acc75a6 100644 --- a/debian/patches/features/all/rt/0245-mm-rt-kmap_atomic-scheduling.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-re-_3_0-rt4.patch @@ -1,7 +1,6 @@ -From bb7b8e76b3eeee8acb7076b22bd09d90a750730e Mon Sep 17 00:00:00 2001 +Subject: mm, rt: kmap_atomic scheduling From: Peter Zijlstra Date: Thu, 28 Jul 2011 10:43:51 +0200 -Subject: [PATCH 245/267] mm, rt: kmap_atomic scheduling In fact, with migrate_disable() existing one could play games with kmap_atomic. You could save/restore the kmap_atomic slots on context @@ -21,19 +20,19 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins mm/memory.c | 2 ++ 3 files changed, 43 insertions(+) -diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c -index ada175e3..20f1573 100644 ---- a/arch/x86/kernel/process_32.c -+++ b/arch/x86/kernel/process_32.c -@@ -39,6 +39,7 @@ +Index: linux-3.4/arch/x86/kernel/process_32.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/process_32.c ++++ linux-3.4/arch/x86/kernel/process_32.c +@@ -36,6 +36,7 @@ + #include #include #include - #include +#include #include - #include -@@ -339,6 +340,41 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) + #include +@@ -285,6 +286,41 @@ __switch_to(struct task_struct *prev_p, task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT)) __switch_to_xtra(prev_p, next_p, tss); @@ -75,19 +74,19 @@ index ada175e3..20f1573 100644 /* * Leave lazy mode, flushing any hypercalls made here. * This must be done before restoring TLS segments so -diff --git a/include/linux/sched.h b/include/linux/sched.h -index a84a901..1f6b11a 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h @@ -63,6 +63,7 @@ struct sched_param { #include #include +#include - #include #include #include -@@ -1603,6 +1604,10 @@ struct task_struct { + #include +@@ -1647,6 +1648,10 @@ struct task_struct { struct rcu_head put_rcu; int softirq_nestcnt; #endif @@ -98,11 +97,11 @@ index a84a901..1f6b11a 100644 }; #ifdef CONFIG_PREEMPT_RT_FULL -diff --git a/mm/memory.c b/mm/memory.c -index af0df1a..a3ae5e7 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3447,6 +3447,7 @@ unlock: +Index: linux-3.4/mm/memory.c +=================================================================== +--- linux-3.4.orig/mm/memory.c ++++ linux-3.4/mm/memory.c +@@ -3470,6 +3470,7 @@ unlock: #ifdef CONFIG_PREEMPT_RT_FULL void pagefault_disable(void) { @@ -110,7 +109,7 @@ index af0df1a..a3ae5e7 100644 current->pagefault_disabled++; /* * make sure to have issued the store before a pagefault -@@ -3464,6 +3465,7 @@ void pagefault_enable(void) +@@ -3487,6 +3488,7 @@ void pagefault_enable(void) */ barrier(); current->pagefault_disabled--; @@ -118,6 +117,3 @@ index af0df1a..a3ae5e7 100644 } EXPORT_SYMBOL_GPL(pagefault_enable); #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0048-mm-raw_pagefault_disable.patch b/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch similarity index 89% rename from debian/patches/features/all/rt/0048-mm-raw_pagefault_disable.patch rename to debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch index 36f9b461b..c86310ff9 100644 --- a/debian/patches/features/all/rt/0048-mm-raw_pagefault_disable.patch +++ b/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch @@ -1,7 +1,6 @@ -From 48b2128f0cb2e9503cce884a100c636729eb6b23 Mon Sep 17 00:00:00 2001 +Subject: mm: raw_pagefault_disable From: Peter Zijlstra -Date: Fri, 5 Aug 2011 17:16:58 +0200 -Subject: [PATCH 048/267] mm: raw_pagefault_disable +Date: Fri Aug 05 17:16:58 CEST 2011 Adding migrate_disable() to pagefault_disable() to preserve the per-cpu thing for kmap_atomic might not have been the best of choices. @@ -71,6 +70,7 @@ that up by adding raw_pagefault_disable(). [] smp_apic_timer_interrupt+0x85/0x98 [] apic_timer_interrupt+0x13/0x20 + Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-31keae8mkjiv8esq4rl76cib@git.kernel.org --- @@ -78,10 +78,10 @@ Link: http://lkml.kernel.org/n/tip-31keae8mkjiv8esq4rl76cib@git.kernel.org mm/memory.c | 2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) -diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h -index 9414a1b..44b3751 100644 ---- a/include/linux/uaccess.h -+++ b/include/linux/uaccess.h +Index: linux-3.4/include/linux/uaccess.h +=================================================================== +--- linux-3.4.orig/include/linux/uaccess.h ++++ linux-3.4/include/linux/uaccess.h @@ -8,8 +8,34 @@ * These routines enable/disable the pagefault handler in that * it will not take any MM locks and go straight to the fixup table. @@ -117,7 +117,7 @@ index 9414a1b..44b3751 100644 #ifndef ARCH_HAS_NOCACHE_UACCESS -@@ -50,9 +76,9 @@ static inline unsigned long __copy_from_user_nocache(void *to, +@@ -50,9 +76,9 @@ static inline unsigned long __copy_from_ mm_segment_t old_fs = get_fs(); \ \ set_fs(KERNEL_DS); \ @@ -129,11 +129,11 @@ index 9414a1b..44b3751 100644 set_fs(old_fs); \ ret; \ }) -diff --git a/mm/memory.c b/mm/memory.c -index 454ad3f..a3f7ed8 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3444,6 +3444,7 @@ unlock: +Index: linux-3.4/mm/memory.c +=================================================================== +--- linux-3.4.orig/mm/memory.c ++++ linux-3.4/mm/memory.c +@@ -3467,6 +3467,7 @@ unlock: return 0; } @@ -141,7 +141,7 @@ index 454ad3f..a3f7ed8 100644 void pagefault_disable(void) { inc_preempt_count(); -@@ -3472,6 +3473,7 @@ void pagefault_enable(void) +@@ -3495,6 +3496,7 @@ void pagefault_enable(void) preempt_check_resched(); } EXPORT_SYMBOL_GPL(pagefault_enable); @@ -149,6 +149,3 @@ index 454ad3f..a3f7ed8 100644 /* * By the time we get here, we already hold the mm semaphore --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0058-rwsem-inlcude-fix.patch.patch b/debian/patches/features/all/rt/pid-h-include-atomic-h.patch similarity index 54% rename from debian/patches/features/all/rt/0058-rwsem-inlcude-fix.patch.patch rename to debian/patches/features/all/rt/pid-h-include-atomic-h.patch index f68f98ffa..324444eaf 100644 --- a/debian/patches/features/all/rt/0058-rwsem-inlcude-fix.patch.patch +++ b/debian/patches/features/all/rt/pid-h-include-atomic-h.patch @@ -1,17 +1,16 @@ -From dde840601c92b17bf87a3357ac64ad703ef3e7e2 Mon Sep 17 00:00:00 2001 +Subject: rwsem-inlcude-fix.patch From: Thomas Gleixner Date: Fri, 15 Jul 2011 21:24:27 +0200 -Subject: [PATCH 058/267] rwsem-inlcude-fix.patch Signed-off-by: Thomas Gleixner --- include/linux/pid.h | 1 + 1 file changed, 1 insertion(+) -diff --git a/include/linux/pid.h b/include/linux/pid.h -index b152d44..7f33683 100644 ---- a/include/linux/pid.h -+++ b/include/linux/pid.h +Index: linux-3.4/include/linux/pid.h +=================================================================== +--- linux-3.4.orig/include/linux/pid.h ++++ linux-3.4/include/linux/pid.h @@ -2,6 +2,7 @@ #define _LINUX_PID_H @@ -20,6 +19,3 @@ index b152d44..7f33683 100644 enum pid_type { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0242-ping-sysrq.patch.patch b/debian/patches/features/all/rt/ping-sysrq.patch similarity index 76% rename from debian/patches/features/all/rt/0242-ping-sysrq.patch.patch rename to debian/patches/features/all/rt/ping-sysrq.patch index 3d2b53206..78b89226e 100644 --- a/debian/patches/features/all/rt/0242-ping-sysrq.patch.patch +++ b/debian/patches/features/all/rt/ping-sysrq.patch @@ -1,7 +1,6 @@ -From e5e0ee7e55d021e36709c7a92696668b28a67fef Mon Sep 17 00:00:00 2001 +Subject: ping-sysrq.patch From: Carsten Emde Date: Tue, 19 Jul 2011 13:51:17 +0100 -Subject: [PATCH 242/267] ping-sysrq.patch There are (probably rare) situations when a system crashed and the system console becomes unresponsive but the network icmp layer still is alive. @@ -11,6 +10,7 @@ This patch provides this facility. Please consult the updated documentation Documentation/sysrq.txt for details. Signed-off-by: Carsten Emde + --- Documentation/sysrq.txt | 11 +++++++++-- include/net/netns/ipv4.h | 1 + @@ -18,11 +18,11 @@ Signed-off-by: Carsten Emde 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 312e375..9981f30 100644 ---- a/Documentation/sysrq.txt -+++ b/Documentation/sysrq.txt -@@ -57,10 +57,17 @@ On PowerPC - Press 'ALT - Print Screen (or F13) - , +Index: linux-3.4/Documentation/sysrq.txt +=================================================================== +--- linux-3.4.orig/Documentation/sysrq.txt ++++ linux-3.4/Documentation/sysrq.txt +@@ -57,10 +57,17 @@ On PowerPC - Press 'ALT - Print Screen ( On other - If you know of the key combos for other architectures, please let me know so I can add them to this section. @@ -42,10 +42,10 @@ index 312e375..9981f30 100644 * 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 d786b4f..8cef1d1 100644 ---- a/include/net/netns/ipv4.h -+++ b/include/net/netns/ipv4.h +Index: linux-3.4/include/net/netns/ipv4.h +=================================================================== +--- linux-3.4.orig/include/net/netns/ipv4.h ++++ linux-3.4/include/net/netns/ipv4.h @@ -47,6 +47,7 @@ struct netns_ipv4 { int sysctl_icmp_echo_ignore_all; @@ -54,11 +54,11 @@ index d786b4f..8cef1d1 100644 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 ab188ae..028eb47 100644 ---- a/net/ipv4/icmp.c -+++ b/net/ipv4/icmp.c -@@ -67,6 +67,7 @@ +Index: linux-3.4/net/ipv4/icmp.c +=================================================================== +--- linux-3.4.orig/net/ipv4/icmp.c ++++ linux-3.4/net/ipv4/icmp.c +@@ -69,6 +69,7 @@ #include #include #include @@ -66,7 +66,7 @@ index ab188ae..028eb47 100644 #include #include #include -@@ -801,6 +802,30 @@ out_err: +@@ -799,6 +800,30 @@ out_err: } /* @@ -97,7 +97,7 @@ index ab188ae..028eb47 100644 * Handle ICMP_ECHO ("ping") requests. * * RFC 1122: 3.2.2.6 MUST have an echo server that answers ICMP echo -@@ -827,6 +852,11 @@ static void icmp_echo(struct sk_buff *skb) +@@ -825,6 +850,11 @@ static void icmp_echo(struct sk_buff *sk icmp_param.data_len = skb->len; icmp_param.head_len = sizeof(struct icmphdr); icmp_reply(&icmp_param, skb); @@ -109,11 +109,11 @@ index ab188ae..028eb47 100644 } } -diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c -index 69fd720..0ecdb72 100644 ---- a/net/ipv4/sysctl_net_ipv4.c -+++ b/net/ipv4/sysctl_net_ipv4.c -@@ -680,6 +680,13 @@ static struct ctl_table ipv4_net_table[] = { +Index: linux-3.4/net/ipv4/sysctl_net_ipv4.c +=================================================================== +--- linux-3.4.orig/net/ipv4/sysctl_net_ipv4.c ++++ linux-3.4/net/ipv4/sysctl_net_ipv4.c +@@ -718,6 +718,13 @@ static struct ctl_table ipv4_net_table[] .proc_handler = proc_dointvec }, { @@ -127,6 +127,3 @@ index 69fd720..0ecdb72 100644 .procname = "icmp_ignore_bogus_error_responses", .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, .maxlen = sizeof(int), --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0140-posix-timers-Avoid-wakeups-when-no-timers-are-active.patch b/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch similarity index 71% rename from debian/patches/features/all/rt/0140-posix-timers-Avoid-wakeups-when-no-timers-are-active.patch rename to debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch index eacd079a2..fe24274da 100644 --- a/debian/patches/features/all/rt/0140-posix-timers-Avoid-wakeups-when-no-timers-are-active.patch +++ b/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch @@ -1,21 +1,20 @@ -From 7953f114c1cf0bc5b923515b856c9098f7d91ce4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:44 -0500 -Subject: [PATCH 140/267] posix-timers: Avoid wakeups when no timers are - active +Subject: posix-timers: Avoid wakeups when no timers are active Waking the thread even when no timers are scheduled is useless. Signed-off-by: Thomas Gleixner + --- kernel/posix-cpu-timers.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c -index fb350d7..1d4c609 100644 ---- a/kernel/posix-cpu-timers.c -+++ b/kernel/posix-cpu-timers.c -@@ -1436,6 +1436,21 @@ wait_to_die: +Index: linux-3.4/kernel/posix-cpu-timers.c +=================================================================== +--- linux-3.4.orig/kernel/posix-cpu-timers.c ++++ linux-3.4/kernel/posix-cpu-timers.c +@@ -1408,6 +1408,21 @@ wait_to_die: return 0; } @@ -37,7 +36,7 @@ index fb350d7..1d4c609 100644 void run_posix_cpu_timers(struct task_struct *tsk) { unsigned long cpu = smp_processor_id(); -@@ -1448,7 +1463,7 @@ void run_posix_cpu_timers(struct task_struct *tsk) +@@ -1420,7 +1435,7 @@ void run_posix_cpu_timers(struct task_st tasklist = per_cpu(posix_timer_tasklist, cpu); /* check to see if we're already queued */ @@ -46,7 +45,7 @@ index fb350d7..1d4c609 100644 get_task_struct(tsk); if (tasklist) { tsk->posix_timer_list = tasklist; -@@ -1460,9 +1475,9 @@ void run_posix_cpu_timers(struct task_struct *tsk) +@@ -1432,9 +1447,9 @@ void run_posix_cpu_timers(struct task_st tsk->posix_timer_list = tsk; } per_cpu(posix_timer_tasklist, cpu) = tsk; @@ -58,6 +57,3 @@ index fb350d7..1d4c609 100644 } /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0033-posix-timers-Prevent-broadcast-signals.patch b/debian/patches/features/all/rt/posix-timers-no-broadcast.patch similarity index 65% rename from debian/patches/features/all/rt/0033-posix-timers-Prevent-broadcast-signals.patch rename to debian/patches/features/all/rt/posix-timers-no-broadcast.patch index bb241c71f..05286cba0 100644 --- a/debian/patches/features/all/rt/0033-posix-timers-Prevent-broadcast-signals.patch +++ b/debian/patches/features/all/rt/posix-timers-no-broadcast.patch @@ -1,21 +1,21 @@ -From 224b94ef7444a37fa715a10779f3a758722c7598 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:29:20 -0500 -Subject: [PATCH 033/267] posix-timers: Prevent broadcast signals +Subject: posix-timers: Prevent broadcast signals Posix timers should not send broadcast signals and kernel only signals. Prevent it. Signed-off-by: Thomas Gleixner + --- kernel/posix-timers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c -index 69185ae..7b73c34 100644 ---- a/kernel/posix-timers.c -+++ b/kernel/posix-timers.c -@@ -439,6 +439,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) +Index: linux-3.4/kernel/posix-timers.c +=================================================================== +--- linux-3.4.orig/kernel/posix-timers.c ++++ linux-3.4/kernel/posix-timers.c +@@ -439,6 +439,7 @@ static enum hrtimer_restart posix_timer_ static struct pid *good_sigevent(sigevent_t * event) { struct task_struct *rtn = current->group_leader; @@ -23,7 +23,7 @@ index 69185ae..7b73c34 100644 if ((event->sigev_notify & SIGEV_THREAD_ID ) && (!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) || -@@ -447,7 +448,8 @@ static struct pid *good_sigevent(sigevent_t * event) +@@ -447,7 +448,8 @@ static struct pid *good_sigevent(sigeven return NULL; if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) && @@ -33,6 +33,3 @@ index 69185ae..7b73c34 100644 return NULL; return task_pid(rtn); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0139-posix-timers-Shorten-posix_cpu_timers-CPU-kernel-thr.patch b/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch similarity index 62% rename from debian/patches/features/all/rt/0139-posix-timers-Shorten-posix_cpu_timers-CPU-kernel-thr.patch rename to debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch index 132276e91..b837a1ea8 100644 --- a/debian/patches/features/all/rt/0139-posix-timers-Shorten-posix_cpu_timers-CPU-kernel-thr.patch +++ b/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch @@ -1,8 +1,6 @@ -From 34fed7c7e788f6c7594b51c3d1bba4cf047d6c0a Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 3 Jul 2009 08:30:00 -0500 -Subject: [PATCH 139/267] posix-timers: Shorten posix_cpu_timers/ kernel - thread names +Subject: posix-timers: Shorten posix_cpu_timers/ kernel thread names Shorten the softirq kernel thread names because they always overflow the limited comm length, appearing as "posix_cpu_timer" CPU# times. @@ -10,15 +8,16 @@ limited comm length, appearing as "posix_cpu_timer" CPU# times. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/posix-cpu-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c -index 17336ab..fb350d7 100644 ---- a/kernel/posix-cpu-timers.c -+++ b/kernel/posix-cpu-timers.c -@@ -1479,7 +1479,7 @@ static int posix_cpu_thread_call(struct notifier_block *nfb, +Index: linux-3.4/kernel/posix-cpu-timers.c +=================================================================== +--- linux-3.4.orig/kernel/posix-cpu-timers.c ++++ linux-3.4/kernel/posix-cpu-timers.c +@@ -1451,7 +1451,7 @@ static int posix_cpu_thread_call(struct switch (action) { case CPU_UP_PREPARE: p = kthread_create(posix_cpu_timers_thread, hcpu, @@ -27,6 +26,3 @@ index 17336ab..fb350d7 100644 if (IS_ERR(p)) return NOTIFY_BAD; p->flags |= PF_NOFREEZE; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0138-posix-timers-thread-posix-cpu-timers-on-rt.patch b/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch similarity index 79% rename from debian/patches/features/all/rt/0138-posix-timers-thread-posix-cpu-timers-on-rt.patch rename to debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch index ef8e7915f..2a67ae932 100644 --- a/debian/patches/features/all/rt/0138-posix-timers-thread-posix-cpu-timers-on-rt.patch +++ b/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch @@ -1,7 +1,6 @@ -From 2ae10b4578ddd05bec615c8b112521ece75f4dba Mon Sep 17 00:00:00 2001 From: John Stultz Date: Fri, 3 Jul 2009 08:29:58 -0500 -Subject: [PATCH 138/267] posix-timers: thread posix-cpu-timers on -rt +Subject: posix-timers: thread posix-cpu-timers on -rt posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. @@ -10,19 +9,20 @@ context. Move it to a thread. Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner + --- - include/linux/init_task.h | 7 ++ - include/linux/sched.h | 3 + - init/main.c | 1 + - kernel/fork.c | 3 + - kernel/posix-cpu-timers.c | 182 +++++++++++++++++++++++++++++++++++++++++++-- + include/linux/init_task.h | 7 + + include/linux/sched.h | 3 + init/main.c | 1 + kernel/fork.c | 3 + kernel/posix-cpu-timers.c | 182 ++++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 190 insertions(+), 6 deletions(-) -diff --git a/include/linux/init_task.h b/include/linux/init_task.h -index 32574ee..cfd9f8d 100644 ---- a/include/linux/init_task.h -+++ b/include/linux/init_task.h -@@ -126,6 +126,12 @@ extern struct cred init_cred; +Index: linux-3.4/include/linux/init_task.h +=================================================================== +--- linux-3.4.orig/include/linux/init_task.h ++++ linux-3.4/include/linux/init_task.h +@@ -132,6 +132,12 @@ extern struct cred init_cred; # define INIT_PERF_EVENTS(tsk) #endif @@ -35,7 +35,7 @@ index 32574ee..cfd9f8d 100644 #define INIT_TASK_COMM "swapper" /* -@@ -180,6 +186,7 @@ extern struct cred init_cred; +@@ -186,6 +192,7 @@ extern struct cred init_cred; .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 */ \ @@ -43,11 +43,11 @@ index 32574ee..cfd9f8d 100644 .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 30ac0b5..9ff731d 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1355,6 +1355,9 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1403,6 +1403,9 @@ struct task_struct { struct task_cputime cputime_expires; struct list_head cpu_timers[3]; @@ -57,10 +57,10 @@ index 30ac0b5..9ff731d 100644 /* process credentials */ const struct cred __rcu *real_cred; /* objective and real subjective task -diff --git a/init/main.c b/init/main.c -index 0e274f9..0c41665 100644 ---- a/init/main.c -+++ b/init/main.c +Index: linux-3.4/init/main.c +=================================================================== +--- linux-3.4.orig/init/main.c ++++ linux-3.4/init/main.c @@ -68,6 +68,7 @@ #include #include @@ -69,25 +69,25 @@ index 0e274f9..0c41665 100644 #include #include -diff --git a/kernel/fork.c b/kernel/fork.c -index 7992f54..d8027e9 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -1026,6 +1026,9 @@ void mm_init_owner(struct mm_struct *mm, struct task_struct *p) +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -1096,6 +1096,9 @@ void mm_init_owner(struct mm_struct *mm, */ static void posix_cpu_timers_init(struct task_struct *tsk) { +#ifdef CONFIG_PREEMPT_RT_BASE + tsk->posix_timer_list = NULL; +#endif - tsk->cputime_expires.prof_exp = cputime_zero; - tsk->cputime_expires.virt_exp = cputime_zero; + tsk->cputime_expires.prof_exp = 0; + tsk->cputime_expires.virt_exp = 0; tsk->cputime_expires.sched_exp = 0; -diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c -index e7cb76d..17336ab 100644 ---- a/kernel/posix-cpu-timers.c -+++ b/kernel/posix-cpu-timers.c -@@ -701,7 +701,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int flags, +Index: linux-3.4/kernel/posix-cpu-timers.c +=================================================================== +--- linux-3.4.orig/kernel/posix-cpu-timers.c ++++ linux-3.4/kernel/posix-cpu-timers.c +@@ -682,7 +682,7 @@ static int posix_cpu_timer_set(struct k_ /* * Disarm any old timer after extracting its expiry time. */ @@ -96,7 +96,7 @@ index e7cb76d..17336ab 100644 ret = 0; old_incr = timer->it.cpu.incr; -@@ -1223,7 +1223,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) +@@ -1198,7 +1198,7 @@ void posix_cpu_timer_schedule(struct k_i /* * Now re-arm for the new expiry time. */ @@ -105,7 +105,7 @@ index e7cb76d..17336ab 100644 arm_timer(timer); spin_unlock(&p->sighand->siglock); -@@ -1290,10 +1290,11 @@ static inline int fastpath_timer_check(struct task_struct *tsk) +@@ -1262,10 +1262,11 @@ static inline int fastpath_timer_check(s sig = tsk->signal; if (sig->cputimer.running) { struct task_cputime group_sample; @@ -119,7 +119,7 @@ index e7cb76d..17336ab 100644 if (task_cputime_expired(&group_sample, &sig->cputime_expires)) return 1; -@@ -1307,13 +1308,13 @@ static inline int fastpath_timer_check(struct task_struct *tsk) +@@ -1279,13 +1280,13 @@ static inline int fastpath_timer_check(s * already updated our counts. We need to check if any timers fire now. * Interrupts are disabled. */ @@ -135,7 +135,7 @@ index e7cb76d..17336ab 100644 /* * The fast path checks that there are no expired thread or thread -@@ -1371,6 +1372,175 @@ void run_posix_cpu_timers(struct task_struct *tsk) +@@ -1343,6 +1344,175 @@ void run_posix_cpu_timers(struct task_st } } @@ -263,8 +263,8 @@ index e7cb76d..17336ab 100644 +#ifdef CONFIG_HOTPLUG_CPU + case CPU_UP_CANCELED: + /* Unbind it from offline cpu so it can run. Fall thru. */ -+ kthread_bind(per_cpu(posix_timer_task,cpu), -+ any_online_cpu(cpu_online_map)); ++ kthread_bind(per_cpu(posix_timer_task, cpu), ++ cpumask_any(cpu_online_mask)); + kthread_stop(per_cpu(posix_timer_task,cpu)); + per_cpu(posix_timer_task,cpu) = NULL; + break; @@ -292,7 +292,7 @@ index e7cb76d..17336ab 100644 + unsigned long cpu; + + /* init the per-cpu posix_timer_tasklets */ -+ for_each_cpu_mask(cpu, cpu_possible_map) ++ for_each_possible_cpu(cpu) + per_cpu(posix_timer_tasklist, cpu) = NULL; + + posix_cpu_thread_call(&posix_cpu_thread_notifier, CPU_UP_PREPARE, hcpu); @@ -311,6 +311,3 @@ index e7cb76d..17336ab 100644 /* * Set one of the process-wide special case CPU timers or RLIMIT_CPU. * The tsk->sighand->siglock must be held by the caller. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0237-power-disable-highmem-on-rt.patch.patch b/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch similarity index 53% rename from debian/patches/features/all/rt/0237-power-disable-highmem-on-rt.patch.patch rename to debian/patches/features/all/rt/power-disable-highmem-on-rt.patch index bf2838691..bca5ebbad 100644 --- a/debian/patches/features/all/rt/0237-power-disable-highmem-on-rt.patch.patch +++ b/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch @@ -1,18 +1,17 @@ -From 8705b7416b5d8270fa3fce06795fac1f7cb9f217 Mon Sep 17 00:00:00 2001 +Subject: power-disable-highmem-on-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:08:34 +0200 -Subject: [PATCH 237/267] power-disable-highmem-on-rt.patch Signed-off-by: Thomas Gleixner --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index c504625..d01baf8 100644 ---- a/arch/powerpc/Kconfig -+++ b/arch/powerpc/Kconfig -@@ -276,7 +276,7 @@ menu "Kernel options" +Index: linux-3.4/arch/powerpc/Kconfig +=================================================================== +--- linux-3.4.orig/arch/powerpc/Kconfig ++++ linux-3.4/arch/powerpc/Kconfig +@@ -283,7 +283,7 @@ menu "Kernel options" config HIGHMEM bool "High memory support" @@ -21,6 +20,3 @@ index c504625..d01baf8 100644 source kernel/time/Kconfig source kernel/Kconfig.hz --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0236-power-use-generic-rwsem-on-rt.patch b/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch similarity index 53% rename from debian/patches/features/all/rt/0236-power-use-generic-rwsem-on-rt.patch rename to debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch index 1431e6dc1..847713137 100644 --- a/debian/patches/features/all/rt/0236-power-use-generic-rwsem-on-rt.patch +++ b/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch @@ -1,16 +1,13 @@ -From 0560af1e02494253956e070e69f1cf856e2e0a84 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner -Date: Tue, 10 Apr 2012 14:34:18 -0400 -Subject: [PATCH 236/267] power-use-generic-rwsem-on-rt --- arch/powerpc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 7c93c7e..c504625 100644 ---- a/arch/powerpc/Kconfig -+++ b/arch/powerpc/Kconfig +Index: linux-3.4/arch/powerpc/Kconfig +=================================================================== +--- linux-3.4.orig/arch/powerpc/Kconfig ++++ linux-3.4/arch/powerpc/Kconfig @@ -69,10 +69,11 @@ config LOCKDEP_SUPPORT config RWSEM_GENERIC_SPINLOCK @@ -24,6 +21,3 @@ index 7c93c7e..c504625 100644 config GENERIC_LOCKBREAK bool --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0079-preempt-Provide-preempt_-_-no-rt-variants.patch b/debian/patches/features/all/rt/preempt-nort-rt-variants.patch similarity index 72% rename from debian/patches/features/all/rt/0079-preempt-Provide-preempt_-_-no-rt-variants.patch rename to debian/patches/features/all/rt/preempt-nort-rt-variants.patch index e00ce4707..fab467d12 100644 --- a/debian/patches/features/all/rt/0079-preempt-Provide-preempt_-_-no-rt-variants.patch +++ b/debian/patches/features/all/rt/preempt-nort-rt-variants.patch @@ -1,27 +1,27 @@ -From b114ea4baca627525d85c109fefcb2ba3de55ffa Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 24 Jul 2009 12:38:56 +0200 -Subject: [PATCH 079/267] preempt: Provide preempt_*_(no)rt variants +Subject: preempt: Provide preempt_*_(no)rt variants RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. Signed-off-by: Thomas Gleixner + --- include/linux/preempt.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 227b0f5..29db25f 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h +Index: linux-3.4/include/linux/preempt.h +=================================================================== +--- linux-3.4.orig/include/linux/preempt.h ++++ linux-3.4/include/linux/preempt.h @@ -54,11 +54,15 @@ do { \ dec_preempt_count(); \ } while (0) --#define preempt_enable_no_resched() __preempt_enable_no_resched() +-#define preempt_enable_no_resched() sched_preempt_enable_no_resched() +#ifndef CONFIG_PREEMPT_RT_BASE -+# define preempt_enable_no_resched() __preempt_enable_no_resched() ++# define preempt_enable_no_resched() sched_preempt_enable_no_resched() +#else +# define preempt_enable_no_resched() preempt_enable() +#endif @@ -29,7 +29,7 @@ index 227b0f5..29db25f 100644 #define preempt_enable() \ do { \ - preempt_enable_no_resched(); \ -+ __preempt_enable_no_resched(); \ ++ sched_preempt_enable_no_resched(); \ barrier(); \ preempt_check_resched(); \ } while (0) @@ -52,6 +52,3 @@ index 227b0f5..29db25f 100644 #ifdef CONFIG_PREEMPT_NOTIFIERS struct preempt_notifier; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0075-printk-force_early_printk-boot-param-to-help-with-de.patch b/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch similarity index 50% rename from debian/patches/features/all/rt/0075-printk-force_early_printk-boot-param-to-help-with-de.patch rename to debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch index 35f70cee5..12f8259d2 100644 --- a/debian/patches/features/all/rt/0075-printk-force_early_printk-boot-param-to-help-with-de.patch +++ b/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch @@ -1,8 +1,10 @@ -From 7e09744cd7ca0c94a940049f7557916e764ef9ea Mon Sep 17 00:00:00 2001 +Subject: printk: %27force_early_printk%27 boot param to help with debugging +From: Peter Zijlstra +Date: Fri, 02 Sep 2011 14:41:29 +0200 + +Subject: printk: 'force_early_printk' boot param to help with debugging From: Peter Zijlstra -Date: Fri, 2 Sep 2011 14:29:33 +0200 -Subject: [PATCH 075/267] printk: 'force_early_printk' boot param to help with - debugging +Date: Fri Sep 02 14:29:33 CEST 2011 Gives me an option to screw printk and actually see what the machine says. @@ -15,24 +17,21 @@ Link: http://lkml.kernel.org/n/tip-ykb97nsfmobq44xketrxs977@git.kernel.org kernel/printk.c | 7 +++++++ 1 file changed, 7 insertions(+) -diff --git a/kernel/printk.c b/kernel/printk.c -index 96ee3cd..1f06626 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -541,6 +541,13 @@ asmlinkage void early_printk(const char *fmt, ...) +Index: linux-3.4/kernel/printk.c +=================================================================== +--- linux-3.4.orig/kernel/printk.c ++++ linux-3.4/kernel/printk.c +@@ -547,6 +547,13 @@ asmlinkage void early_printk(const char */ - static int __read_mostly printk_killswitch; + static bool __read_mostly printk_killswitch; +static int __init force_early_printk_setup(char *str) +{ -+ printk_killswitch = 1; ++ printk_killswitch = true; + return 0; +} +early_param("force_early_printk", force_early_printk_setup); + void printk_kill(void) { - printk_killswitch = 1; --- -1.7.10 - + printk_killswitch = true; diff --git a/debian/patches/features/all/rt/0074-printk-kill.patch.patch b/debian/patches/features/all/rt/printk-kill.patch similarity index 70% rename from debian/patches/features/all/rt/0074-printk-kill.patch.patch rename to debian/patches/features/all/rt/printk-kill.patch index 2b5ac2d83..f3b37da55 100644 --- a/debian/patches/features/all/rt/0074-printk-kill.patch.patch +++ b/debian/patches/features/all/rt/printk-kill.patch @@ -1,7 +1,6 @@ -From 91869f3a1488dba10d311b5892e4555e94f67353 Mon Sep 17 00:00:00 2001 +Subject: printk-kill.patch From: Ingo Molnar Date: Fri, 22 Jul 2011 17:58:40 +0200 -Subject: [PATCH 074/267] printk-kill.patch Signed-off-by: Thomas Gleixner --- @@ -10,10 +9,10 @@ Signed-off-by: Thomas Gleixner kernel/watchdog.c | 15 +++++++++++++-- 3 files changed, 48 insertions(+), 3 deletions(-) -diff --git a/include/linux/printk.h b/include/linux/printk.h -index be10455..a53adf6 100644 ---- a/include/linux/printk.h -+++ b/include/linux/printk.h +Index: linux-3.4/include/linux/printk.h +=================================================================== +--- linux-3.4.orig/include/linux/printk.h ++++ linux-3.4/include/linux/printk.h @@ -91,9 +91,11 @@ int no_printk(const char *fmt, ...) #ifdef CONFIG_EARLY_PRINTK extern asmlinkage __printf(1, 2) @@ -26,7 +25,7 @@ index be10455..a53adf6 100644 #endif extern int printk_needs_cpu(int cpu); -@@ -114,7 +116,6 @@ extern int __printk_ratelimit(const char *func); +@@ -119,7 +121,6 @@ extern int __printk_ratelimit(const char #define printk_ratelimit() __printk_ratelimit(__func__) extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, unsigned int interval_msec); @@ -34,11 +33,11 @@ index be10455..a53adf6 100644 extern int printk_delay_msec; extern int dmesg_restrict; extern int kptr_restrict; -diff --git a/kernel/printk.c b/kernel/printk.c -index b7aa50e..96ee3cd 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -532,6 +532,32 @@ asmlinkage void early_printk(const char *fmt, ...) +Index: linux-3.4/kernel/printk.c +=================================================================== +--- linux-3.4.orig/kernel/printk.c ++++ linux-3.4/kernel/printk.c +@@ -538,6 +538,32 @@ asmlinkage void early_printk(const char early_vprintk(fmt, ap); va_end(ap); } @@ -49,11 +48,11 @@ index b7aa50e..96ee3cd 100644 + * + * Used by the NMI watchdog if early-printk is enabled. + */ -+static int __read_mostly printk_killswitch; ++static bool __read_mostly printk_killswitch; + +void printk_kill(void) +{ -+ printk_killswitch = 1; ++ printk_killswitch = true; +} + +static int forced_early_printk(const char *fmt, va_list ap) @@ -70,8 +69,8 @@ index b7aa50e..96ee3cd 100644 +} #endif - static int __read_mostly ignore_loglevel; -@@ -850,6 +876,13 @@ asmlinkage int vprintk(const char *fmt, va_list args) + static bool __read_mostly ignore_loglevel; +@@ -862,6 +888,13 @@ asmlinkage int vprintk(const char *fmt, size_t plen; char special; @@ -85,11 +84,11 @@ index b7aa50e..96ee3cd 100644 boot_delay_msec(); printk_delay(); -diff --git a/kernel/watchdog.c b/kernel/watchdog.c -index 1d7bca7..c7e2a2f 100644 ---- a/kernel/watchdog.c -+++ b/kernel/watchdog.c -@@ -201,6 +201,8 @@ static int is_softlockup(unsigned long touch_ts) +Index: linux-3.4/kernel/watchdog.c +=================================================================== +--- linux-3.4.orig/kernel/watchdog.c ++++ linux-3.4/kernel/watchdog.c +@@ -201,6 +201,8 @@ static int is_softlockup(unsigned long t #ifdef CONFIG_HARDLOCKUP_DETECTOR @@ -98,7 +97,7 @@ index 1d7bca7..c7e2a2f 100644 static struct perf_event_attr wd_hw_attr = { .type = PERF_TYPE_HARDWARE, .config = PERF_COUNT_HW_CPU_CYCLES, -@@ -235,10 +237,19 @@ static void watchdog_overflow_callback(struct perf_event *event, +@@ -235,10 +237,19 @@ static void watchdog_overflow_callback(s if (__this_cpu_read(hard_watchdog_warn) == true) return; @@ -120,6 +119,3 @@ index 1d7bca7..c7e2a2f 100644 __this_cpu_write(hard_watchdog_warn, true); return; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0118-radix-tree-rt-aware.patch.patch b/debian/patches/features/all/rt/radix-tree-rt-aware.patch similarity index 66% rename from debian/patches/features/all/rt/0118-radix-tree-rt-aware.patch.patch rename to debian/patches/features/all/rt/radix-tree-rt-aware.patch index 48f15e78a..dd58a92b3 100644 --- a/debian/patches/features/all/rt/0118-radix-tree-rt-aware.patch.patch +++ b/debian/patches/features/all/rt/radix-tree-rt-aware.patch @@ -1,7 +1,6 @@ -From 78aab28d7975d404d97310ab718dd56d0a682c3c Mon Sep 17 00:00:00 2001 +Subject: radix-tree-rt-aware.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:33:18 +0200 -Subject: [PATCH 118/267] radix-tree-rt-aware.patch Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner lib/radix-tree.c | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) -diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h -index 9d4539c..6b4bdf2 100644 ---- a/include/linux/radix-tree.h -+++ b/include/linux/radix-tree.h -@@ -231,7 +231,13 @@ unsigned long radix_tree_next_hole(struct radix_tree_root *root, +Index: linux-3.4/include/linux/radix-tree.h +=================================================================== +--- linux-3.4.orig/include/linux/radix-tree.h ++++ linux-3.4/include/linux/radix-tree.h +@@ -230,7 +230,13 @@ unsigned long radix_tree_next_hole(struc unsigned long index, unsigned long max_scan); unsigned long radix_tree_prev_hole(struct radix_tree_root *root, unsigned long index, unsigned long max_scan); @@ -27,7 +26,7 @@ index 9d4539c..6b4bdf2 100644 void radix_tree_init(void); void *radix_tree_tag_set(struct radix_tree_root *root, unsigned long index, unsigned int tag); -@@ -256,7 +262,7 @@ unsigned long radix_tree_locate_item(struct radix_tree_root *root, void *item); +@@ -255,7 +261,7 @@ unsigned long radix_tree_locate_item(str static inline void radix_tree_preload_end(void) { @@ -35,12 +34,12 @@ index 9d4539c..6b4bdf2 100644 + preempt_enable_nort(); } - #endif /* _LINUX_RADIX_TREE_H */ -diff --git a/lib/radix-tree.c b/lib/radix-tree.c -index d9df745..770453a 100644 ---- a/lib/radix-tree.c -+++ b/lib/radix-tree.c -@@ -166,12 +166,13 @@ radix_tree_node_alloc(struct radix_tree_root *root) + /** +Index: linux-3.4/lib/radix-tree.c +=================================================================== +--- linux-3.4.orig/lib/radix-tree.c ++++ linux-3.4/lib/radix-tree.c +@@ -202,12 +202,13 @@ radix_tree_node_alloc(struct radix_tree_ * succeed in getting a node here (and never reach * kmem_cache_alloc) */ @@ -55,7 +54,7 @@ index d9df745..770453a 100644 } if (ret == NULL) ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); -@@ -206,6 +207,7 @@ radix_tree_node_free(struct radix_tree_node *node) +@@ -242,6 +243,7 @@ radix_tree_node_free(struct radix_tree_n call_rcu(&node->rcu_head, radix_tree_node_rcu_free); } @@ -63,7 +62,7 @@ index d9df745..770453a 100644 /* * Load up this CPU's radix_tree_node buffer with sufficient objects to * ensure that the addition of a single element in the tree cannot fail. On -@@ -240,6 +242,7 @@ out: +@@ -276,6 +278,7 @@ out: return ret; } EXPORT_SYMBOL(radix_tree_preload); @@ -71,6 +70,3 @@ index d9df745..770453a 100644 /* * Return the maximum key which can be store into a --- -1.7.10 - diff --git a/debian/patches/features/all/rt/rcu-fix-build-break.patch b/debian/patches/features/all/rt/rcu-fix-build-break.patch new file mode 100644 index 000000000..2b0c525d2 --- /dev/null +++ b/debian/patches/features/all/rt/rcu-fix-build-break.patch @@ -0,0 +1,60 @@ +Subject: rcu: Fix build break +From: John Kacur +Date: Fri, 13 Apr 2012 12:54:21 +0200 + +A build break can occur with the following config options enabled + +CONFIG_PREEMPT_RT_FULL +CONFIG_RCU_FAST_NO_HZ +CONFIG_RCU_CPU_STALL_INFO + +This occurs because symbols in print_cpu_stall_fast_no_hz() such as +rcu_idle_gp_timer are not accessible with CONFIG_PREEMPT_RT_FULL +and results in the following type of build errors: + +kernel/rcutree_plugin.h: In function ‘print_cpu_stall_fast_no_hz’: +kernel/rcutree_plugin.h:2195: error: ‘rcu_idle_gp_timer’ undeclared (first use in this function) + +This patch fixes the build break by limiting the PREEMPT_RT_FULL +section to the function rcu_needs_cpu() instead of to the entire +!defined(CONFIG_RCU_FAST_NO_NZ) section as was intended in the +original "rcu: Make ksoftirqd do RCU quiescent states" patch. + +Signed-off-by: John Kacur +Cc: Paul McKenney +Link: http://lkml.kernel.org/r/1334314461-8937-1-git-send-email-jkacur@redhat.com +Signed-off-by: Thomas Gleixner +--- + kernel/rcutree_plugin.h | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: linux-3.4/kernel/rcutree_plugin.h +=================================================================== +--- linux-3.4.orig/kernel/rcutree_plugin.h ++++ linux-3.4/kernel/rcutree_plugin.h +@@ -1914,6 +1914,9 @@ int rcu_needs_cpu(int cpu) + { + return rcu_cpu_has_callbacks(cpu); + } ++#endif /* !defined(CONFIG_RCU_FAST_NO_HZ) || defined(CONFIG_PREEMPT_RT_FULL) */ ++ ++#if !defined(CONFIG_RCU_FAST_NO_HZ) + + /* + * Because we do not have RCU_FAST_NO_HZ, don't bother initializing for it. +@@ -1984,6 +1987,7 @@ static DEFINE_PER_CPU(struct hrtimer, rc + static ktime_t rcu_idle_gp_wait; /* If some non-lazy callbacks. */ + static ktime_t rcu_idle_lazy_gp_wait; /* If only lazy callbacks. */ + ++#ifndef CONFIG_PREEMPT_RT_FULL + /* + * Allow the CPU to enter dyntick-idle mode if either: (1) There are no + * callbacks on this CPU, (2) this CPU has not yet attempted to enter +@@ -2001,6 +2005,7 @@ int rcu_needs_cpu(int cpu) + /* Otherwise, RCU needs the CPU only if it recently tried and failed. */ + return per_cpu(rcu_dyntick_holdoff, cpu) == jiffies; + } ++#endif /* #ifndef CONFIG_PREEMPT_RT_FULL */ + + /* + * Does the specified flavor of RCU have non-lazy callbacks pending on diff --git a/debian/patches/features/all/rt/0206-rcu-Fix-macro-substitution-for-synchronize_rcu_bh-on.patch b/debian/patches/features/all/rt/rcu-fix-macro-substitution.patch similarity index 74% rename from debian/patches/features/all/rt/0206-rcu-Fix-macro-substitution-for-synchronize_rcu_bh-on.patch rename to debian/patches/features/all/rt/rcu-fix-macro-substitution.patch index f662a0f3f..0d91977e9 100644 --- a/debian/patches/features/all/rt/0206-rcu-Fix-macro-substitution-for-synchronize_rcu_bh-on.patch +++ b/debian/patches/features/all/rt/rcu-fix-macro-substitution.patch @@ -1,11 +1,6 @@ -From b2b741ee43489c44dcac9894ea0c15cdf45ccc8d Mon Sep 17 00:00:00 2001 +Subject: rcu: Fix macro substitution for synchronize_rcu_bh() on RT From: John Kacur Date: Mon, 14 Nov 2011 02:44:42 +0100 -Subject: [PATCH 206/267] rcu: Fix macro substitution for synchronize_rcu_bh() - on RT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit kernel/rcutorture.c:492: error: ‘synchronize_rcu_bh’ undeclared here (not in a function) @@ -25,10 +20,10 @@ Signed-off-by: Thomas Gleixner include/linux/rcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h -index 800b840..6e503a3 100644 ---- a/include/linux/rcutree.h -+++ b/include/linux/rcutree.h +Index: linux-3.4/include/linux/rcutree.h +=================================================================== +--- linux-3.4.orig/include/linux/rcutree.h ++++ linux-3.4/include/linux/rcutree.h @@ -60,7 +60,7 @@ static inline void exit_rcu(void) #ifndef CONFIG_PREEMPT_RT_FULL extern void synchronize_rcu_bh(void); @@ -38,6 +33,3 @@ index 800b840..6e503a3 100644 #endif extern void synchronize_sched_expedited(void); extern void synchronize_rcu_expedited(void); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0203-RCU-Force-PREEMPT_RCU-for-PREEMPT-RT.patch b/debian/patches/features/all/rt/rcu-force-preempt-rcu-for-rt.patch similarity index 69% rename from debian/patches/features/all/rt/0203-RCU-Force-PREEMPT_RCU-for-PREEMPT-RT.patch rename to debian/patches/features/all/rt/rcu-force-preempt-rcu-for-rt.patch index 1ac58e5a8..a18cc011b 100644 --- a/debian/patches/features/all/rt/0203-RCU-Force-PREEMPT_RCU-for-PREEMPT-RT.patch +++ b/debian/patches/features/all/rt/rcu-force-preempt-rcu-for-rt.patch @@ -1,7 +1,6 @@ -From fc2773a086cefeb3e342f8007021fa008fb01f59 Mon Sep 17 00:00:00 2001 +Subject: RCU: Force PREEMPT_RCU for PREEMPT-RT From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:30 -0500 -Subject: [PATCH 203/267] RCU: Force PREEMPT_RCU for PREEMPT-RT PREEMPT_RT relies on PREEMPT_RCU - only allow RCU to be configured interactively in the !PREEMPT_RT case. @@ -15,11 +14,11 @@ Link: http://lkml.kernel.org/n/tip-j1y0phicu6s6pu8guku2vca0@git.kernel.org init/Kconfig | 1 - 1 file changed, 1 deletion(-) -diff --git a/init/Kconfig b/init/Kconfig -index 720c182..dbc82d0 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -731,7 +731,6 @@ config RT_GROUP_SCHED +Index: linux-3.4/init/Kconfig +=================================================================== +--- linux-3.4.orig/init/Kconfig ++++ linux-3.4/init/Kconfig +@@ -746,7 +746,6 @@ config RT_GROUP_SCHED bool "Group scheduling for SCHED_RR/FIFO" depends on EXPERIMENTAL depends on CGROUP_SCHED @@ -27,6 +26,3 @@ index 720c182..dbc82d0 100644 default n help This feature lets you explicitly allocate real CPU bandwidth --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0205-rcu-Merge-RCU-bh-into-RCU-preempt.patch b/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch similarity index 71% rename from debian/patches/features/all/rt/0205-rcu-Merge-RCU-bh-into-RCU-preempt.patch rename to debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch index 4286a6bdf..b7d1ffd90 100644 --- a/debian/patches/features/all/rt/0205-rcu-Merge-RCU-bh-into-RCU-preempt.patch +++ b/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch @@ -1,7 +1,6 @@ -From ba74bc264c160ce00ea6c51598a3bf721c27f8fd Mon Sep 17 00:00:00 2001 -From: Thomas Gleixner +Subject: rcu: Merge RCU-bh into RCU-preempt Date: Wed, 5 Oct 2011 11:59:38 -0700 -Subject: [PATCH 205/267] rcu: Merge RCU-bh into RCU-preempt +From: Thomas Gleixner The Linux kernel has long RCU-bh read-side critical sections that intolerably increase scheduling latency under mainline's RCU-bh rules, @@ -23,6 +22,7 @@ Signed-off-by: Thomas Gleixner Signed-off-by: Paul E. McKenney Link: http://lkml.kernel.org/r/20111005185938.GA20403@linux.vnet.ibm.com Signed-off-by: Thomas Gleixner + --- include/linux/rcupdate.h | 25 +++++++++++++++++++++++++ include/linux/rcutree.h | 18 ++++++++++++++++-- @@ -30,11 +30,11 @@ Signed-off-by: Thomas Gleixner kernel/rcutree.c | 10 ++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-) -diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h -index a0082e2..7c31d86 100644 ---- a/include/linux/rcupdate.h -+++ b/include/linux/rcupdate.h -@@ -92,6 +92,9 @@ extern void call_rcu(struct rcu_head *head, +Index: linux-3.4/include/linux/rcupdate.h +=================================================================== +--- linux-3.4.orig/include/linux/rcupdate.h ++++ linux-3.4/include/linux/rcupdate.h +@@ -101,6 +101,9 @@ extern void call_rcu(struct rcu_head *he #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ @@ -44,7 +44,7 @@ index a0082e2..7c31d86 100644 /** * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period. * @head: structure to be used for queueing the RCU updates. -@@ -112,6 +115,7 @@ extern void call_rcu(struct rcu_head *head, +@@ -121,6 +124,7 @@ extern void call_rcu(struct rcu_head *he */ extern void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *head)); @@ -52,7 +52,7 @@ index a0082e2..7c31d86 100644 /** * call_rcu_sched() - Queue an RCU for invocation after sched grace period. -@@ -181,7 +185,13 @@ static inline int rcu_preempt_depth(void) +@@ -190,7 +194,13 @@ static inline int rcu_preempt_depth(void /* Internal to kernel */ extern void rcu_sched_qs(int cpu); @@ -65,8 +65,8 @@ index a0082e2..7c31d86 100644 + extern void rcu_check_callbacks(int cpu, int user); struct notifier_block; - -@@ -281,7 +291,14 @@ static inline int rcu_read_lock_held(void) + extern void rcu_idle_enter(void); +@@ -331,7 +341,14 @@ static inline int rcu_read_lock_held(voi * rcu_read_lock_bh_held() is defined out of line to avoid #include-file * hell. */ @@ -81,7 +81,7 @@ index a0082e2..7c31d86 100644 /** * rcu_read_lock_sched_held() - might we be in RCU-sched read-side critical section? -@@ -684,8 +701,12 @@ static inline void rcu_read_unlock(void) +@@ -780,10 +797,14 @@ static inline void rcu_read_unlock(void) static inline void rcu_read_lock_bh(void) { local_bh_disable(); @@ -89,28 +89,32 @@ index a0082e2..7c31d86 100644 + rcu_read_lock(); +#else __acquire(RCU_BH); - rcu_read_acquire_bh(); + rcu_lock_acquire(&rcu_bh_lock_map); + rcu_lockdep_assert(!rcu_is_cpu_idle(), + "rcu_read_lock_bh() used illegally while idle"); +#endif } /* -@@ -695,8 +716,12 @@ static inline void rcu_read_lock_bh(void) +@@ -793,10 +814,14 @@ static inline void rcu_read_lock_bh(void */ static inline void rcu_read_unlock_bh(void) { +#ifdef CONFIG_PREEMPT_RT_FULL + rcu_read_unlock(); +#else - rcu_read_release_bh(); + rcu_lockdep_assert(!rcu_is_cpu_idle(), + "rcu_read_unlock_bh() used illegally while idle"); + rcu_lock_release(&rcu_bh_lock_map); __release(RCU_BH); +#endif local_bh_enable(); } -diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h -index 6745846..800b840 100644 ---- a/include/linux/rcutree.h -+++ b/include/linux/rcutree.h +Index: linux-3.4/include/linux/rcutree.h +=================================================================== +--- linux-3.4.orig/include/linux/rcutree.h ++++ linux-3.4/include/linux/rcutree.h @@ -57,7 +57,11 @@ static inline void exit_rcu(void) #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ @@ -123,7 +127,7 @@ index 6745846..800b840 100644 extern void synchronize_sched_expedited(void); extern void synchronize_rcu_expedited(void); -@@ -67,19 +71,29 @@ static inline void synchronize_rcu_bh_expedited(void) +@@ -85,19 +89,29 @@ static inline void synchronize_rcu_bh_ex } extern void rcu_barrier(void); @@ -155,10 +159,10 @@ index 6745846..800b840 100644 /* A context switch is a grace period for RCU-sched and RCU-bh. */ static inline int rcu_blocking_is_gp(void) { -diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c -index c5b98e5..24dcc71 100644 ---- a/kernel/rcupdate.c -+++ b/kernel/rcupdate.c +Index: linux-3.4/kernel/rcupdate.c +=================================================================== +--- linux-3.4.orig/kernel/rcupdate.c ++++ linux-3.4/kernel/rcupdate.c @@ -77,6 +77,7 @@ int debug_lockdep_rcu_enabled(void) } EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); @@ -167,7 +171,7 @@ index c5b98e5..24dcc71 100644 /** * rcu_read_lock_bh_held() - might we be in RCU-bh read-side critical section? * -@@ -96,6 +97,7 @@ int rcu_read_lock_bh_held(void) +@@ -103,6 +104,7 @@ int rcu_read_lock_bh_held(void) return in_softirq() || irqs_disabled(); } EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); @@ -175,11 +179,11 @@ index c5b98e5..24dcc71 100644 #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ -diff --git a/kernel/rcutree.c b/kernel/rcutree.c -index 8ef8675..3afb0fd 100644 ---- a/kernel/rcutree.c -+++ b/kernel/rcutree.c -@@ -170,6 +170,7 @@ void rcu_sched_qs(int cpu) +Index: linux-3.4/kernel/rcutree.c +=================================================================== +--- linux-3.4.orig/kernel/rcutree.c ++++ linux-3.4/kernel/rcutree.c +@@ -172,6 +172,7 @@ void rcu_sched_qs(int cpu) rdp->passed_quiesce = 1; } @@ -187,7 +191,7 @@ index 8ef8675..3afb0fd 100644 void rcu_bh_qs(int cpu) { struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu); -@@ -180,6 +181,7 @@ void rcu_bh_qs(int cpu) +@@ -182,6 +183,7 @@ void rcu_bh_qs(int cpu) trace_rcu_grace_period("rcu_bh", rdp->gpnum, "cpuqs"); rdp->passed_quiesce = 1; } @@ -195,7 +199,7 @@ index 8ef8675..3afb0fd 100644 /* * Note a context switch. This is a quiescent state for RCU-sched, -@@ -225,6 +227,7 @@ long rcu_batches_completed_sched(void) +@@ -228,6 +230,7 @@ long rcu_batches_completed_sched(void) } EXPORT_SYMBOL_GPL(rcu_batches_completed_sched); @@ -203,7 +207,7 @@ index 8ef8675..3afb0fd 100644 /* * Return the number of RCU BH batches processed thus far for debug & stats. */ -@@ -242,6 +245,7 @@ void rcu_bh_force_quiescent_state(void) +@@ -245,6 +248,7 @@ void rcu_bh_force_quiescent_state(void) force_quiescent_state(&rcu_bh_state, 0); } EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state); @@ -211,23 +215,23 @@ index 8ef8675..3afb0fd 100644 /* * Record the number of times rcutorture tests have been initiated and -@@ -1667,6 +1671,7 @@ void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) +@@ -1884,6 +1888,7 @@ void call_rcu_sched(struct rcu_head *hea } EXPORT_SYMBOL_GPL(call_rcu_sched); +#ifndef CONFIG_PREEMPT_RT_FULL /* - * Queue an RCU for invocation after a quicker grace period. + * Queue an RCU callback for invocation after a quicker grace period. */ -@@ -1675,6 +1680,7 @@ void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) - __call_rcu(head, func, &rcu_bh_state); +@@ -1892,6 +1897,7 @@ void call_rcu_bh(struct rcu_head *head, + __call_rcu(head, func, &rcu_bh_state, 0); } EXPORT_SYMBOL_GPL(call_rcu_bh); +#endif /** * synchronize_sched - wait until an rcu-sched grace period has elapsed. -@@ -1707,6 +1713,7 @@ void synchronize_sched(void) +@@ -1928,6 +1934,7 @@ void synchronize_sched(void) } EXPORT_SYMBOL_GPL(synchronize_sched); @@ -235,15 +239,15 @@ index 8ef8675..3afb0fd 100644 /** * synchronize_rcu_bh - wait until an rcu_bh grace period has elapsed. * -@@ -1723,6 +1730,7 @@ void synchronize_rcu_bh(void) +@@ -1948,6 +1955,7 @@ void synchronize_rcu_bh(void) wait_rcu_gp(call_rcu_bh); } EXPORT_SYMBOL_GPL(synchronize_rcu_bh); +#endif - /* - * Check to see if there is any immediate RCU-related work to be done -@@ -1877,6 +1885,7 @@ static void _rcu_barrier(struct rcu_state *rsp, + static atomic_t sync_sched_expedited_started = ATOMIC_INIT(0); + static atomic_t sync_sched_expedited_done = ATOMIC_INIT(0); +@@ -2223,6 +2231,7 @@ static void _rcu_barrier(struct rcu_stat mutex_unlock(&rcu_barrier_mutex); } @@ -251,7 +255,7 @@ index 8ef8675..3afb0fd 100644 /** * rcu_barrier_bh - Wait until all in-flight call_rcu_bh() callbacks complete. */ -@@ -1885,6 +1894,7 @@ void rcu_barrier_bh(void) +@@ -2231,6 +2240,7 @@ void rcu_barrier_bh(void) _rcu_barrier(&rcu_bh_state, call_rcu_bh); } EXPORT_SYMBOL_GPL(rcu_barrier_bh); @@ -259,6 +263,3 @@ index 8ef8675..3afb0fd 100644 /** * rcu_barrier_sched - Wait for in-flight call_rcu_sched() callbacks. --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0207-rcu-more-fallout.patch.patch b/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch similarity index 50% rename from debian/patches/features/all/rt/0207-rcu-more-fallout.patch.patch rename to debian/patches/features/all/rt/rcu-tiny-merge-bh.patch index 1884c7f8e..dda27f583 100644 --- a/debian/patches/features/all/rt/0207-rcu-more-fallout.patch.patch +++ b/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch @@ -1,18 +1,17 @@ -From a9654417fcb37bfadb38035c19cbb20f0e5b0c9c Mon Sep 17 00:00:00 2001 +Subject: rcu-more-fallout.patch From: Thomas Gleixner Date: Mon, 14 Nov 2011 10:57:54 +0100 -Subject: [PATCH 207/267] rcu-more-fallout.patch Signed-off-by: Thomas Gleixner --- kernel/rcutiny.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c -index 636af6d..6689097 100644 ---- a/kernel/rcutiny.c -+++ b/kernel/rcutiny.c -@@ -243,6 +243,7 @@ void call_rcu_sched(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) +Index: linux-3.4/kernel/rcutiny.c +=================================================================== +--- linux-3.4.orig/kernel/rcutiny.c ++++ linux-3.4/kernel/rcutiny.c +@@ -368,6 +368,7 @@ void call_rcu_sched(struct rcu_head *hea } EXPORT_SYMBOL_GPL(call_rcu_sched); @@ -20,11 +19,8 @@ index 636af6d..6689097 100644 /* * Post an RCU bottom-half callback to be invoked after any subsequent * quiescent state. -@@ -252,3 +253,4 @@ void call_rcu_bh(struct rcu_head *head, void (*func)(struct rcu_head *rcu)) +@@ -377,3 +378,4 @@ void call_rcu_bh(struct rcu_head *head, __call_rcu(head, func, &rcu_bh_ctrlblk); } EXPORT_SYMBOL_GPL(call_rcu_bh); +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0160-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch b/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch similarity index 72% rename from debian/patches/features/all/rt/0160-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch rename to debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch index c2f49f20d..b0686751e 100644 --- a/debian/patches/features/all/rt/0160-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch +++ b/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch @@ -1,8 +1,6 @@ -From 3ac376ea00518e9ef418830f784197c1daca8687 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Thu, 28 Jul 2011 11:16:00 +0800 -Subject: [PATCH 160/267] hotplug: Reread hotplug_pcp on pin_current_cpu() - retry +Subject: hotplug: Reread hotplug_pcp on pin_current_cpu() retry When retry happens, it's likely that the task has been migrated to another cpu (except unplug failed), but it still derefernces the @@ -19,11 +17,11 @@ Signed-off-by: Thomas Gleixner kernel/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/kernel/cpu.c b/kernel/cpu.c -index 171cb6c..80c72da 100644 ---- a/kernel/cpu.c -+++ b/kernel/cpu.c -@@ -76,9 +76,11 @@ static DEFINE_PER_CPU(struct hotplug_pcp, hotplug_pcp); +Index: linux-3.4/kernel/cpu.c +=================================================================== +--- linux-3.4.orig/kernel/cpu.c ++++ linux-3.4/kernel/cpu.c +@@ -76,9 +76,11 @@ static DEFINE_PER_CPU(struct hotplug_pcp */ void pin_current_cpu(void) { @@ -36,6 +34,3 @@ index 171cb6c..80c72da 100644 if (!hp->unplug || hp->refcount || preempt_count() > 1 || hp->unplug == current || (current->flags & PF_STOMPER)) { hp->refcount++; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0002-slab-lockdep-Annotate-all-slab-caches.patch b/debian/patches/features/all/rt/re-possible-slab-deadlock-while-doing-ifenslave-1.patch similarity index 82% rename from debian/patches/features/all/rt/0002-slab-lockdep-Annotate-all-slab-caches.patch rename to debian/patches/features/all/rt/re-possible-slab-deadlock-while-doing-ifenslave-1.patch index ba3929d8e..26d6e44c9 100644 --- a/debian/patches/features/all/rt/0002-slab-lockdep-Annotate-all-slab-caches.patch +++ b/debian/patches/features/all/rt/re-possible-slab-deadlock-while-doing-ifenslave-1.patch @@ -1,7 +1,6 @@ -From 788ce6c0f8d2db7e6e5bdf6568a80a52a016e000 Mon Sep 17 00:00:00 2001 +Subject: slab, lockdep: Annotate all slab caches From: Peter Zijlstra -Date: Mon, 28 Nov 2011 19:51:51 +0100 -Subject: [PATCH 002/267] slab, lockdep: Annotate all slab caches +Date: Mon Nov 28 19:51:51 CET 2011 Currently we only annotate the kmalloc caches, annotate all of them. @@ -18,12 +17,11 @@ Link: http://lkml.kernel.org/n/tip-10bey2cgpcvtbdkgigaoab8w@git.kernel.org --- mm/slab.c | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) - -diff --git a/mm/slab.c b/mm/slab.c -index 83311c9a..b76905e 100644 ---- a/mm/slab.c -+++ b/mm/slab.c -@@ -607,6 +607,12 @@ int slab_is_available(void) +Index: linux-3.4/mm/slab.c +=================================================================== +--- linux-3.4.orig/mm/slab.c ++++ linux-3.4/mm/slab.c +@@ -611,6 +611,12 @@ int slab_is_available(void) return g_cpucache_up >= EARLY; } @@ -36,7 +34,7 @@ index 83311c9a..b76905e 100644 #ifdef CONFIG_LOCKDEP /* -@@ -668,38 +674,41 @@ static void slab_set_debugobj_lock_classes(struct kmem_cache *cachep) +@@ -672,38 +678,41 @@ static void slab_set_debugobj_lock_class slab_set_debugobj_lock_classes_node(cachep, node); } @@ -92,7 +90,7 @@ index 83311c9a..b76905e 100644 { } -@@ -712,12 +721,6 @@ static void slab_set_debugobj_lock_classes(struct kmem_cache *cachep) +@@ -716,12 +725,6 @@ static void slab_set_debugobj_lock_class } #endif @@ -105,7 +103,7 @@ index 83311c9a..b76905e 100644 static DEFINE_PER_CPU(struct delayed_work, slab_reap_work); static inline struct array_cache *cpu_cache_get(struct kmem_cache *cachep) -@@ -1669,14 +1672,13 @@ void __init kmem_cache_init_late(void) +@@ -1685,14 +1688,13 @@ void __init kmem_cache_init_late(void) g_cpucache_up = LATE; @@ -123,7 +121,7 @@ index 83311c9a..b76905e 100644 mutex_unlock(&cache_chain_mutex); /* Done! */ -@@ -2479,6 +2481,8 @@ kmem_cache_create (const char *name, size_t size, size_t align, +@@ -2544,6 +2546,8 @@ kmem_cache_create (const char *name, siz slab_set_debugobj_lock_classes(cachep); } @@ -132,6 +130,3 @@ index 83311c9a..b76905e 100644 /* cache setup completed, link it into the list */ list_add(&cachep->next, &cache_chain); oops: --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0116-ARM-Initialize-ptl-lock-for-vector-page.patch b/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch similarity index 80% rename from debian/patches/features/all/rt/0116-ARM-Initialize-ptl-lock-for-vector-page.patch rename to debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch index 2d956a60a..a74d13f5a 100644 --- a/debian/patches/features/all/rt/0116-ARM-Initialize-ptl-lock-for-vector-page.patch +++ b/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch @@ -1,7 +1,6 @@ -From aef992f3068fa6705daaa030d035978ebd60978a Mon Sep 17 00:00:00 2001 +Subject: ARM: Initialize ptl->lock for vector page From: Frank Rowand Date: Sat, 1 Oct 2011 18:58:13 -0700 -Subject: [PATCH 116/267] ARM: Initialize ptl->lock for vector page Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if PREEMPT_RT_FULL=y because vectors_user_mapping() creates a @@ -34,11 +33,11 @@ Signed-off-by: Thomas Gleixner arch/arm/kernel/process.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c -index 54833ff..75227b3 100644 ---- a/arch/arm/kernel/process.c -+++ b/arch/arm/kernel/process.c -@@ -489,6 +489,31 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) +Index: linux-3.4/arch/arm/kernel/process.c +=================================================================== +--- linux-3.4.orig/arch/arm/kernel/process.c ++++ linux-3.4/arch/arm/kernel/process.c +@@ -526,6 +526,31 @@ unsigned long arch_randomize_brk(struct } #ifdef CONFIG_MMU @@ -69,7 +68,4 @@ index 54833ff..75227b3 100644 + /* * The vectors page is always readable from user space for the - * atomic helpers and the signal restart code. Let's declare a mapping --- -1.7.10 - + * atomic helpers and the signal restart code. Insert it into the diff --git a/debian/patches/features/all/rt/0122-relay-fix-timer-madness.patch b/debian/patches/features/all/rt/relay-fix-timer-madness.patch similarity index 71% rename from debian/patches/features/all/rt/0122-relay-fix-timer-madness.patch rename to debian/patches/features/all/rt/relay-fix-timer-madness.patch index 3dc7c5a77..bed2a5271 100644 --- a/debian/patches/features/all/rt/0122-relay-fix-timer-madness.patch +++ b/debian/patches/features/all/rt/relay-fix-timer-madness.patch @@ -1,7 +1,6 @@ -From 008dd51b17a4d0e538e3ae60cee743fec6900b14 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:07 -0500 -Subject: [PATCH 122/267] relay: fix timer madness +Subject: relay: fix timer madness remove timer calls (!!!) from deep within the tracing infrastructure. This was totally bogus code that can cause lockups and worse. Poll @@ -9,15 +8,16 @@ the buffer every 2 jiffies for now. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/relay.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) -diff --git a/kernel/relay.c b/kernel/relay.c -index b6f803a..eae992d 100644 ---- a/kernel/relay.c -+++ b/kernel/relay.c -@@ -340,6 +340,10 @@ static void wakeup_readers(unsigned long data) +Index: linux-3.4/kernel/relay.c +=================================================================== +--- linux-3.4.orig/kernel/relay.c ++++ linux-3.4/kernel/relay.c +@@ -340,6 +340,10 @@ static void wakeup_readers(unsigned long { struct rchan_buf *buf = (struct rchan_buf *)data; wake_up_interruptible(&buf->read_wait); @@ -28,7 +28,7 @@ index b6f803a..eae992d 100644 } /** -@@ -357,6 +361,7 @@ static void __relay_reset(struct rchan_buf *buf, unsigned int init) +@@ -357,6 +361,7 @@ static void __relay_reset(struct rchan_b init_waitqueue_head(&buf->read_wait); kref_init(&buf->kref); setup_timer(&buf->timer, wakeup_readers, (unsigned long)buf); @@ -36,7 +36,7 @@ index b6f803a..eae992d 100644 } else del_timer_sync(&buf->timer); -@@ -739,15 +744,6 @@ size_t relay_switch_subbuf(struct rchan_buf *buf, size_t length) +@@ -739,15 +744,6 @@ size_t relay_switch_subbuf(struct rchan_ else buf->early_bytes += buf->chan->subbuf_size - buf->padding[old_subbuf]; @@ -52,6 +52,3 @@ index b6f803a..eae992d 100644 } old = buf->data; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0086-core-Do-not-disable-interrupts-on-RT-in-res_counter..patch b/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch similarity index 86% rename from debian/patches/features/all/rt/0086-core-Do-not-disable-interrupts-on-RT-in-res_counter..patch rename to debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch index ee99f7ba9..f2a249d27 100644 --- a/debian/patches/features/all/rt/0086-core-Do-not-disable-interrupts-on-RT-in-res_counter..patch +++ b/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch @@ -1,8 +1,6 @@ -From fadf7cb3af643dd7aa4ad2322df4916621e09e03 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:33 -0500 -Subject: [PATCH 086/267] core: Do not disable interrupts on RT in - res_counter.c +Subject: core: Do not disable interrupts on RT in res_counter.c Frederic Weisbecker reported this warning: @@ -43,15 +41,16 @@ So replace it with _nort(). This code needs a second look. Reported-by: Frederic Weisbecker Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/res_counter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/kernel/res_counter.c b/kernel/res_counter.c -index 34683ef..21e9ec4 100644 ---- a/kernel/res_counter.c -+++ b/kernel/res_counter.c -@@ -43,7 +43,7 @@ int res_counter_charge(struct res_counter *counter, unsigned long val, +Index: linux-3.4/kernel/res_counter.c +=================================================================== +--- linux-3.4.orig/kernel/res_counter.c ++++ linux-3.4/kernel/res_counter.c +@@ -43,7 +43,7 @@ int res_counter_charge(struct res_counte struct res_counter *c, *u; *limit_fail_at = NULL; @@ -69,7 +68,7 @@ index 34683ef..21e9ec4 100644 return ret; } -@@ -79,13 +79,13 @@ void res_counter_uncharge(struct res_counter *counter, unsigned long val) +@@ -104,13 +104,13 @@ void res_counter_uncharge(struct res_cou unsigned long flags; struct res_counter *c; @@ -85,6 +84,3 @@ index 34683ef..21e9ec4 100644 } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/revert-workqueue-skip-nr_running-sanity-check-in-wor.patch b/debian/patches/features/all/rt/revert-workqueue-skip-nr_running-sanity-check-in-wor.patch new file mode 100644 index 000000000..8dec2548c --- /dev/null +++ b/debian/patches/features/all/rt/revert-workqueue-skip-nr_running-sanity-check-in-wor.patch @@ -0,0 +1,35 @@ +From: Ben Hutchings +Date: Thu, 31 May 2012 02:58:44 +0100 +Subject: [PATCH] Revert "workqueue: skip nr_running sanity check in + worker_enter_idle() if trustee is active" + +This reverts commit 5d79c6f64a904afc92a329f80abe693e3ae105fe. +It conflicts with, and appears to be unnecessary for, the PREEMPT_RT +series. +--- + kernel/workqueue.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/kernel/workqueue.c b/kernel/workqueue.c +index 7947e16..bb425b1 100644 +--- a/kernel/workqueue.c ++++ b/kernel/workqueue.c +@@ -1215,13 +1215,8 @@ static void worker_enter_idle(struct worker *worker) + } else + wake_up_all(&gcwq->trustee_wait); + +- /* +- * Sanity check nr_running. Because trustee releases gcwq->lock +- * between setting %WORKER_ROGUE and zapping nr_running, the +- * warning may trigger spuriously. Check iff trustee is idle. +- */ +- WARN_ON_ONCE(gcwq->trustee_state == TRUSTEE_DONE && +- gcwq->nr_workers == gcwq->nr_idle && ++ /* sanity check nr_running */ ++ WARN_ON_ONCE(gcwq->nr_workers == gcwq->nr_idle && + atomic_read(get_gcwq_nr_running(gcwq->cpu))); + } + +-- +1.7.10 + diff --git a/debian/patches/features/all/rt/0255-futex-rt-Fix-possible-lockup-when-taking-pi_lock-in-.patch b/debian/patches/features/all/rt/rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch similarity index 74% rename from debian/patches/features/all/rt/0255-futex-rt-Fix-possible-lockup-when-taking-pi_lock-in-.patch rename to debian/patches/features/all/rt/rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch index 888d10667..fbb854b89 100644 --- a/debian/patches/features/all/rt/0255-futex-rt-Fix-possible-lockup-when-taking-pi_lock-in-.patch +++ b/debian/patches/features/all/rt/rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch @@ -1,8 +1,6 @@ -From f59381eae9ea03fc0021f571ebaec6c6a8f8c38c Mon Sep 17 00:00:00 2001 +Subject: futex/rt: Fix possible lockup when taking pi_lock in proxy handler From: Steven Rostedt -Date: Thu, 1 Mar 2012 13:55:29 -0500 -Subject: [PATCH 255/267] futex/rt: Fix possible lockup when taking pi_lock in - proxy handler +Date: Thu, 01 Mar 2012 13:55:29 -0500 When taking the pi_lock, we must disable interrupts because the pi_lock can also be taken in an interrupt handler. @@ -21,11 +19,11 @@ Signed-off-by: Thomas Gleixner kernel/rtmutex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index 9850dc0..b525158 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c -@@ -1373,14 +1373,14 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock, +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c +@@ -1365,14 +1365,14 @@ int rt_mutex_start_proxy_lock(struct rt_ * PI_REQUEUE_INPROGRESS, so that if the task is waking up * it will know that we are in the process of requeuing it. */ @@ -43,6 +41,3 @@ index 9850dc0..b525158 100644 #endif ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0258-lglock-rt-Use-non-rt-for_each_cpu-in-rt-code.patch b/debian/patches/features/all/rt/rfc-lglock-rt-use-non-rt-for_each_cpu-in-rt-code.patch similarity index 91% rename from debian/patches/features/all/rt/0258-lglock-rt-Use-non-rt-for_each_cpu-in-rt-code.patch rename to debian/patches/features/all/rt/rfc-lglock-rt-use-non-rt-for_each_cpu-in-rt-code.patch index 804ca667e..eb19630e7 100644 --- a/debian/patches/features/all/rt/0258-lglock-rt-Use-non-rt-for_each_cpu-in-rt-code.patch +++ b/debian/patches/features/all/rt/rfc-lglock-rt-use-non-rt-for_each_cpu-in-rt-code.patch @@ -1,7 +1,6 @@ -From 4ae26b38227b37f961750c930447068b0b1d2c37 Mon Sep 17 00:00:00 2001 +Subject: lglock/rt: Use non-rt for_each_cpu() in -rt code From: Steven Rostedt -Date: Thu, 1 Mar 2012 13:55:30 -0500 -Subject: [PATCH 258/267] lglock/rt: Use non-rt for_each_cpu() in -rt code +Date: Thu, 01 Mar 2012 13:55:30 -0500 Currently the RT version of the lglocks() does a for_each_online_cpu() in the name##_global_lock_online() functions. Non-rt uses its own @@ -34,10 +33,10 @@ Signed-off-by: Thomas Gleixner include/linux/lglock.h | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) -diff --git a/include/linux/lglock.h b/include/linux/lglock.h -index 52b289f..cdfcef3 100644 ---- a/include/linux/lglock.h -+++ b/include/linux/lglock.h +Index: linux-3.4/include/linux/lglock.h +=================================================================== +--- linux-3.4.orig/include/linux/lglock.h ++++ linux-3.4/include/linux/lglock.h @@ -203,9 +203,31 @@ #else /* !PREEMPT_RT_FULL */ #define DEFINE_LGLOCK(name) \ @@ -107,6 +106,3 @@ index 52b289f..cdfcef3 100644 } \ EXPORT_SYMBOL(name##_global_unlock_online); \ \ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0131-printk-Don-t-call-printk_tick-in-printk_needs_cpu-on.patch b/debian/patches/features/all/rt/rfc-printk-don-27t-call-printk_tick-in-printk_needs_cpu.patch similarity index 82% rename from debian/patches/features/all/rt/0131-printk-Don-t-call-printk_tick-in-printk_needs_cpu-on.patch rename to debian/patches/features/all/rt/rfc-printk-don-27t-call-printk_tick-in-printk_needs_cpu.patch index 45a17b2fa..c3efd9ac4 100644 --- a/debian/patches/features/all/rt/0131-printk-Don-t-call-printk_tick-in-printk_needs_cpu-on.patch +++ b/debian/patches/features/all/rt/rfc-printk-don-27t-call-printk_tick-in-printk_needs_cpu.patch @@ -1,8 +1,6 @@ -From 1bfdc4700bc80161dfc1a6231316796362e0ff3c Mon Sep 17 00:00:00 2001 +Subject: printk: Don't call printk_tick in printk_needs_cpu() on RT From: Yong Zhang Date: Sun, 16 Oct 2011 18:56:45 +0800 -Subject: [PATCH 131/267] printk: Don't call printk_tick in printk_needs_cpu() - on RT printk_tick() can't be called in atomic context when RT is enabled, otherwise below warning will show: @@ -32,11 +30,11 @@ Signed-off-by: Thomas Gleixner kernel/printk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/kernel/printk.c b/kernel/printk.c -index 1f06626..2b95bc0 100644 ---- a/kernel/printk.c -+++ b/kernel/printk.c -@@ -1274,8 +1274,8 @@ void printk_tick(void) +Index: linux-3.4/kernel/printk.c +=================================================================== +--- linux-3.4.orig/kernel/printk.c ++++ linux-3.4/kernel/printk.c +@@ -1298,8 +1298,8 @@ void printk_tick(void) int printk_needs_cpu(int cpu) { @@ -47,6 +45,3 @@ index 1f06626..2b95bc0 100644 return __this_cpu_read(printk_pending); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0256-ring-buffer-rt-Check-for-irqs-disabled-before-grabbi.patch b/debian/patches/features/all/rt/rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch similarity index 65% rename from debian/patches/features/all/rt/0256-ring-buffer-rt-Check-for-irqs-disabled-before-grabbi.patch rename to debian/patches/features/all/rt/rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch index 1e0bb1299..c621057b0 100644 --- a/debian/patches/features/all/rt/0256-ring-buffer-rt-Check-for-irqs-disabled-before-grabbi.patch +++ b/debian/patches/features/all/rt/rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch @@ -1,8 +1,6 @@ -From 3a841b921ab0fba99f19c80899ddd30ca3e4c698 Mon Sep 17 00:00:00 2001 +Subject: ring-buffer/rt: Check for irqs disabled before grabbing reader lock From: Steven Rostedt -Date: Thu, 1 Mar 2012 13:55:32 -0500 -Subject: [PATCH 256/267] ring-buffer/rt: Check for irqs disabled before - grabbing reader lock +Date: Thu, 01 Mar 2012 13:55:32 -0500 In RT the reader lock is a mutex and we can not grab it when preemption is disabled. The in_atomic() check that is there does not check if irqs are @@ -20,11 +18,11 @@ Signed-off-by: Thomas Gleixner kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c -index 354017f..c060f04 100644 ---- a/kernel/trace/ring_buffer.c -+++ b/kernel/trace/ring_buffer.c -@@ -1054,7 +1054,7 @@ static inline int ok_to_lock(void) +Index: linux-3.4/kernel/trace/ring_buffer.c +=================================================================== +--- linux-3.4.orig/kernel/trace/ring_buffer.c ++++ linux-3.4/kernel/trace/ring_buffer.c +@@ -1022,7 +1022,7 @@ static inline int ok_to_lock(void) if (in_nmi()) return 0; #ifdef CONFIG_PREEMPT_RT_FULL @@ -33,6 +31,3 @@ index 354017f..c060f04 100644 return 0; #endif return 1; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0257-sched-rt-Fix-wait_task_interactive-to-test-rt_spin_l.patch b/debian/patches/features/all/rt/rfc-sched-rt-fix-wait_task_interactive-to-test-rt_spin_lock-state.patch similarity index 72% rename from debian/patches/features/all/rt/0257-sched-rt-Fix-wait_task_interactive-to-test-rt_spin_l.patch rename to debian/patches/features/all/rt/rfc-sched-rt-fix-wait_task_interactive-to-test-rt_spin_lock-state.patch index b20ac35cf..51a5b3d16 100644 --- a/debian/patches/features/all/rt/0257-sched-rt-Fix-wait_task_interactive-to-test-rt_spin_l.patch +++ b/debian/patches/features/all/rt/rfc-sched-rt-fix-wait_task_interactive-to-test-rt_spin_lock-state.patch @@ -1,8 +1,6 @@ -From 15c45a54d63ba235de26bae3edc875bbe462b6fd Mon Sep 17 00:00:00 2001 +Subject: sched/rt: Fix wait_task_interactive() to test rt_spin_lock state From: Steven Rostedt -Date: Thu, 1 Mar 2012 13:55:33 -0500 -Subject: [PATCH 257/267] sched/rt: Fix wait_task_interactive() to test - rt_spin_lock state +Date: Thu, 01 Mar 2012 13:55:33 -0500 The wait_task_interactive() will have a task sleep waiting for another task to have a certain state. But it ignores the rt_spin_locks state @@ -21,14 +19,14 @@ Cc: stable-rt@vger.kernel.org Link: http://lkml.kernel.org/r/20120301190345.979435764@goodmis.org Signed-off-by: Thomas Gleixner --- - kernel/sched.c | 6 ++++-- + kernel/sched/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index 81b340d..1cc706d 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -2450,7 +2450,8 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1174,7 +1174,8 @@ unsigned long wait_task_inactive(struct * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -38,7 +36,7 @@ index 81b340d..1cc706d 100644 return 0; cpu_relax(); } -@@ -2465,7 +2466,8 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state) +@@ -1189,7 +1190,8 @@ unsigned long wait_task_inactive(struct running = task_running(rq, p); on_rq = p->on_rq; ncsw = 0; @@ -48,6 +46,3 @@ index 81b340d..1cc706d 100644 ncsw = p->nvcsw | LONG_MIN; /* sets MSB */ task_rq_unlock(rq, p, &flags); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0254-timer-Fix-hotplug-for-rt.patch b/debian/patches/features/all/rt/rfc-timer-fix-hotplug-for-rt.patch similarity index 80% rename from debian/patches/features/all/rt/0254-timer-Fix-hotplug-for-rt.patch rename to debian/patches/features/all/rt/rfc-timer-fix-hotplug-for-rt.patch index face9847d..e77d96260 100644 --- a/debian/patches/features/all/rt/0254-timer-Fix-hotplug-for-rt.patch +++ b/debian/patches/features/all/rt/rfc-timer-fix-hotplug-for-rt.patch @@ -1,7 +1,6 @@ -From 2ae873bfcfbc86cb8b793586df8da0cd1cdd1a35 Mon Sep 17 00:00:00 2001 +Subject: timer: Fix hotplug for -rt From: Steven Rostedt -Date: Thu, 1 Mar 2012 13:55:28 -0500 -Subject: [PATCH 254/267] timer: Fix hotplug for -rt +Date: Thu, 01 Mar 2012 13:55:28 -0500 Revert the RT patch: Author: Ingo Molnar @@ -29,11 +28,11 @@ Signed-off-by: Thomas Gleixner kernel/timer.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index a791a43..c8c88d1 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1743,21 +1743,17 @@ static void __cpuinit migrate_timers(int cpu) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1793,21 +1793,17 @@ static void __cpuinit migrate_timers(int { struct tvec_base *old_base; struct tvec_base *new_base; @@ -58,7 +57,7 @@ index a791a43..c8c88d1 100644 BUG_ON(old_base->running_timer); -@@ -1771,10 +1767,8 @@ static void __cpuinit migrate_timers(int cpu) +@@ -1821,10 +1817,8 @@ static void __cpuinit migrate_timers(int } spin_unlock(&old_base->lock); @@ -71,6 +70,3 @@ index a791a43..c8c88d1 100644 } #endif /* CONFIG_HOTPLUG_CPU */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0200-rt-Add-the-preempt-rt-lock-replacement-APIs.patch b/debian/patches/features/all/rt/rt-add-rt-locks.patch similarity index 88% rename from debian/patches/features/all/rt/0200-rt-Add-the-preempt-rt-lock-replacement-APIs.patch rename to debian/patches/features/all/rt/rt-add-rt-locks.patch index 342d9650e..db1a4ec1b 100644 --- a/debian/patches/features/all/rt/0200-rt-Add-the-preempt-rt-lock-replacement-APIs.patch +++ b/debian/patches/features/all/rt/rt-add-rt-locks.patch @@ -1,31 +1,27 @@ -From caca4d3e5e340a8dc341f6bc64d3f5dfc829dc46 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 26 Jul 2009 19:39:56 +0200 -Subject: [PATCH 200/267] rt: Add the preempt-rt lock replacement APIs +Subject: rt: Add the preempt-rt lock replacement APIs Map spinlocks, rwlocks, rw_semaphores and semaphores to the rt_mutex based locking functions for preempt-rt. Signed-off-by: Thomas Gleixner ---- - include/linux/rwlock_rt.h | 123 +++++++++++ - include/linux/spinlock.h | 12 +- - include/linux/spinlock_api_smp.h | 4 +- - include/linux/spinlock_rt.h | 156 ++++++++++++++ - kernel/Makefile | 9 +- - kernel/rt.c | 442 ++++++++++++++++++++++++++++++++++++++ - kernel/spinlock.c | 7 + - lib/spinlock_debug.c | 5 + - 8 files changed, 754 insertions(+), 4 deletions(-) - create mode 100644 include/linux/rwlock_rt.h - create mode 100644 include/linux/spinlock_rt.h - create mode 100644 kernel/rt.c -diff --git a/include/linux/rwlock_rt.h b/include/linux/rwlock_rt.h -new file mode 100644 -index 0000000..853ee36 +--- + include/linux/rwlock_rt.h | 123 ++++++++++ + include/linux/spinlock.h | 12 - + include/linux/spinlock_api_smp.h | 4 + include/linux/spinlock_rt.h | 156 +++++++++++++ + kernel/Makefile | 9 + kernel/rt.c | 442 +++++++++++++++++++++++++++++++++++++++ + kernel/spinlock.c | 7 + lib/spinlock_debug.c | 5 + 8 files changed, 754 insertions(+), 4 deletions(-) + +Index: linux-3.4/include/linux/rwlock_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/rwlock_rt.h ++++ linux-3.4/include/linux/rwlock_rt.h @@ -0,0 +1,123 @@ +#ifndef __LINUX_RWLOCK_RT_H +#define __LINUX_RWLOCK_RT_H @@ -150,11 +146,11 @@ index 0000000..853ee36 + } while (0) + +#endif -diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h -index 7df6c17..5fe7e40 100644 ---- a/include/linux/spinlock.h -+++ b/include/linux/spinlock.h -@@ -254,7 +254,11 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) +Index: linux-3.4/include/linux/spinlock.h +=================================================================== +--- linux-3.4.orig/include/linux/spinlock.h ++++ linux-3.4/include/linux/spinlock.h +@@ -254,7 +254,11 @@ static inline void do_raw_spin_unlock(ra #define raw_spin_can_lock(lock) (!raw_spin_is_locked(lock)) /* Include rwlock functions */ @@ -167,7 +163,7 @@ index 7df6c17..5fe7e40 100644 /* * Pull the _spin_*()/_read_*()/_write_*() functions/declarations: -@@ -265,6 +269,10 @@ static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) +@@ -265,6 +269,10 @@ static inline void do_raw_spin_unlock(ra # include #endif @@ -178,18 +174,18 @@ index 7df6c17..5fe7e40 100644 /* * Map the spin_lock functions to the raw variants for PREEMPT_RT=n */ -@@ -397,4 +405,6 @@ extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); +@@ -394,4 +402,6 @@ extern int _atomic_dec_and_lock(atomic_t #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 e253ccd..2a5ba05 100644 ---- a/include/linux/spinlock_api_smp.h -+++ b/include/linux/spinlock_api_smp.h -@@ -191,6 +191,8 @@ static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock) +Index: linux-3.4/include/linux/spinlock_api_smp.h +=================================================================== +--- linux-3.4.orig/include/linux/spinlock_api_smp.h ++++ linux-3.4/include/linux/spinlock_api_smp.h +@@ -191,6 +191,8 @@ static inline int __raw_spin_trylock_bh( return 0; } @@ -199,11 +195,10 @@ index e253ccd..2a5ba05 100644 +#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 0000000..205ca95 +Index: linux-3.4/include/linux/spinlock_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/spinlock_rt.h ++++ linux-3.4/include/linux/spinlock_rt.h @@ -0,0 +1,156 @@ +#ifndef __LINUX_SPINLOCK_RT_H +#define __LINUX_SPINLOCK_RT_H @@ -361,11 +356,11 @@ index 0000000..205ca95 + atomic_dec_and_spin_lock(atomic, lock) + +#endif -diff --git a/kernel/Makefile b/kernel/Makefile -index e898c5b..c961d3a 100644 ---- a/kernel/Makefile -+++ b/kernel/Makefile -@@ -7,8 +7,8 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ +Index: linux-3.4/kernel/Makefile +=================================================================== +--- linux-3.4.orig/kernel/Makefile ++++ linux-3.4/kernel/Makefile +@@ -7,8 +7,8 @@ obj-y = fork.o exec_domain.o panic.o sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \ signal.o sys.o kmod.o workqueue.o pid.o \ rcupdate.o extable.o params.o posix-timers.o \ @@ -373,11 +368,11 @@ index e898c5b..c961d3a 100644 - hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ + kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o \ + hrtimer.o nsproxy.o srcu.o semaphore.o \ - notifier.o ksysfs.o sched_clock.o cred.o \ - async.o range.o - obj-y += groups.o -@@ -29,7 +29,11 @@ obj-$(CONFIG_PROFILING) += profile.o - obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o + notifier.o ksysfs.o cred.o \ + async.o range.o groups.o + +@@ -29,7 +29,11 @@ obj-$(CONFIG_FREEZER) += freezer.o + obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += time/ +ifneq ($(CONFIG_PREEMPT_RT_FULL),y) @@ -396,11 +391,10 @@ index e898c5b..c961d3a 100644 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_SMP) += smp.o ifneq ($(CONFIG_SMP),y) -diff --git a/kernel/rt.c b/kernel/rt.c -new file mode 100644 -index 0000000..092d6b3 +Index: linux-3.4/kernel/rt.c +=================================================================== --- /dev/null -+++ b/kernel/rt.c ++++ linux-3.4/kernel/rt.c @@ -0,0 +1,442 @@ +/* + * kernel/rt.c @@ -844,11 +838,11 @@ index 0000000..092d6b3 + return 1; +} +EXPORT_SYMBOL(atomic_dec_and_mutex_lock); -diff --git a/kernel/spinlock.c b/kernel/spinlock.c -index 84c7d96..47fd3cf 100644 ---- a/kernel/spinlock.c -+++ b/kernel/spinlock.c -@@ -110,8 +110,11 @@ void __lockfunc __raw_##op##_lock_bh(locktype##_t *lock) \ +Index: linux-3.4/kernel/spinlock.c +=================================================================== +--- linux-3.4.orig/kernel/spinlock.c ++++ linux-3.4/kernel/spinlock.c +@@ -110,8 +110,11 @@ void __lockfunc __raw_##op##_lock_bh(loc * __[spin|read|write]_lock_bh() */ BUILD_LOCK_OPS(spin, raw_spinlock); @@ -860,7 +854,7 @@ index 84c7d96..47fd3cf 100644 #endif -@@ -195,6 +198,8 @@ void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock) +@@ -195,6 +198,8 @@ void __lockfunc _raw_spin_unlock_bh(raw_ EXPORT_SYMBOL(_raw_spin_unlock_bh); #endif @@ -869,7 +863,7 @@ index 84c7d96..47fd3cf 100644 #ifndef CONFIG_INLINE_READ_TRYLOCK int __lockfunc _raw_read_trylock(rwlock_t *lock) { -@@ -339,6 +344,8 @@ void __lockfunc _raw_write_unlock_bh(rwlock_t *lock) +@@ -339,6 +344,8 @@ void __lockfunc _raw_write_unlock_bh(rwl EXPORT_SYMBOL(_raw_write_unlock_bh); #endif @@ -878,11 +872,11 @@ index 84c7d96..47fd3cf 100644 #ifdef CONFIG_DEBUG_LOCK_ALLOC void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) -diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c -index 5f3eacd..f824704 100644 ---- a/lib/spinlock_debug.c -+++ b/lib/spinlock_debug.c -@@ -31,6 +31,7 @@ void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, +Index: linux-3.4/lib/spinlock_debug.c +=================================================================== +--- linux-3.4.orig/lib/spinlock_debug.c ++++ linux-3.4/lib/spinlock_debug.c +@@ -31,6 +31,7 @@ void __raw_spin_lock_init(raw_spinlock_t EXPORT_SYMBOL(__raw_spin_lock_init); @@ -890,7 +884,7 @@ index 5f3eacd..f824704 100644 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 char *name, +@@ -48,6 +49,7 @@ void __rwlock_init(rwlock_t *lock, const } EXPORT_SYMBOL(__rwlock_init); @@ -898,7 +892,7 @@ index 5f3eacd..f824704 100644 static void spin_dump(raw_spinlock_t *lock, const char *msg) { -@@ -155,6 +157,7 @@ void do_raw_spin_unlock(raw_spinlock_t *lock) +@@ -155,6 +157,7 @@ void do_raw_spin_unlock(raw_spinlock_t * arch_spin_unlock(&lock->raw_lock); } @@ -912,6 +906,3 @@ index 5f3eacd..f824704 100644 } + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0197-rt-add-rt-spinlocks.patch.patch b/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch similarity index 77% rename from debian/patches/features/all/rt/0197-rt-add-rt-spinlocks.patch.patch rename to debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch index 5c0f4be96..b15a24440 100644 --- a/debian/patches/features/all/rt/0197-rt-add-rt-spinlocks.patch.patch +++ b/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch @@ -1,22 +1,18 @@ -From 553d24b2d8ed1a9be9bbccac50af86e71f700d21 Mon Sep 17 00:00:00 2001 +Subject: rt-add-rt-spinlocks.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:43:35 +0200 -Subject: [PATCH 197/267] rt-add-rt-spinlocks.patch Signed-off-by: Thomas Gleixner --- include/linux/rwlock_types_rt.h | 33 +++++++++++++++++++++++++ - include/linux/spinlock_types.h | 11 ++++++--- - include/linux/spinlock_types_rt.h | 49 +++++++++++++++++++++++++++++++++++++ + include/linux/spinlock_types.h | 11 ++++++-- + include/linux/spinlock_types_rt.h | 49 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 3 deletions(-) - create mode 100644 include/linux/rwlock_types_rt.h - create mode 100644 include/linux/spinlock_types_rt.h -diff --git a/include/linux/rwlock_types_rt.h b/include/linux/rwlock_types_rt.h -new file mode 100644 -index 0000000..b138321 +Index: linux-3.4/include/linux/rwlock_types_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/rwlock_types_rt.h ++++ linux-3.4/include/linux/rwlock_types_rt.h @@ -0,0 +1,33 @@ +#ifndef __LINUX_RWLOCK_TYPES_RT_H +#define __LINUX_RWLOCK_TYPES_RT_H @@ -51,10 +47,10 @@ index 0000000..b138321 + rwlock_t name __cacheline_aligned_in_smp = __RW_LOCK_UNLOCKED(name) + +#endif -diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h -index 5c8664d..10bac71 100644 ---- a/include/linux/spinlock_types.h -+++ b/include/linux/spinlock_types.h +Index: linux-3.4/include/linux/spinlock_types.h +=================================================================== +--- linux-3.4.orig/include/linux/spinlock_types.h ++++ linux-3.4/include/linux/spinlock_types.h @@ -11,8 +11,13 @@ #include @@ -72,11 +68,10 @@ index 5c8664d..10bac71 100644 +#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 0000000..1fe8fc0 +Index: linux-3.4/include/linux/spinlock_types_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/spinlock_types_rt.h ++++ linux-3.4/include/linux/spinlock_types_rt.h @@ -0,0 +1,49 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RT_H +#define __LINUX_SPINLOCK_TYPES_RT_H @@ -127,6 +122,3 @@ index 0000000..1fe8fc0 + spinlock_t name __cacheline_aligned_in_smp = __SPIN_LOCK_UNLOCKED(name) + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0198-rt-add-rt-to-mutex-headers.patch.patch b/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch similarity index 87% rename from debian/patches/features/all/rt/0198-rt-add-rt-to-mutex-headers.patch.patch rename to debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch index 1ac100681..cb0f6b822 100644 --- a/debian/patches/features/all/rt/0198-rt-add-rt-to-mutex-headers.patch.patch +++ b/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch @@ -1,19 +1,17 @@ -From 9d9363b19e5c6bfac8e6cbe4c4a91098820086c4 Mon Sep 17 00:00:00 2001 +Subject: rt-add-rt-to-mutex-headers.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:56:22 +0200 -Subject: [PATCH 198/267] rt-add-rt-to-mutex-headers.patch Signed-off-by: Thomas Gleixner --- - include/linux/mutex.h | 21 ++++++++---- - include/linux/mutex_rt.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++ + include/linux/mutex.h | 21 +++++++---- + include/linux/mutex_rt.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 7 deletions(-) - create mode 100644 include/linux/mutex_rt.h -diff --git a/include/linux/mutex.h b/include/linux/mutex.h -index 9121595..bdf1da2 100644 ---- a/include/linux/mutex.h -+++ b/include/linux/mutex.h +Index: linux-3.4/include/linux/mutex.h +=================================================================== +--- linux-3.4.orig/include/linux/mutex.h ++++ linux-3.4/include/linux/mutex.h @@ -17,6 +17,17 @@ #include @@ -46,7 +44,7 @@ index 9121595..bdf1da2 100644 #define __MUTEX_INITIALIZER(lockname) \ { .count = ATOMIC_INIT(1) \ , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ -@@ -167,6 +171,9 @@ extern int __must_check mutex_lock_killable(struct mutex *lock); +@@ -167,6 +171,9 @@ extern int __must_check mutex_lock_killa */ extern int mutex_trylock(struct mutex *lock); extern void mutex_unlock(struct mutex *lock); @@ -56,11 +54,10 @@ index 9121595..bdf1da2 100644 extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX -diff --git a/include/linux/mutex_rt.h b/include/linux/mutex_rt.h -new file mode 100644 -index 0000000..c38a44b +Index: linux-3.4/include/linux/mutex_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/mutex_rt.h ++++ linux-3.4/include/linux/mutex_rt.h @@ -0,0 +1,84 @@ +#ifndef __LINUX_MUTEX_RT_H +#define __LINUX_MUTEX_RT_H @@ -146,6 +143,3 @@ index 0000000..c38a44b +} while (0) + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0261-rt-Introduce-cpu_chill.patch b/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch similarity index 62% rename from debian/patches/features/all/rt/0261-rt-Introduce-cpu_chill.patch rename to debian/patches/features/all/rt/rt-introduce-cpu-chill.patch index 4f0223e0a..8f7ffe5fe 100644 --- a/debian/patches/features/all/rt/0261-rt-Introduce-cpu_chill.patch +++ b/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch @@ -1,7 +1,6 @@ -From 939a22067d292bb22eb0d6c7e8427d626fb297ea Mon Sep 17 00:00:00 2001 +Subject: rt: Introduce cpu_chill() From: Thomas Gleixner -Date: Wed, 7 Mar 2012 20:51:03 +0100 -Subject: [PATCH 261/267] rt: Introduce cpu_chill() +Date: Wed, 07 Mar 2012 20:51:03 +0100 Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() @@ -14,11 +13,11 @@ Cc: stable-rt@vger.kernel.org include/linux/delay.h | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/include/linux/delay.h b/include/linux/delay.h -index a6ecb34..e23a7c0 100644 ---- a/include/linux/delay.h -+++ b/include/linux/delay.h -@@ -52,4 +52,10 @@ static inline void ssleep(unsigned int seconds) +Index: linux-3.4/include/linux/delay.h +=================================================================== +--- linux-3.4.orig/include/linux/delay.h ++++ linux-3.4/include/linux/delay.h +@@ -52,4 +52,10 @@ static inline void ssleep(unsigned int s msleep(seconds * 1000); } @@ -29,6 +28,3 @@ index a6ecb34..e23a7c0 100644 +#endif + #endif /* defined(_LINUX_DELAY_H) */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0104-rt-local-irq-lock.patch.patch b/debian/patches/features/all/rt/rt-local-irq-lock.patch similarity index 94% rename from debian/patches/features/all/rt/0104-rt-local-irq-lock.patch.patch rename to debian/patches/features/all/rt/rt-local-irq-lock.patch index c711fcaa5..d05af60c2 100644 --- a/debian/patches/features/all/rt/0104-rt-local-irq-lock.patch.patch +++ b/debian/patches/features/all/rt/rt-local-irq-lock.patch @@ -1,19 +1,16 @@ -From d4347dd3d5bbee7c4098ae3eddf2c166dff769f4 Mon Sep 17 00:00:00 2001 +Subject: rt-local-irq-lock.patch From: Thomas Gleixner Date: Mon, 20 Jun 2011 09:03:47 +0200 -Subject: [PATCH 104/267] rt-local-irq-lock.patch Signed-off-by: Thomas Gleixner --- - include/linux/locallock.h | 230 +++++++++++++++++++++++++++++++++++++++++++++ + include/linux/locallock.h | 230 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 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 0000000..8fbc393 +Index: linux-3.4/include/linux/locallock.h +=================================================================== --- /dev/null -+++ b/include/linux/locallock.h ++++ linux-3.4/include/linux/locallock.h @@ -0,0 +1,230 @@ +#ifndef _LINUX_LOCALLOCK_H +#define _LINUX_LOCALLOCK_H @@ -245,6 +242,3 @@ index 0000000..8fbc393 +#endif + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0194-rt-mutex-add-sleeping-spinlocks-support.patch.patch b/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch similarity index 87% rename from debian/patches/features/all/rt/0194-rt-mutex-add-sleeping-spinlocks-support.patch.patch rename to debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch index 3ada99886..729a51ad5 100644 --- a/debian/patches/features/all/rt/0194-rt-mutex-add-sleeping-spinlocks-support.patch.patch +++ b/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch @@ -1,20 +1,19 @@ -From 2b86a7f0c11f3f308ab29cce9ac43397cc243f50 Mon Sep 17 00:00:00 2001 +Subject: rt-mutex-add-sleeping-spinlocks-support.patch From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:21:25 +0200 -Subject: [PATCH 194/267] rt-mutex-add-sleeping-spinlocks-support.patch Signed-off-by: Thomas Gleixner --- - include/linux/rtmutex.h | 35 ++++- - kernel/futex.c | 3 +- - kernel/rtmutex.c | 382 ++++++++++++++++++++++++++++++++++++++++++++--- - kernel/rtmutex_common.h | 9 ++ - 4 files changed, 403 insertions(+), 26 deletions(-) + include/linux/rtmutex.h | 35 +++- + kernel/futex.c | 3 + kernel/rtmutex.c | 384 +++++++++++++++++++++++++++++++++++++++++++++--- + kernel/rtmutex_common.h | 9 + + 4 files changed, 404 insertions(+), 27 deletions(-) -diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h -index 3561eb2..928d93e 100644 ---- a/include/linux/rtmutex.h -+++ b/include/linux/rtmutex.h +Index: linux-3.4/include/linux/rtmutex.h +=================================================================== +--- linux-3.4.orig/include/linux/rtmutex.h ++++ linux-3.4/include/linux/rtmutex.h @@ -29,9 +29,10 @@ struct rt_mutex { raw_spinlock_t wait_lock; struct plist_head wait_list; @@ -73,11 +72,11 @@ index 3561eb2..928d93e 100644 #define DEFINE_RT_MUTEX(mutexname) \ struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) -diff --git a/kernel/futex.c b/kernel/futex.c -index 840fcea..2771a63 100644 ---- a/kernel/futex.c -+++ b/kernel/futex.c -@@ -2299,8 +2299,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, +Index: linux-3.4/kernel/futex.c +=================================================================== +--- linux-3.4.orig/kernel/futex.c ++++ linux-3.4/kernel/futex.c +@@ -2299,8 +2299,7 @@ static int futex_wait_requeue_pi(u32 __u * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ @@ -87,10 +86,10 @@ index 840fcea..2771a63 100644 ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index f8dcb7b..a7723d2 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c @@ -8,6 +8,12 @@ * Copyright (C) 2005 Kihon Technologies Inc., Steven Rostedt * Copyright (C) 2006 Esben Nielsen @@ -104,7 +103,7 @@ index f8dcb7b..a7723d2 100644 * See Documentation/rt-mutex-design.txt for details. */ #include -@@ -96,6 +102,12 @@ static inline void mark_rt_mutex_waiters(struct rt_mutex *lock) +@@ -96,6 +102,12 @@ static inline void mark_rt_mutex_waiters } #endif @@ -117,7 +116,7 @@ index f8dcb7b..a7723d2 100644 /* * Calculate task priority from the waiter list priority * -@@ -142,6 +154,14 @@ static void rt_mutex_adjust_prio(struct task_struct *task) +@@ -142,6 +154,14 @@ static void rt_mutex_adjust_prio(struct raw_spin_unlock_irqrestore(&task->pi_lock, flags); } @@ -132,7 +131,7 @@ index f8dcb7b..a7723d2 100644 /* * Max number of times we'll walk the boosting chain: */ -@@ -253,13 +273,15 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -253,13 +273,15 @@ static int rt_mutex_adjust_prio_chain(st /* Release the task */ raw_spin_unlock_irqrestore(&task->pi_lock, flags); if (!rt_mutex_owner(lock)) { @@ -151,7 +150,7 @@ index f8dcb7b..a7723d2 100644 raw_spin_unlock(&lock->wait_lock); goto out_put_task; } -@@ -304,6 +326,25 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -304,6 +326,25 @@ static int rt_mutex_adjust_prio_chain(st return ret; } @@ -177,7 +176,7 @@ index f8dcb7b..a7723d2 100644 /* * Try to take an rt-mutex * -@@ -313,8 +354,9 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -313,8 +354,9 @@ static int rt_mutex_adjust_prio_chain(st * @task: the task which wants to acquire the lock * @waiter: the waiter that is queued to the lock's wait list. (could be NULL) */ @@ -189,7 +188,7 @@ index f8dcb7b..a7723d2 100644 { /* * We have to be careful here if the atomic speedups are -@@ -347,12 +389,14 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, +@@ -347,12 +389,14 @@ static int try_to_take_rt_mutex(struct r * 3) it is top waiter */ if (rt_mutex_has_waiters(lock)) { @@ -208,7 +207,7 @@ index f8dcb7b..a7723d2 100644 if (waiter || rt_mutex_has_waiters(lock)) { unsigned long flags; struct rt_mutex_waiter *top; -@@ -377,7 +421,6 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, +@@ -377,7 +421,6 @@ static int try_to_take_rt_mutex(struct r raw_spin_unlock_irqrestore(&task->pi_lock, flags); } @@ -216,7 +215,7 @@ index f8dcb7b..a7723d2 100644 debug_rt_mutex_lock(lock); rt_mutex_set_owner(lock, task); -@@ -387,6 +430,13 @@ static int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, +@@ -387,6 +430,13 @@ static int try_to_take_rt_mutex(struct r return 1; } @@ -230,7 +229,7 @@ index f8dcb7b..a7723d2 100644 /* * Task blocks on lock. * -@@ -501,7 +551,7 @@ static void wakeup_next_waiter(struct rt_mutex *lock) +@@ -501,7 +551,7 @@ static void wakeup_next_waiter(struct rt raw_spin_unlock_irqrestore(¤t->pi_lock, flags); @@ -239,7 +238,7 @@ index f8dcb7b..a7723d2 100644 } /* -@@ -580,18 +630,315 @@ void rt_mutex_adjust_pi(struct task_struct *task) +@@ -580,18 +630,315 @@ void rt_mutex_adjust_pi(struct task_stru return; } @@ -558,7 +557,7 @@ index f8dcb7b..a7723d2 100644 * @timeout: the pre-initialized and started timer, or NULL for none * @waiter: the pre-initialized rt_mutex_waiter * -@@ -655,9 +1002,10 @@ rt_mutex_slowlock(struct rt_mutex *lock, int state, +@@ -647,9 +994,10 @@ rt_mutex_slowlock(struct rt_mutex *lock, struct rt_mutex_waiter waiter; int ret = 0; @@ -570,7 +569,7 @@ index f8dcb7b..a7723d2 100644 /* Try to acquire the lock again: */ if (try_to_take_rt_mutex(lock, current, NULL)) { -@@ -710,6 +1058,7 @@ rt_mutex_slowtrylock(struct rt_mutex *lock) +@@ -702,6 +1050,7 @@ rt_mutex_slowtrylock(struct rt_mutex *lo int ret = 0; raw_spin_lock(&lock->wait_lock); @@ -578,7 +577,7 @@ index f8dcb7b..a7723d2 100644 if (likely(rt_mutex_owner(lock) != current)) { -@@ -942,7 +1291,6 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); +@@ -934,12 +1283,11 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); void __rt_mutex_init(struct rt_mutex *lock, const char *name) { lock->owner = NULL; @@ -586,7 +585,13 @@ index f8dcb7b..a7723d2 100644 plist_head_init(&lock->wait_list); debug_rt_mutex_init(lock, name); -@@ -962,7 +1310,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init); + } +-EXPORT_SYMBOL_GPL(__rt_mutex_init); ++EXPORT_SYMBOL(__rt_mutex_init); + + /** + * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a +@@ -954,7 +1302,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init); void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) { @@ -595,10 +600,10 @@ index f8dcb7b..a7723d2 100644 debug_rt_mutex_proxy_lock(lock, proxy_owner); rt_mutex_set_owner(lock, proxy_owner); rt_mutex_deadlock_account_lock(lock, proxy_owner); -diff --git a/kernel/rtmutex_common.h b/kernel/rtmutex_common.h -index 47290ec..6ec3dc1 100644 ---- a/kernel/rtmutex_common.h -+++ b/kernel/rtmutex_common.h +Index: linux-3.4/kernel/rtmutex_common.h +=================================================================== +--- linux-3.4.orig/kernel/rtmutex_common.h ++++ linux-3.4/kernel/rtmutex_common.h @@ -49,6 +49,7 @@ struct rt_mutex_waiter { struct plist_node pi_list_entry; struct task_struct *task; @@ -607,7 +612,7 @@ index 47290ec..6ec3dc1 100644 #ifdef CONFIG_DEBUG_RT_MUTEXES unsigned long ip; struct pid *deadlock_task_pid; -@@ -126,4 +127,12 @@ extern int rt_mutex_finish_proxy_lock(struct rt_mutex *lock, +@@ -126,4 +127,12 @@ extern int rt_mutex_finish_proxy_lock(st # include "rtmutex.h" #endif @@ -620,6 +625,3 @@ index 47290ec..6ec3dc1 100644 +} + #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0076-rt-preempt-base-config.patch.patch b/debian/patches/features/all/rt/rt-preempt-base-config.patch similarity index 73% rename from debian/patches/features/all/rt/0076-rt-preempt-base-config.patch.patch rename to debian/patches/features/all/rt/rt-preempt-base-config.patch index e71b70d8d..d773dce63 100644 --- a/debian/patches/features/all/rt/0076-rt-preempt-base-config.patch.patch +++ b/debian/patches/features/all/rt/rt-preempt-base-config.patch @@ -1,17 +1,16 @@ -From fa80496475ea56404325811b11eb95bdb1519b13 Mon Sep 17 00:00:00 2001 +Subject: rt-preempt-base-config.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 12:39:57 +0200 -Subject: [PATCH 076/267] rt-preempt-base-config.patch Signed-off-by: Thomas Gleixner --- kernel/Kconfig.preempt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) -diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt -index 24e7cb0..35c6f20 100644 ---- a/kernel/Kconfig.preempt -+++ b/kernel/Kconfig.preempt +Index: linux-3.4/kernel/Kconfig.preempt +=================================================================== +--- linux-3.4.orig/kernel/Kconfig.preempt ++++ linux-3.4/kernel/Kconfig.preempt @@ -1,3 +1,10 @@ +config PREEMPT + bool @@ -32,10 +31,10 @@ index 24e7cb0..35c6f20 100644 bool "Preemptible Kernel (Low-Latency Desktop)" - select PREEMPT_COUNT + select PREEMPT + select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making - all kernel code (that is not executing in a critical section) -@@ -51,6 +58,14 @@ config PREEMPT +@@ -52,6 +59,14 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. @@ -50,6 +49,3 @@ index 24e7cb0..35c6f20 100644 endchoice config PREEMPT_COUNT --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0209-rt-rcutree-Move-misplaced-prototype.patch b/debian/patches/features/all/rt/rt-rcutree-warn-fix.patch similarity index 59% rename from debian/patches/features/all/rt/0209-rt-rcutree-Move-misplaced-prototype.patch rename to debian/patches/features/all/rt/rt-rcutree-warn-fix.patch index 62678cc6b..21cab1dd0 100644 --- a/debian/patches/features/all/rt/0209-rt-rcutree-Move-misplaced-prototype.patch +++ b/debian/patches/features/all/rt/rt-rcutree-warn-fix.patch @@ -1,10 +1,6 @@ -From db23d49ad9b8225da4d9930cdac61ccfe155a3b6 Mon Sep 17 00:00:00 2001 +Subject: rt/rcutree: Move misplaced prototype From: Ingo Molnar -Date: Wed, 14 Dec 2011 12:51:28 +0100 -Subject: [PATCH 209/267] rt/rcutree: Move misplaced prototype -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit +Date: Wed Dec 14 12:51:28 CET 2011 Fix this warning on x86 defconfig: @@ -15,16 +11,17 @@ usage site that needs it. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner +--- --- kernel/rcutree.c | 2 ++ kernel/rcutree.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) -diff --git a/kernel/rcutree.c b/kernel/rcutree.c -index 3118218..8c26a49 100644 ---- a/kernel/rcutree.c -+++ b/kernel/rcutree.c -@@ -171,6 +171,8 @@ void rcu_sched_qs(int cpu) +Index: linux-3.4/kernel/rcutree.c +=================================================================== +--- linux-3.4.orig/kernel/rcutree.c ++++ linux-3.4/kernel/rcutree.c +@@ -173,6 +173,8 @@ void rcu_sched_qs(int cpu) } #ifdef CONFIG_PREEMPT_RT_FULL @@ -33,11 +30,11 @@ index 3118218..8c26a49 100644 void rcu_bh_qs(int cpu) { rcu_preempt_qs(cpu); -diff --git a/kernel/rcutree.h b/kernel/rcutree.h -index b522273..dca495d 100644 ---- a/kernel/rcutree.h -+++ b/kernel/rcutree.h -@@ -430,7 +430,6 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work); +Index: linux-3.4/kernel/rcutree.h +=================================================================== +--- linux-3.4.orig/kernel/rcutree.h ++++ linux-3.4/kernel/rcutree.h +@@ -423,7 +423,6 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work); /* Forward declarations for rcutree_plugin.h */ static void rcu_bootup_announce(void); long rcu_batches_completed(void); @@ -45,6 +42,3 @@ index b522273..dca495d 100644 static void rcu_preempt_note_context_switch(int cpu); static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp); #ifdef CONFIG_HOTPLUG_CPU --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0176-ring-buffer-Convert-reader_lock-from-raw_spin_lock-i.patch b/debian/patches/features/all/rt/rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch similarity index 81% rename from debian/patches/features/all/rt/0176-ring-buffer-Convert-reader_lock-from-raw_spin_lock-i.patch rename to debian/patches/features/all/rt/rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch index 8d8387961..4dd5156c3 100644 --- a/debian/patches/features/all/rt/0176-ring-buffer-Convert-reader_lock-from-raw_spin_lock-i.patch +++ b/debian/patches/features/all/rt/rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch @@ -1,8 +1,6 @@ -From 128036c3653638bba3b9e4fc68dfa0a6b3d48517 Mon Sep 17 00:00:00 2001 +Subject: ring-buffer: Convert reader_lock from raw_spin_lock into spin_lock From: Steven Rostedt Date: Tue, 27 Sep 2011 13:56:50 -0400 -Subject: [PATCH 176/267] ring-buffer: Convert reader_lock from raw_spin_lock - into spin_lock The reader_lock is mostly taken in normal context with interrupts enabled. But because ftrace_dump() can happen anywhere, it is used as a spin lock @@ -39,15 +37,18 @@ Cc: Peter Zijlstra Cc: Clark Williams Link: http://lkml.kernel.org/r/1317146210.26514.33.camel@gandalf.stny.rr.com Signed-off-by: Thomas Gleixner + + + --- - kernel/trace/ring_buffer.c | 151 ++++++++++++++++++++++++-------------------- + kernel/trace/ring_buffer.c | 151 ++++++++++++++++++++++++--------------------- 1 file changed, 81 insertions(+), 70 deletions(-) -diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c -index f5b7b5c..354017f 100644 ---- a/kernel/trace/ring_buffer.c -+++ b/kernel/trace/ring_buffer.c -@@ -478,7 +478,7 @@ struct ring_buffer_per_cpu { +Index: linux-3.4/kernel/trace/ring_buffer.c +=================================================================== +--- linux-3.4.orig/kernel/trace/ring_buffer.c ++++ linux-3.4/kernel/trace/ring_buffer.c +@@ -446,7 +446,7 @@ struct ring_buffer_per_cpu { int cpu; atomic_t record_disabled; struct ring_buffer *buffer; @@ -56,7 +57,7 @@ index f5b7b5c..354017f 100644 arch_spinlock_t lock; struct lock_class_key lock_key; struct list_head *pages; -@@ -1049,6 +1049,44 @@ static int rb_allocate_pages(struct ring_buffer_per_cpu *cpu_buffer, +@@ -1017,6 +1017,44 @@ static int rb_allocate_pages(struct ring return -ENOMEM; } @@ -101,7 +102,7 @@ index f5b7b5c..354017f 100644 static struct ring_buffer_per_cpu * rb_allocate_cpu_buffer(struct ring_buffer *buffer, int cpu) { -@@ -1064,7 +1102,7 @@ rb_allocate_cpu_buffer(struct ring_buffer *buffer, int cpu) +@@ -1032,7 +1070,7 @@ rb_allocate_cpu_buffer(struct ring_buffe cpu_buffer->cpu = cpu; cpu_buffer->buffer = buffer; @@ -110,7 +111,7 @@ index f5b7b5c..354017f 100644 lockdep_set_class(&cpu_buffer->reader_lock, buffer->reader_lock_key); cpu_buffer->lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; -@@ -1259,9 +1297,11 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages) +@@ -1227,9 +1265,11 @@ rb_remove_pages(struct ring_buffer_per_c { struct buffer_page *bpage; struct list_head *p; @@ -123,7 +124,7 @@ index f5b7b5c..354017f 100644 rb_head_page_deactivate(cpu_buffer); for (i = 0; i < nr_pages; i++) { -@@ -1279,7 +1319,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages) +@@ -1247,7 +1287,7 @@ rb_remove_pages(struct ring_buffer_per_c rb_check_pages(cpu_buffer); out: @@ -132,7 +133,7 @@ index f5b7b5c..354017f 100644 } static void -@@ -1288,9 +1328,11 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer, +@@ -1256,9 +1296,11 @@ rb_insert_pages(struct ring_buffer_per_c { struct buffer_page *bpage; struct list_head *p; @@ -145,7 +146,7 @@ index f5b7b5c..354017f 100644 rb_head_page_deactivate(cpu_buffer); for (i = 0; i < nr_pages; i++) { -@@ -1305,7 +1347,7 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer, +@@ -1273,7 +1315,7 @@ rb_insert_pages(struct ring_buffer_per_c rb_check_pages(cpu_buffer); out: @@ -154,7 +155,7 @@ index f5b7b5c..354017f 100644 } /** -@@ -2689,7 +2731,7 @@ unsigned long ring_buffer_oldest_event_ts(struct ring_buffer *buffer, int cpu) +@@ -2714,7 +2756,7 @@ unsigned long ring_buffer_oldest_event_t return 0; cpu_buffer = buffer->buffers[cpu]; @@ -163,7 +164,7 @@ index f5b7b5c..354017f 100644 /* * if the tail is on reader_page, oldest time stamp is on the reader * page -@@ -2699,7 +2741,7 @@ unsigned long ring_buffer_oldest_event_ts(struct ring_buffer *buffer, int cpu) +@@ -2724,7 +2766,7 @@ unsigned long ring_buffer_oldest_event_t else bpage = rb_set_head_page(cpu_buffer); ret = bpage->page->time_stamp; @@ -172,7 +173,7 @@ index f5b7b5c..354017f 100644 return ret; } -@@ -2863,15 +2905,16 @@ void ring_buffer_iter_reset(struct ring_buffer_iter *iter) +@@ -2888,15 +2930,16 @@ void ring_buffer_iter_reset(struct ring_ { struct ring_buffer_per_cpu *cpu_buffer; unsigned long flags; @@ -191,7 +192,7 @@ index f5b7b5c..354017f 100644 } EXPORT_SYMBOL_GPL(ring_buffer_iter_reset); -@@ -3289,21 +3332,6 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts) +@@ -3314,21 +3357,6 @@ rb_iter_peek(struct ring_buffer_iter *it } EXPORT_SYMBOL_GPL(ring_buffer_iter_peek); @@ -213,7 +214,7 @@ index f5b7b5c..354017f 100644 /** * ring_buffer_peek - peek at the next event to be read * @buffer: The ring buffer to read -@@ -3321,22 +3349,17 @@ ring_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts, +@@ -3346,22 +3374,17 @@ ring_buffer_peek(struct ring_buffer *buf struct ring_buffer_per_cpu *cpu_buffer = buffer->buffers[cpu]; struct ring_buffer_event *event; unsigned long flags; @@ -239,7 +240,7 @@ index f5b7b5c..354017f 100644 if (event && event->type_len == RINGBUF_TYPE_PADDING) goto again; -@@ -3358,11 +3381,12 @@ ring_buffer_iter_peek(struct ring_buffer_iter *iter, u64 *ts) +@@ -3383,11 +3406,12 @@ ring_buffer_iter_peek(struct ring_buffer struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer; struct ring_buffer_event *event; unsigned long flags; @@ -254,7 +255,7 @@ index f5b7b5c..354017f 100644 if (event && event->type_len == RINGBUF_TYPE_PADDING) goto again; -@@ -3388,9 +3412,7 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, +@@ -3413,9 +3437,7 @@ ring_buffer_consume(struct ring_buffer * struct ring_buffer_per_cpu *cpu_buffer; struct ring_buffer_event *event = NULL; unsigned long flags; @@ -265,7 +266,7 @@ index f5b7b5c..354017f 100644 again: /* might be called in atomic */ -@@ -3400,9 +3422,7 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, +@@ -3425,9 +3447,7 @@ ring_buffer_consume(struct ring_buffer * goto out; cpu_buffer = buffer->buffers[cpu]; @@ -276,7 +277,7 @@ index f5b7b5c..354017f 100644 event = rb_buffer_peek(cpu_buffer, ts, lost_events); if (event) { -@@ -3410,9 +3430,8 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, +@@ -3435,9 +3455,8 @@ ring_buffer_consume(struct ring_buffer * rb_advance_reader(cpu_buffer); } @@ -288,7 +289,7 @@ index f5b7b5c..354017f 100644 out: preempt_enable(); -@@ -3497,17 +3516,18 @@ ring_buffer_read_start(struct ring_buffer_iter *iter) +@@ -3522,17 +3541,18 @@ ring_buffer_read_start(struct ring_buffe { struct ring_buffer_per_cpu *cpu_buffer; unsigned long flags; @@ -309,7 +310,7 @@ index f5b7b5c..354017f 100644 } EXPORT_SYMBOL_GPL(ring_buffer_read_start); -@@ -3541,8 +3561,9 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts) +@@ -3566,8 +3586,9 @@ ring_buffer_read(struct ring_buffer_iter struct ring_buffer_event *event; struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer; unsigned long flags; @@ -320,7 +321,7 @@ index f5b7b5c..354017f 100644 again: event = rb_iter_peek(iter, ts); if (!event) -@@ -3553,7 +3574,7 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts) +@@ -3578,7 +3599,7 @@ ring_buffer_read(struct ring_buffer_iter rb_advance_iter(iter); out: @@ -329,7 +330,7 @@ index f5b7b5c..354017f 100644 return event; } -@@ -3618,13 +3639,14 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) +@@ -3643,13 +3664,14 @@ void ring_buffer_reset_cpu(struct ring_b { struct ring_buffer_per_cpu *cpu_buffer = buffer->buffers[cpu]; unsigned long flags; @@ -345,7 +346,7 @@ index f5b7b5c..354017f 100644 if (RB_WARN_ON(cpu_buffer, local_read(&cpu_buffer->committing))) goto out; -@@ -3636,7 +3658,7 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) +@@ -3661,7 +3683,7 @@ void ring_buffer_reset_cpu(struct ring_b arch_spin_unlock(&cpu_buffer->lock); out: @@ -354,7 +355,7 @@ index f5b7b5c..354017f 100644 atomic_dec(&cpu_buffer->record_disabled); } -@@ -3663,22 +3685,16 @@ int ring_buffer_empty(struct ring_buffer *buffer) +@@ -3688,22 +3710,16 @@ int ring_buffer_empty(struct ring_buffer { struct ring_buffer_per_cpu *cpu_buffer; unsigned long flags; @@ -380,7 +381,7 @@ index f5b7b5c..354017f 100644 if (!ret) return 0; -@@ -3697,22 +3713,16 @@ int ring_buffer_empty_cpu(struct ring_buffer *buffer, int cpu) +@@ -3722,22 +3738,16 @@ int ring_buffer_empty_cpu(struct ring_bu { struct ring_buffer_per_cpu *cpu_buffer; unsigned long flags; @@ -406,7 +407,7 @@ index f5b7b5c..354017f 100644 return ret; } -@@ -3887,6 +3897,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, +@@ -3912,6 +3922,7 @@ int ring_buffer_read_page(struct ring_bu unsigned int commit; unsigned int read; u64 save_timestamp; @@ -414,7 +415,7 @@ index f5b7b5c..354017f 100644 int ret = -1; if (!cpumask_test_cpu(cpu, buffer->cpumask)) -@@ -3908,7 +3919,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, +@@ -3933,7 +3944,7 @@ int ring_buffer_read_page(struct ring_bu if (!bpage) goto out; @@ -423,7 +424,7 @@ index f5b7b5c..354017f 100644 reader = rb_get_reader_page(cpu_buffer); if (!reader) -@@ -4032,7 +4043,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer, +@@ -4057,7 +4068,7 @@ int ring_buffer_read_page(struct ring_bu memset(&bpage->data[commit], 0, BUF_PAGE_SIZE - commit); out_unlock: @@ -432,6 +433,3 @@ index f5b7b5c..354017f 100644 out: return ret; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0172-sched-Do-not-compare-cpu-masks-in-scheduler.patch b/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch similarity index 72% rename from debian/patches/features/all/rt/0172-sched-Do-not-compare-cpu-masks-in-scheduler.patch rename to debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch index 524f43805..b908fde56 100644 --- a/debian/patches/features/all/rt/0172-sched-Do-not-compare-cpu-masks-in-scheduler.patch +++ b/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch @@ -1,22 +1,22 @@ -From c48eb84f8fe2773f74592fdebc3e48a247d96b7f Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra +Subject: sched: Do not compare cpu masks in scheduler Date: Tue, 27 Sep 2011 08:40:24 -0400 -Subject: [PATCH 172/267] sched: Do not compare cpu masks in scheduler +From: Peter Zijlstra Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Clark Williams Link: http://lkml.kernel.org/r/20110927124423.128129033@goodmis.org Signed-off-by: Thomas Gleixner + --- - kernel/sched.c | 14 +++++--------- + kernel/sched/core.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index 579724d..1d07891 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4385,16 +4385,12 @@ static inline void update_migrate_disable(struct task_struct *p) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -3164,16 +3164,12 @@ static inline void update_migrate_disabl */ mask = tsk_cpus_allowed(p); @@ -38,6 +38,3 @@ index 579724d..1d07891 100644 } void migrate_disable(void) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0173-sched-Have-migrate_disable-ignore-bounded-threads.patch b/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch similarity index 79% rename from debian/patches/features/all/rt/0173-sched-Have-migrate_disable-ignore-bounded-threads.patch rename to debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch index b0604332d..23eec2226 100644 --- a/debian/patches/features/all/rt/0173-sched-Have-migrate_disable-ignore-bounded-threads.patch +++ b/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch @@ -1,22 +1,22 @@ -From 88db6db5d3ea0b26f57e3fe507dbb70332006d6f Mon Sep 17 00:00:00 2001 -From: Peter Zijlstra +Subject: sched: Have migrate_disable ignore bounded threads Date: Tue, 27 Sep 2011 08:40:25 -0400 -Subject: [PATCH 173/267] sched: Have migrate_disable ignore bounded threads +From: Peter Zijlstra Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Clark Williams Link: http://lkml.kernel.org/r/20110927124423.567944215@goodmis.org Signed-off-by: Thomas Gleixner + --- - kernel/sched.c | 23 +++++++++-------------- + kernel/sched/core.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index 1d07891..51c0ad6 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4397,7 +4397,7 @@ void migrate_disable(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -3176,7 +3176,7 @@ void migrate_disable(void) { struct task_struct *p = current; @@ -25,7 +25,7 @@ index 1d07891..51c0ad6 100644 #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic++; #endif -@@ -4428,7 +4428,7 @@ void migrate_enable(void) +@@ -3207,7 +3207,7 @@ void migrate_enable(void) unsigned long flags; struct rq *rq; @@ -34,7 +34,7 @@ index 1d07891..51c0ad6 100644 #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic--; #endif -@@ -4449,26 +4449,21 @@ void migrate_enable(void) +@@ -3228,26 +3228,21 @@ void migrate_enable(void) if (unlikely(migrate_disabled_updated(p))) { /* @@ -68,6 +68,3 @@ index 1d07891..51c0ad6 100644 raw_spin_unlock_irqrestore(&rq->lock, flags); } else p->migrate_disable = 0; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0171-sched-Postpone-actual-migration-disalbe-to-schedule.patch b/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch similarity index 91% rename from debian/patches/features/all/rt/0171-sched-Postpone-actual-migration-disalbe-to-schedule.patch rename to debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch index f94add2e1..529c33cd3 100644 --- a/debian/patches/features/all/rt/0171-sched-Postpone-actual-migration-disalbe-to-schedule.patch +++ b/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch @@ -1,7 +1,6 @@ -From 5af39adfc38297dee471eea03f81c9894c473238 Mon Sep 17 00:00:00 2001 +Subject: sched: Postpone actual migration disalbe to schedule From: Steven Rostedt Date: Tue, 27 Sep 2011 08:40:23 -0400 -Subject: [PATCH 171/267] sched: Postpone actual migration disalbe to schedule The migrate_disable() can cause a bit of a overhead to the RT kernel, as changing the affinity is expensive to do at every lock encountered. @@ -18,15 +17,16 @@ Cc: Peter Zijlstra Cc: Clark Williams Link: http://lkml.kernel.org/r/20110927124422.779693167@goodmis.org Signed-off-by: Thomas Gleixner + --- - kernel/sched.c | 251 +++++++++++++++++++++++++++++--------------------------- + kernel/sched/core.c | 251 +++++++++++++++++++++++++++------------------------- 1 file changed, 132 insertions(+), 119 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index c26b1ba..579724d 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4357,6 +4357,135 @@ static inline void schedule_debug(struct task_struct *prev) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -3136,6 +3136,135 @@ static inline void schedule_debug(struct schedstat_inc(this_rq(), sched_count); } @@ -96,7 +96,7 @@ index c26b1ba..579724d 100644 + p->migrate_disable = 1; + preempt_enable(); +} -+EXPORT_SYMBOL_GPL(migrate_disable); ++EXPORT_SYMBOL(migrate_disable); + +void migrate_enable(void) +{ @@ -153,7 +153,7 @@ index c26b1ba..579724d 100644 + unpin_current_cpu(); + preempt_enable(); +} -+EXPORT_SYMBOL_GPL(migrate_enable); ++EXPORT_SYMBOL(migrate_enable); +#else +static inline void update_migrate_disable(struct task_struct *p) { } +#define migrate_disabled_updated(p) 0 @@ -162,7 +162,7 @@ index c26b1ba..579724d 100644 static void put_prev_task(struct rq *rq, struct task_struct *prev) { if (prev->on_rq || rq->skip_clock_update < 0) -@@ -4416,6 +4545,8 @@ need_resched: +@@ -3195,6 +3324,8 @@ need_resched: raw_spin_lock_irq(&rq->lock); @@ -171,7 +171,7 @@ index c26b1ba..579724d 100644 switch_count = &prev->nivcsw; if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { if (unlikely(signal_pending_state(prev->state, prev))) { -@@ -6224,7 +6355,7 @@ static inline void sched_init_granularity(void) +@@ -4976,7 +5107,7 @@ void __cpuinit init_idle(struct task_str #ifdef CONFIG_SMP void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -180,7 +180,7 @@ index c26b1ba..579724d 100644 if (p->sched_class && p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, new_mask); p->rt.nr_cpus_allowed = cpumask_weight(new_mask); -@@ -6299,124 +6430,6 @@ out: +@@ -5051,124 +5182,6 @@ out: } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); @@ -242,7 +242,7 @@ index c26b1ba..579724d 100644 - raw_spin_unlock_irqrestore(&rq->lock, flags); - preempt_enable(); -} --EXPORT_SYMBOL_GPL(migrate_disable); +-EXPORT_SYMBOL(migrate_disable); - -void migrate_enable(void) -{ @@ -299,12 +299,9 @@ index c26b1ba..579724d 100644 - unpin_current_cpu(); - preempt_enable(); -} --EXPORT_SYMBOL_GPL(migrate_enable); +-EXPORT_SYMBOL(migrate_enable); -#endif /* CONFIG_PREEMPT_RT_FULL */ - /* * Move (not current) task off this cpu, onto dest cpu. We're doing * this because either it can't run here any more (set_cpus_allowed() --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0214-rt-Improve-the-serial-console-PASS_LIMIT.patch b/debian/patches/features/all/rt/rt-serial-warn-fix.patch similarity index 56% rename from debian/patches/features/all/rt/0214-rt-Improve-the-serial-console-PASS_LIMIT.patch rename to debian/patches/features/all/rt/rt-serial-warn-fix.patch index 9f9210e85..66a21ff8f 100644 --- a/debian/patches/features/all/rt/0214-rt-Improve-the-serial-console-PASS_LIMIT.patch +++ b/debian/patches/features/all/rt/rt-serial-warn-fix.patch @@ -1,14 +1,10 @@ -From fc2844bf8a953a213b9b179947031651eca5980a Mon Sep 17 00:00:00 2001 +Subject: rt: Improve the serial console PASS_LIMIT From: Ingo Molnar -Date: Wed, 14 Dec 2011 13:05:54 +0100 -Subject: [PATCH 214/267] rt: Improve the serial console PASS_LIMIT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit +Date: Wed Dec 14 13:05:54 CET 2011 Beyond the warning: - drivers/tty/serial/8250.c:1613:6: warning: unused variable ‘pass_counter’ [-Wunused-variable] + drivers/tty/serial/8250/8250.c:1613:6: warning: unused variable ‘pass_counter’ [-Wunused-variable] the solution of just looping infinitely was ugly - up it to 1 million to give it a chance to continue in some really ugly situation. @@ -16,14 +12,14 @@ give it a chance to continue in some really ugly situation. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- - drivers/tty/serial/8250.c | 13 ++++++++++--- + drivers/tty/serial/8250/8250.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c -index 687b1ad..3bf482c 100644 ---- a/drivers/tty/serial/8250.c -+++ b/drivers/tty/serial/8250.c -@@ -81,7 +81,16 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ +Index: linux-3.4/drivers/tty/serial/8250/8250.c +=================================================================== +--- linux-3.4.orig/drivers/tty/serial/8250/8250.c ++++ linux-3.4/drivers/tty/serial/8250/8250.c +@@ -80,7 +80,16 @@ static unsigned int skip_txen_test; /* f #define DEBUG_INTR(fmt...) do { } while (0) #endif @@ -41,7 +37,7 @@ index 687b1ad..3bf482c 100644 #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) -@@ -1631,14 +1640,12 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id) +@@ -1584,14 +1593,12 @@ static irqreturn_t serial8250_interrupt( l = l->next; @@ -56,6 +52,3 @@ index 687b1ad..3bf482c 100644 } while (l != end); spin_unlock(&i->lock); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0107-slab-Fix-__do_drain-to-use-the-right-array-cache.patch b/debian/patches/features/all/rt/rt-slab-fix-__do_drain-to-use-the-right-array-cache.patch similarity index 85% rename from debian/patches/features/all/rt/0107-slab-Fix-__do_drain-to-use-the-right-array-cache.patch rename to debian/patches/features/all/rt/rt-slab-fix-__do_drain-to-use-the-right-array-cache.patch index 9f5248337..bb4905e1c 100644 --- a/debian/patches/features/all/rt/0107-slab-Fix-__do_drain-to-use-the-right-array-cache.patch +++ b/debian/patches/features/all/rt/rt-slab-fix-__do_drain-to-use-the-right-array-cache.patch @@ -1,7 +1,6 @@ -From b9b052a0e38ea1b57bb61460b4eb38ccb9313ad2 Mon Sep 17 00:00:00 2001 +Subject: slab: Fix __do_drain to use the right array cache From: Steven Rostedt Date: Tue, 11 Oct 2011 23:56:23 -0400 -Subject: [PATCH 107/267] slab: Fix __do_drain to use the right array cache The array cache in __do_drain() was using the cpu_cache_get() function which uses smp_processor_id() to get the proper array. On mainline, this @@ -34,15 +33,16 @@ Cc: Clark Williams Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1318391783.13262.11.camel@gandalf.stny.rr.com Signed-off-by: Thomas Gleixner + --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/mm/slab.c b/mm/slab.c -index 38575a8..5b63148 100644 ---- a/mm/slab.c -+++ b/mm/slab.c -@@ -2573,7 +2573,7 @@ static void __do_drain(void *arg, unsigned int cpu) +Index: linux-3.4/mm/slab.c +=================================================================== +--- linux-3.4.orig/mm/slab.c ++++ linux-3.4/mm/slab.c +@@ -2638,7 +2638,7 @@ static void __do_drain(void *arg, unsign struct array_cache *ac; int node = cpu_to_mem(cpu); @@ -51,6 +51,3 @@ index 38575a8..5b63148 100644 spin_lock(&cachep->nodelists[node]->list_lock); free_block(cachep, ac->entry, ac->avail, node); spin_unlock(&cachep->nodelists[node]->list_lock); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0165-tracing-Show-padding-as-unsigned-short.patch b/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch similarity index 79% rename from debian/patches/features/all/rt/0165-tracing-Show-padding-as-unsigned-short.patch rename to debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch index 348e3c25a..6a057a55f 100644 --- a/debian/patches/features/all/rt/0165-tracing-Show-padding-as-unsigned-short.patch +++ b/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch @@ -1,7 +1,6 @@ -From dd3770d74d14d22cd6c3942d94fdef417465f665 Mon Sep 17 00:00:00 2001 +Subject: tracing: Show padding as unsigned short From: Steven Rostedt Date: Wed, 16 Nov 2011 13:19:35 -0500 -Subject: [PATCH 165/267] tracing: Show padding as unsigned short RT added two bytes to trace migrate disable counting to the trace events and used two bytes of the padding to make the change. The structures and @@ -20,6 +19,7 @@ format: field:unsigned short common_migrate_disable; offset:8; size:2; signed:0; field:int common_padding; offset:10; size:2; signed:0; + The field for common_padding has the correct size and offset, but the use of "int" might confuse some parsers (and people that are reading it). This needs to be changed to "unsigned short". @@ -28,15 +28,16 @@ Signed-off-by: Steven Rostedt Link: http://lkml.kernel.org/r/1321467575.4181.36.camel@frodo Cc: stable-rt@vger.kernel.org Signed-off-by: Thomas Gleixner + --- kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c -index aca63cc..69cc908 100644 ---- a/kernel/trace/trace_events.c -+++ b/kernel/trace/trace_events.c -@@ -117,7 +117,7 @@ static int trace_define_common_fields(void) +Index: linux-3.4/kernel/trace/trace_events.c +=================================================================== +--- linux-3.4.orig/kernel/trace/trace_events.c ++++ linux-3.4/kernel/trace/trace_events.c +@@ -117,7 +117,7 @@ static int trace_define_common_fields(vo __common_field(unsigned char, preempt_count); __common_field(int, pid); __common_field(unsigned short, migrate_disable); @@ -45,6 +46,3 @@ index aca63cc..69cc908 100644 return ret; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0196-rtmutex-avoid-include-hell.patch.patch b/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch similarity index 58% rename from debian/patches/features/all/rt/0196-rtmutex-avoid-include-hell.patch.patch rename to debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch index c8b55c890..6a06ee7fc 100644 --- a/debian/patches/features/all/rt/0196-rtmutex-avoid-include-hell.patch.patch +++ b/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch @@ -1,17 +1,16 @@ -From 930f138fdda5b6523bcfdeb836d23454d36dd93e Mon Sep 17 00:00:00 2001 +Subject: rtmutex-avoid-include-hell.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:06:39 +0200 -Subject: [PATCH 196/267] rtmutex-avoid-include-hell.patch Signed-off-by: Thomas Gleixner --- 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 928d93e..5ebd0bb 100644 ---- a/include/linux/rtmutex.h -+++ b/include/linux/rtmutex.h +Index: linux-3.4/include/linux/rtmutex.h +=================================================================== +--- linux-3.4.orig/include/linux/rtmutex.h ++++ linux-3.4/include/linux/rtmutex.h @@ -14,7 +14,7 @@ #include @@ -21,6 +20,3 @@ index 928d93e..5ebd0bb 100644 extern int max_lock_depth; /* for sysctl */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0192-rtmutex-futex-prepare-rt.patch.patch b/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch similarity index 81% rename from debian/patches/features/all/rt/0192-rtmutex-futex-prepare-rt.patch.patch rename to debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch index 55c14da2b..564f395c5 100644 --- a/debian/patches/features/all/rt/0192-rtmutex-futex-prepare-rt.patch.patch +++ b/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch @@ -1,19 +1,18 @@ -From 7f683c2c7663bb1db3d91fa8cf280960ce9f571c Mon Sep 17 00:00:00 2001 +Subject: rtmutex-futex-prepare-rt.patch From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:04:15 +0200 -Subject: [PATCH 192/267] rtmutex-futex-prepare-rt.patch Signed-off-by: Thomas Gleixner --- - kernel/futex.c | 77 ++++++++++++++++++++++++++++++++++++++--------- + kernel/futex.c | 77 ++++++++++++++++++++++++++++++++++++++---------- kernel/rtmutex.c | 31 ++++++++++++++++--- - kernel/rtmutex_common.h | 2 ++ + kernel/rtmutex_common.h | 2 + 3 files changed, 91 insertions(+), 19 deletions(-) -diff --git a/kernel/futex.c b/kernel/futex.c -index 866c9d5..840fcea 100644 ---- a/kernel/futex.c -+++ b/kernel/futex.c +Index: linux-3.4/kernel/futex.c +=================================================================== +--- linux-3.4.orig/kernel/futex.c ++++ linux-3.4/kernel/futex.c @@ -1423,6 +1423,16 @@ retry_private: requeue_pi_wake_futex(this, &key2, hb2); drop_count++; @@ -31,7 +30,7 @@ index 866c9d5..840fcea 100644 } else if (ret) { /* -EDEADLK */ this->pi_state = NULL; -@@ -2267,7 +2277,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, +@@ -2267,7 +2277,7 @@ static int futex_wait_requeue_pi(u32 __u struct hrtimer_sleeper timeout, *to = NULL; struct rt_mutex_waiter rt_waiter; struct rt_mutex *pi_mutex = NULL; @@ -40,7 +39,7 @@ index 866c9d5..840fcea 100644 union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; -@@ -2311,20 +2321,55 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, +@@ -2311,20 +2321,55 @@ static int futex_wait_requeue_pi(u32 __u /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); @@ -107,7 +106,7 @@ index 866c9d5..840fcea 100644 /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { -@@ -2333,9 +2378,10 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, +@@ -2333,9 +2378,10 @@ static int futex_wait_requeue_pi(u32 __u * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { @@ -120,7 +119,7 @@ index 866c9d5..840fcea 100644 } } else { /* -@@ -2348,7 +2394,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, +@@ -2348,7 +2394,8 @@ static int futex_wait_requeue_pi(u32 __u ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1); debug_rt_mutex_free_waiter(&rt_waiter); @@ -130,11 +129,11 @@ index 866c9d5..840fcea 100644 /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index 723fd3a..13b3c92 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c -@@ -67,6 +67,11 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock) +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c +@@ -67,6 +67,11 @@ static void fixup_rt_mutex_waiters(struc clear_rt_mutex_waiters(lock); } @@ -146,7 +145,7 @@ index 723fd3a..13b3c92 100644 /* * We can speed up the acquire/release, if the architecture * supports cmpxchg and if there's no debugging state to be set up -@@ -196,7 +201,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, +@@ -196,7 +201,7 @@ static int rt_mutex_adjust_prio_chain(st * reached or the state of the chain has changed while we * dropped the locks. */ @@ -155,7 +154,7 @@ index 723fd3a..13b3c92 100644 goto out_unlock_pi; /* -@@ -399,6 +404,23 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, +@@ -399,6 +404,23 @@ static int task_blocks_on_rt_mutex(struc int chain_walk = 0, res; raw_spin_lock_irqsave(&task->pi_lock, flags); @@ -179,7 +178,7 @@ index 723fd3a..13b3c92 100644 __rt_mutex_adjust_prio(task); waiter->task = task; waiter->lock = lock; -@@ -423,7 +445,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, +@@ -423,7 +445,7 @@ static int task_blocks_on_rt_mutex(struc plist_add(&waiter->pi_list_entry, &owner->pi_waiters); __rt_mutex_adjust_prio(owner); @@ -188,7 +187,7 @@ index 723fd3a..13b3c92 100644 chain_walk = 1; raw_spin_unlock_irqrestore(&owner->pi_lock, flags); } -@@ -517,7 +539,7 @@ static void remove_waiter(struct rt_mutex *lock, +@@ -517,7 +539,7 @@ static void remove_waiter(struct rt_mute } __rt_mutex_adjust_prio(owner); @@ -197,7 +196,7 @@ index 723fd3a..13b3c92 100644 chain_walk = 1; raw_spin_unlock_irqrestore(&owner->pi_lock, flags); -@@ -551,7 +573,8 @@ void rt_mutex_adjust_pi(struct task_struct *task) +@@ -551,7 +573,8 @@ void rt_mutex_adjust_pi(struct task_stru raw_spin_lock_irqsave(&task->pi_lock, flags); waiter = task->pi_blocked_on; @@ -207,11 +206,11 @@ index 723fd3a..13b3c92 100644 raw_spin_unlock_irqrestore(&task->pi_lock, flags); return; } -diff --git a/kernel/rtmutex_common.h b/kernel/rtmutex_common.h -index 53a66c8..b43d832 100644 ---- a/kernel/rtmutex_common.h -+++ b/kernel/rtmutex_common.h -@@ -103,6 +103,8 @@ static inline struct task_struct *rt_mutex_owner(struct rt_mutex *lock) +Index: linux-3.4/kernel/rtmutex_common.h +=================================================================== +--- linux-3.4.orig/kernel/rtmutex_common.h ++++ linux-3.4/kernel/rtmutex_common.h +@@ -103,6 +103,8 @@ static inline struct task_struct *rt_mut /* * PI-futex support (proxy locking functions, etc.): */ @@ -220,6 +219,3 @@ index 53a66c8..b43d832 100644 extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0191-rtmutex-lock-killable.patch.patch b/debian/patches/features/all/rt/rtmutex-lock-killable.patch similarity index 77% rename from debian/patches/features/all/rt/0191-rtmutex-lock-killable.patch.patch rename to debian/patches/features/all/rt/rtmutex-lock-killable.patch index d24ae383c..29e07a9a9 100644 --- a/debian/patches/features/all/rt/0191-rtmutex-lock-killable.patch.patch +++ b/debian/patches/features/all/rt/rtmutex-lock-killable.patch @@ -1,7 +1,6 @@ -From 4a983053b2d60a6f87eac812ee805671bdc1f9f0 Mon Sep 17 00:00:00 2001 +Subject: rtmutex-lock-killable.patch From: Thomas Gleixner -Date: Thu, 9 Jun 2011 11:43:52 +0200 -Subject: [PATCH 191/267] rtmutex-lock-killable.patch +Date: Thu, 09 Jun 2011 11:43:52 +0200 Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/rtmutex.c | 33 +++++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) -diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h -index de17134..3561eb2 100644 ---- a/include/linux/rtmutex.h -+++ b/include/linux/rtmutex.h -@@ -90,6 +90,7 @@ extern void rt_mutex_destroy(struct rt_mutex *lock); +Index: linux-3.4/include/linux/rtmutex.h +=================================================================== +--- linux-3.4.orig/include/linux/rtmutex.h ++++ linux-3.4/include/linux/rtmutex.h +@@ -90,6 +90,7 @@ extern void rt_mutex_destroy(struct rt_m extern void rt_mutex_lock(struct rt_mutex *lock); extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, int detect_deadlock); @@ -21,11 +20,11 @@ index de17134..3561eb2 100644 extern int rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout, int detect_deadlock); -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index f9d8482..723fd3a 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c -@@ -799,12 +799,12 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c +@@ -791,12 +791,12 @@ EXPORT_SYMBOL_GPL(rt_mutex_lock); /** * rt_mutex_lock_interruptible - lock a rt_mutex interruptible * @@ -41,7 +40,7 @@ index f9d8482..723fd3a 100644 * -EDEADLK when the lock would deadlock (when deadlock detection is on) */ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock, -@@ -818,17 +818,38 @@ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock, +@@ -810,17 +810,38 @@ int __sched rt_mutex_lock_interruptible( EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); /** @@ -83,6 +82,3 @@ index f9d8482..723fd3a 100644 * -ETIMEDOUT when the timeout expired * -EDEADLK when the lock would deadlock (when deadlock detection is on) */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0199-rwsem-add-rt-variant.patch.patch b/debian/patches/features/all/rt/rwsem-add-rt-variant.patch similarity index 81% rename from debian/patches/features/all/rt/0199-rwsem-add-rt-variant.patch.patch rename to debian/patches/features/all/rt/rwsem-add-rt-variant.patch index a82374870..c3c44e12a 100644 --- a/debian/patches/features/all/rt/0199-rwsem-add-rt-variant.patch.patch +++ b/debian/patches/features/all/rt/rwsem-add-rt-variant.patch @@ -1,22 +1,20 @@ -From ceee8a9d6deb269345ae0ae0949770809036443a Mon Sep 17 00:00:00 2001 +Subject: rwsem-add-rt-variant.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 21:02:53 +0200 -Subject: [PATCH 199/267] rwsem-add-rt-variant.patch Signed-off-by: Thomas Gleixner --- - include/linux/rwsem.h | 6 +++ - include/linux/rwsem_rt.h | 105 ++++++++++++++++++++++++++++++++++++++++++++++ - lib/Makefile | 3 ++ + include/linux/rwsem.h | 6 ++ + include/linux/rwsem_rt.h | 105 +++++++++++++++++++++++++++++++++++++++++++++++ + lib/Makefile | 3 + 3 files changed, 114 insertions(+) - create mode 100644 include/linux/rwsem_rt.h -diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h -index 63d4065..209be4b 100644 ---- a/include/linux/rwsem.h -+++ b/include/linux/rwsem.h -@@ -17,6 +17,10 @@ - #include +Index: linux-3.4/include/linux/rwsem.h +=================================================================== +--- linux-3.4.orig/include/linux/rwsem.h ++++ linux-3.4/include/linux/rwsem.h +@@ -16,6 +16,10 @@ + #include +#ifdef CONFIG_PREEMPT_RT_FULL @@ -26,18 +24,17 @@ index 63d4065..209be4b 100644 struct rw_semaphore; #ifdef CONFIG_RWSEM_GENERIC_SPINLOCK -@@ -131,4 +135,6 @@ extern void down_write_nested(struct rw_semaphore *sem, int subclass); +@@ -130,4 +134,6 @@ extern void down_write_nested(struct rw_ # define down_write_nested(sem, subclass) down_write(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 0000000..802c690 +Index: linux-3.4/include/linux/rwsem_rt.h +=================================================================== --- /dev/null -+++ b/include/linux/rwsem_rt.h ++++ linux-3.4/include/linux/rwsem_rt.h @@ -0,0 +1,105 @@ +#ifndef _LINUX_RWSEM_RT_H +#define _LINUX_RWSEM_RT_H @@ -144,11 +141,11 @@ index 0000000..802c690 +} + +#endif -diff --git a/lib/Makefile b/lib/Makefile -index a4da283..5026c91 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -37,8 +37,11 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o +Index: linux-3.4/lib/Makefile +=================================================================== +--- linux-3.4.orig/lib/Makefile ++++ linux-3.4/lib/Makefile +@@ -38,8 +38,11 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o @@ -160,6 +157,3 @@ index a4da283..5026c91 100644 CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS)) obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o --- -1.7.10 - diff --git a/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch b/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch new file mode 100644 index 000000000..ac3751a29 --- /dev/null +++ b/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch @@ -0,0 +1,26 @@ +Subject: sched-clear-pf-thread-bound-on-fallback-rq.patch +From: Thomas Gleixner +Date: Fri, 04 Nov 2011 20:48:36 +0100 + +Signed-off-by: Thomas Gleixner +--- + kernel/sched/core.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1325,6 +1325,12 @@ out: + } + } + ++ /* ++ * Clear PF_THREAD_BOUND, otherwise we wreckage ++ * migrate_disable/enable. See optimization for ++ * PF_THREAD_BOUND tasks there. ++ */ ++ p->flags &= ~PF_THREAD_BOUND; + return dest_cpu; + } + diff --git a/debian/patches/features/all/rt/0148-sched-cond-resched.patch.patch b/debian/patches/features/all/rt/sched-cond-resched.patch similarity index 59% rename from debian/patches/features/all/rt/0148-sched-cond-resched.patch.patch rename to debian/patches/features/all/rt/sched-cond-resched.patch index ba6c05a20..c95479f69 100644 --- a/debian/patches/features/all/rt/0148-sched-cond-resched.patch.patch +++ b/debian/patches/features/all/rt/sched-cond-resched.patch @@ -1,18 +1,17 @@ -From 74dde8bd22fa29f1dc21a3e2a6ed93fdbda04374 Mon Sep 17 00:00:00 2001 +Subject: sched-cond-resched.patch From: Thomas Gleixner -Date: Tue, 7 Jun 2011 11:25:03 +0200 -Subject: [PATCH 148/267] sched-cond-resched.patch +Date: Tue, 07 Jun 2011 11:25:03 +0200 Signed-off-by: Thomas Gleixner --- - kernel/sched.c | 14 +++++++++++--- + kernel/sched/core.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index aa3cc02..42d0003 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -5775,9 +5775,17 @@ static inline int should_resched(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -4554,9 +4554,17 @@ static inline int should_resched(void) static void __cond_resched(void) { @@ -33,6 +32,3 @@ index aa3cc02..42d0003 100644 } int __sched _cond_resched(void) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0141-sched-delay-put-task.patch.patch b/debian/patches/features/all/rt/sched-delay-put-task.patch similarity index 71% rename from debian/patches/features/all/rt/0141-sched-delay-put-task.patch.patch rename to debian/patches/features/all/rt/sched-delay-put-task.patch index bff90a34c..e5a4b688a 100644 --- a/debian/patches/features/all/rt/0141-sched-delay-put-task.patch.patch +++ b/debian/patches/features/all/rt/sched-delay-put-task.patch @@ -1,7 +1,6 @@ -From bb265465ad0828b002fb95edbb8fdd92f5bd75e3 Mon Sep 17 00:00:00 2001 +Subject: sched-delay-put-task.patch From: Thomas Gleixner Date: Tue, 31 May 2011 16:59:16 +0200 -Subject: [PATCH 141/267] sched-delay-put-task.patch Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/fork.c | 11 +++++++++++ 2 files changed, 24 insertions(+) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 9ff731d..fb5e51f 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1591,6 +1591,9 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1635,6 +1635,9 @@ struct task_struct { #ifdef CONFIG_HAVE_HW_BREAKPOINT atomic_t ptrace_bp_refcnt; #endif @@ -23,7 +22,7 @@ index 9ff731d..fb5e51f 100644 }; /* Future-safe accessor for struct task_struct's cpus_allowed. */ -@@ -1775,6 +1778,15 @@ extern struct pid *cad_pid; +@@ -1819,6 +1822,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) @@ -39,7 +38,7 @@ index 9ff731d..fb5e51f 100644 extern void __put_task_struct(struct task_struct *t); static inline void put_task_struct(struct task_struct *t) -@@ -1782,6 +1794,7 @@ static inline void put_task_struct(struct task_struct *t) +@@ -1826,6 +1838,7 @@ static inline void put_task_struct(struc if (atomic_dec_and_test(&t->usage)) __put_task_struct(t); } @@ -47,11 +46,11 @@ index 9ff731d..fb5e51f 100644 extern void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st); extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st); -diff --git a/kernel/fork.c b/kernel/fork.c -index d8027e9..fe49c39 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -197,7 +197,18 @@ void __put_task_struct(struct task_struct *tsk) +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -201,7 +201,18 @@ void __put_task_struct(struct task_struc if (!profile_handoff_task(tsk)) free_task(tsk); } @@ -70,6 +69,3 @@ index d8027e9..fe49c39 100644 /* * macro override instead of weak attribute alias, to workaround --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0153-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch b/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch similarity index 70% rename from debian/patches/features/all/rt/0153-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch rename to debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch index 309c715e5..e6e3b9331 100644 --- a/debian/patches/features/all/rt/0153-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch +++ b/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch @@ -1,7 +1,6 @@ -From 50f5bed3b9927c7527a3bace73e89af6da5a5812 Mon Sep 17 00:00:00 2001 +Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:03:52 +0200 -Subject: [PATCH 153/267] sched: Disable CONFIG_RT_GROUP_SCHED on RT Carsten reported problems when running: @@ -17,11 +16,11 @@ Signed-off-by: Thomas Gleixner init/Kconfig | 1 + 1 file changed, 1 insertion(+) -diff --git a/init/Kconfig b/init/Kconfig -index dbc82d0..720c182 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -731,6 +731,7 @@ config RT_GROUP_SCHED +Index: linux-3.4/init/Kconfig +=================================================================== +--- linux-3.4.orig/init/Kconfig ++++ linux-3.4/init/Kconfig +@@ -746,6 +746,7 @@ config RT_GROUP_SCHED bool "Group scheduling for SCHED_RR/FIFO" depends on EXPERIMENTAL depends on CGROUP_SCHED @@ -29,6 +28,3 @@ index dbc82d0..720c182 100644 default n help This feature lets you explicitly allocate real CPU bandwidth --- -1.7.10 - diff --git a/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch b/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch new file mode 100644 index 000000000..df6356535 --- /dev/null +++ b/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch @@ -0,0 +1,29 @@ +Subject: sched-disable-ttwu-queue.patch +From: Thomas Gleixner +Date: Tue, 13 Sep 2011 16:42:35 +0200 + +Signed-off-by: Thomas Gleixner +--- + kernel/sched/features.h | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: linux-3.4/kernel/sched/features.h +=================================================================== +--- linux-3.4.orig/kernel/sched/features.h ++++ linux-3.4/kernel/sched/features.h +@@ -60,11 +60,15 @@ SCHED_FEAT(OWNER_SPIN, true) + */ + SCHED_FEAT(NONTASK_POWER, true) + ++#ifndef CONFIG_PREEMPT_RT_FULL + /* + * Queue remote wakeups on the target CPU and process them + * using the scheduler IPI. Reduces rq->lock contention/bounces. + */ + SCHED_FEAT(TTWU_QUEUE, true) ++#else ++SCHED_FEAT(TTWU_QUEUE, false) ++#endif + + SCHED_FEAT(FORCE_SD_OVERLAP, false) + SCHED_FEAT(RT_RUNTIME_SHARE, true) diff --git a/debian/patches/features/all/rt/0006-sched-Distangle-worker-accounting-from-rq-3Elock.patch b/debian/patches/features/all/rt/sched-distangle-worker-accounting-from-rq-3elock.patch similarity index 84% rename from debian/patches/features/all/rt/0006-sched-Distangle-worker-accounting-from-rq-3Elock.patch rename to debian/patches/features/all/rt/sched-distangle-worker-accounting-from-rq-3elock.patch index 149313ae9..86fb595d9 100644 --- a/debian/patches/features/all/rt/0006-sched-Distangle-worker-accounting-from-rq-3Elock.patch +++ b/debian/patches/features/all/rt/sched-distangle-worker-accounting-from-rq-3elock.patch @@ -1,7 +1,6 @@ -From f88ad17a5ee292086822942fee103f09abb93bc4 Mon Sep 17 00:00:00 2001 +Subject: sched: Distangle worker accounting from rq-%3Elock From: Thomas Gleixner Date: Wed, 22 Jun 2011 19:47:03 +0200 -Subject: [PATCH 006/267] sched: Distangle worker accounting from rq-%3Elock 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 @@ -24,16 +23,16 @@ Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de Signed-off-by: Thomas Gleixner --- - kernel/sched.c | 66 +++++++++++---------------------------------- - kernel/workqueue.c | 67 +++++++++++++++++++++------------------------- - kernel/workqueue_sched.h | 5 ++-- - 3 files changed, 47 insertions(+), 91 deletions(-) + kernel/sched/core.c | 66 ++++++++++---------------------------------- + kernel/workqueue.c | 69 +++++++++++++++++++++-------------------------- + kernel/workqueue_sched.h | 5 +-- + 3 files changed, 48 insertions(+), 92 deletions(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index d6b149c..a39494e 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -2644,10 +2644,6 @@ static void ttwu_activate(struct rq *rq, struct task_struct *p, int en_flags) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1399,10 +1399,6 @@ static void ttwu_activate(struct rq *rq, { activate_task(rq, p, en_flags); p->on_rq = 1; @@ -44,7 +43,7 @@ index d6b149c..a39494e 100644 } /* -@@ -2882,40 +2878,6 @@ out: +@@ -1642,40 +1638,6 @@ out: } /** @@ -85,7 +84,7 @@ index d6b149c..a39494e 100644 * wake_up_process - Wake up a specific process * @p: The process to be woken up. * -@@ -4420,19 +4382,6 @@ need_resched: +@@ -3200,19 +3162,6 @@ need_resched: } else { deactivate_task(rq, prev, DEQUEUE_SLEEP); prev->on_rq = 0; @@ -105,9 +104,9 @@ index d6b149c..a39494e 100644 } switch_count = &prev->nvcsw; } -@@ -4475,6 +4424,14 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -3255,6 +3204,14 @@ static inline void sched_submit_work(str { - if (!tsk->state) + if (!tsk->state || tsk_is_pi_blocked(tsk)) return; + + /* @@ -120,7 +119,7 @@ index d6b149c..a39494e 100644 /* * If we are going to sleep and we have plugged IO queued, * make sure to submit it to avoid deadlocks. -@@ -4483,12 +4440,19 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -3263,12 +3220,19 @@ static inline void sched_submit_work(str blk_schedule_flush_plug(tsk); } @@ -140,10 +139,10 @@ index d6b149c..a39494e 100644 } EXPORT_SYMBOL(schedule); -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index bb425b1..4b4421d 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c @@ -137,6 +137,7 @@ struct worker { unsigned int flags; /* X: flags */ int id; /* I: worker id */ @@ -152,7 +151,7 @@ index bb425b1..4b4421d 100644 }; /* -@@ -660,66 +661,58 @@ static void wake_up_worker(struct global_cwq *gcwq) +@@ -655,66 +656,58 @@ static void wake_up_worker(struct global } /** @@ -213,14 +212,14 @@ index bb425b1..4b4421d 100644 if (worker->flags & WORKER_NOT_RUNNING) - return NULL; + return; -+ -+ if (WARN_ON_ONCE(worker->sleeping)) -+ return; - /* this can only happen on the local cpu */ - BUG_ON(cpu != raw_smp_processor_id()); -+ worker->sleeping = 1; ++ if (WARN_ON_ONCE(worker->sleeping)) ++ return; ++ worker->sleeping = 1; ++ + cpu = smp_processor_id(); + gcwq = get_gcwq(cpu); + spin_lock_irq(&gcwq->lock); @@ -234,10 +233,11 @@ index bb425b1..4b4421d 100644 - * and preemption disabled, which in turn means that none else - * could be manipulating idle_list, so dereferencing idle_list - * without gcwq lock is safe. - */ +- */ - if (atomic_dec_and_test(nr_running) && !list_empty(&gcwq->worklist)) - to_wakeup = first_worker(gcwq); - return to_wakeup ? to_wakeup->task : NULL; ++ */ + if (atomic_dec_and_test(get_gcwq_nr_running(cpu)) && + !list_empty(&gcwq->worklist)) { + worker = first_worker(gcwq); @@ -248,10 +248,10 @@ index bb425b1..4b4421d 100644 } /** -diff --git a/kernel/workqueue_sched.h b/kernel/workqueue_sched.h -index 2d10fc9..3bf73e2 100644 ---- a/kernel/workqueue_sched.h -+++ b/kernel/workqueue_sched.h +Index: linux-3.4/kernel/workqueue_sched.h +=================================================================== +--- linux-3.4.orig/kernel/workqueue_sched.h ++++ linux-3.4/kernel/workqueue_sched.h @@ -4,6 +4,5 @@ * Scheduler hooks for concurrency managed workqueue. Only to be * included from sched.c and workqueue.c. @@ -261,6 +261,3 @@ index 2d10fc9..3bf73e2 100644 - unsigned int cpu); +void wq_worker_running(struct task_struct *task); +void wq_worker_sleeping(struct task_struct *task); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0142-sched-limit-nr-migrate.patch.patch b/debian/patches/features/all/rt/sched-limit-nr-migrate.patch similarity index 56% rename from debian/patches/features/all/rt/0142-sched-limit-nr-migrate.patch.patch rename to debian/patches/features/all/rt/sched-limit-nr-migrate.patch index 19aa011c2..321384282 100644 --- a/debian/patches/features/all/rt/0142-sched-limit-nr-migrate.patch.patch +++ b/debian/patches/features/all/rt/sched-limit-nr-migrate.patch @@ -1,18 +1,17 @@ -From c9d7f9417dea7fcc17f2b73d1a75e4af21749523 Mon Sep 17 00:00:00 2001 +Subject: sched-limit-nr-migrate.patch From: Thomas Gleixner -Date: Mon, 6 Jun 2011 12:12:51 +0200 -Subject: [PATCH 142/267] sched-limit-nr-migrate.patch +Date: Mon, 06 Jun 2011 12:12:51 +0200 Signed-off-by: Thomas Gleixner --- - kernel/sched.c | 4 ++++ + kernel/sched/core.c | 4 ++++ 1 file changed, 4 insertions(+) -diff --git a/kernel/sched.c b/kernel/sched.c -index c47e7a6..6e2bf9e 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -942,7 +942,11 @@ late_initcall(sched_init_debug); +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -263,7 +263,11 @@ late_initcall(sched_init_debug); * Number of tasks to iterate in a single balance run. * Limited because this is done with IRQs disabled. */ @@ -24,6 +23,3 @@ index c47e7a6..6e2bf9e 100644 /* * period over which we average the RT time consumption, measured --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0146-sched-might-sleep-do-not-account-rcu-depth.patch.patch b/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch similarity index 59% rename from debian/patches/features/all/rt/0146-sched-might-sleep-do-not-account-rcu-depth.patch.patch rename to debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch index 0402a2d1c..1bf06b987 100644 --- a/debian/patches/features/all/rt/0146-sched-might-sleep-do-not-account-rcu-depth.patch.patch +++ b/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch @@ -1,19 +1,18 @@ -From d6f44ae26c31cf3d826165f0013cfa21a7aaa079 Mon Sep 17 00:00:00 2001 +Subject: sched-might-sleep-do-not-account-rcu-depth.patch From: Thomas Gleixner -Date: Tue, 7 Jun 2011 09:19:06 +0200 -Subject: [PATCH 146/267] sched-might-sleep-do-not-account-rcu-depth.patch +Date: Tue, 07 Jun 2011 09:19:06 +0200 Signed-off-by: Thomas Gleixner --- include/linux/rcupdate.h | 7 +++++++ - kernel/sched.c | 3 ++- + kernel/sched/core.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) -diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h -index 2cf4226..a0082e2 100644 ---- a/include/linux/rcupdate.h -+++ b/include/linux/rcupdate.h -@@ -147,6 +147,11 @@ void synchronize_rcu(void); +Index: linux-3.4/include/linux/rcupdate.h +=================================================================== +--- linux-3.4.orig/include/linux/rcupdate.h ++++ linux-3.4/include/linux/rcupdate.h +@@ -156,6 +156,11 @@ void synchronize_rcu(void); * types of kernel builds, the rcu_read_lock() nesting depth is unknowable. */ #define rcu_preempt_depth() (current->rcu_read_lock_nesting) @@ -25,7 +24,7 @@ index 2cf4226..a0082e2 100644 #else /* #ifdef CONFIG_PREEMPT_RCU */ -@@ -170,6 +175,8 @@ static inline int rcu_preempt_depth(void) +@@ -179,6 +184,8 @@ static inline int rcu_preempt_depth(void return 0; } @@ -34,11 +33,11 @@ index 2cf4226..a0082e2 100644 #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ /* Internal to kernel */ -diff --git a/kernel/sched.c b/kernel/sched.c -index b813946..aa3cc02 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -8429,7 +8429,8 @@ void __init sched_init(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -7092,7 +7092,8 @@ void __init sched_init(void) #ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { @@ -48,6 +47,3 @@ index b813946..aa3cc02 100644 return (nested == preempt_offset); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0161-sched-migrate-disable.patch.patch b/debian/patches/features/all/rt/sched-migrate-disable.patch similarity index 73% rename from debian/patches/features/all/rt/0161-sched-migrate-disable.patch.patch rename to debian/patches/features/all/rt/sched-migrate-disable.patch index 68c096074..421e3d861 100644 --- a/debian/patches/features/all/rt/0161-sched-migrate-disable.patch.patch +++ b/debian/patches/features/all/rt/sched-migrate-disable.patch @@ -1,21 +1,20 @@ -From 8c27127e781fd1707beb16ac8af849c5c0564f35 Mon Sep 17 00:00:00 2001 +Subject: sched-migrate-disable.patch From: Thomas Gleixner Date: Thu, 16 Jun 2011 13:26:08 +0200 -Subject: [PATCH 161/267] sched-migrate-disable.patch Signed-off-by: Thomas Gleixner --- - include/linux/preempt.h | 8 +++++ + include/linux/preempt.h | 8 ++++ include/linux/sched.h | 13 +++++-- - include/linux/smp.h | 1 - - kernel/sched.c | 88 ++++++++++++++++++++++++++++++++++++++++++++--- - lib/smp_processor_id.c | 6 ++-- + include/linux/smp.h | 1 + kernel/sched/core.c | 88 +++++++++++++++++++++++++++++++++++++++++++++--- + lib/smp_processor_id.c | 6 +-- 5 files changed, 104 insertions(+), 12 deletions(-) -diff --git a/include/linux/preempt.h b/include/linux/preempt.h -index 29db25f..363e5e2 100644 ---- a/include/linux/preempt.h -+++ b/include/linux/preempt.h +Index: linux-3.4/include/linux/preempt.h +=================================================================== +--- linux-3.4.orig/include/linux/preempt.h ++++ linux-3.4/include/linux/preempt.h @@ -108,6 +108,14 @@ do { \ #endif /* CONFIG_PREEMPT_COUNT */ @@ -31,11 +30,11 @@ index 29db25f..363e5e2 100644 #ifdef CONFIG_PREEMPT_RT_FULL # define preempt_disable_rt() preempt_disable() # define preempt_enable_rt() preempt_enable() -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 6f10df5..712e991 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1259,6 +1259,7 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1302,6 +1302,7 @@ struct task_struct { #endif unsigned int policy; @@ -43,7 +42,7 @@ index 6f10df5..712e991 100644 cpumask_t cpus_allowed; #ifdef CONFIG_PREEMPT_RCU -@@ -1598,9 +1599,6 @@ struct task_struct { +@@ -1642,9 +1643,6 @@ struct task_struct { #endif }; @@ -53,7 +52,7 @@ index 6f10df5..712e991 100644 #ifdef CONFIG_PREEMPT_RT_FULL static inline bool cur_pf_disabled(void) { return current->pagefault_disabled; } #else -@@ -2683,6 +2681,15 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) +@@ -2773,6 +2771,15 @@ static inline void set_task_cpu(struct t #endif /* CONFIG_SMP */ @@ -69,11 +68,11 @@ index 6f10df5..712e991 100644 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 e6c58d8..94c8430 100644 ---- a/include/linux/smp.h -+++ b/include/linux/smp.h -@@ -80,7 +80,6 @@ void __smp_call_function_single(int cpuid, struct call_single_data *data, +Index: linux-3.4/include/linux/smp.h +=================================================================== +--- linux-3.4.orig/include/linux/smp.h ++++ linux-3.4/include/linux/smp.h +@@ -80,7 +80,6 @@ void __smp_call_function_single(int cpui int smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, void *info, int wait); @@ -81,11 +80,11 @@ index e6c58d8..94c8430 100644 /* * Generic and arch helpers */ -diff --git a/kernel/sched.c b/kernel/sched.c -index a5a4ddc..8ceb0af 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -6224,11 +6224,12 @@ static inline void sched_init_granularity(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -4976,11 +4976,12 @@ void __cpuinit init_idle(struct task_str #ifdef CONFIG_SMP void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -102,7 +101,7 @@ index a5a4ddc..8ceb0af 100644 } /* -@@ -6279,7 +6280,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) +@@ -5031,7 +5032,7 @@ int set_cpus_allowed_ptr(struct task_str do_set_cpus_allowed(p, new_mask); /* Can the task run on the task's current CPU? If so, we're done */ @@ -111,7 +110,7 @@ index a5a4ddc..8ceb0af 100644 goto out; dest_cpu = cpumask_any_and(cpu_active_mask, new_mask); -@@ -6298,6 +6299,83 @@ out: +@@ -5050,6 +5051,83 @@ out: } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); @@ -149,7 +148,7 @@ index a5a4ddc..8ceb0af 100644 + task_rq_unlock(rq, p, &flags); + preempt_enable(); +} -+EXPORT_SYMBOL_GPL(migrate_disable); ++EXPORT_SYMBOL(migrate_disable); + +void migrate_enable(void) +{ @@ -190,16 +189,16 @@ index a5a4ddc..8ceb0af 100644 + unpin_current_cpu(); + preempt_enable(); +} -+EXPORT_SYMBOL_GPL(migrate_enable); ++EXPORT_SYMBOL(migrate_enable); + /* * Move (not current) task off this cpu, onto dest cpu. We're doing * this because either it can't run here any more (set_cpus_allowed() -diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c -index 503f087..60a7569 100644 ---- a/lib/smp_processor_id.c -+++ b/lib/smp_processor_id.c -@@ -39,9 +39,9 @@ notrace unsigned int debug_smp_processor_id(void) +Index: linux-3.4/lib/smp_processor_id.c +=================================================================== +--- linux-3.4.orig/lib/smp_processor_id.c ++++ linux-3.4/lib/smp_processor_id.c +@@ -39,9 +39,9 @@ notrace unsigned int debug_smp_processor if (!printk_ratelimit()) goto out_enable; @@ -212,6 +211,3 @@ index 503f087..60a7569 100644 print_symbol("caller is %s\n", (long)__builtin_return_address(0)); dump_stack(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0143-sched-mmdrop-delayed.patch.patch b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch similarity index 69% rename from debian/patches/features/all/rt/0143-sched-mmdrop-delayed.patch.patch rename to debian/patches/features/all/rt/sched-mmdrop-delayed.patch index 77c3d832f..38c7e629d 100644 --- a/debian/patches/features/all/rt/0143-sched-mmdrop-delayed.patch.patch +++ b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch @@ -1,7 +1,6 @@ -From 1805ca21bb9a0b15cb8976b854d378ba78634575 Mon Sep 17 00:00:00 2001 +Subject: sched-mmdrop-delayed.patch From: Thomas Gleixner -Date: Mon, 6 Jun 2011 12:20:33 +0200 -Subject: [PATCH 143/267] sched-mmdrop-delayed.patch +Date: Mon, 06 Jun 2011 12:20:33 +0200 Needs thread context (pgd_lock) -> ifdeffed. workqueues wont work with RT @@ -11,13 +10,13 @@ Signed-off-by: Thomas Gleixner include/linux/mm_types.h | 4 ++++ include/linux/sched.h | 12 ++++++++++++ kernel/fork.c | 15 ++++++++++++++- - kernel/sched.c | 21 +++++++++++++++++++-- + kernel/sched/core.c | 21 +++++++++++++++++++-- 4 files changed, 49 insertions(+), 3 deletions(-) -diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 1ec126f..c303a27 100644 ---- a/include/linux/mm_types.h -+++ b/include/linux/mm_types.h +Index: linux-3.4/include/linux/mm_types.h +=================================================================== +--- linux-3.4.orig/include/linux/mm_types.h ++++ linux-3.4/include/linux/mm_types.h @@ -12,6 +12,7 @@ #include #include @@ -26,7 +25,7 @@ index 1ec126f..c303a27 100644 #include #include -@@ -393,6 +394,9 @@ struct mm_struct { +@@ -392,6 +393,9 @@ struct mm_struct { #ifdef CONFIG_CPUMASK_OFFSTACK struct cpumask cpumask_allocation; #endif @@ -36,11 +35,11 @@ index 1ec126f..c303a27 100644 }; static inline void mm_init_cpumask(struct mm_struct *mm) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index fb5e51f..e6f37ca 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -2268,12 +2268,24 @@ extern struct mm_struct * mm_alloc(void); +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -2324,12 +2324,24 @@ extern struct mm_struct * mm_alloc(void) /* mmdrop drops the mm and the page tables */ extern void __mmdrop(struct mm_struct *); @@ -65,11 +64,11 @@ index fb5e51f..e6f37ca 100644 /* mmput gets rid of the mappings and all user-space */ extern void mmput(struct mm_struct *); /* Grab a reference to a task's mm, if it is not already going away */ -diff --git a/kernel/fork.c b/kernel/fork.c -index fe49c39..78e5e6a 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -202,7 +202,7 @@ EXPORT_SYMBOL_GPL(__put_task_struct); +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(__put_task_struct); #else void __put_task_struct_cb(struct rcu_head *rhp) { @@ -78,7 +77,7 @@ index fe49c39..78e5e6a 100644 __put_task_struct(tsk); -@@ -553,6 +553,19 @@ void __mmdrop(struct mm_struct *mm) +@@ -572,6 +572,19 @@ void __mmdrop(struct mm_struct *mm) } EXPORT_SYMBOL_GPL(__mmdrop); @@ -98,12 +97,12 @@ index fe49c39..78e5e6a 100644 /* * Decrement the use count and release all resources for an mm. */ -diff --git a/kernel/sched.c b/kernel/sched.c -index 6e2bf9e..3ff2d0f 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -3174,8 +3174,12 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev) - finish_lock_switch(rq, prev); +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1934,8 +1934,12 @@ static void finish_task_switch(struct rq + finish_arch_post_lock_switch(); fire_sched_in_preempt_notifiers(current); + /* @@ -116,7 +115,7 @@ index 6e2bf9e..3ff2d0f 100644 if (unlikely(prev_state == TASK_DEAD)) { /* * Remove function-return probe instances associated with this -@@ -6303,6 +6307,8 @@ static int migration_cpu_stop(void *data) +@@ -5075,6 +5079,8 @@ static int migration_cpu_stop(void *data #ifdef CONFIG_HOTPLUG_CPU @@ -125,7 +124,7 @@ index 6e2bf9e..3ff2d0f 100644 /* * Ensures that the idle task is using init_mm right before its cpu goes * offline. -@@ -6315,7 +6321,12 @@ void idle_task_exit(void) +@@ -5087,7 +5093,12 @@ void idle_task_exit(void) if (mm != &init_mm) switch_mm(mm, &init_mm, current); @@ -139,7 +138,7 @@ index 6e2bf9e..3ff2d0f 100644 } /* -@@ -6660,6 +6671,12 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) +@@ -5408,6 +5419,12 @@ migration_call(struct notifier_block *nf migrate_nr_uninterruptible(rq); calc_global_load_remove(rq); break; @@ -152,6 +151,3 @@ index 6e2bf9e..3ff2d0f 100644 #endif } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0169-sched-rt-Fix-migrate_enable-thinko.patch b/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch similarity index 66% rename from debian/patches/features/all/rt/0169-sched-rt-Fix-migrate_enable-thinko.patch rename to debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch index 1a2aff775..23d5f38d0 100644 --- a/debian/patches/features/all/rt/0169-sched-rt-Fix-migrate_enable-thinko.patch +++ b/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch @@ -1,7 +1,6 @@ -From 7c7aa857c372f9d95c5493ecf3660c4819710371 Mon Sep 17 00:00:00 2001 +Subject: sched, rt: Fix migrate_enable() thinko From: Mike Galbraith Date: Tue, 23 Aug 2011 16:12:43 +0200 -Subject: [PATCH 169/267] sched, rt: Fix migrate_enable() thinko Assigning mask = tsk_cpus_allowed(p) after p->migrate_disable = 0 ensures that we won't see a mask change.. no push/pull, we stack tasks on one CPU. @@ -15,16 +14,17 @@ Cc: Paul E. McKenney Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1314108763.6689.4.camel@marge.simson.net Signed-off-by: Thomas Gleixner + --- - kernel/sched.c | 4 +++- - kernel/sched_debug.c | 7 +++++++ + kernel/sched/core.c | 4 +++- + kernel/sched/debug.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index eff6bbe2..3baf3de 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -6376,12 +6376,14 @@ void migrate_enable(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -5128,12 +5128,14 @@ void migrate_enable(void) */ rq = this_rq(); raw_spin_lock_irqsave(&rq->lock, flags); @@ -40,11 +40,11 @@ index eff6bbe2..3baf3de 100644 if (p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, mask); p->rt.nr_cpus_allowed = cpumask_weight(mask); -diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c -index a6710a1..528032b 100644 ---- a/kernel/sched_debug.c -+++ b/kernel/sched_debug.c -@@ -235,6 +235,9 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq) +Index: linux-3.4/kernel/sched/debug.c +=================================================================== +--- linux-3.4.orig/kernel/sched/debug.c ++++ linux-3.4/kernel/sched/debug.c +@@ -237,6 +237,9 @@ void print_rt_rq(struct seq_file *m, int P(rt_throttled); PN(rt_time); PN(rt_runtime); @@ -54,7 +54,7 @@ index a6710a1..528032b 100644 #undef PN #undef P -@@ -484,6 +487,10 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) +@@ -485,6 +488,10 @@ void proc_sched_show_task(struct task_st P(se.load.weight); P(policy); P(prio); @@ -65,6 +65,3 @@ index a6710a1..528032b 100644 #undef PN #undef __PN #undef P --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0144-sched-rt-mutex-wakeup.patch.patch b/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch similarity index 74% rename from debian/patches/features/all/rt/0144-sched-rt-mutex-wakeup.patch.patch rename to debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch index 2e4e55397..86dc1fb77 100644 --- a/debian/patches/features/all/rt/0144-sched-rt-mutex-wakeup.patch.patch +++ b/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch @@ -1,19 +1,18 @@ -From a0b8c6ebdaee8a3dd0a55d9df418aa28d0175d49 Mon Sep 17 00:00:00 2001 +Subject: sched-rt-mutex-wakeup.patch From: Thomas Gleixner Date: Sat, 25 Jun 2011 09:21:04 +0200 -Subject: [PATCH 144/267] sched-rt-mutex-wakeup.patch Signed-off-by: Thomas Gleixner --- include/linux/sched.h | 3 +++ - kernel/sched.c | 31 ++++++++++++++++++++++++++++++- + kernel/sched/core.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index e6f37ca..6c20349 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1072,6 +1072,7 @@ struct sched_domain; +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1109,6 +1109,7 @@ struct sched_domain; #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ #define WF_FORK 0x02 /* child wakeup after fork */ #define WF_MIGRATED 0x04 /* internal use, task got migrated */ @@ -21,7 +20,7 @@ index e6f37ca..6c20349 100644 #define ENQUEUE_WAKEUP 1 #define ENQUEUE_HEAD 2 -@@ -1221,6 +1222,7 @@ enum perf_event_task_context { +@@ -1264,6 +1265,7 @@ enum perf_event_task_context { struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ @@ -29,7 +28,7 @@ index e6f37ca..6c20349 100644 void *stack; atomic_t usage; unsigned int flags; /* per process flags, defined below */ -@@ -2178,6 +2180,7 @@ extern void xtime_update(unsigned long ticks); +@@ -2234,6 +2236,7 @@ extern void xtime_update(unsigned long t extern int wake_up_state(struct task_struct *tsk, unsigned int state); extern int wake_up_process(struct task_struct *tsk); @@ -37,11 +36,11 @@ index e6f37ca..6c20349 100644 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.c b/kernel/sched.c -index 3ff2d0f..f101d97 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -2827,8 +2827,25 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1586,8 +1586,25 @@ try_to_wake_up(struct task_struct *p, un smp_wmb(); raw_spin_lock_irqsave(&p->pi_lock, flags); @@ -68,7 +67,7 @@ index 3ff2d0f..f101d97 100644 success = 1; /* we're going to change ->state */ cpu = task_cpu(p); -@@ -2900,6 +2917,18 @@ int wake_up_process(struct task_struct *p) +@@ -1659,6 +1676,18 @@ int wake_up_process(struct task_struct * } EXPORT_SYMBOL(wake_up_process); @@ -87,6 +86,3 @@ index 3ff2d0f..f101d97 100644 int wake_up_state(struct task_struct *p, unsigned int state) { return try_to_wake_up(p, state, 0); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0170-sched-teach-migrate_disable-about-atomic-contexts.patch b/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch similarity index 70% rename from debian/patches/features/all/rt/0170-sched-teach-migrate_disable-about-atomic-contexts.patch rename to debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch index 8e1df1168..f1c3495c5 100644 --- a/debian/patches/features/all/rt/0170-sched-teach-migrate_disable-about-atomic-contexts.patch +++ b/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch @@ -1,7 +1,10 @@ -From 21b6c47d72b590a11b244f08804acb63ff44f1ee Mon Sep 17 00:00:00 2001 +Subject: sched: Teach migrate_disable about atomic contexts +From: Peter Zijlstra +Date: Fri, 02 Sep 2011 14:41:37 +0200 + +Subject: sched: teach migrate_disable about atomic contexts From: Peter Zijlstra -Date: Fri, 2 Sep 2011 14:29:27 +0200 -Subject: [PATCH 170/267] sched: teach migrate_disable about atomic contexts +Date: Fri Sep 02 14:29:27 CEST 2011 [] spin_bug+0x94/0xa8 [] do_raw_spin_lock+0x43/0xea @@ -31,14 +34,14 @@ Signed-off-by: Thomas Gleixner Link: http://lkml.kernel.org/n/tip-wbot4vsmwhi8vmbf83hsclk6@git.kernel.org --- include/linux/sched.h | 3 +++ - kernel/sched.c | 21 +++++++++++++++++++++ + kernel/sched/core.c | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 32e9e3f..af6cb0c 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1261,6 +1261,9 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1304,6 +1304,9 @@ struct task_struct { unsigned int policy; #ifdef CONFIG_PREEMPT_RT_FULL int migrate_disable; @@ -48,11 +51,11 @@ index 32e9e3f..af6cb0c 100644 #endif cpumask_t cpus_allowed; -diff --git a/kernel/sched.c b/kernel/sched.c -index 3baf3de..c26b1ba 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -6307,6 +6307,17 @@ void migrate_disable(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -5059,6 +5059,17 @@ void migrate_disable(void) unsigned long flags; struct rq *rq; @@ -70,7 +73,7 @@ index 3baf3de..c26b1ba 100644 preempt_disable(); if (p->migrate_disable) { p->migrate_disable++; -@@ -6355,6 +6366,16 @@ void migrate_enable(void) +@@ -5107,6 +5118,16 @@ void migrate_enable(void) unsigned long flags; struct rq *rq; @@ -87,6 +90,3 @@ index 3baf3de..c26b1ba 100644 WARN_ON_ONCE(p->migrate_disable <= 0); preempt_disable(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0154-sched-ttwu-Return-success-when-only-changing-the-sav.patch b/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch similarity index 67% rename from debian/patches/features/all/rt/0154-sched-ttwu-Return-success-when-only-changing-the-sav.patch rename to debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch index 4307513ed..9aeffde85 100644 --- a/debian/patches/features/all/rt/0154-sched-ttwu-Return-success-when-only-changing-the-sav.patch +++ b/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch @@ -1,8 +1,6 @@ -From d5d774d904f151d692b990315e6fb17cfcaedf01 Mon Sep 17 00:00:00 2001 +Subject: sched: ttwu: Return success when only changing the saved_state value From: Thomas Gleixner Date: Tue, 13 Dec 2011 21:42:19 +0100 -Subject: [PATCH 154/267] sched: ttwu: Return success when only changing the - saved_state value 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 @@ -17,14 +15,14 @@ that case as well. Signed-off-by: Thomas Gleixner Cc: stable-rt@vger.kernel.org --- - kernel/sched.c | 4 +++- + kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -diff --git a/kernel/sched.c b/kernel/sched.c -index 5b871cb..a5a4ddc 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -2834,8 +2834,10 @@ try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -1593,8 +1593,10 @@ try_to_wake_up(struct task_struct *p, un * if the wakeup condition is true. */ if (!(wake_flags & WF_LOCK_SLEEPER)) { @@ -36,6 +34,3 @@ index 5b871cb..a5a4ddc 100644 } goto out; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0249-scsi-fcoe-rt-aware.patch.patch b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch similarity index 65% rename from debian/patches/features/all/rt/0249-scsi-fcoe-rt-aware.patch.patch rename to debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch index 39350736f..c362cab91 100644 --- a/debian/patches/features/all/rt/0249-scsi-fcoe-rt-aware.patch.patch +++ b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch @@ -1,7 +1,6 @@ -From 9ced647b18ba69e9d435dfe720a7babb03da4707 Mon Sep 17 00:00:00 2001 +Subject: scsi-fcoe-rt-aware.patch From: Thomas Gleixner Date: Sat, 12 Nov 2011 14:00:48 +0100 -Subject: [PATCH 249/267] scsi-fcoe-rt-aware.patch Signed-off-by: Thomas Gleixner --- @@ -10,11 +9,11 @@ Signed-off-by: Thomas Gleixner 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 8d67467..4085187 100644 ---- a/drivers/scsi/fcoe/fcoe.c -+++ b/drivers/scsi/fcoe/fcoe.c -@@ -1156,7 +1156,7 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) +Index: linux-3.4/drivers/scsi/fcoe/fcoe.c +=================================================================== +--- linux-3.4.orig/drivers/scsi/fcoe/fcoe.c ++++ linux-3.4/drivers/scsi/fcoe/fcoe.c +@@ -1222,7 +1222,7 @@ static void fcoe_percpu_thread_destroy(u struct sk_buff *skb; #ifdef CONFIG_SMP struct fcoe_percpu_s *p0; @@ -23,7 +22,7 @@ index 8d67467..4085187 100644 #endif /* CONFIG_SMP */ FCOE_DBG("Destroying receive thread for CPU %d\n", cpu); -@@ -1212,7 +1212,7 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) +@@ -1278,7 +1278,7 @@ static void fcoe_percpu_thread_destroy(u kfree_skb(skb); spin_unlock_bh(&p->fcoe_rx_list.lock); } @@ -32,7 +31,7 @@ index 8d67467..4085187 100644 #else /* * This a non-SMP scenario where the singular Rx thread is -@@ -1435,11 +1435,11 @@ err2: +@@ -1494,11 +1494,11 @@ err2: static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) { struct fcoe_percpu_s *fps; @@ -47,7 +46,7 @@ index 8d67467..4085187 100644 return rc; } -@@ -1680,7 +1680,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) +@@ -1738,7 +1738,7 @@ static void fcoe_recv_frame(struct sk_bu */ hp = (struct fcoe_hdr *) skb_network_header(skb); @@ -56,7 +55,7 @@ index 8d67467..4085187 100644 if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { if (stats->ErrorFrames < 5) printk(KERN_WARNING "fcoe: FCoE version " -@@ -1712,13 +1712,13 @@ static void fcoe_recv_frame(struct sk_buff *skb) +@@ -1770,13 +1770,13 @@ static void fcoe_recv_frame(struct sk_bu goto drop; if (!fcoe_filter_frames(lport, fp)) { @@ -72,11 +71,11 @@ index 8d67467..4085187 100644 kfree_skb(skb); } -diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c -index e7522dc..bfb83c0 100644 ---- a/drivers/scsi/fcoe/fcoe_ctlr.c -+++ b/drivers/scsi/fcoe/fcoe_ctlr.c -@@ -719,7 +719,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) +Index: linux-3.4/drivers/scsi/fcoe/fcoe_ctlr.c +=================================================================== +--- linux-3.4.orig/drivers/scsi/fcoe/fcoe_ctlr.c ++++ linux-3.4/drivers/scsi/fcoe/fcoe_ctlr.c +@@ -719,7 +719,7 @@ static unsigned long fcoe_ctlr_age_fcfs( unsigned long sel_time = 0; struct fcoe_dev_stats *stats; @@ -85,7 +84,7 @@ index e7522dc..bfb83c0 100644 list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; -@@ -752,7 +752,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) +@@ -752,7 +752,7 @@ static unsigned long fcoe_ctlr_age_fcfs( sel_time = fcf->time; } } @@ -94,11 +93,11 @@ index e7522dc..bfb83c0 100644 if (sel_time && !fip->sel_fcf && !fip->sel_time) { sel_time += msecs_to_jiffies(FCOE_CTLR_START_DELAY); fip->sel_time = sel_time; -diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c -index 9de9db2..340998f 100644 ---- a/drivers/scsi/libfc/fc_exch.c -+++ b/drivers/scsi/libfc/fc_exch.c -@@ -724,10 +724,10 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, +Index: linux-3.4/drivers/scsi/libfc/fc_exch.c +=================================================================== +--- linux-3.4.orig/drivers/scsi/libfc/fc_exch.c ++++ linux-3.4/drivers/scsi/libfc/fc_exch.c +@@ -724,10 +724,10 @@ static struct fc_exch *fc_exch_em_alloc( } memset(ep, 0, sizeof(*ep)); @@ -111,6 +110,3 @@ index 9de9db2..340998f 100644 /* peek cache of free slot */ if (pool->left != FC_XID_UNKNOWN) { --- -1.7.10 - 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/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch new file mode 100644 index 000000000..eeb410698 --- /dev/null +++ b/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch @@ -0,0 +1,58 @@ +Subject: scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll +From: John Kacur +Date: Fri, 27 Apr 2012 12:48:46 +0200 + +RT triggers the following: + +[ 11.307652] [] __might_sleep+0xe7/0x110 +[ 11.307663] [] rt_spin_lock+0x24/0x60 +[ 11.307670] [] ? rt_spin_lock_slowunlock+0x78/0x90 +[ 11.307703] [] qla24xx_intr_handler+0x63/0x2d0 [qla2xxx] +[ 11.307736] [] qla2x00_poll+0x67/0x90 [qla2xxx] + +Function qla2x00_poll does local_irq_save() before calling qla24xx_intr_handler +which has a spinlock. Since spinlocks are sleepable on rt, it is not allowed +to call them with interrupts disabled. Therefore we use local_irq_save_nort() +instead which saves flags without disabling interrupts. + +This fix needs to be applied to v3.0-rt, v3.2-rt and v3.4-rt + +Suggested-by: Thomas Gleixner +Signed-off-by: John Kacur +Cc: Steven Rostedt +Cc: David Sommerseth +Link: http://lkml.kernel.org/r/1335523726-10024-1-git-send-email-jkacur@redhat.com +Cc: stable-rt@vger.kernel.org +Signed-off-by: Thomas Gleixner +--- + drivers/scsi/qla2xxx/qla_inline.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h +index 6e45764..28d9a8d 100644 +--- a/drivers/scsi/qla2xxx/qla_inline.h ++++ b/drivers/scsi/qla2xxx/qla_inline.h +@@ -36,12 +36,12 @@ qla2x00_poll(struct rsp_que *rsp) + { + unsigned long flags; + struct qla_hw_data *ha = rsp->hw; +- local_irq_save(flags); ++ local_irq_save_nort(flags); + if (IS_QLA82XX(ha)) + qla82xx_poll(0, rsp); + else + ha->isp_ops->intr_handler(0, rsp); +- local_irq_restore(flags); ++ local_irq_restore_nort(flags); + } + + static inline uint8_t * +-- +1.7.1 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + + diff --git a/debian/patches/features/all/rt/0253-seqlock-Prevent-rt-starvation.patch b/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch similarity index 80% rename from debian/patches/features/all/rt/0253-seqlock-Prevent-rt-starvation.patch rename to debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch index 0eca3550e..690490d2d 100644 --- a/debian/patches/features/all/rt/0253-seqlock-Prevent-rt-starvation.patch +++ b/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch @@ -1,7 +1,6 @@ -From 4d679adbfa52d738a7e72a71c5b63582c55fb487 Mon Sep 17 00:00:00 2001 +Subject: seqlock: Prevent rt starvation From: Thomas Gleixner Date: Wed, 22 Feb 2012 12:03:30 +0100 -Subject: [PATCH 253/267] seqlock: Prevent rt starvation If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. @@ -16,16 +15,17 @@ possible. Signed-off-by: Thomas Gleixner Cc: stable-rt@vger.kernel.org + --- - include/linux/seqlock.h | 55 ++++++++++++++++++++++++++++++++++++++--------- - include/net/neighbour.h | 2 +- + include/linux/seqlock.h | 55 +++++++++++++++++++++++++++++++++++++++--------- + include/net/neighbour.h | 2 - 2 files changed, 46 insertions(+), 11 deletions(-) -diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h -index 3e1f3f9..a1dbf48 100644 ---- a/include/linux/seqlock.h -+++ b/include/linux/seqlock.h -@@ -125,18 +125,30 @@ static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) +Index: linux-3.4/include/linux/seqlock.h +=================================================================== +--- linux-3.4.orig/include/linux/seqlock.h ++++ linux-3.4/include/linux/seqlock.h +@@ -125,18 +125,30 @@ static inline int read_seqcount_retry(co * Sequence counter only version assumes that callers are using their * own mutexing. */ @@ -92,7 +92,7 @@ index 3e1f3f9..a1dbf48 100644 static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start) { -@@ -195,36 +230,36 @@ static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start) +@@ -195,36 +230,36 @@ static inline unsigned read_seqretry(con static inline void write_seqlock(seqlock_t *sl) { spin_lock(&sl->lock); @@ -135,7 +135,7 @@ index 3e1f3f9..a1dbf48 100644 spin_unlock_irq(&sl->lock); } -@@ -233,7 +268,7 @@ static inline unsigned long __write_seqlock_irqsave(seqlock_t *sl) +@@ -233,7 +268,7 @@ static inline unsigned long __write_seql unsigned long flags; spin_lock_irqsave(&sl->lock, flags); @@ -144,7 +144,7 @@ index 3e1f3f9..a1dbf48 100644 return flags; } -@@ -243,7 +278,7 @@ static inline unsigned long __write_seqlock_irqsave(seqlock_t *sl) +@@ -243,7 +278,7 @@ static inline unsigned long __write_seql static inline void write_sequnlock_irqrestore(seqlock_t *sl, unsigned long flags) { @@ -153,11 +153,11 @@ index 3e1f3f9..a1dbf48 100644 spin_unlock_irqrestore(&sl->lock, flags); } -diff --git a/include/net/neighbour.h b/include/net/neighbour.h -index 2720884..6fda9fa 100644 ---- a/include/net/neighbour.h -+++ b/include/net/neighbour.h -@@ -385,7 +385,7 @@ struct neighbour_cb { +Index: linux-3.4/include/net/neighbour.h +=================================================================== +--- linux-3.4.orig/include/net/neighbour.h ++++ linux-3.4/include/net/neighbour.h +@@ -394,7 +394,7 @@ struct neighbour_cb { #define NEIGH_CB(skb) ((struct neighbour_cb *)(skb)->cb) @@ -166,6 +166,3 @@ index 2720884..6fda9fa 100644 const struct net_device *dev) { unsigned int seq; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0019-seqlock-Remove-unused-functions.patch b/debian/patches/features/all/rt/seqlock-remove-unused-functions.patch similarity index 68% rename from debian/patches/features/all/rt/0019-seqlock-Remove-unused-functions.patch rename to debian/patches/features/all/rt/seqlock-remove-unused-functions.patch index d02843ae5..367dfeb18 100644 --- a/debian/patches/features/all/rt/0019-seqlock-Remove-unused-functions.patch +++ b/debian/patches/features/all/rt/seqlock-remove-unused-functions.patch @@ -1,18 +1,17 @@ -From 5e0436d075a54bc63fa9e48a160ca9df12ff9b77 Mon Sep 17 00:00:00 2001 +Subject: seqlock: Remove unused functions From: Thomas Gleixner Date: Sat, 16 Jul 2011 18:38:22 +0200 -Subject: [PATCH 019/267] seqlock: Remove unused functions Signed-off-by: Thomas Gleixner --- include/linux/seqlock.h | 21 --------------------- 1 file changed, 21 deletions(-) -diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h -index c6db9fb..b990f6e 100644 ---- a/include/linux/seqlock.h -+++ b/include/linux/seqlock.h -@@ -69,17 +69,6 @@ static inline void write_sequnlock(seqlock_t *sl) +Index: linux-3.4/include/linux/seqlock.h +=================================================================== +--- linux-3.4.orig/include/linux/seqlock.h ++++ linux-3.4/include/linux/seqlock.h +@@ -69,17 +69,6 @@ static inline void write_sequnlock(seqlo spin_unlock(&sl->lock); } @@ -30,7 +29,7 @@ index c6db9fb..b990f6e 100644 /* Start of read calculation -- fetch last complete writer token */ static __always_inline unsigned read_seqbegin(const seqlock_t *sl) { -@@ -248,14 +237,4 @@ static inline void write_seqcount_barrier(seqcount_t *s) +@@ -248,14 +237,4 @@ static inline void write_seqcount_barrie #define write_sequnlock_bh(lock) \ do { write_sequnlock(lock); local_bh_enable(); } while(0) @@ -45,6 +44,3 @@ index c6db9fb..b990f6e 100644 - }) - #endif /* __LINUX_SEQLOCK_H */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0020-seqlock-Use-seqcount.patch b/debian/patches/features/all/rt/seqlock-use-seqcount.patch similarity index 91% rename from debian/patches/features/all/rt/0020-seqlock-Use-seqcount.patch rename to debian/patches/features/all/rt/seqlock-use-seqcount.patch index b6f53db21..3a292534e 100644 --- a/debian/patches/features/all/rt/0020-seqlock-Use-seqcount.patch +++ b/debian/patches/features/all/rt/seqlock-use-seqcount.patch @@ -1,19 +1,18 @@ -From cc961dbd2fbdd830c4ba4162c7116d354dfcb13f Mon Sep 17 00:00:00 2001 +Subject: seqlock: Use seqcount From: Thomas Gleixner Date: Sat, 16 Jul 2011 18:40:26 +0200 -Subject: [PATCH 020/267] seqlock: Use seqcount No point in having different implementations for the same thing. Signed-off-by: Thomas Gleixner --- - include/linux/seqlock.h | 176 +++++++++++++++++++++++++---------------------- + include/linux/seqlock.h | 176 +++++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 83 deletions(-) -diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h -index b990f6e..3e1f3f9 100644 ---- a/include/linux/seqlock.h -+++ b/include/linux/seqlock.h +Index: linux-3.4/include/linux/seqlock.h +=================================================================== +--- linux-3.4.orig/include/linux/seqlock.h ++++ linux-3.4/include/linux/seqlock.h @@ -30,81 +30,12 @@ #include #include @@ -96,7 +95,7 @@ index b990f6e..3e1f3f9 100644 typedef struct seqcount { unsigned sequence; } seqcount_t; -@@ -186,7 +117,6 @@ static inline int __read_seqcount_retry(const seqcount_t *s, unsigned start) +@@ -186,7 +117,6 @@ static inline int __read_seqcount_retry( static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) { smp_rmb(); @@ -104,7 +103,7 @@ index b990f6e..3e1f3f9 100644 return __read_seqcount_retry(s, start); } -@@ -220,21 +150,101 @@ static inline void write_seqcount_barrier(seqcount_t *s) +@@ -220,21 +150,101 @@ static inline void write_seqcount_barrie s->sequence+=2; } @@ -219,6 +218,3 @@ index b990f6e..3e1f3f9 100644 +} #endif /* __LINUX_SEQLOCK_H */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/series b/debian/patches/features/all/rt/series index 1bb2c96d4..eddd67e16 100644 --- a/debian/patches/features/all/rt/series +++ b/debian/patches/features/all/rt/series @@ -1,267 +1,590 @@ -0001-x86-Call-idle-notifier-after-irq_enter.patch -0002-slab-lockdep-Annotate-all-slab-caches.patch -0003-x86-kprobes-Remove-remove-bogus-preempt_enable.patch -0004-x86-hpet-Disable-MSI-on-Lenovo-W510.patch -0005-block-Shorten-interrupt-disabled-regions.patch -0006-sched-Distangle-worker-accounting-from-rq-3Elock.patch -0007-mips-enable-interrupts-in-signal.patch.patch -0008-arm-enable-interrupts-in-signal-code.patch.patch -0009-powerpc-85xx-Mark-cascade-irq-IRQF_NO_THREAD.patch -0010-powerpc-wsp-Mark-opb-cascade-handler-IRQF_NO_THREAD.patch -0011-powerpc-Mark-IPI-interrupts-IRQF_NO_THREAD.patch -0012-powerpc-Allow-irq-threading.patch -0013-sched-Keep-period-timer-ticking-when-throttling-acti.patch -0014-sched-Do-not-throttle-due-to-PI-boosting.patch -0015-time-Remove-bogus-comments.patch -0016-x86-vdso-Remove-bogus-locking-in-update_vsyscall_tz.patch -0017-x86-vdso-Use-seqcount-instead-of-seqlock.patch -0018-ia64-vsyscall-Use-seqcount-instead-of-seqlock.patch -0019-seqlock-Remove-unused-functions.patch -0020-seqlock-Use-seqcount.patch -0021-vfs-fs_struct-Move-code-out-of-seqcount-write-sectio.patch -0022-timekeeping-Split-xtime_lock.patch -0023-intel_idle-Convert-i7300_idle_lock-to-raw-spinlock.patch -0024-mm-memcg-shorten-preempt-disabled-section-around-eve.patch -0025-tracing-Account-for-preempt-off-in-preempt_schedule.patch -0026-signal-revert-ptrace-preempt-magic.patch.patch -0027-arm-Mark-pmu-interupt-IRQF_NO_THREAD.patch -0028-arm-Allow-forced-irq-threading.patch -0029-preempt-rt-Convert-arm-boot_lock-to-raw.patch -0030-sched-Create-schedule_preempt_disabled.patch -0031-sched-Use-schedule_preempt_disabled.patch -0032-signals-Do-not-wakeup-self.patch -0033-posix-timers-Prevent-broadcast-signals.patch -0034-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch -0035-signal-x86-Delay-calling-signals-in-atomic.patch -0036-generic-Use-raw-local-irq-variant-for-generic-cmpxch.patch -0037-drivers-random-Reduce-preempt-disabled-region.patch -0038-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch -0039-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch -0040-drivers-net-tulip_remove_one-needs-to-call-pci_disab.patch -0041-drivers-net-Use-disable_irq_nosync-in-8139too.patch -0042-drivers-net-ehea-Make-rx-irq-handler-non-threaded-IR.patch -0043-drivers-net-at91_ether-Make-mdio-protection-rt-safe.patch -0044-preempt-mark-legitimated-no-resched-sites.patch.patch -0045-mm-Prepare-decoupling-the-page-fault-disabling-logic.patch -0046-mm-Fixup-all-fault-handlers-to-check-current-pagefau.patch -0047-mm-pagefault_disabled.patch -0048-mm-raw_pagefault_disable.patch -0049-filemap-fix-up.patch.patch -0050-mm-Remove-preempt-count-from-pagefault-disable-enabl.patch -0051-x86-highmem-Replace-BUG_ON-by-WARN_ON.patch -0052-suspend-Prevent-might-sleep-splats.patch -0053-OF-Fixup-resursive-locking-code-paths.patch -0054-of-convert-devtree-lock.patch.patch -0055-list-add-list-last-entry.patch.patch -0056-mm-page-alloc-use-list-last-entry.patch.patch -0057-mm-slab-move-debug-out.patch.patch -0058-rwsem-inlcude-fix.patch.patch -0059-sysctl-include-fix.patch.patch -0060-net-flip-lock-dep-thingy.patch.patch -0061-softirq-thread-do-softirq.patch.patch -0062-softirq-split-out-code.patch.patch -0063-x86-Do-not-unmask-io_apic-when-interrupt-is-in-progr.patch -0064-x86-32-fix-signal-crap.patch.patch -0065-x86-Do-not-disable-preemption-in-int3-on-32bit.patch -0066-rcu-Reduce-lock-section.patch -0067-locking-various-init-fixes.patch.patch -0068-wait-Provide-__wake_up_all_locked.patch -0069-pci-Use-__wake_up_all_locked-pci_unblock_user_cfg_ac.patch -0070-latency-hist.patch.patch -0071-hwlatdetect.patch.patch -0072-localversion.patch.patch -0073-early-printk-consolidate.patch.patch -0074-printk-kill.patch.patch -0075-printk-force_early_printk-boot-param-to-help-with-de.patch -0076-rt-preempt-base-config.patch.patch -0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch -0078-rt-local_irq_-variants-depending-on-RT-RT.patch -0079-preempt-Provide-preempt_-_-no-rt-variants.patch -0080-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch -0081-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch -0082-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch -0083-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch -0084-acpi-Do-not-disable-interrupts-on-PREEMPT_RT.patch -0085-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch -0086-core-Do-not-disable-interrupts-on-RT-in-res_counter..patch -0087-usb-Use-local_irq_-_nort-variants.patch -0088-tty-Do-not-disable-interrupts-in-put_ldisc-on-rt.patch -0089-mm-scatterlist-dont-disable-irqs-on-RT.patch -0090-signal-fix-up-rcu-wreckage.patch.patch -0091-net-wireless-warn-nort.patch.patch -0092-mm-Replace-cgroup_page-bit-spinlock.patch -0093-buffer_head-Replace-bh_uptodate_lock-for-rt.patch -0094-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch -0095-genirq-Disable-DEBUG_SHIRQ-for-rt.patch -0096-genirq-Disable-random-call-on-preempt-rt.patch -0097-genirq-disable-irqpoll-on-rt.patch -0098-genirq-force-threading.patch.patch -0099-drivers-net-fix-livelock-issues.patch -0100-drivers-net-vortex-fix-locking-issues.patch -0101-drivers-net-gianfar-Make-RT-aware.patch -0102-USB-Fix-the-mouse-problem-when-copying-large-amounts.patch -0103-local-var.patch.patch -0104-rt-local-irq-lock.patch.patch -0105-cpu-rt-variants.patch.patch -0106-mm-slab-wrap-functions.patch.patch -0107-slab-Fix-__do_drain-to-use-the-right-array-cache.patch -0108-mm-More-lock-breaks-in-slab.c.patch -0109-mm-page_alloc-rt-friendly-per-cpu-pages.patch -0110-mm-page_alloc-reduce-lock-sections-further.patch -0111-mm-page-alloc-fix.patch.patch -0112-mm-convert-swap-to-percpu-locked.patch -0113-mm-vmstat-fix-the-irq-lock-asymetry.patch.patch -0114-mm-make-vmstat-rt-aware.patch -0115-mm-shrink-the-page-frame-to-rt-size.patch -0116-ARM-Initialize-ptl-lock-for-vector-page.patch -0117-mm-Allow-only-slab-on-RT.patch -0118-radix-tree-rt-aware.patch.patch -0119-panic-disable-random-on-rt.patch -0120-ipc-Make-the-ipc-code-rt-aware.patch -0121-ipc-mqueue-Add-a-critical-section-to-avoid-a-deadloc.patch -0122-relay-fix-timer-madness.patch -0123-net-ipv4-route-use-locks-on-up-rt.patch.patch -0124-workqueue-avoid-the-lock-in-cpu-dying.patch.patch -0125-timers-prepare-for-full-preemption.patch -0126-timers-preempt-rt-support.patch -0127-timers-fix-timer-hotplug-on-rt.patch -0128-timers-mov-printk_tick-to-soft-interrupt.patch -0129-timer-delay-waking-softirqs-from-the-jiffy-tick.patch -0130-timers-Avoid-the-switch-timers-base-set-to-NULL-tric.patch -0131-printk-Don-t-call-printk_tick-in-printk_needs_cpu-on.patch -0132-hrtimers-prepare-full-preemption.patch -0133-hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch -0134-hrtimer-Don-t-call-the-timer-handler-from-hrtimer_st.patch -0135-hrtimer-Add-missing-debug_activate-aid-Was-Re-ANNOUN.patch -0136-hrtimer-fix-reprogram-madness.patch.patch -0137-timer-fd-Prevent-live-lock.patch -0138-posix-timers-thread-posix-cpu-timers-on-rt.patch -0139-posix-timers-Shorten-posix_cpu_timers-CPU-kernel-thr.patch -0140-posix-timers-Avoid-wakeups-when-no-timers-are-active.patch -0141-sched-delay-put-task.patch.patch -0142-sched-limit-nr-migrate.patch.patch -0143-sched-mmdrop-delayed.patch.patch -0144-sched-rt-mutex-wakeup.patch.patch -0145-sched-prevent-idle-boost.patch.patch -0146-sched-might-sleep-do-not-account-rcu-depth.patch.patch -0147-sched-Break-out-from-load_balancing-on-rq_lock-conte.patch -0148-sched-cond-resched.patch.patch -0149-cond-resched-softirq-fix.patch.patch -0150-sched-no-work-when-pi-blocked.patch.patch -0151-cond-resched-lock-rt-tweak.patch.patch -0152-sched-disable-ttwu-queue.patch.patch -0153-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch -0154-sched-ttwu-Return-success-when-only-changing-the-sav.patch -0155-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch -0156-stomp-machine-mark-stomper-thread.patch.patch -0157-stomp-machine-raw-lock.patch.patch -0158-hotplug-Lightweight-get-online-cpus.patch -0159-hotplug-sync_unplug-No.patch -0160-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch -0161-sched-migrate-disable.patch.patch -0162-hotplug-use-migrate-disable.patch.patch -0163-hotplug-Call-cpu_unplug_begin-before-DOWN_PREPARE.patch -0164-ftrace-migrate-disable-tracing.patch.patch -0165-tracing-Show-padding-as-unsigned-short.patch -0166-migrate-disable-rt-variant.patch.patch -0167-sched-Optimize-migrate_disable.patch -0168-sched-Generic-migrate_disable.patch -0169-sched-rt-Fix-migrate_enable-thinko.patch -0170-sched-teach-migrate_disable-about-atomic-contexts.patch -0171-sched-Postpone-actual-migration-disalbe-to-schedule.patch -0172-sched-Do-not-compare-cpu-masks-in-scheduler.patch -0173-sched-Have-migrate_disable-ignore-bounded-threads.patch -0174-sched-clear-pf-thread-bound-on-fallback-rq.patch.patch -0175-ftrace-crap.patch.patch -0176-ring-buffer-Convert-reader_lock-from-raw_spin_lock-i.patch -0177-net-netif_rx_ni-migrate-disable.patch.patch -0178-softirq-Sanitize-softirq-pending-for-NOHZ-RT.patch -0179-lockdep-rt.patch.patch -0180-mutex-no-spin-on-rt.patch.patch -0181-softirq-local-lock.patch.patch -0182-softirq-Export-in_serving_softirq.patch -0183-hardirq.h-Define-softirq_count-as-OUL-to-kill-build-.patch -0184-softirq-Fix-unplug-deadlock.patch -0185-softirq-disable-softirq-stacks-for-rt.patch.patch -0186-softirq-make-fifo.patch.patch -0187-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch -0188-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch -0189-local-vars-migrate-disable.patch.patch -0190-md-raid5-Make-raid5_percpu-handling-RT-aware.patch -0191-rtmutex-lock-killable.patch.patch -0192-rtmutex-futex-prepare-rt.patch.patch -0193-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch -0194-rt-mutex-add-sleeping-spinlocks-support.patch.patch -0195-spinlock-types-separate-raw.patch.patch -0196-rtmutex-avoid-include-hell.patch.patch -0197-rt-add-rt-spinlocks.patch.patch -0198-rt-add-rt-to-mutex-headers.patch.patch -0199-rwsem-add-rt-variant.patch.patch -0200-rt-Add-the-preempt-rt-lock-replacement-APIs.patch -0201-rwlocks-Fix-section-mismatch.patch -0202-timer-handle-idle-trylock-in-get-next-timer-irq.patc.patch -0203-RCU-Force-PREEMPT_RCU-for-PREEMPT-RT.patch -0204-rcu-Frob-softirq-test.patch -0205-rcu-Merge-RCU-bh-into-RCU-preempt.patch -0206-rcu-Fix-macro-substitution-for-synchronize_rcu_bh-on.patch -0207-rcu-more-fallout.patch.patch -0208-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch -0209-rt-rcutree-Move-misplaced-prototype.patch -0210-lglocks-rt.patch.patch -0211-serial-8250-Clean-up-the-locking-for-rt.patch -0212-serial-8250-Call-flush_to_ldisc-when-the-irq-is-thre.patch -0213-drivers-tty-fix-omap-lock-crap.patch.patch -0214-rt-Improve-the-serial-console-PASS_LIMIT.patch -0215-fs-namespace-preemption-fix.patch -0216-mm-protect-activate-switch-mm.patch.patch -0217-fs-block-rt-support.patch.patch -0218-fs-ntfs-disable-interrupt-only-on-RT.patch -0219-x86-Convert-mce-timer-to-hrtimer.patch -0220-x86-stackprotector-Avoid-random-pool-on-rt.patch -0221-x86-Use-generic-rwsem_spinlocks-on-rt.patch -0222-x86-Disable-IST-stacks-for-debug-int-3-stack-fault-f.patch -0223-workqueue-use-get-cpu-light.patch.patch -0224-epoll.patch.patch -0225-mm-vmalloc.patch.patch -0226-workqueue-Fix-cpuhotplug-trainwreck.patch -0227-workqueue-Fix-PF_THREAD_BOUND-abuse.patch -0228-workqueue-Use-get_cpu_light-in-flush_gcwq.patch -0229-hotplug-stuff.patch.patch -0230-debugobjects-rt.patch.patch -0231-jump-label-rt.patch.patch -0232-skbufhead-raw-lock.patch.patch -0233-x86-no-perf-irq-work-rt.patch.patch -0234-console-make-rt-friendly.patch.patch -0235-printk-Disable-migration-instead-of-preemption.patch -0236-power-use-generic-rwsem-on-rt.patch -0237-power-disable-highmem-on-rt.patch.patch -0238-arm-disable-highmem-on-rt.patch.patch -0239-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch -0240-mips-disable-highmem-on-rt.patch.patch -0241-net-Avoid-livelock-in-net_tx_action-on-RT.patch -0242-ping-sysrq.patch.patch -0243-kgdb-serial-Short-term-workaround.patch -0244-add-sys-kernel-realtime-entry.patch -0245-mm-rt-kmap_atomic-scheduling.patch -0246-ipc-sem-Rework-semaphore-wakeups.patch -0247-sysrq-Allow-immediate-Magic-SysRq-output-for-PREEMPT.patch -0248-x86-kvm-require-const-tsc-for-rt.patch.patch -0249-scsi-fcoe-rt-aware.patch.patch -0250-x86-crypto-Reduce-preempt-disabled-regions.patch -0251-dm-Make-rt-aware.patch -0252-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch -0253-seqlock-Prevent-rt-starvation.patch -0254-timer-Fix-hotplug-for-rt.patch -0255-futex-rt-Fix-possible-lockup-when-taking-pi_lock-in-.patch -0256-ring-buffer-rt-Check-for-irqs-disabled-before-grabbi.patch -0257-sched-rt-Fix-wait_task_interactive-to-test-rt_spin_l.patch -0258-lglock-rt-Use-non-rt-for_each_cpu-in-rt-code.patch -0259-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch -0260-softirq-Check-preemption-after-reenabling-interrupts.patch -0261-rt-Introduce-cpu_chill.patch -0262-fs-dcache-Use-cpu_chill-in-trylock-loops.patch -0263-net-Use-cpu_chill-instead-of-cpu_relax.patch -0264-kconfig-disable-a-few-options-rt.patch.patch -0265-kconfig-preempt-rt-full.patch.patch -0266-rt-Make-migrate_disable-enable-and-__rt_mutex_init-n.patch -0267-Linux-3.2.16-rt27-REBASE.patch +########################################################### +# DELTA against a known Linus release (3.2.5) +########################################################### + +############################################################ +# UPSTREAM changes queued for 3.3 or 3.2 +############################################################ +re-possible-slab-deadlock-while-doing-ifenslave-1.patch + +# Should go to stable 3.0.x! + +############################################################ +# UPSTREAM FIXES, patches pending +############################################################ +# rtc-deal-with-errors-correctly.patch -- 3.0.1 +# rtc-fix-hrtimer-deadlock.patch -- 3.0.1 +# rtc-limit-frequency.patch -- 3.0.1 + +# Some variant of this is in 3.1 + +############################################################ +# Stuff broken upstream, patches submitted +############################################################ +x86-kprobes-remove-bogus-preempt-enable.patch + +############################################################ +# Stuff which needs addressing upstream, but requires more +# information +############################################################ +tick-skew.patch +x86-hpet-disable-msi-on-lenovo-w510.patch + +############################################################ +# Stuff broken upstream, need to be sent +############################################################ + +############################################################ +# Submitted on LKML +############################################################ +# SCHED BLOCK/WQ +block-shorten-interrupt-disabled-regions.patch +sched-distangle-worker-accounting-from-rq-3elock.patch + +############################################################ +# Submitted to mips ML +############################################################ +mips-enable-interrupts-in-signal.patch + +############################################################ +# Submitted to ARM ML +############################################################ +arm-enable-interrupts-in-signal-code.patch + +############################################################ +# Submitted on LKML +############################################################ + +# JBD + +# SCHED + +############################################################ +# Submitted on ppc-devel +############################################################ + +############################################################ +# Submitted to net-dev +############################################################ + +############################################################ +# Pending in tip +############################################################ + +# WATCHDOG + +# CLOCKSOURCE + +# RTMUTEX CLEANUP + +# RAW SPINLOCKS + +# X86 + +############################################################ +# Pending in peterz's scheduler queue +############################################################ + + +############################################################ +# Stuff which should go upstream ASAP +############################################################ + +# Timekeeping / VDSO + +# SEQLOCK +seqlock-remove-unused-functions.patch +seqlock-use-seqcount.patch +#seqlock-provide-seq-spin-lock.patch +#fs-struct-use-seqlock.patch +#fs-dentry-use-seqlock.patch + +# VFS. Al Viro provided this so we can deal with the seqcount simpler + +# RAW SPINLOCKS +timekeeping-split-xtime-lock.patch +intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch + +# MM memcg + +# Tracing +tracing-account-for-preempt-off-in-preempt_schedule.patch + +# PTRACE/SIGNAL crap +signal-revert-ptrace-preempt-magic.patch + +# ARM IRQF_NO_TRHEAD / IRQ THREADING SUPPORT +arm-mark-pmu-interupt-no-thread.patch +arm-allow-irq-threading.patch +arm-convert-boot-lock-to-raw.patch + +# PREEMPT_ENABLE_NO_RESCHED + +# SIGNALS / POSIXTIMERS +arm-omap-make-wakeupgen_lock-raw.patch +signals-do-not-wake-self.patch +posix-timers-no-broadcast.patch +signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch +oleg-signal-rt-fix.patch + +# SCHED + +# GENERIC CMPXCHG +generic-cmpxchg-use-raw-local-irq.patch + +# SHORTEN PREEMPT DISABLED +drivers-random-reduce-preempt-disabled-region.patch + +# CLOCKSOURCE +arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch +clocksource-tclib-allow-higher-clockrates.patch + +# HW LATENCY DETECTOR - this really wants a rewrite +#hw-latency-detector.patch + +# DRIVERS NET +drivers-net-tulip-add-missing-pci-disable.patch +drivers-net-8139-disable-irq-nosync.patch +drivers-net-ehea-mark-rx-irq-no-thread.patch +drivers-net-at91-make-mdio-protection-rt-safe.patch + +# PREEMPT + +# PAGEFAULT DISABLE +mm-prepare-pf-disable-discoupling.patch +arch-use-pagefault-disabled.patch +peter_zijlstra-frob-pagefault_disable.patch +peterz-raw_pagefault_disable.patch +# highmem-explicitly-disable-preemption.patch -- peterz +filemap-fix-up.patch +mm-remove-preempt-count-from-pf.patch + +# HIGHMEM +x86-highmem-warn.patch + +# PM +suspend-prevernt-might-sleep-splats.patch + +# DEVICE TREE +of-fixup-recursive-locking.patch +of-convert-devtree-lock.patch + +# MM/LISTS +list-add-list-last-entry.patch +mm-page-alloc-use-list-last-entry.patch +mm-slab-move-debug-out.patch + +# INCLUDE MESS +pid-h-include-atomic-h.patch +sysctl-include-atomic-h.patch + +# NETWORKING +net-flip-lock-dep-thingy.patch + +# SOFTIRQ +softirq-thread-do-softirq.patch +softirq-split-out-code.patch + +# X86 +x86-io-apic-migra-no-unmask.patch +fix-rt-int3-x86_32-3.2-rt.patch + +# RCU + +# LOCKING INIT FIXES +locking-various-init-fixes.patch +# rtc-tegra-lock-init.patch -- 3.0.1 + +# PCI +pci-access-use-__wake_up_all_locked.patch + +##################################################### +# Stuff which should go mainline, but wants some care +##################################################### + +# SEQLOCK + +# ANON RW SEMAPHORES + +# TRACING +latency-hist.patch + +# HW latency detector +hwlatdetect.patch + +################################################## +# REAL RT STUFF starts here +################################################## + +# Add RT to version +localversion.patch + +# PRINTK +early-printk-consolidate.patch +printk-kill.patch +printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch + +# BASE RT CONFIG +rt-preempt-base-config.patch + +# WARN/BUG_ON_RT +bug-rt-dependend-variants.patch + +# LOCAL_IRQ_RT/NON_RT +local-irq-rt-depending-variants.patch + +# PREEMPT NORT +preempt-nort-rt-variants.patch + +# ANNOTATE local_irq_disable sites +ata-disable-interrupts-if-non-rt.patch +ide-use-nort-local-irq-variants.patch +infiniband-mellanox-ib-use-nort-irq.patch +inpt-gameport-use-local-irq-nort.patch +acpi-use-local-irq-nort.patch +user-use-local-irq-nort.patch +resource-counters-use-localirq-nort.patch +usb-hcd-use-local-irq-nort.patch +tty-use-local-irq-nort.patch +mm-scatterlist-dont-disable-irqs-on-RT.patch + +# Sigh +signal-fix-up-rcu-wreckage.patch + +# ANNOTATE BUG/WARNON +net-wireless-warn-nort.patch + +# BIT SPINLOCKS - SIGH +mm-cgroup-page-bit-spinlock.patch +fs-replace-bh_uptodate_lock-for-rt.patch +fs-jbd-replace-bh_state-lock.patch + +# GENIRQ +genirq-nodebug-shirq.patch +genirq-disable-random-call-on-preempt-rt.patch +genirq-disable-irqpoll-on-rt.patch +genirq-force-threading.patch + +# DRIVERS NET +drivers-net-fix-livelock-issues.patch +drivers-net-vortex-fix-locking-issues.patch +drivers-net-gianfar-make-rt-aware.patch + +# DRIVERS USB +# Revisit. Looks weird +#usb-rt-support.patch +usb-fix-mouse-problem-copying-large-data.patch + +# LOCAL_IRQ_LOCKS +local-var.patch +rt-local-irq-lock.patch +cpu-rt-variants.patch + +# MM SLAB +mm-slab-wrap-functions.patch +rt-slab-fix-__do_drain-to-use-the-right-array-cache.patch +mm-slab-more-lock-breaks.patch + +# MM PAGE_ALLOC +mm-page_alloc-rt-friendly-per-cpu-pages.patch +mm-page_alloc-reduce-lock-sections-further.patch +mm-page-alloc-fix.patch + +# MM SWAP +mm-convert-swap-to-percpu-locked.patch + +# MM vmstat +mm-make-vmstat-rt-aware.patch + +# MM memory +#mm-memory-rt.patch - ZAP... is unused +mm-shrink-the-page-frame-to-rt-size.patch +re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch + +# MM SLAB only +mm-allow-slab-rt.patch + +# Revisit for avr/frv/ia64/mn10300/sh/sparc ... +#mm-quicklists-percpu-locked.patch + +# RADIX TREE +radix-tree-rt-aware.patch + +# PANIC +panic-disable-random-on-rt.patch + +# IPC +ipc-make-rt-aware.patch +ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch + +# RELAY +relay-fix-timer-madness.patch + +# NETWORKING +net-ipv4-route-use-locks-on-up-rt.patch + +# WORKQUEUE SIGH +workqueue-avoid-the-lock-in-cpu-dying.patch + +# TIMERS +timers-prepare-for-full-preemption.patch +timers-preempt-rt-support.patch +timers-fix-timer-hotplug-on-rt.patch +timers-mov-printk_tick-to-soft-interrupt.patch +timer-delay-waking-softirqs-from-the-jiffy-tick.patch +timers-avoid-the-base-null-otptimization-on-rt.patch + +# More PRINTK +rfc-printk-don-27t-call-printk_tick-in-printk_needs_cpu.patch + +# HRTIMERS +hrtimers-prepare-full-preemption.patch +hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch +peter_zijlstra-frob-hrtimer.patch +hrtimer-add-missing-debug_activate-aid-was-re-announce-3-0-6-rt17.patch +hrtimer-fix-reprogram-madness.patch +timer-fd-avoid-live-lock.patch + +# POSIX-CPU-TIMERS +posix-timers-thread-posix-cpu-timers-on-rt.patch +posix-timers-shorten-cpu-timers-thread.patch +posix-timers-avoid-wakeups-when-no-timers-are-active.patch + +# SCHEDULER +sched-delay-put-task.patch +sched-limit-nr-migrate.patch +sched-mmdrop-delayed.patch +sched-rt-mutex-wakeup.patch +sched-might-sleep-do-not-account-rcu-depth.patch +# CHECKME sched-load-balance-break-on-rq-contention.patch +sched-cond-resched.patch +cond-resched-softirq-rt.patch +cond-resched-lock-rt-tweak.patch +sched-disable-ttwu-queue.patch +sched-disable-rt-group-sched-on-rt.patch +sched-ttwu-ensure-success-return-is-correct.patch + +# STOP MACHINE +stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch +stomp-machine-mark-stomper-thread.patch +stomp-machine-raw-lock.patch + +# MIGRATE DISABLE AND PER CPU +hotplug-light-get-online-cpus.patch +hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch +re-migrate_disable-race-with-cpu-hotplug-3f.patch +sched-migrate-disable.patch +hotplug-use-migrate-disable.patch +hotplug-call-cpu_unplug_begin-a-little-early.patch + +ftrace-migrate-disable-tracing.patch +rt-tracing-show-padding-as-unsigned-short.patch + +migrate-disable-rt-variant.patch +peter_zijlstra-frob-migrate_disable.patch +peter_zijlstra-frob-migrate_disable-2.patch +sched-rt-fix-migrate_enable-thinko.patch +sched-teach-migrate_disable-about-atomic-contexts.patch +rt-sched-postpone-actual-migration-disalbe-to-schedule.patch +rt-sched-do-not-compare-cpu-masks-in-scheduler.patch +rt-sched-have-migrate_disable-ignore-bounded-threads.patch +sched-clear-pf-thread-bound-on-fallback-rq.patch + +# FTRACE +ftrace-crap.patch +rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch + +# NETWORKING +net-netif_rx_ni-migrate-disable.patch + +# NOHZ +softirq-sanitize-softirq-pending.patch + +# LOCKDEP +lockdep-no-softirq-accounting-on-rt.patch + +# SOFTIRQ local lock +mutex-no-spin-on-rt.patch +softirq-local-lock.patch +softirq-export-in-serving-softirq.patch +harirq-h-define-softirq_count-as-oul-to-kill-build-warning.patch +softirq-fix-unplug-deadlock.patch +softirq-disable-softirq-stacks-for-rt.patch +softirq-make-fifo.patch +tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch +irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch + +# LOCAL VARS and GETCPU STUFF +local-vars-migrate-disable.patch + +# RAID5 +md-raid5-percpu-handling-rt-aware.patch + +# RTMUTEX +rtmutex-lock-killable.patch + +# FUTEX/RTMUTEX +rtmutex-futex-prepare-rt.patch +futex-requeue-pi-fix.patch + +# RTMUTEX +rt-mutex-add-sleeping-spinlocks-support.patch +spinlock-types-separate-raw.patch +rtmutex-avoid-include-hell.patch +rt-add-rt-spinlock-to-headers.patch +rt-add-rt-to-mutex-headers.patch +rwsem-add-rt-variant.patch +rt-add-rt-locks.patch + +# RTMUTEX Fallout +tasklist-lock-fix-section-conflict.patch + +# NOHZ/RTMUTEX +timer-handle-idle-trylock-in-get-next-timer-irq.patch + +# RCU +rcu-force-preempt-rcu-for-rt.patch +peter_zijlstra-frob-rcu.patch +rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch +rcu-fix-macro-substitution.patch +rcu-tiny-merge-bh.patch +patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch +rcu-fix-build-break.patch +rt-rcutree-warn-fix.patch + +# LGLOCKS - lovely +lglocks-rt.patch + +# DRIVERS SERIAL +drivers-serial-cleanup-locking-for-rt.patch +drivers-serial-call-flush_to_ldisc-when-the-irq-is-t.patch +drivers-tty-fix-omap-lock-crap.patch +rt-serial-warn-fix.patch + +# FS +fs-namespace-preemption-fix.patch +mm-protect-activate-switch-mm.patch +mm-protect-activate_mm-by-preempt_-disable-7cenable-_rt.patch +fs-block-rt-support.patch +fs-ntfs-disable-interrupt-non-rt.patch + +# X86 +x86-mce-timer-hrtimer.patch +x86-stackprot-no-random-on-rt.patch +# x86-no-highmem-with-rt.patch -- peterz +x86-use-gen-rwsem-spinlocks-rt.patch +x86-disable-debug-stack.patch + +# CPU get light +workqueue-use-get-cpu-light.patch +epoll-use-get-cpu-light.patch +mm-vmalloc-use-get-cpu-light.patch + +# WORKQUEUE more fixes +workqueue-sanity.patch +workqueue-fix-PF_THREAD_BOUND.patch +workqueue-hotplug-fix.patch +workqueue-more-hotplug-fallout.patch + +# DEBUGOBJECTS +debugobjects-rt.patch + +# JUMPLABEL +jump-label-rt.patch + +# NET +skbufhead-raw-lock.patch + +# PERF +perf-move-irq-work-to-softirq-in-rt.patch + +# CONSOLE. NEEDS more thought !!! +console-make-rt-friendly.patch +fix-printk-flush-of-messages-1.patch + +# POWERC +power-use-generic-rwsem-on-rt.patch +power-disable-highmem-on-rt.patch + +# ARM +arm-disable-highmem-on-rt.patch +arm-at91-tclib-default-to-tclib-timer-for-rt.patch + +# MIPS +mips-disable-highmem-on-rt.patch + +# NETWORK livelock fix +net-tx-action-avoid-livelock-on-rt.patch + +# NETWORK DEBUGGING AID +ping-sysrq.patch + +# KGDB +kgb-serial-hackaround.patch + +# SYSFS - RT indicator +sysfs-realtime-entry.patch + +# KMAP/HIGHMEM +peter_zijlstra-re-_3_0-rt4.patch + +# IPC +ipc-sem-rework-semaphore-wakeups.patch + +# SYSRQ + +# KVM require constant freq TSC (smp function call -> cpufreq) +x86-kvm-require-const-tsc-for-rt.patch + +# SCSI/FCOE +scsi-fcoe-rt-aware.patch + +# X86 crypto +x86-crypto-reduce-preempt-disabled-regions.patch + +# Device mapper +dm-make-rt-aware.patch + +# ACPI +# Dropped those two as they cause a scheduling in atomic failure and +# we have no clue why we made those locks raw in the first place. +# acpi-make-gbl-hardware-lock-raw.patch +# acpi-make-ec-lock-raw-as-well.patch + +# This one is just a follow up to the raw spin locks +# Simple raw spinlock based waitqueue +# wait-simple-version.patch +# acpi-gpe-use-wait-simple.patch + +# CPUMASK OFFSTACK +cpumask-disable-offstack-on-rt.patch + +# Various fixes - fold them back +seqlock-prevent-rt-starvation.patch +#fs-protect-opencoded-isize-seqcount.patch +#net-u64-stat-protect-seqcount.patch +rfc-timer-fix-hotplug-for-rt.patch +rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch +rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch +rfc-sched-rt-fix-wait_task_interactive-to-test-rt_spin_lock-state.patch +rfc-lglock-rt-use-non-rt-for_each_cpu-in-rt-code.patch + +cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch + +softirq-preempt-fix-3-re.txt +scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch +upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch + +rt-introduce-cpu-chill.patch +fs-dcache-use-cpu-chill-in-trylock-loops.patch +net-use-cpu-chill.patch + +ntp-make-ntp-lock-raw-sigh.patch + +# Enable full RT +mips-remove-smp-reserve-lock.patch +lockdep-selftest-convert-spinlock-to-raw-spinlock.patch +lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch +genirq-add-default-mask-cmdline-option.patch +kconfig-disable-a-few-options-rt.patch +kconfig-preempt-rt-full.patch diff --git a/debian/patches/features/all/rt/0090-signal-fix-up-rcu-wreckage.patch.patch b/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch similarity index 60% rename from debian/patches/features/all/rt/0090-signal-fix-up-rcu-wreckage.patch.patch rename to debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch index f04a2dab5..f92cc0647 100644 --- a/debian/patches/features/all/rt/0090-signal-fix-up-rcu-wreckage.patch.patch +++ b/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch @@ -1,18 +1,17 @@ -From 8dae1f2c7df48338f0aa39dc07d65ec2c2faabe6 Mon Sep 17 00:00:00 2001 +Subject: signal-fix-up-rcu-wreckage.patch From: Thomas Gleixner Date: Fri, 22 Jul 2011 08:07:08 +0200 -Subject: [PATCH 090/267] signal-fix-up-rcu-wreckage.patch Signed-off-by: Thomas Gleixner --- kernel/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/kernel/signal.c b/kernel/signal.c -index c8b1bc1..739c2e4 100644 ---- a/kernel/signal.c -+++ b/kernel/signal.c -@@ -1362,12 +1362,12 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, +Index: linux-3.4/kernel/signal.c +=================================================================== +--- linux-3.4.orig/kernel/signal.c ++++ linux-3.4/kernel/signal.c +@@ -1401,12 +1401,12 @@ struct sighand_struct *__lock_task_sigha struct sighand_struct *sighand; for (;;) { @@ -27,7 +26,7 @@ index c8b1bc1..739c2e4 100644 break; } -@@ -1378,7 +1378,7 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, +@@ -1417,7 +1417,7 @@ struct sighand_struct *__lock_task_sigha } spin_unlock(&sighand->siglock); rcu_read_unlock(); @@ -36,6 +35,3 @@ index c8b1bc1..739c2e4 100644 } return sighand; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0026-signal-revert-ptrace-preempt-magic.patch.patch b/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch similarity index 61% rename from debian/patches/features/all/rt/0026-signal-revert-ptrace-preempt-magic.patch.patch rename to debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch index 4fe436c01..6ac84db56 100644 --- a/debian/patches/features/all/rt/0026-signal-revert-ptrace-preempt-magic.patch.patch +++ b/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch @@ -1,18 +1,17 @@ -From f5252418489d88d27411fb576294a1e55dbb03b4 Mon Sep 17 00:00:00 2001 +Subject: signal-revert-ptrace-preempt-magic.patch From: Thomas Gleixner Date: Wed, 21 Sep 2011 19:57:12 +0200 -Subject: [PATCH 026/267] signal-revert-ptrace-preempt-magic.patch Signed-off-by: Thomas Gleixner --- kernel/signal.c | 8 -------- 1 file changed, 8 deletions(-) -diff --git a/kernel/signal.c b/kernel/signal.c -index 2065515..d8b0b21 100644 ---- a/kernel/signal.c -+++ b/kernel/signal.c -@@ -1857,15 +1857,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info) +Index: linux-3.4/kernel/signal.c +=================================================================== +--- linux-3.4.orig/kernel/signal.c ++++ linux-3.4/kernel/signal.c +@@ -1909,15 +1909,7 @@ static void ptrace_stop(int exit_code, i if (gstop_done && ptrace_reparented(current)) do_notify_parent_cldstop(current, false, why); @@ -28,6 +27,3 @@ index 2065515..d8b0b21 100644 schedule(); } else { /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0034-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch similarity index 68% rename from debian/patches/features/all/rt/0034-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch rename to debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch index e05a5ae97..441e1f4c1 100644 --- a/debian/patches/features/all/rt/0034-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,25 +1,25 @@ -From 4f199fd1218f10cf419d1c9f9a7ed6c57969320c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:56 -0500 -Subject: [PATCH 034/267] signals: Allow rt tasks to cache one sigqueue struct +Subject: signals: Allow rt tasks to cache one sigqueue struct To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. Signed-off-by: Thomas Gleixner + --- - include/linux/sched.h | 1 + - include/linux/signal.h | 1 + - kernel/exit.c | 2 +- - kernel/fork.c | 1 + - kernel/signal.c | 83 +++++++++++++++++++++++++++++++++++++++++++++--- + include/linux/sched.h | 1 + include/linux/signal.h | 1 + kernel/exit.c | 2 - + kernel/fork.c | 1 + kernel/signal.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 83 insertions(+), 5 deletions(-) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 9897fe6..7268acf 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1387,6 +1387,7 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1435,6 +1435,7 @@ struct task_struct { /* signal handlers */ struct signal_struct *signal; struct sighand_struct *sighand; @@ -27,11 +27,11 @@ index 9897fe6..7268acf 100644 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 a822300..a448900 100644 ---- a/include/linux/signal.h -+++ b/include/linux/signal.h -@@ -229,6 +229,7 @@ static inline void init_sigpending(struct sigpending *sig) +Index: linux-3.4/include/linux/signal.h +=================================================================== +--- linux-3.4.orig/include/linux/signal.h ++++ linux-3.4/include/linux/signal.h +@@ -229,6 +229,7 @@ static inline void init_sigpending(struc } extern void flush_sigqueue(struct sigpending *queue); @@ -39,11 +39,11 @@ index a822300..a448900 100644 /* 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 e6e01b9..9075780 100644 ---- a/kernel/exit.c -+++ b/kernel/exit.c -@@ -141,7 +141,7 @@ static void __exit_signal(struct task_struct *tsk) +Index: linux-3.4/kernel/exit.c +=================================================================== +--- linux-3.4.orig/kernel/exit.c ++++ linux-3.4/kernel/exit.c +@@ -143,7 +143,7 @@ static void __exit_signal(struct task_st * Do this under ->siglock, we can race with another thread * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. */ @@ -52,23 +52,23 @@ index e6e01b9..9075780 100644 tsk->sighand = NULL; spin_unlock(&sighand->siglock); -diff --git a/kernel/fork.c b/kernel/fork.c -index 0acf42c0..d8aa0c7 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -1134,6 +1134,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -1204,6 +1204,7 @@ static struct task_struct *copy_process( spin_lock_init(&p->alloc_lock); init_sigpending(&p->pending); + p->sigqueue_cache = NULL; - p->utime = cputime_zero; - p->stime = cputime_zero; -diff --git a/kernel/signal.c b/kernel/signal.c -index 8ad4755..fc1a67a 100644 ---- a/kernel/signal.c -+++ b/kernel/signal.c -@@ -344,13 +344,45 @@ static bool task_participate_group_stop(struct task_struct *task) + p->utime = p->stime = p->gtime = 0; + p->utimescaled = p->stimescaled = 0; +Index: linux-3.4/kernel/signal.c +=================================================================== +--- linux-3.4.orig/kernel/signal.c ++++ linux-3.4/kernel/signal.c +@@ -345,13 +345,45 @@ static bool task_participate_group_stop( return false; } @@ -115,7 +115,7 @@ index 8ad4755..fc1a67a 100644 { struct sigqueue *q = NULL; struct user_struct *user; -@@ -367,7 +399,10 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi +@@ -368,7 +400,10 @@ __sigqueue_alloc(int sig, struct task_st if (override_rlimit || atomic_read(&user->sigpending) <= task_rlimit(t, RLIMIT_SIGPENDING)) { @@ -127,7 +127,7 @@ index 8ad4755..fc1a67a 100644 } else { print_dropped_signal(sig); } -@@ -384,6 +419,13 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi +@@ -385,6 +420,13 @@ __sigqueue_alloc(int sig, struct task_st return q; } @@ -141,7 +141,7 @@ index 8ad4755..fc1a67a 100644 static void __sigqueue_free(struct sigqueue *q) { if (q->flags & SIGQUEUE_PREALLOC) -@@ -393,6 +435,21 @@ static void __sigqueue_free(struct sigqueue *q) +@@ -394,6 +436,21 @@ static void __sigqueue_free(struct sigqu kmem_cache_free(sigqueue_cachep, q); } @@ -163,7 +163,7 @@ index 8ad4755..fc1a67a 100644 void flush_sigqueue(struct sigpending *queue) { struct sigqueue *q; -@@ -406,6 +463,21 @@ void flush_sigqueue(struct sigpending *queue) +@@ -407,6 +464,21 @@ void flush_sigqueue(struct sigpending *q } /* @@ -185,7 +185,7 @@ index 8ad4755..fc1a67a 100644 * Flush all pending signals for a task. */ void __flush_signals(struct task_struct *t) -@@ -554,7 +626,7 @@ static void collect_signal(int sig, struct sigpending *list, siginfo_t *info) +@@ -555,7 +627,7 @@ static void collect_signal(int sig, stru still_pending: list_del_init(&first->list); copy_siginfo(info, &first->info); @@ -194,7 +194,7 @@ index 8ad4755..fc1a67a 100644 } else { /* * Ok, it wasn't in the queue. This must be -@@ -600,6 +672,8 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) +@@ -601,6 +673,8 @@ int dequeue_signal(struct task_struct *t { int signr; @@ -203,7 +203,7 @@ index 8ad4755..fc1a67a 100644 /* We only dequeue private signals from ourselves, we don't let * signalfd steal them */ -@@ -1518,7 +1592,8 @@ EXPORT_SYMBOL(kill_pid); +@@ -1557,7 +1631,8 @@ EXPORT_SYMBOL(kill_pid); */ struct sigqueue *sigqueue_alloc(void) { @@ -213,6 +213,3 @@ index 8ad4755..fc1a67a 100644 if (q) q->flags |= SIGQUEUE_PREALLOC; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0032-signals-Do-not-wakeup-self.patch b/debian/patches/features/all/rt/signals-do-not-wake-self.patch similarity index 61% rename from debian/patches/features/all/rt/0032-signals-Do-not-wakeup-self.patch rename to debian/patches/features/all/rt/signals-do-not-wake-self.patch index 7064e62f4..59bf36f11 100644 --- a/debian/patches/features/all/rt/0032-signals-Do-not-wakeup-self.patch +++ b/debian/patches/features/all/rt/signals-do-not-wake-self.patch @@ -1,21 +1,21 @@ -From 244867f1bbbcc44274b4bf053f82e6de83b5e32d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:44 -0500 -Subject: [PATCH 032/267] signals: Do not wakeup self +Subject: signals: Do not wakeup self Signals which are delivered by current to current can do without waking up current :) Signed-off-by: Thomas Gleixner + --- kernel/signal.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/kernel/signal.c b/kernel/signal.c -index d8b0b21..8ad4755 100644 ---- a/kernel/signal.c -+++ b/kernel/signal.c -@@ -682,6 +682,9 @@ void signal_wake_up(struct task_struct *t, int resume) +Index: linux-3.4/kernel/signal.c +=================================================================== +--- linux-3.4.orig/kernel/signal.c ++++ linux-3.4/kernel/signal.c +@@ -683,6 +683,9 @@ void signal_wake_up(struct task_struct * set_tsk_thread_flag(t, TIF_SIGPENDING); @@ -25,6 +25,3 @@ index d8b0b21..8ad4755 100644 /* * For SIGKILL, we want to wake it up in the stopped/traced/killable * case. We don't check t->state here because there is a race with it --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0232-skbufhead-raw-lock.patch.patch b/debian/patches/features/all/rt/skbufhead-raw-lock.patch similarity index 71% rename from debian/patches/features/all/rt/0232-skbufhead-raw-lock.patch.patch rename to debian/patches/features/all/rt/skbufhead-raw-lock.patch index 22995eff4..b58cce7b9 100644 --- a/debian/patches/features/all/rt/0232-skbufhead-raw-lock.patch.patch +++ b/debian/patches/features/all/rt/skbufhead-raw-lock.patch @@ -1,7 +1,6 @@ -From db6185709bdb319f73536d67b22d4669228decab Mon Sep 17 00:00:00 2001 +Subject: skbufhead-raw-lock.patch From: Thomas Gleixner Date: Tue, 12 Jul 2011 15:38:34 +0200 -Subject: [PATCH 232/267] skbufhead-raw-lock.patch Signed-off-by: Thomas Gleixner --- @@ -10,11 +9,11 @@ Signed-off-by: Thomas Gleixner net/core/dev.c | 26 ++++++++++++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) -diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index a82ad4d..a5bde77 100644 ---- a/include/linux/netdevice.h -+++ b/include/linux/netdevice.h -@@ -1760,6 +1760,7 @@ struct softnet_data { +Index: linux-3.4/include/linux/netdevice.h +=================================================================== +--- linux-3.4.orig/include/linux/netdevice.h ++++ linux-3.4/include/linux/netdevice.h +@@ -1743,6 +1743,7 @@ struct softnet_data { unsigned dropped; struct sk_buff_head input_pkt_queue; struct napi_struct backlog; @@ -22,11 +21,11 @@ index a82ad4d..a5bde77 100644 }; static inline void input_queue_head_incr(struct softnet_data *sd) -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h -index 6cf8b53..ea9736d 100644 ---- a/include/linux/skbuff.h -+++ b/include/linux/skbuff.h -@@ -124,6 +124,7 @@ struct sk_buff_head { +Index: linux-3.4/include/linux/skbuff.h +=================================================================== +--- linux-3.4.orig/include/linux/skbuff.h ++++ linux-3.4/include/linux/skbuff.h +@@ -132,6 +132,7 @@ struct sk_buff_head { __u32 qlen; spinlock_t lock; @@ -34,7 +33,7 @@ index 6cf8b53..ea9736d 100644 }; struct sk_buff; -@@ -925,6 +926,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list) +@@ -967,6 +968,12 @@ static inline void skb_queue_head_init(s __skb_queue_head_init(list); } @@ -47,11 +46,11 @@ index 6cf8b53..ea9736d 100644 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 517b488..d030f8d 100644 ---- a/net/core/dev.c -+++ b/net/core/dev.c -@@ -222,14 +222,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) +Index: linux-3.4/net/core/dev.c +=================================================================== +--- linux-3.4.orig/net/core/dev.c ++++ linux-3.4/net/core/dev.c +@@ -220,14 +220,14 @@ static inline struct hlist_head *dev_ind static inline void rps_lock(struct softnet_data *sd) { #ifdef CONFIG_RPS @@ -68,7 +67,7 @@ index 517b488..d030f8d 100644 #endif } -@@ -3407,7 +3407,7 @@ static void flush_backlog(void *arg) +@@ -3353,7 +3353,7 @@ static void flush_backlog(void *arg) skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) { if (skb->dev == dev) { __skb_unlink(skb, &sd->input_pkt_queue); @@ -77,7 +76,7 @@ index 517b488..d030f8d 100644 input_queue_head_incr(sd); } } -@@ -3416,10 +3416,13 @@ static void flush_backlog(void *arg) +@@ -3362,10 +3362,13 @@ static void flush_backlog(void *arg) skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev == dev) { __skb_unlink(skb, &sd->process_queue); @@ -92,7 +91,7 @@ index 517b488..d030f8d 100644 } static int napi_gro_complete(struct sk_buff *skb) -@@ -3903,10 +3906,17 @@ static void net_rx_action(struct softirq_action *h) +@@ -3849,10 +3852,17 @@ static void net_rx_action(struct softirq struct softnet_data *sd = &__get_cpu_var(softnet_data); unsigned long time_limit = jiffies + 2; int budget = netdev_budget; @@ -110,7 +109,7 @@ index 517b488..d030f8d 100644 while (!list_empty(&sd->poll_list)) { struct napi_struct *n; int work, weight; -@@ -6372,6 +6382,9 @@ static int dev_cpu_callback(struct notifier_block *nfb, +@@ -6279,6 +6289,9 @@ static int dev_cpu_callback(struct notif netif_rx(skb); input_queue_head_incr(oldsd); } @@ -120,7 +119,7 @@ index 517b488..d030f8d 100644 return NOTIFY_OK; } -@@ -6638,8 +6651,9 @@ static int __init net_dev_init(void) +@@ -6542,8 +6555,9 @@ static int __init net_dev_init(void) struct softnet_data *sd = &per_cpu(softnet_data, i); memset(sd, 0, sizeof(*sd)); @@ -132,6 +131,3 @@ index 517b488..d030f8d 100644 sd->completion_queue = NULL; INIT_LIST_HEAD(&sd->poll_list); sd->output_queue = NULL; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0185-softirq-disable-softirq-stacks-for-rt.patch.patch b/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch similarity index 53% rename from debian/patches/features/all/rt/0185-softirq-disable-softirq-stacks-for-rt.patch.patch rename to debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch index 5d291e6fe..f87be58fa 100644 --- a/debian/patches/features/all/rt/0185-softirq-disable-softirq-stacks-for-rt.patch.patch +++ b/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch @@ -1,11 +1,10 @@ -From effbceee022e5c4f987c009c06d18e3c6f5edd80 Mon Sep 17 00:00:00 2001 +Subject: softirq-disable-softirq-stacks-for-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 13:59:17 +0200 -Subject: [PATCH 185/267] softirq-disable-softirq-stacks-for-rt.patch Signed-off-by: Thomas Gleixner --- - arch/powerpc/kernel/irq.c | 3 ++- + 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 ++ @@ -14,13 +13,13 @@ Signed-off-by: Thomas Gleixner arch/x86/kernel/irq_32.c | 2 ++ arch/x86/kernel/irq_64.c | 3 ++- include/linux/interrupt.h | 3 +-- - 9 files changed, 17 insertions(+), 4 deletions(-) + 9 files changed, 17 insertions(+), 3 deletions(-) -diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c -index 745c1e7..e0ee531 100644 ---- a/arch/powerpc/kernel/irq.c -+++ b/arch/powerpc/kernel/irq.c -@@ -440,6 +440,7 @@ void irq_ctx_init(void) +Index: linux-3.4/arch/powerpc/kernel/irq.c +=================================================================== +--- linux-3.4.orig/arch/powerpc/kernel/irq.c ++++ linux-3.4/arch/powerpc/kernel/irq.c +@@ -523,6 +523,7 @@ void irq_ctx_init(void) } } @@ -28,19 +27,18 @@ index 745c1e7..e0ee531 100644 static inline void do_softirq_onstack(void) { struct thread_info *curtp, *irqtp; -@@ -476,7 +477,7 @@ void do_softirq(void) +@@ -559,6 +560,7 @@ void do_softirq(void) local_irq_restore(flags); } -- +#endif - /* - * IRQ controller and virtual interrupts -diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S -index 7cd07b4..46c6073 100644 ---- a/arch/powerpc/kernel/misc_32.S -+++ b/arch/powerpc/kernel/misc_32.S + irq_hw_number_t virq_to_hw(unsigned int virq) + { +Index: linux-3.4/arch/powerpc/kernel/misc_32.S +=================================================================== +--- linux-3.4.orig/arch/powerpc/kernel/misc_32.S ++++ linux-3.4/arch/powerpc/kernel/misc_32.S @@ -36,6 +36,7 @@ .text @@ -57,10 +55,10 @@ index 7cd07b4..46c6073 100644 _GLOBAL(call_handle_irq) mflr r0 -diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S -index 616921e..2961d75 100644 ---- a/arch/powerpc/kernel/misc_64.S -+++ b/arch/powerpc/kernel/misc_64.S +Index: linux-3.4/arch/powerpc/kernel/misc_64.S +=================================================================== +--- linux-3.4.orig/arch/powerpc/kernel/misc_64.S ++++ linux-3.4/arch/powerpc/kernel/misc_64.S @@ -29,6 +29,7 @@ .text @@ -77,10 +75,10 @@ index 616921e..2961d75 100644 _GLOBAL(call_handle_irq) ld r8,0(r6) -diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c -index a3ee919..9127bc0 100644 ---- a/arch/sh/kernel/irq.c -+++ b/arch/sh/kernel/irq.c +Index: linux-3.4/arch/sh/kernel/irq.c +=================================================================== +--- linux-3.4.orig/arch/sh/kernel/irq.c ++++ linux-3.4/arch/sh/kernel/irq.c @@ -149,6 +149,7 @@ void irq_ctx_exit(int cpu) hardirq_ctx[cpu] = NULL; } @@ -97,11 +95,11 @@ index a3ee919..9127bc0 100644 #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 d45b710..c3a3737 100644 ---- a/arch/sparc/kernel/irq_64.c -+++ b/arch/sparc/kernel/irq_64.c -@@ -699,6 +699,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs) +Index: linux-3.4/arch/sparc/kernel/irq_64.c +=================================================================== +--- linux-3.4.orig/arch/sparc/kernel/irq_64.c ++++ linux-3.4/arch/sparc/kernel/irq_64.c +@@ -698,6 +698,7 @@ void __irq_entry handler_irq(int pil, st set_irq_regs(old_regs); } @@ -109,7 +107,7 @@ index d45b710..c3a3737 100644 void do_softirq(void) { unsigned long flags; -@@ -724,6 +725,7 @@ void do_softirq(void) +@@ -723,6 +724,7 @@ void do_softirq(void) local_irq_restore(flags); } @@ -117,11 +115,11 @@ index d45b710..c3a3737 100644 #ifdef CONFIG_HOTPLUG_CPU void fixup_irqs(void) -diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S -index faf8d5e..fb0f578 100644 ---- a/arch/x86/kernel/entry_64.S -+++ b/arch/x86/kernel/entry_64.S -@@ -1192,6 +1192,7 @@ ENTRY(kernel_execve) +Index: linux-3.4/arch/x86/kernel/entry_64.S +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/entry_64.S ++++ linux-3.4/arch/x86/kernel/entry_64.S +@@ -1240,6 +1240,7 @@ ENTRY(kernel_execve) CFI_ENDPROC END(kernel_execve) @@ -129,7 +127,7 @@ index faf8d5e..fb0f578 100644 /* Call softirq on interrupt stack. Interrupts are off. */ ENTRY(call_softirq) CFI_STARTPROC -@@ -1211,6 +1212,7 @@ ENTRY(call_softirq) +@@ -1259,6 +1260,7 @@ ENTRY(call_softirq) ret CFI_ENDPROC END(call_softirq) @@ -137,10 +135,10 @@ index faf8d5e..fb0f578 100644 #ifdef CONFIG_XEN zeroentry xen_hypervisor_callback xen_do_hypervisor_callback -diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c -index 7209070..84417a2 100644 ---- a/arch/x86/kernel/irq_32.c -+++ b/arch/x86/kernel/irq_32.c +Index: linux-3.4/arch/x86/kernel/irq_32.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/irq_32.c ++++ linux-3.4/arch/x86/kernel/irq_32.c @@ -149,6 +149,7 @@ void __cpuinit irq_ctx_init(int cpu) cpu, per_cpu(hardirq_ctx, cpu), per_cpu(softirq_ctx, cpu)); } @@ -157,11 +155,11 @@ index 7209070..84417a2 100644 bool handle_irq(unsigned irq, struct pt_regs *regs) { -diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c -index 69bca46..3fbc07d 100644 ---- a/arch/x86/kernel/irq_64.c -+++ b/arch/x86/kernel/irq_64.c -@@ -65,7 +65,7 @@ bool handle_irq(unsigned irq, struct pt_regs *regs) +Index: linux-3.4/arch/x86/kernel/irq_64.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/irq_64.c ++++ linux-3.4/arch/x86/kernel/irq_64.c +@@ -88,7 +88,7 @@ bool handle_irq(unsigned irq, struct pt_ return true; } @@ -170,16 +168,16 @@ index 69bca46..3fbc07d 100644 extern void call_softirq(void); asmlinkage void do_softirq(void) -@@ -85,3 +85,4 @@ asmlinkage void do_softirq(void) +@@ -108,3 +108,4 @@ asmlinkage void do_softirq(void) } local_irq_restore(flags); } +#endif -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index 20d8dcc..1a74cf7 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -456,10 +456,9 @@ struct softirq_action +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -454,10 +454,9 @@ struct softirq_action void (*action)(struct softirq_action *); }; @@ -191,6 +189,3 @@ index 20d8dcc..1a74cf7 100644 static inline void thread_do_softirq(void) { do_softirq(); } #else extern void thread_do_softirq(void); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0182-softirq-Export-in_serving_softirq.patch b/debian/patches/features/all/rt/softirq-export-in-serving-softirq.patch similarity index 72% rename from debian/patches/features/all/rt/0182-softirq-Export-in_serving_softirq.patch rename to debian/patches/features/all/rt/softirq-export-in-serving-softirq.patch index aca8f5665..bfd034d97 100644 --- a/debian/patches/features/all/rt/0182-softirq-Export-in_serving_softirq.patch +++ b/debian/patches/features/all/rt/softirq-export-in-serving-softirq.patch @@ -1,7 +1,6 @@ -From cf6595696f15aae904914b61061b88d721b4487b Mon Sep 17 00:00:00 2001 +Subject: softirq: Export in_serving_softirq() From: John Kacur Date: Mon, 14 Nov 2011 02:44:43 +0100 -Subject: [PATCH 182/267] softirq: Export in_serving_softirq() ERROR: "in_serving_softirq" [net/sched/cls_cgroup.ko] undefined! @@ -12,14 +11,15 @@ Cc: Paul McKenney Cc: stable-rt@vger.kernel.org Link: http://lkml.kernel.org/r/1321235083-21756-2-git-send-email-jkacur@redhat.com Signed-off-by: Thomas Gleixner + --- kernel/softirq.c | 1 + 1 file changed, 1 insertion(+) -diff --git a/kernel/softirq.c b/kernel/softirq.c -index 2c10a79..f107c07 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -439,6 +439,7 @@ int in_serving_softirq(void) preempt_enable(); return res; @@ -28,6 +28,3 @@ index 2c10a79..f107c07 100644 /* * Called with bh and local interrupts disabled. For full RT cpu must --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0184-softirq-Fix-unplug-deadlock.patch b/debian/patches/features/all/rt/softirq-fix-unplug-deadlock.patch similarity index 79% rename from debian/patches/features/all/rt/0184-softirq-Fix-unplug-deadlock.patch rename to debian/patches/features/all/rt/softirq-fix-unplug-deadlock.patch index dd6bfd4af..9789c5c76 100644 --- a/debian/patches/features/all/rt/0184-softirq-Fix-unplug-deadlock.patch +++ b/debian/patches/features/all/rt/softirq-fix-unplug-deadlock.patch @@ -1,7 +1,10 @@ -From 6e7719ff9fce1d2b04f2d5d30f16f78514843650 Mon Sep 17 00:00:00 2001 +Subject: softirq: Fix unplug deadlock +From: Peter Zijlstra +Date: Fri, 30 Sep 2011 15:59:16 +0200 + +Subject: [RT] softirq: Fix unplug deadlock From: Peter Zijlstra -Date: Fri, 30 Sep 2011 15:52:14 +0200 -Subject: [PATCH 184/267] softirq: Fix unplug deadlock +Date: Fri Sep 30 15:52:14 CEST 2011 If ksoftirqd gets woken during hot-unplug, __thread_do_softirq() will call pin_current_cpu() which will block on the held cpu_hotplug.lock. @@ -27,11 +30,11 @@ Signed-off-by: Thomas Gleixner kernel/softirq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -diff --git a/kernel/softirq.c b/kernel/softirq.c -index f107c07..56de566 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -1086,9 +1086,8 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c +@@ -1078,9 +1078,8 @@ static int __cpuinit cpu_callback(struct int hotcpu = (unsigned long)hcpu; struct task_struct *p; @@ -42,7 +45,7 @@ index f107c07..56de566 100644 p = kthread_create_on_node(run_ksoftirqd, hcpu, cpu_to_node(hotcpu), -@@ -1101,19 +1100,16 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb, +@@ -1093,19 +1092,16 @@ static int __cpuinit cpu_callback(struct per_cpu(ksoftirqd, hotcpu) = p; break; case CPU_ONLINE: @@ -63,6 +66,3 @@ index f107c07..56de566 100644 static const struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0181-softirq-local-lock.patch.patch b/debian/patches/features/all/rt/softirq-local-lock.patch similarity index 78% rename from debian/patches/features/all/rt/0181-softirq-local-lock.patch.patch rename to debian/patches/features/all/rt/softirq-local-lock.patch index 459f5f19c..9719c76a6 100644 --- a/debian/patches/features/all/rt/0181-softirq-local-lock.patch.patch +++ b/debian/patches/features/all/rt/softirq-local-lock.patch @@ -1,21 +1,20 @@ -From 4263da6524d1b2eb07d0f07930c53ed4682db0df Mon Sep 17 00:00:00 2001 +Subject: softirq-local-lock.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 15:57:18 +0200 -Subject: [PATCH 181/267] softirq-local-lock.patch Signed-off-by: Thomas Gleixner --- - include/linux/hardirq.h | 16 ++++- - include/linux/interrupt.h | 11 +++ - include/linux/sched.h | 1 + - init/main.c | 1 + - kernel/softirq.c | 170 ++++++++++++++++++++++++++++++++++++++++++++- - 5 files changed, 194 insertions(+), 5 deletions(-) + include/linux/hardirq.h | 16 +++- + include/linux/interrupt.h | 12 +++ + include/linux/sched.h | 1 + init/main.c | 1 + kernel/softirq.c | 166 +++++++++++++++++++++++++++++++++++++++++++++- + 5 files changed, 191 insertions(+), 5 deletions(-) -diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h -index f743883..2f5d318 100644 ---- a/include/linux/hardirq.h -+++ b/include/linux/hardirq.h +Index: linux-3.4/include/linux/hardirq.h +=================================================================== +--- linux-3.4.orig/include/linux/hardirq.h ++++ linux-3.4/include/linux/hardirq.h @@ -60,7 +60,11 @@ #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) #define NMI_OFFSET (1UL << NMI_SHIFT) @@ -56,11 +55,11 @@ index f743883..2f5d318 100644 /* * Are we in NMI context? -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index 74e28d9..20d8dcc 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -458,7 +458,12 @@ struct softirq_action +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -456,7 +456,13 @@ struct softirq_action asmlinkage void do_softirq(void); asmlinkage void __do_softirq(void); @@ -70,10 +69,11 @@ index 74e28d9..20d8dcc 100644 +#else +extern void thread_do_softirq(void); +#endif - ++ extern void open_softirq(int nr, void (*action)(struct softirq_action *)); extern void softirq_init(void); -@@ -650,6 +655,12 @@ void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) + extern void __raise_softirq_irqoff(unsigned int nr); +@@ -643,6 +649,12 @@ void tasklet_hrtimer_cancel(struct taskl tasklet_kill(&ttimer->tasklet); } @@ -86,11 +86,11 @@ index 74e28d9..20d8dcc 100644 /* * Autoprobing for irqs: * -diff --git a/include/linux/sched.h b/include/linux/sched.h -index af6cb0c..a84a901 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1601,6 +1601,7 @@ struct task_struct { +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1645,6 +1645,7 @@ struct task_struct { #endif #ifdef CONFIG_PREEMPT_RT_BASE struct rcu_head put_rcu; @@ -98,11 +98,11 @@ index af6cb0c..a84a901 100644 #endif }; -diff --git a/init/main.c b/init/main.c -index 0c41665..1c0a673 100644 ---- a/init/main.c -+++ b/init/main.c -@@ -490,6 +490,7 @@ asmlinkage void __init start_kernel(void) +Index: linux-3.4/init/main.c +=================================================================== +--- linux-3.4.orig/init/main.c ++++ linux-3.4/init/main.c +@@ -490,6 +490,7 @@ asmlinkage void __init start_kernel(void * Interrupts are still disabled. Do necessary setups, then * enable them */ @@ -110,10 +110,10 @@ index 0c41665..1c0a673 100644 tick_init(); boot_cpu_init(); page_address_init(); -diff --git a/kernel/softirq.c b/kernel/softirq.c -index 8332622..2c10a79 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -24,6 +24,7 @@ #include #include @@ -122,7 +122,7 @@ index 8332622..2c10a79 100644 #define CREATE_TRACE_POINTS #include -@@ -165,6 +166,7 @@ static void handle_pending_softirqs(u32 pending, int cpu) +@@ -165,6 +166,7 @@ static void handle_pending_softirqs(u32 local_irq_disable(); } @@ -305,39 +305,21 @@ index 8332622..2c10a79 100644 } __irq_enter(); -@@ -392,6 +550,7 @@ void irq_enter(void) - #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED - static inline void invoke_softirq(void) - { -+#ifndef CONFIG_PREEMPT_RT_FULL - if (!force_irqthreads) - __do_softirq(); - else { -@@ -400,10 +559,14 @@ static inline void invoke_softirq(void) - wakeup_softirqd(); - __local_bh_enable(SOFTIRQ_OFFSET); - } -+#else -+ wakeup_softirqd(); -+#endif - } - #else - static inline void invoke_softirq(void) - { -+#ifndef CONFIG_PREEMPT_RT_FULL - if (!force_irqthreads) - do_softirq(); - else { -@@ -412,6 +575,9 @@ static inline void invoke_softirq(void) - wakeup_softirqd(); - __local_bh_enable(SOFTIRQ_OFFSET); - } -+#else -+ wakeup_softirqd(); -+#endif - } - #endif +@@ -391,6 +549,7 @@ void irq_enter(void) --- -1.7.10 - + static inline void invoke_softirq(void) + { ++#ifndef CONFIG_PREEMPT_RT_FULL + if (!force_irqthreads) { + #ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED + __do_softirq(); +@@ -403,6 +562,9 @@ static inline void invoke_softirq(void) + wakeup_softirqd(); + __local_bh_enable(SOFTIRQ_OFFSET); + } ++#else ++ wakeup_softirqd(); ++#endif + } + + /* diff --git a/debian/patches/features/all/rt/0186-softirq-make-fifo.patch.patch b/debian/patches/features/all/rt/softirq-make-fifo.patch similarity index 79% rename from debian/patches/features/all/rt/0186-softirq-make-fifo.patch.patch rename to debian/patches/features/all/rt/softirq-make-fifo.patch index 73fc54990..9226544ef 100644 --- a/debian/patches/features/all/rt/0186-softirq-make-fifo.patch.patch +++ b/debian/patches/features/all/rt/softirq-make-fifo.patch @@ -1,17 +1,16 @@ -From 38fc4611892b365946ff2d9b340dcdab3d8ac761 Mon Sep 17 00:00:00 2001 +Subject: softirq-make-fifo.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 21:06:43 +0200 -Subject: [PATCH 186/267] softirq-make-fifo.patch Signed-off-by: Thomas Gleixner --- kernel/softirq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -diff --git a/kernel/softirq.c b/kernel/softirq.c -index 56de566..dd80cb4 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -372,6 +372,8 @@ asmlinkage void do_softirq(void) static inline void local_bh_disable_nort(void) { local_bh_disable(); } @@ -42,7 +41,7 @@ index 56de566..dd80cb4 100644 #endif /* PREEMPT_RT_FULL */ /* * Enter an interrupt context. -@@ -985,6 +1001,8 @@ void __init softirq_init(void) +@@ -977,6 +993,8 @@ void __init softirq_init(void) static int run_ksoftirqd(void * __bind_cpu) { @@ -51,7 +50,7 @@ index 56de566..dd80cb4 100644 set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { -@@ -1010,6 +1028,7 @@ static int run_ksoftirqd(void * __bind_cpu) +@@ -1002,6 +1020,7 @@ static int run_ksoftirqd(void * __bind_c wait_to_die: preempt_enable(); @@ -59,6 +58,3 @@ index 56de566..dd80cb4 100644 /* Wait for kthread_stop */ set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0178-softirq-Sanitize-softirq-pending-for-NOHZ-RT.patch b/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch similarity index 74% rename from debian/patches/features/all/rt/0178-softirq-Sanitize-softirq-pending-for-NOHZ-RT.patch rename to debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch index f233419e9..eae4b5a1c 100644 --- a/debian/patches/features/all/rt/0178-softirq-Sanitize-softirq-pending-for-NOHZ-RT.patch +++ b/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch @@ -1,20 +1,20 @@ -From 2cad2f524d6ee31a2b4d1eafd2535bfaf51bc697 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 13:16:38 -0500 -Subject: [PATCH 178/267] softirq: Sanitize softirq pending for NOHZ/RT +Subject: softirq: Sanitize softirq pending for NOHZ/RT Signed-off-by: Thomas Gleixner + --- - include/linux/interrupt.h | 2 ++ - kernel/softirq.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ - kernel/time/tick-sched.c | 8 +----- + include/linux/interrupt.h | 2 + + kernel/softirq.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ + kernel/time/tick-sched.c | 8 ------ 3 files changed, 64 insertions(+), 7 deletions(-) -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index b9162dc..74e28d9 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -471,6 +471,8 @@ static inline void __raise_softirq_irqoff(unsigned int nr) +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -464,6 +464,8 @@ extern void __raise_softirq_irqoff(unsig extern void raise_softirq_irqoff(unsigned int nr); extern void raise_softirq(unsigned int nr); @@ -23,10 +23,10 @@ index b9162dc..74e28d9 100644 /* This is the worklist that queues up per-cpu softirq work. * * send_remote_sendirq() adds work to these lists, and -diff --git a/kernel/softirq.c b/kernel/softirq.c -index c6c5824..8332622 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -61,6 +61,67 @@ char *softirq_to_name[NR_SOFTIRQS] = { "TASKLET", "SCHED", "HRTIMER", "RCU" }; @@ -95,12 +95,12 @@ index c6c5824..8332622 100644 /* * we cannot loop indefinitely here to avoid userspace starvation, * but we also don't want to introduce a worst case 1/HZ latency -diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c -index a2c2a64..a6b26d2 100644 ---- a/kernel/time/tick-sched.c -+++ b/kernel/time/tick-sched.c -@@ -336,13 +336,7 @@ void tick_nohz_stop_sched_tick(int inidle) - goto end; +Index: linux-3.4/kernel/time/tick-sched.c +=================================================================== +--- linux-3.4.orig/kernel/time/tick-sched.c ++++ linux-3.4/kernel/time/tick-sched.c +@@ -307,13 +307,7 @@ static void tick_nohz_stop_sched_tick(st + return; if (unlikely(local_softirq_pending() && cpu_online(cpu))) { - static int ratelimit; @@ -111,9 +111,6 @@ index a2c2a64..a6b26d2 100644 - ratelimit++; - } + softirq_check_pending_idle(); - goto end; + return; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0062-softirq-split-out-code.patch.patch b/debian/patches/features/all/rt/softirq-split-out-code.patch similarity index 90% rename from debian/patches/features/all/rt/0062-softirq-split-out-code.patch.patch rename to debian/patches/features/all/rt/softirq-split-out-code.patch index e515d7b9f..5f8477a14 100644 --- a/debian/patches/features/all/rt/0062-softirq-split-out-code.patch.patch +++ b/debian/patches/features/all/rt/softirq-split-out-code.patch @@ -1,17 +1,16 @@ -From afd97d0727b378d48a20073ae838cb800ec0c7df Mon Sep 17 00:00:00 2001 +Subject: softirq-split-out-code.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 15:46:49 +0200 -Subject: [PATCH 062/267] softirq-split-out-code.patch Signed-off-by: Thomas Gleixner --- - kernel/softirq.c | 94 ++++++++++++++++++++++++++++++------------------------ + kernel/softirq.c | 94 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 42 deletions(-) -diff --git a/kernel/softirq.c b/kernel/softirq.c -index a8becbf..c6c5824 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -76,6 +76,34 @@ static void wakeup_softirqd(void) wake_up_process(tsk); } @@ -129,7 +128,7 @@ index a8becbf..c6c5824 100644 #ifndef __ARCH_HAS_DO_SOFTIRQ asmlinkage void do_softirq(void) -@@ -743,22 +761,14 @@ static int run_ksoftirqd(void * __bind_cpu) +@@ -739,22 +757,14 @@ static int run_ksoftirqd(void * __bind_c while (!kthread_should_stop()) { preempt_disable(); @@ -151,9 +150,6 @@ index a8becbf..c6c5824 100644 - if (local_softirq_pending()) - __do_softirq(); - local_irq_enable(); - __preempt_enable_no_resched(); + sched_preempt_enable_no_resched(); cond_resched(); preempt_disable(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/softirq-thread-do-softirq.patch b/debian/patches/features/all/rt/softirq-thread-do-softirq.patch new file mode 100644 index 000000000..418233dc7 --- /dev/null +++ b/debian/patches/features/all/rt/softirq-thread-do-softirq.patch @@ -0,0 +1,35 @@ +Subject: softirq-thread-do-softirq.patch +From: Thomas Gleixner +Date: Tue, 28 Jun 2011 15:44:15 +0200 + +Signed-off-by: Thomas Gleixner +--- + include/linux/interrupt.h | 1 + + net/core/dev.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -452,6 +452,7 @@ struct softirq_action + + asmlinkage void do_softirq(void); + asmlinkage void __do_softirq(void); ++static inline void thread_do_softirq(void) { do_softirq(); } + extern void open_softirq(int nr, void (*action)(struct softirq_action *)); + extern void softirq_init(void); + extern void __raise_softirq_irqoff(unsigned int nr); +Index: linux-3.4/net/core/dev.c +=================================================================== +--- linux-3.4.orig/net/core/dev.c ++++ linux-3.4/net/core/dev.c +@@ -2989,7 +2989,7 @@ int netif_rx_ni(struct sk_buff *skb) + preempt_disable(); + err = netif_rx(skb); + if (local_softirq_pending()) +- do_softirq(); ++ thread_do_softirq(); + preempt_enable(); + + return err; diff --git a/debian/patches/features/all/rt/0195-spinlock-types-separate-raw.patch.patch b/debian/patches/features/all/rt/spinlock-types-separate-raw.patch similarity index 81% rename from debian/patches/features/all/rt/0195-spinlock-types-separate-raw.patch.patch rename to debian/patches/features/all/rt/spinlock-types-separate-raw.patch index 56c5e409e..e7ebba1d5 100644 --- a/debian/patches/features/all/rt/0195-spinlock-types-separate-raw.patch.patch +++ b/debian/patches/features/all/rt/spinlock-types-separate-raw.patch @@ -1,22 +1,19 @@ -From edc23764a4d960d988c6f0edc219a6bdece3813f Mon Sep 17 00:00:00 2001 +Subject: spinlock-types-separate-raw.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:34:01 +0200 -Subject: [PATCH 195/267] spinlock-types-separate-raw.patch Signed-off-by: Thomas Gleixner --- - include/linux/rwlock_types.h | 4 ++ - include/linux/spinlock_types.h | 74 +---------------------------------- + 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/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 cc0072e..5317cd9 100644 ---- a/include/linux/rwlock_types.h -+++ b/include/linux/rwlock_types.h +Index: linux-3.4/include/linux/rwlock_types.h +=================================================================== +--- linux-3.4.orig/include/linux/rwlock_types.h ++++ linux-3.4/include/linux/rwlock_types.h @@ -1,6 +1,10 @@ #ifndef __LINUX_RWLOCK_TYPES_H #define __LINUX_RWLOCK_TYPES_H @@ -28,10 +25,10 @@ index cc0072e..5317cd9 100644 /* * 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 73548eb..5c8664d 100644 ---- a/include/linux/spinlock_types.h -+++ b/include/linux/spinlock_types.h +Index: linux-3.4/include/linux/spinlock_types.h +=================================================================== +--- linux-3.4.orig/include/linux/spinlock_types.h ++++ linux-3.4/include/linux/spinlock_types.h @@ -9,79 +9,9 @@ * Released under the General Public License (GPL). */ @@ -114,11 +111,10 @@ index 73548eb..5c8664d 100644 #include -diff --git a/include/linux/spinlock_types_nort.h b/include/linux/spinlock_types_nort.h -new file mode 100644 -index 0000000..f1dac1f +Index: linux-3.4/include/linux/spinlock_types_nort.h +=================================================================== --- /dev/null -+++ b/include/linux/spinlock_types_nort.h ++++ linux-3.4/include/linux/spinlock_types_nort.h @@ -0,0 +1,33 @@ +#ifndef __LINUX_SPINLOCK_TYPES_NORT_H +#define __LINUX_SPINLOCK_TYPES_NORT_H @@ -153,11 +149,10 @@ index 0000000..f1dac1f +#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 0000000..edffc4d +Index: linux-3.4/include/linux/spinlock_types_raw.h +=================================================================== --- /dev/null -+++ b/include/linux/spinlock_types_raw.h ++++ linux-3.4/include/linux/spinlock_types_raw.h @@ -0,0 +1,56 @@ +#ifndef __LINUX_SPINLOCK_TYPES_RAW_H +#define __LINUX_SPINLOCK_TYPES_RAW_H @@ -215,6 +210,3 @@ index 0000000..edffc4d +#define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) + +#endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0156-stomp-machine-mark-stomper-thread.patch.patch b/debian/patches/features/all/rt/stomp-machine-mark-stomper-thread.patch similarity index 58% rename from debian/patches/features/all/rt/0156-stomp-machine-mark-stomper-thread.patch.patch rename to debian/patches/features/all/rt/stomp-machine-mark-stomper-thread.patch index 34d633823..8445ba1c0 100644 --- a/debian/patches/features/all/rt/0156-stomp-machine-mark-stomper-thread.patch.patch +++ b/debian/patches/features/all/rt/stomp-machine-mark-stomper-thread.patch @@ -1,7 +1,6 @@ -From 1c767a07496d139da6d3e72977bd4e10b38eff84 Mon Sep 17 00:00:00 2001 +Subject: stomp-machine-mark-stomper-thread.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 19:53:19 +0200 -Subject: [PATCH 156/267] stomp-machine-mark-stomper-thread.patch Signed-off-by: Thomas Gleixner --- @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/stop_machine.c | 1 + 2 files changed, 2 insertions(+) -diff --git a/include/linux/sched.h b/include/linux/sched.h -index 175aaee..6f10df5 100644 ---- a/include/linux/sched.h -+++ b/include/linux/sched.h -@@ -1822,6 +1822,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * +Index: linux-3.4/include/linux/sched.h +=================================================================== +--- linux-3.4.orig/include/linux/sched.h ++++ linux-3.4/include/linux/sched.h +@@ -1864,6 +1864,7 @@ extern void thread_group_times(struct ta #define PF_FROZEN 0x00010000 /* frozen for system suspend */ #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ #define PF_KSWAPD 0x00040000 /* I am kswapd */ @@ -21,11 +20,11 @@ index 175aaee..6f10df5 100644 #define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */ #define PF_KTHREAD 0x00200000 /* I am a kernel thread */ #define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */ -diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c -index 61779f8..484a335 100644 ---- a/kernel/stop_machine.c -+++ b/kernel/stop_machine.c -@@ -327,6 +327,7 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb, +Index: linux-3.4/kernel/stop_machine.c +=================================================================== +--- linux-3.4.orig/kernel/stop_machine.c ++++ linux-3.4/kernel/stop_machine.c +@@ -327,6 +327,7 @@ static int __cpuinit cpu_stop_cpu_callba if (IS_ERR(p)) return notifier_from_errno(PTR_ERR(p)); get_task_struct(p); @@ -33,6 +32,3 @@ index 61779f8..484a335 100644 kthread_bind(p, cpu); sched_set_stop_task(cpu, p); stopper->thread = p; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0157-stomp-machine-raw-lock.patch.patch b/debian/patches/features/all/rt/stomp-machine-raw-lock.patch similarity index 80% rename from debian/patches/features/all/rt/0157-stomp-machine-raw-lock.patch.patch rename to debian/patches/features/all/rt/stomp-machine-raw-lock.patch index 070ad5b89..bf9424d1e 100644 --- a/debian/patches/features/all/rt/0157-stomp-machine-raw-lock.patch.patch +++ b/debian/patches/features/all/rt/stomp-machine-raw-lock.patch @@ -1,17 +1,16 @@ -From 3186fdbdb48a91d93b7fe5e0002969a731075380 Mon Sep 17 00:00:00 2001 +Subject: stomp-machine-raw-lock.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 11:01:51 +0200 -Subject: [PATCH 157/267] stomp-machine-raw-lock.patch Signed-off-by: Thomas Gleixner --- - kernel/stop_machine.c | 58 ++++++++++++++++++++++++++++++++++--------------- + kernel/stop_machine.c | 58 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 17 deletions(-) -diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c -index 484a335..561ba3a 100644 ---- a/kernel/stop_machine.c -+++ b/kernel/stop_machine.c +Index: linux-3.4/kernel/stop_machine.c +=================================================================== +--- linux-3.4.orig/kernel/stop_machine.c ++++ linux-3.4/kernel/stop_machine.c @@ -29,12 +29,12 @@ struct cpu_stop_done { atomic_t nr_todo; /* nr left to execute */ bool executed; /* actually executed? */ @@ -27,7 +26,7 @@ index 484a335..561ba3a 100644 bool enabled; /* is this stopper enabled? */ struct list_head works; /* list of pending works */ struct task_struct *thread; /* stopper thread */ -@@ -47,7 +47,7 @@ static void cpu_stop_init_done(struct cpu_stop_done *done, unsigned int nr_todo) +@@ -47,7 +47,7 @@ static void cpu_stop_init_done(struct cp { memset(done, 0, sizeof(*done)); atomic_set(&done->nr_todo, nr_todo); @@ -36,7 +35,7 @@ index 484a335..561ba3a 100644 } /* signal completion unless @done is NULL */ -@@ -56,8 +56,10 @@ static void cpu_stop_signal_done(struct cpu_stop_done *done, bool executed) +@@ -56,8 +56,10 @@ static void cpu_stop_signal_done(struct if (done) { if (executed) done->executed = true; @@ -49,7 +48,7 @@ index 484a335..561ba3a 100644 } } -@@ -67,7 +69,7 @@ static void cpu_stop_queue_work(struct cpu_stopper *stopper, +@@ -67,7 +69,7 @@ static void cpu_stop_queue_work(struct c { unsigned long flags; @@ -58,7 +57,7 @@ index 484a335..561ba3a 100644 if (stopper->enabled) { list_add_tail(&work->list, &stopper->works); -@@ -75,7 +77,23 @@ static void cpu_stop_queue_work(struct cpu_stopper *stopper, +@@ -75,7 +77,23 @@ static void cpu_stop_queue_work(struct c } else cpu_stop_signal_done(work->done, false); @@ -83,7 +82,7 @@ index 484a335..561ba3a 100644 } /** -@@ -109,7 +127,7 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) +@@ -109,7 +127,7 @@ int stop_one_cpu(unsigned int cpu, cpu_s cpu_stop_init_done(&done, 1); cpu_stop_queue_work(&per_cpu(cpu_stopper, cpu), &work); @@ -92,7 +91,7 @@ index 484a335..561ba3a 100644 return done.executed ? done.ret : -ENOENT; } -@@ -171,7 +189,7 @@ static int __stop_cpus(const struct cpumask *cpumask, +@@ -171,7 +189,7 @@ static int __stop_cpus(const struct cpum cpu_stop_init_done(&done, cpumask_weight(cpumask)); queue_stop_cpus_work(cpumask, fn, arg, &done); @@ -131,7 +130,7 @@ index 484a335..561ba3a 100644 } else schedule(); -@@ -337,9 +361,9 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb, +@@ -337,9 +361,9 @@ static int __cpuinit cpu_stop_cpu_callba /* strictly unnecessary, as first user will wake it */ wake_up_process(stopper->thread); /* mark enabled */ @@ -143,7 +142,7 @@ index 484a335..561ba3a 100644 break; #ifdef CONFIG_HOTPLUG_CPU -@@ -352,11 +376,11 @@ static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb, +@@ -352,11 +376,11 @@ static int __cpuinit cpu_stop_cpu_callba /* kill the stopper */ kthread_stop(stopper->thread); /* drain remaining works */ @@ -166,7 +165,7 @@ index 484a335..561ba3a 100644 INIT_LIST_HEAD(&stopper->works); } -@@ -581,7 +605,7 @@ int stop_machine_from_inactive_cpu(int (*fn)(void *), void *data, +@@ -581,7 +605,7 @@ int stop_machine_from_inactive_cpu(int ( ret = stop_machine_cpu_stop(&smdata); /* Busy wait for completion. */ @@ -175,6 +174,3 @@ index 484a335..561ba3a 100644 cpu_relax(); mutex_unlock(&stop_cpus_mutex); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0155-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch b/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch similarity index 76% rename from debian/patches/features/all/rt/0155-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch rename to debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch index 66d5fdcb6..0159c7f99 100644 --- a/debian/patches/features/all/rt/0155-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch +++ b/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch @@ -1,8 +1,6 @@ -From d85c5e002debb67bd3277d1d4308125158ca4860 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:27 -0500 -Subject: [PATCH 155/267] stop_machine: convert stop_machine_run() to - PREEMPT_RT +Subject: stop_machine: convert stop_machine_run() to PREEMPT_RT Instead of playing with non-preemption, introduce explicit startup serialization. This is more robust and cleaner as @@ -10,15 +8,16 @@ well. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/stop_machine.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) -diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c -index 2f194e9..61779f8 100644 ---- a/kernel/stop_machine.c -+++ b/kernel/stop_machine.c -@@ -135,6 +135,7 @@ void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, +Index: linux-3.4/kernel/stop_machine.c +=================================================================== +--- linux-3.4.orig/kernel/stop_machine.c ++++ linux-3.4/kernel/stop_machine.c +@@ -135,6 +135,7 @@ void stop_one_cpu_nowait(unsigned int cp /* static data for stop_cpus */ static DEFINE_MUTEX(stop_cpus_mutex); @@ -26,7 +25,7 @@ index 2f194e9..61779f8 100644 static DEFINE_PER_CPU(struct cpu_stop_work, stop_cpus_work); static void queue_stop_cpus_work(const struct cpumask *cpumask, -@@ -153,15 +154,14 @@ static void queue_stop_cpus_work(const struct cpumask *cpumask, +@@ -153,15 +154,14 @@ static void queue_stop_cpus_work(const s } /* @@ -63,6 +62,3 @@ index 2f194e9..61779f8 100644 /* cpu stop callbacks are not allowed to sleep */ preempt_disable(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0052-suspend-Prevent-might-sleep-splats.patch b/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch similarity index 62% rename from debian/patches/features/all/rt/0052-suspend-Prevent-might-sleep-splats.patch rename to debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch index 7a8de3bdd..69124730e 100644 --- a/debian/patches/features/all/rt/0052-suspend-Prevent-might-sleep-splats.patch +++ b/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch @@ -1,7 +1,6 @@ -From f79388c83db88b6ef89497405df9c630964b512e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 15 Jul 2010 10:29:00 +0200 -Subject: [PATCH 052/267] suspend: Prevent might sleep splats +Subject: suspend: Prevent might sleep splats timekeeping suspend/resume calls read_persistant_clock() which takes rtc_lock. That results in might sleep warnings because at that point @@ -17,17 +16,18 @@ and restoring it to SYSTEM_RUNNING afer sysdev_resume(). Needs to be revisited. Signed-off-by: Thomas Gleixner + --- include/linux/kernel.h | 2 +- kernel/power/hibernate.c | 7 +++++++ kernel/power/suspend.c | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) -diff --git a/include/linux/kernel.h b/include/linux/kernel.h -index a70783d..22bdd4b 100644 ---- a/include/linux/kernel.h -+++ b/include/linux/kernel.h -@@ -369,7 +369,7 @@ extern enum system_states { +Index: linux-3.4/include/linux/kernel.h +=================================================================== +--- linux-3.4.orig/include/linux/kernel.h ++++ linux-3.4/include/linux/kernel.h +@@ -374,7 +374,7 @@ extern enum system_states { SYSTEM_HALT, SYSTEM_POWER_OFF, SYSTEM_RESTART, @@ -36,11 +36,11 @@ index a70783d..22bdd4b 100644 } system_state; #define TAINT_PROPRIETARY_MODULE 0 -diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c -index 7c0d578..32741e2 100644 ---- a/kernel/power/hibernate.c -+++ b/kernel/power/hibernate.c -@@ -284,6 +284,8 @@ static int create_image(int platform_mode) +Index: linux-3.4/kernel/power/hibernate.c +=================================================================== +--- linux-3.4.orig/kernel/power/hibernate.c ++++ linux-3.4/kernel/power/hibernate.c +@@ -270,6 +270,8 @@ static int create_image(int platform_mod local_irq_disable(); @@ -49,7 +49,7 @@ index 7c0d578..32741e2 100644 error = syscore_suspend(); if (error) { printk(KERN_ERR "PM: Some system devices failed to power down, " -@@ -311,6 +313,7 @@ static int create_image(int platform_mode) +@@ -297,6 +299,7 @@ static int create_image(int platform_mod syscore_resume(); Enable_irqs: @@ -57,7 +57,7 @@ index 7c0d578..32741e2 100644 local_irq_enable(); Enable_cpus: -@@ -437,6 +440,7 @@ static int resume_target_kernel(bool platform_mode) +@@ -420,6 +423,7 @@ static int resume_target_kernel(bool pla goto Enable_cpus; local_irq_disable(); @@ -65,7 +65,7 @@ index 7c0d578..32741e2 100644 error = syscore_suspend(); if (error) -@@ -470,6 +474,7 @@ static int resume_target_kernel(bool platform_mode) +@@ -453,6 +457,7 @@ static int resume_target_kernel(bool pla syscore_resume(); Enable_irqs: @@ -73,7 +73,7 @@ index 7c0d578..32741e2 100644 local_irq_enable(); Enable_cpus: -@@ -549,6 +554,7 @@ int hibernation_platform_enter(void) +@@ -532,6 +537,7 @@ int hibernation_platform_enter(void) goto Platform_finish; local_irq_disable(); @@ -81,7 +81,7 @@ index 7c0d578..32741e2 100644 syscore_suspend(); if (pm_wakeup_pending()) { error = -EAGAIN; -@@ -561,6 +567,7 @@ int hibernation_platform_enter(void) +@@ -544,6 +550,7 @@ int hibernation_platform_enter(void) Power_up: syscore_resume(); @@ -89,11 +89,11 @@ index 7c0d578..32741e2 100644 local_irq_enable(); enable_nonboot_cpus(); -diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c -index 4953dc0..691f46e 100644 ---- a/kernel/power/suspend.c -+++ b/kernel/power/suspend.c -@@ -171,6 +171,8 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) +Index: linux-3.4/kernel/power/suspend.c +=================================================================== +--- linux-3.4.orig/kernel/power/suspend.c ++++ linux-3.4/kernel/power/suspend.c +@@ -164,6 +164,8 @@ static int suspend_enter(suspend_state_t arch_suspend_disable_irqs(); BUG_ON(!irqs_disabled()); @@ -102,7 +102,7 @@ index 4953dc0..691f46e 100644 error = syscore_suspend(); if (!error) { *wakeup = pm_wakeup_pending(); -@@ -181,6 +183,8 @@ static int suspend_enter(suspend_state_t state, bool *wakeup) +@@ -174,6 +176,8 @@ static int suspend_enter(suspend_state_t syscore_resume(); } @@ -111,6 +111,3 @@ index 4953dc0..691f46e 100644 arch_suspend_enable_irqs(); BUG_ON(irqs_disabled()); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0059-sysctl-include-fix.patch.patch b/debian/patches/features/all/rt/sysctl-include-atomic-h.patch similarity index 50% rename from debian/patches/features/all/rt/0059-sysctl-include-fix.patch.patch rename to debian/patches/features/all/rt/sysctl-include-atomic-h.patch index 620b56a42..6987ea72a 100644 --- a/debian/patches/features/all/rt/0059-sysctl-include-fix.patch.patch +++ b/debian/patches/features/all/rt/sysctl-include-atomic-h.patch @@ -1,25 +1,21 @@ -From b44a025ed02cf7deb699ff642758cea3b6198cb7 Mon Sep 17 00:00:00 2001 +Subject: sysctl-include-fix.patch From: Thomas Gleixner Date: Mon, 14 Nov 2011 10:52:34 +0100 -Subject: [PATCH 059/267] sysctl-include-fix.patch Signed-off-by: Thomas Gleixner --- include/linux/sysctl.h | 1 + 1 file changed, 1 insertion(+) -diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h -index 703cfa33..b954c41 100644 ---- a/include/linux/sysctl.h -+++ b/include/linux/sysctl.h -@@ -932,6 +932,7 @@ enum - #include +Index: linux-3.4/include/linux/sysctl.h +=================================================================== +--- linux-3.4.orig/include/linux/sysctl.h ++++ linux-3.4/include/linux/sysctl.h +@@ -933,6 +933,7 @@ enum #include #include + #include +#include /* For the /proc/sys support */ struct ctl_table; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0244-add-sys-kernel-realtime-entry.patch b/debian/patches/features/all/rt/sysfs-realtime-entry.patch similarity index 75% rename from debian/patches/features/all/rt/0244-add-sys-kernel-realtime-entry.patch rename to debian/patches/features/all/rt/sysfs-realtime-entry.patch index d8d8f8b1e..d14cc0cf3 100644 --- a/debian/patches/features/all/rt/0244-add-sys-kernel-realtime-entry.patch +++ b/debian/patches/features/all/rt/sysfs-realtime-entry.patch @@ -1,7 +1,6 @@ -From 2bd60b72e2c1fb5480fab987258ee21135a7c7b4 Mon Sep 17 00:00:00 2001 +Subject: add /sys/kernel/realtime entry From: Clark Williams -Date: Sat, 30 Jul 2011 21:55:53 -0500 -Subject: [PATCH 244/267] add /sys/kernel/realtime entry +Date: Sat Jul 30 21:55:53 2011 -0500 Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. @@ -18,10 +17,10 @@ Signed-off-by: Peter Zijlstra kernel/ksysfs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c -index 4e316e1..a546d33 100644 ---- a/kernel/ksysfs.c -+++ b/kernel/ksysfs.c +Index: linux-3.4/kernel/ksysfs.c +=================================================================== +--- linux-3.4.orig/kernel/ksysfs.c ++++ linux-3.4/kernel/ksysfs.c @@ -133,6 +133,15 @@ KERNEL_ATTR_RO(vmcoreinfo); #endif /* CONFIG_KEXEC */ @@ -38,7 +37,7 @@ index 4e316e1..a546d33 100644 /* whether file capabilities are enabled */ static ssize_t fscaps_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) -@@ -182,6 +191,9 @@ static struct attribute * kernel_attrs[] = { +@@ -182,6 +191,9 @@ static struct attribute * kernel_attrs[] &kexec_crash_size_attr.attr, &vmcoreinfo_attr.attr, #endif @@ -48,6 +47,3 @@ index 4e316e1..a546d33 100644 NULL }; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0187-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch b/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch similarity index 90% rename from debian/patches/features/all/rt/0187-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch rename to debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch index 9df0409e8..08ccce879 100644 --- a/debian/patches/features/all/rt/0187-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch +++ b/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch @@ -1,8 +1,6 @@ -From 0186c7f6a5827da6ac440b1d79ca105f6d41ff1f Mon Sep 17 00:00:00 2001 +Subject: tasklet: Prevent tasklets from going into infinite spin in RT From: Ingo Molnar -Date: Tue, 29 Nov 2011 20:18:22 -0500 -Subject: [PATCH 187/267] tasklet: Prevent tasklets from going into infinite - spin in RT +Date: Tue Nov 29 20:18:22 2011 -0500 When CONFIG_PREEMPT_RT_FULL is enabled, tasklets run as threads, and spinlocks turn are mutexes. But this can cause issues with @@ -11,21 +9,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 @@ -33,20 +31,21 @@ waiting, then the tasklet_enable() will kick the tasklets to continue. This prevents the lock up from ksoftirq going into an infinite loop. [ rostedt@goodmis.org: ported to 3.0-rt ] - + Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: Thomas Gleixner + --- - include/linux/interrupt.h | 39 ++++----- - kernel/softirq.c | 208 ++++++++++++++++++++++++++++++++------------- + include/linux/interrupt.h | 39 ++++---- + kernel/softirq.c | 208 +++++++++++++++++++++++++++++++++------------- 2 files changed, 170 insertions(+), 77 deletions(-) -diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index 1a74cf7..bb4b441 100644 ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -517,8 +517,9 @@ extern void __send_remote_softirq(struct call_single_data *cp, int cpu, +Index: linux-3.4/include/linux/interrupt.h +=================================================================== +--- linux-3.4.orig/include/linux/interrupt.h ++++ linux-3.4/include/linux/interrupt.h +@@ -511,8 +511,9 @@ extern void __send_remote_softirq(struct 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. @@ -58,7 +57,7 @@ index 1a74cf7..bb4b441 100644 * Tasklet is strictly serialized wrt itself, but not wrt another tasklets. If client needs some intertask synchronization, he makes it with spinlocks. -@@ -543,27 +544,36 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } +@@ -537,27 +538,36 @@ struct tasklet_struct name = { NULL, 0, enum { TASKLET_STATE_SCHED, /* Tasklet is scheduled for execution */ @@ -101,7 +100,7 @@ index 1a74cf7..bb4b441 100644 #define tasklet_unlock_wait(t) do { } while (0) #define tasklet_unlock(t) do { } while (0) #endif -@@ -612,17 +622,8 @@ static inline void tasklet_disable(struct tasklet_struct *t) +@@ -606,17 +616,8 @@ static inline void tasklet_disable(struc smp_mb(); } @@ -121,10 +120,10 @@ index 1a74cf7..bb4b441 100644 extern void tasklet_kill(struct tasklet_struct *t); extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); -diff --git a/kernel/softirq.c b/kernel/softirq.c -index dd80cb4..92b4ca3 100644 ---- a/kernel/softirq.c -+++ b/kernel/softirq.c +Index: linux-3.4/kernel/softirq.c +=================================================================== +--- linux-3.4.orig/kernel/softirq.c ++++ linux-3.4/kernel/softirq.c @@ -21,6 +21,7 @@ #include #include @@ -133,7 +132,7 @@ index dd80cb4..92b4ca3 100644 #include #include #include -@@ -664,15 +665,45 @@ struct tasklet_head +@@ -656,15 +657,45 @@ struct tasklet_head static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec); static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec); @@ -183,7 +182,7 @@ index dd80cb4..92b4ca3 100644 local_irq_restore(flags); } -@@ -683,10 +714,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t) +@@ -675,10 +706,7 @@ void __tasklet_hi_schedule(struct taskle unsigned long flags; local_irq_save(flags); @@ -195,7 +194,7 @@ index dd80cb4..92b4ca3 100644 local_irq_restore(flags); } -@@ -694,50 +722,119 @@ EXPORT_SYMBOL(__tasklet_hi_schedule); +@@ -686,50 +714,119 @@ EXPORT_SYMBOL(__tasklet_hi_schedule); void __tasklet_hi_schedule_first(struct tasklet_struct *t) { @@ -341,7 +340,7 @@ index dd80cb4..92b4ca3 100644 static void tasklet_hi_action(struct softirq_action *a) { struct tasklet_struct *list; -@@ -748,29 +845,7 @@ static void tasklet_hi_action(struct softirq_action *a) +@@ -740,29 +837,7 @@ static void tasklet_hi_action(struct sof __this_cpu_write(tasklet_hi_vec.tail, &__get_cpu_var(tasklet_hi_vec).head); local_irq_enable(); @@ -372,7 +371,7 @@ index dd80cb4..92b4ca3 100644 } -@@ -793,7 +868,7 @@ void tasklet_kill(struct tasklet_struct *t) +@@ -785,7 +860,7 @@ void tasklet_kill(struct tasklet_struct while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { do { @@ -381,7 +380,7 @@ index dd80cb4..92b4ca3 100644 } while (test_bit(TASKLET_STATE_SCHED, &t->state)); } tasklet_unlock_wait(t); -@@ -999,6 +1074,23 @@ void __init softirq_init(void) +@@ -991,6 +1066,23 @@ void __init softirq_init(void) open_softirq(HI_SOFTIRQ, tasklet_hi_action); } @@ -405,6 +404,3 @@ index dd80cb4..92b4ca3 100644 static int run_ksoftirqd(void * __bind_cpu) { ksoftirqd_set_sched_params(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0201-rwlocks-Fix-section-mismatch.patch b/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch similarity index 70% rename from debian/patches/features/all/rt/0201-rwlocks-Fix-section-mismatch.patch rename to debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch index 0a209abdf..82be75d3e 100644 --- a/debian/patches/features/all/rt/0201-rwlocks-Fix-section-mismatch.patch +++ b/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch @@ -1,16 +1,12 @@ -From 09214fcc3def96da1686b6cb616d744138b121a8 Mon Sep 17 00:00:00 2001 +Subject: rwlocks: Fix section mismatch From: John Kacur -Date: Mon, 19 Sep 2011 11:09:27 +0200 -Subject: [PATCH 201/267] rwlocks: Fix section mismatch -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit +Date: Mon, 19 Sep 2011 11:09:27 +0200 (CEST) This fixes the following build error for the preempt-rt kernel. make kernel/fork.o CC kernel/fork.o -kernel/fork.c:90: error: section of ¡tasklist_lock¢ conflicts with previous declaration +kernel/fork.c:90: error: section of ¡tasklist_lock¢ conflicts with previous declaration make[2]: *** [kernel/fork.o] Error 1 make[1]: *** [kernel/fork.o] Error 2 @@ -37,10 +33,10 @@ Signed-off-by: Thomas Gleixner kernel/fork.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -diff --git a/include/linux/rwlock_types.h b/include/linux/rwlock_types.h -index 5317cd9..d0da966 100644 ---- a/include/linux/rwlock_types.h -+++ b/include/linux/rwlock_types.h +Index: linux-3.4/include/linux/rwlock_types.h +=================================================================== +--- linux-3.4.orig/include/linux/rwlock_types.h ++++ linux-3.4/include/linux/rwlock_types.h @@ -47,6 +47,7 @@ typedef struct { RW_DEP_MAP_INIT(lockname) } #endif @@ -50,11 +46,11 @@ index 5317cd9..d0da966 100644 + rwlock_t name __cacheline_aligned_in_smp = __RW_LOCK_UNLOCKED(name) #endif /* __LINUX_RWLOCK_TYPES_H */ -diff --git a/kernel/fork.c b/kernel/fork.c -index 78e5e6a..e3db0cb 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -87,7 +87,7 @@ int max_threads; /* tunable limit on nr_threads */ +Index: linux-3.4/kernel/fork.c +=================================================================== +--- linux-3.4.orig/kernel/fork.c ++++ linux-3.4/kernel/fork.c +@@ -90,7 +90,7 @@ int max_threads; /* tunable limit on nr DEFINE_PER_CPU(unsigned long, process_counts) = 0; @@ -63,6 +59,3 @@ index 78e5e6a..e3db0cb 100644 #ifdef CONFIG_PROVE_RCU int lockdep_tasklist_lock_is_held(void) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/tick-skew.patch b/debian/patches/features/all/rt/tick-skew.patch new file mode 100644 index 000000000..1f47cdbfe --- /dev/null +++ b/debian/patches/features/all/rt/tick-skew.patch @@ -0,0 +1,103 @@ +From: Mike Galbraith +Date: Tue May 8 12:20:58 2012 +0200 +Subject: tick: Add tick skew boot option + +Let the user decide whether power consumption or jitter is the +more important consideration for their machines. + +Quoting removal commit af5ab277ded04bd9bc6b048c5a2f0e7d70ef0867: + +"Historically, Linux has tried to make the regular timer tick on the + various CPUs not happen at the same time, to avoid contention on + xtime_lock. + + Nowadays, with the tickless kernel, this contention no longer happens + since time keeping and updating are done differently. In addition, + this skew is actually hurting power consumption in a measurable way on + many-core systems." + +Problems: + + - Contrary to the above, systems do encounter contention on both + xtime_lock and RCU structure locks when the tick is synchronized. + + - Moderate sized RT systems suffer intolerable jitter due to the tick + being synchronized. + + - SGI reports the same for their large systems. + + - Fully utilized systems reap no power saving benefit from skew removal, + but do suffer from resulting induced lock contention. + + - 0209f649 rcu: limit rcu_node leaf-level fanout + This patch was born to combat lock contention which testing showed + to have been _induced by_ skew removal. Skew the tick, contention + disappeared virtually completely. + +[ tglx: build fix ] + +Signed-off-by: Mike Galbraith +Link: http://lkml.kernel.org/r/1336472458.21924.78.camel@marge.simpson.net +Signed-off-by: Thomas Gleixner + +--- + Documentation/kernel-parameters.txt | 9 +++++++++ + kernel/time/tick-sched.c | 18 ++++++++++++++++++ + 2 files changed, 27 insertions(+) + +Index: linux-3.4/Documentation/kernel-parameters.txt +=================================================================== +--- linux-3.4.orig/Documentation/kernel-parameters.txt ++++ linux-3.4/Documentation/kernel-parameters.txt +@@ -2426,6 +2426,15 @@ bytes respectively. Such letter suffixes + + sched_debug [KNL] Enables verbose scheduler debug messages. + ++ skew_tick= [KNL] Offset the periodic timer tick per cpu to mitigate ++ xtime_lock contention on larger systems, and/or RCU lock ++ contention on all systems with CONFIG_MAXSMP set. ++ Format: { "0" | "1" } ++ 0 -- disable. (may be 1 via CONFIG_CMDLINE="skew_tick=1" ++ 1 -- enable. ++ Note: increases power consumption, thus should only be ++ enabled if running jitter sensitive (HPC/RT) workloads. ++ + security= [SECURITY] Choose a security module to enable at boot. + If this boot parameter is not specified, only the first + security module asking for security registration will be +Index: linux-3.4/kernel/time/tick-sched.c +=================================================================== +--- linux-3.4.orig/kernel/time/tick-sched.c ++++ linux-3.4/kernel/time/tick-sched.c +@@ -814,6 +814,16 @@ static enum hrtimer_restart tick_sched_t + return HRTIMER_RESTART; + } + ++static int sched_skew_tick; ++ ++static int __init skew_tick(char *str) ++{ ++ get_option(&str, &sched_skew_tick); ++ ++ return 0; ++} ++early_param("skew_tick", skew_tick); ++ + /** + * tick_setup_sched_timer - setup the tick emulation timer + */ +@@ -831,6 +841,14 @@ void tick_setup_sched_timer(void) + /* Get the next period (per cpu) */ + hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update()); + ++ /* Offset the tick to avert xtime_lock contention. */ ++ if (sched_skew_tick) { ++ u64 offset = ktime_to_ns(tick_period) >> 1; ++ do_div(offset, num_possible_cpus()); ++ offset *= smp_processor_id(); ++ hrtimer_add_expires_ns(&ts->sched_timer, offset); ++ } ++ + for (;;) { + hrtimer_forward(&ts->sched_timer, now, tick_period); + hrtimer_start_expires(&ts->sched_timer, diff --git a/debian/patches/features/all/rt/timekeeping-split-xtime-lock.patch b/debian/patches/features/all/rt/timekeeping-split-xtime-lock.patch new file mode 100644 index 000000000..d50b8a52a --- /dev/null +++ b/debian/patches/features/all/rt/timekeeping-split-xtime-lock.patch @@ -0,0 +1,521 @@ +Subject: timekeeping: Split xtime_lock +From: Thomas Gleixner +Date: Thu, 01 Mar 2012 15:14:06 +0100 + +xtime_lock is going to be split apart in mainline, so we can shorten +the seqcount protected regions and avoid updating seqcount in some +code pathes. This is a straight forward split, so we can avoid the +whole mess with raw seqlocks for RT. + +Signed-off-by: Thomas Gleixner +--- + kernel/time/jiffies.c | 4 - + kernel/time/tick-common.c | 10 ++- + kernel/time/tick-internal.h | 3 - + kernel/time/tick-sched.c | 16 +++--- + kernel/time/timekeeping.c | 114 +++++++++++++++++++++++++------------------- + 5 files changed, 87 insertions(+), 60 deletions(-) + +Index: linux-3.4/kernel/time/jiffies.c +=================================================================== +--- linux-3.4.orig/kernel/time/jiffies.c ++++ linux-3.4/kernel/time/jiffies.c +@@ -74,9 +74,9 @@ u64 get_jiffies_64(void) + u64 ret; + + do { +- seq = read_seqbegin(&xtime_lock); ++ seq = read_seqcount_begin(&xtime_seq); + ret = jiffies_64; +- } while (read_seqretry(&xtime_lock, seq)); ++ } while (read_seqcount_retry(&xtime_seq, seq)); + return ret; + } + EXPORT_SYMBOL(get_jiffies_64); +Index: linux-3.4/kernel/time/tick-common.c +=================================================================== +--- linux-3.4.orig/kernel/time/tick-common.c ++++ linux-3.4/kernel/time/tick-common.c +@@ -63,13 +63,15 @@ int tick_is_oneshot_available(void) + static void tick_periodic(int cpu) + { + if (tick_do_timer_cpu == cpu) { +- write_seqlock(&xtime_lock); ++ raw_spin_lock(&xtime_lock); ++ write_seqcount_begin(&xtime_seq); + + /* Keep track of the next tick event */ + tick_next_period = ktime_add(tick_next_period, tick_period); + + do_timer(1); +- write_sequnlock(&xtime_lock); ++ write_seqcount_end(&xtime_seq); ++ raw_spin_unlock(&xtime_lock); + } + + update_process_times(user_mode(get_irq_regs())); +@@ -130,9 +132,9 @@ void tick_setup_periodic(struct clock_ev + ktime_t next; + + do { +- seq = read_seqbegin(&xtime_lock); ++ seq = read_seqcount_begin(&xtime_seq); + next = tick_next_period; +- } while (read_seqretry(&xtime_lock, seq)); ++ } while (read_seqcount_retry(&xtime_seq, seq)); + + clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); + +Index: linux-3.4/kernel/time/tick-internal.h +=================================================================== +--- linux-3.4.orig/kernel/time/tick-internal.h ++++ linux-3.4/kernel/time/tick-internal.h +@@ -141,4 +141,5 @@ static inline int tick_device_is_functio + #endif + + extern void do_timer(unsigned long ticks); +-extern seqlock_t xtime_lock; ++extern raw_spinlock_t xtime_lock; ++extern seqcount_t xtime_seq; +Index: linux-3.4/kernel/time/tick-sched.c +=================================================================== +--- linux-3.4.orig/kernel/time/tick-sched.c ++++ linux-3.4/kernel/time/tick-sched.c +@@ -56,7 +56,8 @@ static void tick_do_update_jiffies64(kti + return; + + /* Reevalute with xtime_lock held */ +- write_seqlock(&xtime_lock); ++ raw_spin_lock(&xtime_lock); ++ write_seqcount_begin(&xtime_seq); + + delta = ktime_sub(now, last_jiffies_update); + if (delta.tv64 >= tick_period.tv64) { +@@ -79,7 +80,8 @@ static void tick_do_update_jiffies64(kti + /* Keep the tick_next_period variable up to date */ + tick_next_period = ktime_add(last_jiffies_update, tick_period); + } +- write_sequnlock(&xtime_lock); ++ write_seqcount_end(&xtime_seq); ++ raw_spin_unlock(&xtime_lock); + } + + /* +@@ -89,12 +91,14 @@ static ktime_t tick_init_jiffy_update(vo + { + ktime_t period; + +- write_seqlock(&xtime_lock); ++ raw_spin_lock(&xtime_lock); ++ write_seqcount_begin(&xtime_seq); + /* Did we start the jiffies update yet ? */ + if (last_jiffies_update.tv64 == 0) + last_jiffies_update = tick_next_period; + period = last_jiffies_update; +- write_sequnlock(&xtime_lock); ++ write_seqcount_end(&xtime_seq); ++ raw_spin_unlock(&xtime_lock); + return period; + } + +@@ -316,11 +320,11 @@ static void tick_nohz_stop_sched_tick(st + ts->idle_calls++; + /* Read jiffies and the time when jiffies were updated last */ + do { +- seq = read_seqbegin(&xtime_lock); ++ seq = read_seqcount_begin(&xtime_seq); + last_update = last_jiffies_update; + last_jiffies = jiffies; + time_delta = timekeeping_max_deferment(); +- } while (read_seqretry(&xtime_lock, seq)); ++ } while (read_seqcount_retry(&xtime_seq, seq)); + + if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) || + arch_needs_cpu(cpu)) { +Index: linux-3.4/kernel/time/timekeeping.c +=================================================================== +--- linux-3.4.orig/kernel/time/timekeeping.c ++++ linux-3.4/kernel/time/timekeeping.c +@@ -70,8 +70,9 @@ struct timekeeper { + /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ + struct timespec raw_time; + +- /* Seqlock for all timekeeper values */ +- seqlock_t lock; ++ /* Open coded seqlock for all timekeeper values */ ++ seqcount_t seq; ++ raw_spinlock_t lock; + }; + + static struct timekeeper timekeeper; +@@ -80,7 +81,8 @@ static struct timekeeper timekeeper; + * This read-write spinlock protects us from races in SMP while + * playing with xtime. + */ +-__cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock); ++__cacheline_aligned_in_smp DEFINE_RAW_SPINLOCK(xtime_lock); ++seqcount_t xtime_seq; + + + /* flag for if timekeeping is suspended */ +@@ -228,7 +230,7 @@ void getnstimeofday(struct timespec *ts) + WARN_ON(timekeeping_suspended); + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + *ts = timekeeper.xtime; + nsecs = timekeeping_get_ns(); +@@ -236,7 +238,7 @@ void getnstimeofday(struct timespec *ts) + /* If arch requires, add in gettimeoffset() */ + nsecs += arch_gettimeoffset(); + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + timespec_add_ns(ts, nsecs); + } +@@ -251,7 +253,7 @@ ktime_t ktime_get(void) + WARN_ON(timekeeping_suspended); + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + secs = timekeeper.xtime.tv_sec + + timekeeper.wall_to_monotonic.tv_sec; + nsecs = timekeeper.xtime.tv_nsec + +@@ -260,7 +262,7 @@ ktime_t ktime_get(void) + /* If arch requires, add in gettimeoffset() */ + nsecs += arch_gettimeoffset(); + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + /* + * Use ktime_set/ktime_add_ns to create a proper ktime on + * 32-bit architectures without CONFIG_KTIME_SCALAR. +@@ -286,14 +288,14 @@ void ktime_get_ts(struct timespec *ts) + WARN_ON(timekeeping_suspended); + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + *ts = timekeeper.xtime; + tomono = timekeeper.wall_to_monotonic; + nsecs = timekeeping_get_ns(); + /* If arch requires, add in gettimeoffset() */ + nsecs += arch_gettimeoffset(); + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec, + ts->tv_nsec + tomono.tv_nsec + nsecs); +@@ -321,7 +323,7 @@ void getnstime_raw_and_real(struct times + do { + u32 arch_offset; + +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + *ts_raw = timekeeper.raw_time; + *ts_real = timekeeper.xtime; +@@ -334,7 +336,7 @@ void getnstime_raw_and_real(struct times + nsecs_raw += arch_offset; + nsecs_real += arch_offset; + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + timespec_add_ns(ts_raw, nsecs_raw); + timespec_add_ns(ts_real, nsecs_real); +@@ -373,7 +375,8 @@ int do_settimeofday(const struct timespe + if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) + return -EINVAL; + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + timekeeping_forward_now(); + +@@ -385,7 +388,8 @@ int do_settimeofday(const struct timespe + timekeeper.xtime = *tv; + timekeeping_update(true); + +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + /* signal hrtimers about time change */ + clock_was_set(); +@@ -409,7 +413,8 @@ int timekeeping_inject_offset(struct tim + if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) + return -EINVAL; + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + timekeeping_forward_now(); + +@@ -419,7 +424,8 @@ int timekeeping_inject_offset(struct tim + + timekeeping_update(true); + +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + /* signal hrtimers about time change */ + clock_was_set(); +@@ -440,7 +446,8 @@ static int change_clocksource(void *data + + new = (struct clocksource *) data; + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + timekeeping_forward_now(); + if (!new->enable || new->enable(new) == 0) { +@@ -451,7 +458,8 @@ static int change_clocksource(void *data + } + timekeeping_update(true); + +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + return 0; + } +@@ -498,11 +506,11 @@ void getrawmonotonic(struct timespec *ts + s64 nsecs; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + nsecs = timekeeping_get_ns_raw(); + *ts = timekeeper.raw_time; + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + timespec_add_ns(ts, nsecs); + } +@@ -518,11 +526,11 @@ int timekeeping_valid_for_hres(void) + int ret; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + ret = timekeeper.clock->flags & CLOCK_SOURCE_VALID_FOR_HRES; + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + return ret; + } +@@ -535,11 +543,11 @@ u64 timekeeping_max_deferment(void) + unsigned long seq; + u64 ret; + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + ret = timekeeper.clock->max_idle_ns; + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + return ret; + } +@@ -586,11 +594,13 @@ void __init timekeeping_init(void) + read_persistent_clock(&now); + read_boot_clock(&boot); + +- seqlock_init(&timekeeper.lock); ++ raw_spin_lock_init(&timekeeper.lock); ++ seqcount_init(&timekeeper.seq); + + ntp_init(); + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + clock = clocksource_default_clock(); + if (clock->enable) + clock->enable(clock); +@@ -608,7 +618,8 @@ void __init timekeeping_init(void) + -boot.tv_sec, -boot.tv_nsec); + timekeeper.total_sleep_time.tv_sec = 0; + timekeeper.total_sleep_time.tv_nsec = 0; +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + } + + /* time in seconds when suspend began */ +@@ -657,7 +668,8 @@ void timekeeping_inject_sleeptime(struct + if (!(ts.tv_sec == 0 && ts.tv_nsec == 0)) + return; + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + timekeeping_forward_now(); + +@@ -665,7 +677,8 @@ void timekeeping_inject_sleeptime(struct + + timekeeping_update(true); + +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + /* signal hrtimers about time change */ + clock_was_set(); +@@ -688,7 +701,8 @@ static void timekeeping_resume(void) + + clocksource_resume(); + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + if (timespec_compare(&ts, &timekeeping_suspend_time) > 0) { + ts = timespec_sub(ts, timekeeping_suspend_time); +@@ -698,7 +712,8 @@ static void timekeeping_resume(void) + timekeeper.clock->cycle_last = timekeeper.clock->read(timekeeper.clock); + timekeeper.ntp_error = 0; + timekeeping_suspended = 0; +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + touch_softlockup_watchdog(); + +@@ -716,7 +731,8 @@ static int timekeeping_suspend(void) + + read_persistent_clock(&timekeeping_suspend_time); + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + timekeeping_forward_now(); + timekeeping_suspended = 1; + +@@ -739,7 +755,8 @@ static int timekeeping_suspend(void) + timekeeping_suspend_time = + timespec_add(timekeeping_suspend_time, delta_delta); + } +- write_sequnlock_irqrestore(&timekeeper.lock, flags); ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + + clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); + clocksource_suspend(); +@@ -997,7 +1014,8 @@ static void update_wall_time(void) + int shift = 0, maxshift; + unsigned long flags; + +- write_seqlock_irqsave(&timekeeper.lock, flags); ++ raw_spin_lock_irqsave(&timekeeper.lock, flags); ++ write_seqcount_begin(&timekeeper.seq); + + /* Make sure we're fully resumed: */ + if (unlikely(timekeeping_suspended)) +@@ -1084,8 +1102,8 @@ static void update_wall_time(void) + timekeeping_update(false); + + out: +- write_sequnlock_irqrestore(&timekeeper.lock, flags); +- ++ write_seqcount_end(&timekeeper.seq); ++ raw_spin_unlock_irqrestore(&timekeeper.lock, flags); + } + + /** +@@ -1131,13 +1149,13 @@ void get_monotonic_boottime(struct times + WARN_ON(timekeeping_suspended); + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + *ts = timekeeper.xtime; + tomono = timekeeper.wall_to_monotonic; + sleep = timekeeper.total_sleep_time; + nsecs = timekeeping_get_ns(); + +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec + sleep.tv_sec, + ts->tv_nsec + tomono.tv_nsec + sleep.tv_nsec + nsecs); +@@ -1188,10 +1206,10 @@ struct timespec current_kernel_time(void + unsigned long seq; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + now = timekeeper.xtime; +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + return now; + } +@@ -1203,11 +1221,11 @@ struct timespec get_monotonic_coarse(voi + unsigned long seq; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + + now = timekeeper.xtime; + mono = timekeeper.wall_to_monotonic; +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + set_normalized_timespec(&now, now.tv_sec + mono.tv_sec, + now.tv_nsec + mono.tv_nsec); +@@ -1239,11 +1257,11 @@ void get_xtime_and_monotonic_and_sleep_o + unsigned long seq; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + *xtim = timekeeper.xtime; + *wtom = timekeeper.wall_to_monotonic; + *sleep = timekeeper.total_sleep_time; +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + } + + /** +@@ -1255,9 +1273,9 @@ ktime_t ktime_get_monotonic_offset(void) + struct timespec wtom; + + do { +- seq = read_seqbegin(&timekeeper.lock); ++ seq = read_seqcount_begin(&timekeeper.seq); + wtom = timekeeper.wall_to_monotonic; +- } while (read_seqretry(&timekeeper.lock, seq)); ++ } while (read_seqcount_retry(&timekeeper.seq, seq)); + + return timespec_to_ktime(wtom); + } +@@ -1272,7 +1290,9 @@ EXPORT_SYMBOL_GPL(ktime_get_monotonic_of + */ + void xtime_update(unsigned long ticks) + { +- write_seqlock(&xtime_lock); ++ raw_spin_lock(&xtime_lock); ++ write_seqcount_begin(&xtime_seq); + do_timer(ticks); +- write_sequnlock(&xtime_lock); ++ write_seqcount_end(&xtime_seq); ++ raw_spin_unlock(&xtime_lock); + } diff --git a/debian/patches/features/all/rt/0129-timer-delay-waking-softirqs-from-the-jiffy-tick.patch b/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch similarity index 88% rename from debian/patches/features/all/rt/0129-timer-delay-waking-softirqs-from-the-jiffy-tick.patch rename to debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch index f62cef6c4..665c2ce1a 100644 --- a/debian/patches/features/all/rt/0129-timer-delay-waking-softirqs-from-the-jiffy-tick.patch +++ b/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch @@ -1,7 +1,6 @@ -From bd101c10314f466f80841254637d9239e5f9c505 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 21 Aug 2009 11:56:45 +0200 -Subject: [PATCH 129/267] timer: delay waking softirqs from the jiffy tick +Subject: timer: delay waking softirqs from the jiffy tick People were complaining about broken balancing with the recent -rt series. @@ -52,15 +51,16 @@ behaviour. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner + --- kernel/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index 7954334..d1bc5a9 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1334,13 +1334,13 @@ void update_process_times(int user_tick) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1384,13 +1384,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); @@ -75,6 +75,3 @@ index 7954334..d1bc5a9 100644 run_posix_cpu_timers(p); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0137-timer-fd-Prevent-live-lock.patch b/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch similarity index 67% rename from debian/patches/features/all/rt/0137-timer-fd-Prevent-live-lock.patch rename to debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch index bdc1a75df..554409021 100644 --- a/debian/patches/features/all/rt/0137-timer-fd-Prevent-live-lock.patch +++ b/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch @@ -1,7 +1,6 @@ -From 321813f096f30c329dccf035a7c12dade475116f Mon Sep 17 00:00:00 2001 +Subject: timer-fd: Prevent live lock From: Thomas Gleixner Date: Wed, 25 Jan 2012 11:08:40 +0100 -Subject: [PATCH 137/267] timer-fd: Prevent live lock If hrtimer_try_to_cancel() requires a retry, then depending on the priority setting te retry loop might prevent timer callback completion @@ -15,11 +14,11 @@ Cc: stable-rt@vger.kernel.org fs/timerfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/fs/timerfd.c b/fs/timerfd.c -index dffeb37..57f0e4e 100644 ---- a/fs/timerfd.c -+++ b/fs/timerfd.c -@@ -313,7 +313,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, +Index: linux-3.4/fs/timerfd.c +=================================================================== +--- linux-3.4.orig/fs/timerfd.c ++++ linux-3.4/fs/timerfd.c +@@ -313,7 +313,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, uf if (hrtimer_try_to_cancel(&ctx->tmr) >= 0) break; spin_unlock_irq(&ctx->wqh.lock); @@ -28,6 +27,3 @@ index dffeb37..57f0e4e 100644 } /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0202-timer-handle-idle-trylock-in-get-next-timer-irq.patc.patch b/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch similarity index 69% rename from debian/patches/features/all/rt/0202-timer-handle-idle-trylock-in-get-next-timer-irq.patc.patch rename to debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch index 2cf0e451d..4762faed2 100644 --- a/debian/patches/features/all/rt/0202-timer-handle-idle-trylock-in-get-next-timer-irq.patc.patch +++ b/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch @@ -1,7 +1,6 @@ -From 8b7f200b841e795352c05886feded37731a67557 Mon Sep 17 00:00:00 2001 +Subject: timer-handle-idle-trylock-in-get-next-timer-irq.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:08:38 +0200 -Subject: [PATCH 202/267] timer-handle-idle-trylock-in-get-next-timer-irq.patch Signed-off-by: Thomas Gleixner --- @@ -10,11 +9,11 @@ Signed-off-by: Thomas Gleixner kernel/timer.c | 7 ++++--- 3 files changed, 16 insertions(+), 10 deletions(-) -diff --git a/include/linux/spinlock_rt.h b/include/linux/spinlock_rt.h -index 205ca95..3b555b4 100644 ---- a/include/linux/spinlock_rt.h -+++ b/include/linux/spinlock_rt.h -@@ -51,7 +51,17 @@ extern void __lockfunc __rt_spin_unlock(struct rt_mutex *lock); +Index: linux-3.4/include/linux/spinlock_rt.h +=================================================================== +--- linux-3.4.orig/include/linux/spinlock_rt.h ++++ linux-3.4/include/linux/spinlock_rt.h +@@ -51,7 +51,17 @@ extern void __lockfunc __rt_spin_unlock( #define spin_lock_irq(lock) spin_lock(lock) @@ -33,10 +32,10 @@ index 205ca95..3b555b4 100644 #ifdef CONFIG_LOCKDEP # define spin_lock_nested(lock, subclass) \ -diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c -index a7723d2..9850dc0 100644 ---- a/kernel/rtmutex.c -+++ b/kernel/rtmutex.c +Index: linux-3.4/kernel/rtmutex.c +=================================================================== +--- linux-3.4.orig/kernel/rtmutex.c ++++ linux-3.4/kernel/rtmutex.c @@ -861,15 +861,10 @@ EXPORT_SYMBOL(rt_spin_unlock_wait); int __lockfunc rt_spin_trylock(spinlock_t *lock) @@ -54,11 +53,11 @@ index a7723d2..9850dc0 100644 return ret; } EXPORT_SYMBOL(rt_spin_trylock); -diff --git a/kernel/timer.c b/kernel/timer.c -index 8a9ca7d..7ea787b 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1323,13 +1323,14 @@ unsigned long get_next_timer_interrupt(unsigned long now) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1373,13 +1373,14 @@ unsigned long get_next_timer_interrupt(u /* * On PREEMPT_RT we cannot sleep here. If the trylock does not * succeed then we return the worst-case 'expires in 1 tick' @@ -76,6 +75,3 @@ index 8a9ca7d..7ea787b 100644 } else { expires = now + 1; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0130-timers-Avoid-the-switch-timers-base-set-to-NULL-tric.patch b/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch similarity index 79% rename from debian/patches/features/all/rt/0130-timers-Avoid-the-switch-timers-base-set-to-NULL-tric.patch rename to debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch index db0c68609..abd11fbb5 100644 --- a/debian/patches/features/all/rt/0130-timers-Avoid-the-switch-timers-base-set-to-NULL-tric.patch +++ b/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch @@ -1,8 +1,6 @@ -From 54346cdefc5b71e02622139705f1d055e1ffb388 Mon Sep 17 00:00:00 2001 +Subject: timers: Avoid the switch timers base set to NULL trick on RT From: Thomas Gleixner Date: Thu, 21 Jul 2011 15:23:39 +0200 -Subject: [PATCH 130/267] timers: Avoid the switch timers base set to NULL - trick on RT On RT that code is preemptible, so we cannot assign NULL to timers base as a preempter would spin forever in lock_timer_base(). @@ -12,11 +10,11 @@ Signed-off-by: Thomas Gleixner kernel/timer.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index d1bc5a9..8a9ca7d 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -654,6 +654,36 @@ static struct tvec_base *lock_timer_base(struct timer_list *timer, +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -700,6 +700,36 @@ static struct tvec_base *lock_timer_base } } @@ -53,7 +51,7 @@ index d1bc5a9..8a9ca7d 100644 static inline int __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only, int pinned) -@@ -699,14 +729,8 @@ __mod_timer(struct timer_list *timer, unsigned long expires, +@@ -745,14 +775,8 @@ __mod_timer(struct timer_list *timer, un * handler yet has not finished. This also guarantees that * the timer is serialized wrt itself. */ @@ -70,6 +68,3 @@ index d1bc5a9..8a9ca7d 100644 } timer->expires = expires; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0127-timers-fix-timer-hotplug-on-rt.patch b/debian/patches/features/all/rt/timers-fix-timer-hotplug-on-rt.patch similarity index 69% rename from debian/patches/features/all/rt/0127-timers-fix-timer-hotplug-on-rt.patch rename to debian/patches/features/all/rt/timers-fix-timer-hotplug-on-rt.patch index 42350fa51..da011e2d7 100644 --- a/debian/patches/features/all/rt/0127-timers-fix-timer-hotplug-on-rt.patch +++ b/debian/patches/features/all/rt/timers-fix-timer-hotplug-on-rt.patch @@ -1,22 +1,22 @@ -From 5328f8e827a189338556177e5fdf0eb4c325d998 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:32 -0500 -Subject: [PATCH 127/267] timers: fix timer hotplug on -rt +Subject: timers: fix timer hotplug on -rt Here we are in the CPU_DEAD notifier, and we must not sleep nor enable interrupts. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- kernel/timer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index 2aa1215..e36b343 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1714,6 +1714,7 @@ static void __cpuinit migrate_timers(int cpu) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1764,6 +1764,7 @@ static void __cpuinit migrate_timers(int { struct tvec_base *old_base; struct tvec_base *new_base; @@ -24,7 +24,7 @@ index 2aa1215..e36b343 100644 int i; BUG_ON(cpu_online(cpu)); -@@ -1723,8 +1724,11 @@ static void __cpuinit migrate_timers(int cpu) +@@ -1773,8 +1774,11 @@ static void __cpuinit migrate_timers(int * The caller is globally serialized and nobody else * takes two locks at once, deadlock is not possible. */ @@ -38,7 +38,7 @@ index 2aa1215..e36b343 100644 BUG_ON(old_base->running_timer); -@@ -1738,7 +1742,9 @@ static void __cpuinit migrate_timers(int cpu) +@@ -1788,7 +1792,9 @@ static void __cpuinit migrate_timers(int } spin_unlock(&old_base->lock); @@ -49,6 +49,3 @@ index 2aa1215..e36b343 100644 put_cpu_var(tvec_bases); } #endif /* CONFIG_HOTPLUG_CPU */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0128-timers-mov-printk_tick-to-soft-interrupt.patch b/debian/patches/features/all/rt/timers-mov-printk_tick-to-soft-interrupt.patch similarity index 59% rename from debian/patches/features/all/rt/0128-timers-mov-printk_tick-to-soft-interrupt.patch rename to debian/patches/features/all/rt/timers-mov-printk_tick-to-soft-interrupt.patch index fe71df260..e4049b630 100644 --- a/debian/patches/features/all/rt/0128-timers-mov-printk_tick-to-soft-interrupt.patch +++ b/debian/patches/features/all/rt/timers-mov-printk_tick-to-soft-interrupt.patch @@ -1,19 +1,19 @@ -From a62527dec2c2f0b464a7493246c6fb716c9c182d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:30 -0500 -Subject: [PATCH 128/267] timers: mov printk_tick to soft interrupt +Subject: timers: mov printk_tick to soft interrupt Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar + --- kernel/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index e36b343..7954334 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1336,7 +1336,6 @@ void update_process_times(int user_tick) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1386,7 +1386,6 @@ void update_process_times(int user_tick) account_process_tick(p, user_tick); run_local_timers(); rcu_check_callbacks(cpu, user_tick); @@ -21,7 +21,7 @@ index e36b343..7954334 100644 #ifdef CONFIG_IRQ_WORK if (in_irq()) irq_work_run(); -@@ -1352,6 +1351,7 @@ static void run_timer_softirq(struct softirq_action *h) +@@ -1402,6 +1401,7 @@ static void run_timer_softirq(struct sof { struct tvec_base *base = __this_cpu_read(tvec_bases); @@ -29,6 +29,3 @@ index e36b343..7954334 100644 hrtimer_run_pending(); if (time_after_eq(jiffies, base->timer_jiffies)) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0126-timers-preempt-rt-support.patch b/debian/patches/features/all/rt/timers-preempt-rt-support.patch similarity index 71% rename from debian/patches/features/all/rt/0126-timers-preempt-rt-support.patch rename to debian/patches/features/all/rt/timers-preempt-rt-support.patch index a9bde30b9..f45871dc9 100644 --- a/debian/patches/features/all/rt/0126-timers-preempt-rt-support.patch +++ b/debian/patches/features/all/rt/timers-preempt-rt-support.patch @@ -1,7 +1,6 @@ -From d6af602c1a87abbfc8c7a01600f97ad75f358f10 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:20 -0500 -Subject: [PATCH 126/267] timers: preempt-rt support +Subject: timers: preempt-rt support Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner @@ -9,11 +8,11 @@ Signed-off-by: Thomas Gleixner kernel/timer.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) -diff --git a/kernel/timer.c b/kernel/timer.c -index e4b2373..2aa1215 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c -@@ -1294,6 +1294,22 @@ unsigned long get_next_timer_interrupt(unsigned long now) +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c +@@ -1344,6 +1344,22 @@ unsigned long get_next_timer_interrupt(u */ if (cpu_is_offline(smp_processor_id())) return now + NEXT_TIMER_MAX_DELTA; @@ -36,7 +35,7 @@ index e4b2373..2aa1215 100644 spin_lock(&base->lock); if (time_before_eq(base->next_timer, base->timer_jiffies)) base->next_timer = __next_timer_interrupt(base); -@@ -1302,7 +1318,7 @@ unsigned long get_next_timer_interrupt(unsigned long now) +@@ -1352,7 +1368,7 @@ unsigned long get_next_timer_interrupt(u if (time_before_eq(expires, now)) return now; @@ -45,6 +44,3 @@ index e4b2373..2aa1215 100644 return cmp_next_hrtimer_event(now, expires); } #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0125-timers-prepare-for-full-preemption.patch b/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch similarity index 76% rename from debian/patches/features/all/rt/0125-timers-prepare-for-full-preemption.patch rename to debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch index 7716473c8..01cdcea55 100644 --- a/debian/patches/features/all/rt/0125-timers-prepare-for-full-preemption.patch +++ b/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch @@ -1,7 +1,6 @@ -From 7ebba5f37928b6e989b7b2a50fef92ec51e99147 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 -Subject: [PATCH 125/267] timers: prepare for full preemption +Subject: timers: prepare for full preemption 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 +8,17 @@ callback. Add a waitqueue to resolve that. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- include/linux/timer.h | 2 +- kernel/timer.c | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) -diff --git a/include/linux/timer.h b/include/linux/timer.h -index 6abd913..b703477 100644 ---- a/include/linux/timer.h -+++ b/include/linux/timer.h -@@ -276,7 +276,7 @@ extern void add_timer(struct timer_list *timer); +Index: linux-3.4/include/linux/timer.h +=================================================================== +--- linux-3.4.orig/include/linux/timer.h ++++ linux-3.4/include/linux/timer.h +@@ -276,7 +276,7 @@ extern void add_timer(struct timer_list extern int try_to_del_timer_sync(struct timer_list *timer); @@ -27,10 +27,10 @@ index 6abd913..b703477 100644 extern int del_timer_sync(struct timer_list *timer); #else # define del_timer_sync(t) del_timer(t) -diff --git a/kernel/timer.c b/kernel/timer.c -index 9c3c62b..e4b2373 100644 ---- a/kernel/timer.c -+++ b/kernel/timer.c +Index: linux-3.4/kernel/timer.c +=================================================================== +--- linux-3.4.orig/kernel/timer.c ++++ linux-3.4/kernel/timer.c @@ -75,6 +75,7 @@ struct tvec_root { struct tvec_base { spinlock_t lock; @@ -39,7 +39,7 @@ index 9c3c62b..e4b2373 100644 unsigned long timer_jiffies; unsigned long next_timer; struct tvec_root tv1; -@@ -679,12 +680,15 @@ __mod_timer(struct timer_list *timer, unsigned long expires, +@@ -725,12 +726,15 @@ __mod_timer(struct timer_list *timer, un debug_activate(timer, expires); @@ -55,7 +55,7 @@ index 9c3c62b..e4b2373 100644 new_base = per_cpu(tvec_bases, cpu); if (base != new_base) { -@@ -885,6 +889,29 @@ void add_timer_on(struct timer_list *timer, int cpu) +@@ -931,6 +935,29 @@ void add_timer_on(struct timer_list *tim } EXPORT_SYMBOL_GPL(add_timer_on); @@ -85,7 +85,7 @@ index 9c3c62b..e4b2373 100644 /** * del_timer - deactive a timer. * @timer: the timer to be deactivated -@@ -953,7 +980,7 @@ out: +@@ -1003,7 +1030,7 @@ out: } EXPORT_SYMBOL(try_to_del_timer_sync); @@ -94,7 +94,7 @@ index 9c3c62b..e4b2373 100644 /** * del_timer_sync - deactivate a timer and wait for the handler to finish. * @timer: the timer to be deactivated -@@ -1013,7 +1040,7 @@ int del_timer_sync(struct timer_list *timer) +@@ -1063,7 +1090,7 @@ int del_timer_sync(struct timer_list *ti int ret = try_to_del_timer_sync(timer); if (ret >= 0) return ret; @@ -103,7 +103,7 @@ index 9c3c62b..e4b2373 100644 } } EXPORT_SYMBOL(del_timer_sync); -@@ -1124,10 +1151,11 @@ static inline void __run_timers(struct tvec_base *base) +@@ -1174,10 +1201,11 @@ static inline void __run_timers(struct t spin_unlock_irq(&base->lock); call_timer_fn(timer, fn, data); @@ -116,7 +116,7 @@ index 9c3c62b..e4b2373 100644 spin_unlock_irq(&base->lock); } -@@ -1634,6 +1662,7 @@ static int __cpuinit init_timers_cpu(int cpu) +@@ -1684,6 +1712,7 @@ static int __cpuinit init_timers_cpu(int } spin_lock_init(&base->lock); @@ -124,6 +124,3 @@ index 9c3c62b..e4b2373 100644 for (j = 0; j < TVN_SIZE; j++) { INIT_LIST_HEAD(base->tv5.vec + j); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0025-tracing-Account-for-preempt-off-in-preempt_schedule.patch b/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch similarity index 79% rename from debian/patches/features/all/rt/0025-tracing-Account-for-preempt-off-in-preempt_schedule.patch rename to debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch index 94cab3dae..64043b6ab 100644 --- a/debian/patches/features/all/rt/0025-tracing-Account-for-preempt-off-in-preempt_schedule.patch +++ b/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch @@ -1,8 +1,6 @@ -From ee9d814d8872fc578eb31771307b2b6a8f5822f8 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 29 Sep 2011 12:24:30 -0500 -Subject: [PATCH 025/267] tracing: Account for preempt off in - preempt_schedule() +Subject: tracing: Account for preempt off in preempt_schedule() The preempt_schedule() uses the preempt_disable_notrace() version because it can cause infinite recursion by the function tracer as @@ -24,14 +22,14 @@ Signed-off-by: Steven Rostedt Signed-off-by: Clark Williams Signed-off-by: Thomas Gleixner --- - kernel/sched.c | 9 +++++++++ + kernel/sched/core.c | 9 +++++++++ 1 file changed, 9 insertions(+) -diff --git a/kernel/sched.c b/kernel/sched.c -index a39494e..6b32395 100644 ---- a/kernel/sched.c -+++ b/kernel/sched.c -@@ -4520,7 +4520,16 @@ asmlinkage void __sched notrace preempt_schedule(void) +Index: linux-3.4/kernel/sched/core.c +=================================================================== +--- linux-3.4.orig/kernel/sched/core.c ++++ linux-3.4/kernel/sched/core.c +@@ -3312,7 +3312,16 @@ asmlinkage void __sched notrace preempt_ do { add_preempt_count_notrace(PREEMPT_ACTIVE); @@ -48,6 +46,3 @@ index a39494e..6b32395 100644 sub_preempt_count_notrace(PREEMPT_ACTIVE); /* --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0088-tty-Do-not-disable-interrupts-in-put_ldisc-on-rt.patch b/debian/patches/features/all/rt/tty-use-local-irq-nort.patch similarity index 74% rename from debian/patches/features/all/rt/0088-tty-Do-not-disable-interrupts-in-put_ldisc-on-rt.patch rename to debian/patches/features/all/rt/tty-use-local-irq-nort.patch index d446deea0..e34dc82e6 100644 --- a/debian/patches/features/all/rt/0088-tty-Do-not-disable-interrupts-in-put_ldisc-on-rt.patch +++ b/debian/patches/features/all/rt/tty-use-local-irq-nort.patch @@ -1,7 +1,6 @@ -From 6dabd1ea3f534ed222bd7fb1391308d5e5ffc844 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 17 Aug 2009 19:49:19 +0200 -Subject: [PATCH 088/267] tty: Do not disable interrupts in put_ldisc on -rt +Subject: tty: Do not disable interrupts in put_ldisc on -rt Fixes the following on PREEMPT_RT: @@ -21,15 +20,16 @@ Call Trace: .... Signed-off-by: Thomas Gleixner + --- drivers/tty/tty_ldisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c -index 8e0924f..820f7dc 100644 ---- a/drivers/tty/tty_ldisc.c -+++ b/drivers/tty/tty_ldisc.c -@@ -71,7 +71,7 @@ static void put_ldisc(struct tty_ldisc *ld) +Index: linux-3.4/drivers/tty/tty_ldisc.c +=================================================================== +--- linux-3.4.orig/drivers/tty/tty_ldisc.c ++++ linux-3.4/drivers/tty/tty_ldisc.c +@@ -53,7 +53,7 @@ static void put_ldisc(struct tty_ldisc * * We really want an "atomic_dec_and_lock_irqsave()", * but we don't have it, so this does it by hand. */ @@ -38,7 +38,7 @@ index 8e0924f..820f7dc 100644 if (atomic_dec_and_lock(&ld->users, &tty_ldisc_lock)) { struct tty_ldisc_ops *ldo = ld->ops; -@@ -82,7 +82,7 @@ static void put_ldisc(struct tty_ldisc *ld) +@@ -64,7 +64,7 @@ static void put_ldisc(struct tty_ldisc * kfree(ld); return; } @@ -47,6 +47,3 @@ index 8e0924f..820f7dc 100644 wake_up(&tty_ldisc_idle); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch new file mode 100644 index 000000000..7586d5303 --- /dev/null +++ b/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -0,0 +1,67 @@ +Subject: [UPSTREAM]net,RT:REmove preemption disabling in netif_rx() +From: Priyanka Jain +Date: Thu, 17 May 2012 09:35:11 +0530 + +1)enqueue_to_backlog() (called from netif_rx) should be + bind to a particluar CPU. This can be achieved by + disabling migration. No need to disable preemption + +2)Fixes crash "BUG: scheduling while atomic: ksoftirqd" + in case of RT. + If preemption is disabled, enqueue_to_backog() is called + in atomic context. And if backlog exceeds its count, + kfree_skb() is called. But in RT, kfree_skb() might + gets scheduled out, so it expects non atomic context. + +3)When CONFIG_PREEMPT_RT_FULL is not defined, + migrate_enable(), migrate_disable() maps to + preempt_enable() and preempt_disable(), so no + change in functionality in case of non-RT. + +-Replace preempt_enable(), preempt_disable() with + migrate_enable(), migrate_disable() respectively +-Replace get_cpu(), put_cpu() with get_cpu_light(), + put_cpu_light() respectively + +Signed-off-by: Priyanka Jain +Acked-by: Rajan Srivastava +Cc: +Link: http://lkml.kernel.org/r/1337227511-2271-1-git-send-email-Priyanka.Jain@freescale.com +Cc: stable-rt@vger.kernel.org +Signed-off-by: Thomas Gleixner +--- + Testing: Tested successfully on p4080ds(8-core SMP system) + + net/core/dev.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: linux-3.4/net/core/dev.c +=================================================================== +--- linux-3.4.orig/net/core/dev.c ++++ linux-3.4/net/core/dev.c +@@ -2937,7 +2937,7 @@ int netif_rx(struct sk_buff *skb) + struct rps_dev_flow voidflow, *rflow = &voidflow; + int cpu; + +- preempt_disable(); ++ migrate_disable(); + rcu_read_lock(); + + cpu = get_rps_cpu(skb->dev, skb, &rflow); +@@ -2947,13 +2947,13 @@ int netif_rx(struct sk_buff *skb) + ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); + + rcu_read_unlock(); +- preempt_enable(); ++ migrate_enable(); + } else + #endif + { + unsigned int qtail; +- ret = enqueue_to_backlog(skb, get_cpu(), &qtail); +- put_cpu(); ++ ret = enqueue_to_backlog(skb, get_cpu_light(), &qtail); ++ put_cpu_light(); + } + return ret; + } diff --git a/debian/patches/features/all/rt/0102-USB-Fix-the-mouse-problem-when-copying-large-amounts.patch b/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch similarity index 68% rename from debian/patches/features/all/rt/0102-USB-Fix-the-mouse-problem-when-copying-large-amounts.patch rename to debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch index 84cd2eb8f..008b53a77 100644 --- a/debian/patches/features/all/rt/0102-USB-Fix-the-mouse-problem-when-copying-large-amounts.patch +++ b/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch @@ -1,8 +1,6 @@ -From 39b88ab341a16993ed1129097a40465312e18af8 Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Mon, 4 Jan 2010 11:33:02 +0800 -Subject: [PATCH 102/267] USB: Fix the mouse problem when copying large - amounts of data +Subject: USB: Fix the mouse problem when copying large amounts of data When copying large amounts of data between the USB storage devices and the hard disk, the USB mouse will not work, this patch fixes it. @@ -12,15 +10,16 @@ sure whether it is producible on other platforms] Signed-off-by: Hu Hongbing Signed-off-by: Wu Zhangjin + --- drivers/usb/host/ohci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c -index b263919..d4b05d1 100644 ---- a/drivers/usb/host/ohci-hcd.c -+++ b/drivers/usb/host/ohci-hcd.c -@@ -830,9 +830,13 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) +Index: linux-3.4/drivers/usb/host/ohci-hcd.c +=================================================================== +--- linux-3.4.orig/drivers/usb/host/ohci-hcd.c ++++ linux-3.4/drivers/usb/host/ohci-hcd.c +@@ -829,9 +829,13 @@ static irqreturn_t ohci_irq (struct usb_ } if (ints & OHCI_INTR_WDH) { @@ -37,6 +36,3 @@ index b263919..d4b05d1 100644 } if (quirk_zfmicro(ohci) && (ints & OHCI_INTR_SF)) { --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0087-usb-Use-local_irq_-_nort-variants.patch b/debian/patches/features/all/rt/usb-hcd-use-local-irq-nort.patch similarity index 57% rename from debian/patches/features/all/rt/0087-usb-Use-local_irq_-_nort-variants.patch rename to debian/patches/features/all/rt/usb-hcd-use-local-irq-nort.patch index 78fdcc770..2a62a827b 100644 --- a/debian/patches/features/all/rt/0087-usb-Use-local_irq_-_nort-variants.patch +++ b/debian/patches/features/all/rt/usb-hcd-use-local-irq-nort.patch @@ -1,39 +1,36 @@ -From aede9f913c631a8c15d7e4bc1898eb7021dc234c Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 3 Jul 2009 08:44:26 -0500 -Subject: [PATCH 087/267] usb: Use local_irq_*_nort() variants +Subject: usb: Use local_irq_*_nort() variants [ tglx: Now that irqf_disabled is dead we should kill that ] Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- 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 8cb9304..32dfd76 100644 ---- a/drivers/usb/core/hcd.c -+++ b/drivers/usb/core/hcd.c -@@ -2145,7 +2145,7 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) +Index: linux-3.4/drivers/usb/core/hcd.c +=================================================================== +--- linux-3.4.orig/drivers/usb/core/hcd.c ++++ linux-3.4/drivers/usb/core/hcd.c +@@ -2143,7 +2143,7 @@ irqreturn_t usb_hcd_irq (int irq, void * * when the first handler doesn't use it. So let's just * assume it's never used. */ - local_irq_save(flags); + local_irq_save_nort(flags); - if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) { + if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) rc = IRQ_NONE; -@@ -2158,7 +2158,7 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) +@@ -2152,7 +2152,7 @@ irqreturn_t usb_hcd_irq (int irq, void * + else rc = IRQ_HANDLED; - } - local_irq_restore(flags); + local_irq_restore_nort(flags); return rc; } EXPORT_SYMBOL_GPL(usb_hcd_irq); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0085-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch b/debian/patches/features/all/rt/user-use-local-irq-nort.patch similarity index 71% rename from debian/patches/features/all/rt/0085-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch rename to debian/patches/features/all/rt/user-use-local-irq-nort.patch index d4ea19366..eb2ab4db2 100644 --- a/debian/patches/features/all/rt/0085-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch +++ b/debian/patches/features/all/rt/user-use-local-irq-nort.patch @@ -1,21 +1,20 @@ -From 1e9f1cee0ada298f8ffa264a72156c25d9e1b5c1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 21 Jul 2009 23:06:05 +0200 -Subject: [PATCH 085/267] core: Do not disable interrupts on RT in - kernel/users.c +Subject: core: Do not disable interrupts on RT in kernel/users.c 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 + --- kernel/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/kernel/user.c b/kernel/user.c -index 71dd236..b831e51 100644 ---- a/kernel/user.c -+++ b/kernel/user.c +Index: linux-3.4/kernel/user.c +=================================================================== +--- linux-3.4.orig/kernel/user.c ++++ linux-3.4/kernel/user.c @@ -129,11 +129,11 @@ void free_uid(struct user_struct *up) if (!up) return; @@ -30,6 +29,3 @@ index 71dd236..b831e51 100644 } struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid) --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0124-workqueue-avoid-the-lock-in-cpu-dying.patch.patch b/debian/patches/features/all/rt/workqueue-avoid-the-lock-in-cpu-dying.patch similarity index 71% rename from debian/patches/features/all/rt/0124-workqueue-avoid-the-lock-in-cpu-dying.patch.patch rename to debian/patches/features/all/rt/workqueue-avoid-the-lock-in-cpu-dying.patch index dc6c29b86..0089e403b 100644 --- a/debian/patches/features/all/rt/0124-workqueue-avoid-the-lock-in-cpu-dying.patch.patch +++ b/debian/patches/features/all/rt/workqueue-avoid-the-lock-in-cpu-dying.patch @@ -1,18 +1,17 @@ -From 647b3063fcb524a25fe0159d2daee73fd5524f9c Mon Sep 17 00:00:00 2001 +Subject: workqueue-avoid-the-lock-in-cpu-dying.patch From: Thomas Gleixner Date: Fri, 24 Jun 2011 20:39:24 +0200 -Subject: [PATCH 124/267] workqueue-avoid-the-lock-in-cpu-dying.patch Signed-off-by: Thomas Gleixner --- kernel/workqueue.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 4b4421d..8bdc220 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c -@@ -3509,6 +3509,25 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c +@@ -3505,6 +3505,25 @@ static int __devinit workqueue_cpu_callb kthread_stop(new_trustee); return NOTIFY_BAD; } @@ -38,7 +37,7 @@ index 4b4421d..8bdc220 100644 } /* some are called w/ irq disabled, don't disturb irq status */ -@@ -3528,16 +3547,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, +@@ -3524,16 +3543,6 @@ static int __devinit workqueue_cpu_callb gcwq->first_idle = new_worker; break; @@ -55,7 +54,7 @@ index 4b4421d..8bdc220 100644 case CPU_POST_DEAD: gcwq->trustee_state = TRUSTEE_BUTCHER; /* fall through */ -@@ -3571,6 +3580,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, +@@ -3567,6 +3576,7 @@ static int __devinit workqueue_cpu_callb spin_unlock_irqrestore(&gcwq->lock, flags); @@ -63,6 +62,3 @@ index 4b4421d..8bdc220 100644 return notifier_from_errno(0); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0227-workqueue-Fix-PF_THREAD_BOUND-abuse.patch b/debian/patches/features/all/rt/workqueue-fix-PF_THREAD_BOUND.patch similarity index 80% rename from debian/patches/features/all/rt/0227-workqueue-Fix-PF_THREAD_BOUND-abuse.patch rename to debian/patches/features/all/rt/workqueue-fix-PF_THREAD_BOUND.patch index 0b00d1408..ef12b0660 100644 --- a/debian/patches/features/all/rt/0227-workqueue-Fix-PF_THREAD_BOUND-abuse.patch +++ b/debian/patches/features/all/rt/workqueue-fix-PF_THREAD_BOUND.patch @@ -1,7 +1,6 @@ -From 9185f2468627b760334cdf1f18ee1e80efab80ac Mon Sep 17 00:00:00 2001 +Subject: workqueue: Fix PF_THREAD_BOUND abuse From: Peter Zijlstra -Date: Mon, 3 Oct 2011 12:43:25 +0200 -Subject: [PATCH 227/267] workqueue: Fix PF_THREAD_BOUND abuse +Date: Mon Oct 03 12:43:25 CEST 2011 PF_THREAD_BOUND is set by kthread_bind() and means the thread is bound to a particular cpu for correctness. The workqueue code abuses this @@ -29,11 +28,11 @@ Signed-off-by: Thomas Gleixner kernel/workqueue.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 8daede8..02ce5cc 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c -@@ -1288,8 +1288,14 @@ __acquires(&gcwq->lock) +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c +@@ -1283,8 +1283,14 @@ __acquires(&gcwq->lock) return false; if (task_cpu(task) == gcwq->cpu && cpumask_equal(¤t->cpus_allowed, @@ -49,7 +48,7 @@ index 8daede8..02ce5cc 100644 spin_unlock_irq(&gcwq->lock); /* -@@ -1303,6 +1309,18 @@ __acquires(&gcwq->lock) +@@ -1298,6 +1304,18 @@ __acquires(&gcwq->lock) } } @@ -68,7 +67,7 @@ index 8daede8..02ce5cc 100644 static struct worker *alloc_worker(void) { struct worker *worker; -@@ -1365,15 +1383,9 @@ static struct worker *create_worker(struct global_cwq *gcwq, bool bind) +@@ -1360,15 +1378,9 @@ static struct worker *create_worker(stru if (IS_ERR(worker->task)) goto fail; @@ -84,7 +83,7 @@ index 8daede8..02ce5cc 100644 if (on_unbound_cpu) worker->flags |= WORKER_UNBOUND; } -@@ -2050,7 +2062,7 @@ repeat: +@@ -2045,7 +2057,7 @@ repeat: if (keep_working(gcwq)) wake_up_worker(gcwq); @@ -93,7 +92,7 @@ index 8daede8..02ce5cc 100644 } schedule(); -@@ -2999,7 +3011,6 @@ struct workqueue_struct *__alloc_workqueue_key(const char *name, +@@ -2995,7 +3007,6 @@ struct workqueue_struct *__alloc_workque if (IS_ERR(rescuer->task)) goto err; @@ -101,6 +100,3 @@ index 8daede8..02ce5cc 100644 wake_up_process(rescuer->task); } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0228-workqueue-Use-get_cpu_light-in-flush_gcwq.patch b/debian/patches/features/all/rt/workqueue-hotplug-fix.patch similarity index 88% rename from debian/patches/features/all/rt/0228-workqueue-Use-get_cpu_light-in-flush_gcwq.patch rename to debian/patches/features/all/rt/workqueue-hotplug-fix.patch index 702d3ab4c..804d35906 100644 --- a/debian/patches/features/all/rt/0228-workqueue-Use-get_cpu_light-in-flush_gcwq.patch +++ b/debian/patches/features/all/rt/workqueue-hotplug-fix.patch @@ -1,7 +1,6 @@ -From f7562a5bc09a9e5e40565d3ced429908de02bc08 Mon Sep 17 00:00:00 2001 +Subject: workqueue: Use get_cpu_light() in flush_gcwq() From: Yong Zhang Date: Sun, 16 Oct 2011 18:56:46 +0800 -Subject: [PATCH 228/267] workqueue: Use get_cpu_light() in flush_gcwq() BUG: sleeping function called from invalid context at kernel/rtmutex.c:645 in_atomic(): 1, irqs_disabled(): 0, pid: 1739, name: bash @@ -59,11 +58,11 @@ Signed-off-by: Thomas Gleixner kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 02ce5cc..8389afe 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c -@@ -3301,14 +3301,14 @@ static void flush_gcwq(struct global_cwq *gcwq) +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c +@@ -3297,14 +3297,14 @@ static void flush_gcwq(struct global_cwq spin_unlock_irq(&gcwq->lock); @@ -80,6 +79,3 @@ index 02ce5cc..8389afe 100644 } static int __devinit workqueue_cpu_down_callback(struct notifier_block *nfb, --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0229-hotplug-stuff.patch.patch b/debian/patches/features/all/rt/workqueue-more-hotplug-fallout.patch similarity index 55% rename from debian/patches/features/all/rt/0229-hotplug-stuff.patch.patch rename to debian/patches/features/all/rt/workqueue-more-hotplug-fallout.patch index 6807c3298..99b4f5c3d 100644 --- a/debian/patches/features/all/rt/0229-hotplug-stuff.patch.patch +++ b/debian/patches/features/all/rt/workqueue-more-hotplug-fallout.patch @@ -1,7 +1,6 @@ -From ebe89669ba12c905ef019454a240784c1e2fee0a Mon Sep 17 00:00:00 2001 +Subject: hotplug-stuff.patch From: Thomas Gleixner -Date: Fri, 4 Nov 2011 18:58:24 +0100 -Subject: [PATCH 229/267] hotplug-stuff.patch +Date: Fri, 04 Nov 2011 18:58:24 +0100 Do not take lock for non handled cases (might be atomic context) @@ -10,11 +9,11 @@ Signed-off-by: Thomas Gleixner kernel/workqueue.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 8389afe..674d783 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c -@@ -3219,6 +3219,11 @@ static int __devinit workqueue_cpu_up_callback(struct notifier_block *nfb, +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c +@@ -3215,6 +3215,11 @@ static int __devinit workqueue_cpu_up_ca new_worker = create_worker(gcwq, false); if (!new_worker) return NOTIFY_BAD; @@ -26,6 +25,3 @@ index 8389afe..674d783 100644 } /* some are called w/ irq disabled, don't disturb irq status */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0226-workqueue-Fix-cpuhotplug-trainwreck.patch b/debian/patches/features/all/rt/workqueue-sanity.patch similarity index 93% rename from debian/patches/features/all/rt/0226-workqueue-Fix-cpuhotplug-trainwreck.patch rename to debian/patches/features/all/rt/workqueue-sanity.patch index 8ee8f967e..7995c22b8 100644 --- a/debian/patches/features/all/rt/0226-workqueue-Fix-cpuhotplug-trainwreck.patch +++ b/debian/patches/features/all/rt/workqueue-sanity.patch @@ -1,7 +1,6 @@ -From 9d750b53be954a1e37bd4d626ba68cd308a1cd25 Mon Sep 17 00:00:00 2001 +Subject: workqueue: Fix cpuhotplug trainwreck From: Peter Zijlstra -Date: Fri, 30 Sep 2011 11:57:58 +0200 -Subject: [PATCH 226/267] workqueue: Fix cpuhotplug trainwreck +Date: Fri Sep 30 11:57:58 CEST 2011 The current workqueue code does crazy stuff on cpu unplug, it relies on forced affine breakage, thereby violating per-cpu expectations. Worse, @@ -28,16 +27,16 @@ this and loose ~250 lines of code. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner --- - include/linux/cpu.h | 6 +- - include/linux/workqueue.h | 5 +- - kernel/workqueue.c | 556 ++++++++++++--------------------------------- - 3 files changed, 152 insertions(+), 415 deletions(-) + include/linux/cpu.h | 6 + include/linux/workqueue.h | 5 + kernel/workqueue.c | 560 ++++++++++++---------------------------------- + 3 files changed, 154 insertions(+), 417 deletions(-) -diff --git a/include/linux/cpu.h b/include/linux/cpu.h -index c46ec3e..72e90bb 100644 ---- a/include/linux/cpu.h -+++ b/include/linux/cpu.h -@@ -66,8 +66,10 @@ enum { +Index: linux-3.4/include/linux/cpu.h +=================================================================== +--- linux-3.4.orig/include/linux/cpu.h ++++ linux-3.4/include/linux/cpu.h +@@ -75,8 +75,10 @@ enum { /* migration should happen before other stuff but after perf */ CPU_PRI_PERF = 20, CPU_PRI_MIGRATION = 10, @@ -50,10 +49,10 @@ index c46ec3e..72e90bb 100644 }; #define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ -diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h -index e228ca9..3d8ac9d 100644 ---- a/include/linux/workqueue.h -+++ b/include/linux/workqueue.h +Index: linux-3.4/include/linux/workqueue.h +=================================================================== +--- linux-3.4.orig/include/linux/workqueue.h ++++ linux-3.4/include/linux/workqueue.h @@ -254,9 +254,10 @@ enum { WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ WQ_HIGHPRI = 1 << 4, /* high priority */ @@ -67,10 +66,10 @@ index e228ca9..3d8ac9d 100644 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 5d23c05b..8daede8 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c @@ -41,6 +41,7 @@ #include #include @@ -87,9 +86,7 @@ index 5d23c05b..8daede8 100644 - WORKER_REBIND = 1 << 5, /* mom is home, come back */ - WORKER_CPU_INTENSIVE = 1 << 6, /* cpu intensive */ - WORKER_UNBOUND = 1 << 7, /* worker is unbound */ -+ WORKER_CPU_INTENSIVE = 1 << 4, /* cpu intensive */ -+ WORKER_UNBOUND = 1 << 5, /* worker is unbound */ - +- - WORKER_NOT_RUNNING = WORKER_PREP | WORKER_ROGUE | WORKER_REBIND | - WORKER_CPU_INTENSIVE | WORKER_UNBOUND, - @@ -99,6 +96,9 @@ index 5d23c05b..8daede8 100644 - TRUSTEE_BUTCHER = 2, /* butcher workers */ - TRUSTEE_RELEASE = 3, /* release workers */ - TRUSTEE_DONE = 4, /* trustee is done */ ++ WORKER_CPU_INTENSIVE = 1 << 4, /* cpu intensive */ ++ WORKER_UNBOUND = 1 << 5, /* worker is unbound */ ++ + WORKER_NOT_RUNNING = WORKER_PREP | WORKER_CPU_INTENSIVE | WORKER_UNBOUND, BUSY_WORKER_HASH_ORDER = 6, /* 64 pointers */ @@ -131,7 +131,7 @@ index 5d23c05b..8daede8 100644 } ____cacheline_aligned_in_smp; /* -@@ -974,13 +961,38 @@ static bool is_chained_work(struct workqueue_struct *wq) +@@ -969,13 +956,38 @@ static bool is_chained_work(struct workq return false; } @@ -173,7 +173,7 @@ index 5d23c05b..8daede8 100644 unsigned long flags; debug_work_activate(work); -@@ -1026,27 +1038,32 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq, +@@ -1021,27 +1033,32 @@ static void __queue_work(unsigned int cp spin_lock_irqsave(&gcwq->lock, flags); } @@ -223,7 +223,7 @@ index 5d23c05b..8daede8 100644 } /** -@@ -1063,34 +1080,19 @@ int queue_work(struct workqueue_struct *wq, struct work_struct *work) +@@ -1058,34 +1075,19 @@ int queue_work(struct workqueue_struct * { int ret; @@ -261,7 +261,7 @@ index 5d23c05b..8daede8 100644 } EXPORT_SYMBOL_GPL(queue_work_on); -@@ -1136,6 +1138,8 @@ int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, +@@ -1131,6 +1133,8 @@ int queue_delayed_work_on(int cpu, struc struct timer_list *timer = &dwork->timer; struct work_struct *work = &dwork->work; @@ -270,7 +270,7 @@ index 5d23c05b..8daede8 100644 if (!test_and_set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work))) { unsigned int lcpu; -@@ -1201,12 +1205,13 @@ static void worker_enter_idle(struct worker *worker) +@@ -1196,12 +1200,13 @@ static void worker_enter_idle(struct wor /* idle_list is LIFO */ list_add(&worker->entry, &gcwq->idle_list); @@ -290,7 +290,7 @@ index 5d23c05b..8daede8 100644 /* sanity check nr_running */ WARN_ON_ONCE(gcwq->nr_workers == gcwq->nr_idle && -@@ -1298,23 +1303,6 @@ __acquires(&gcwq->lock) +@@ -1293,23 +1298,6 @@ __acquires(&gcwq->lock) } } @@ -314,7 +314,7 @@ index 5d23c05b..8daede8 100644 static struct worker *alloc_worker(void) { struct worker *worker; -@@ -1323,7 +1311,6 @@ static struct worker *alloc_worker(void) +@@ -1318,7 +1306,6 @@ static struct worker *alloc_worker(void) if (worker) { INIT_LIST_HEAD(&worker->entry); INIT_LIST_HEAD(&worker->scheduled); @@ -322,7 +322,7 @@ index 5d23c05b..8daede8 100644 /* on creation a worker is in !idle && prep state */ worker->flags = WORKER_PREP; } -@@ -1663,13 +1650,6 @@ static bool manage_workers(struct worker *worker) +@@ -1658,13 +1645,6 @@ static bool manage_workers(struct worker gcwq->flags &= ~GCWQ_MANAGING_WORKERS; @@ -336,7 +336,7 @@ index 5d23c05b..8daede8 100644 return ret; } -@@ -3209,171 +3189,71 @@ EXPORT_SYMBOL_GPL(work_busy); +@@ -3205,171 +3185,71 @@ EXPORT_SYMBOL_GPL(work_busy); * gcwqs serve mix of short, long and very long running works making * blocked draining impractical. * @@ -537,10 +537,7 @@ index 5d23c05b..8daede8 100644 - */ - gcwq->trustee_state = TRUSTEE_IN_CHARGE; - wake_up_all(&gcwq->trustee_wait); -+ if (wq->flags & WQ_NON_AFFINE) -+ list_move(&work->entry, &non_affine_works); -+ } - +- - /* - * The original cpu is in the process of dying and may go away - * anytime now. When that happens, we and all workers would @@ -554,11 +551,15 @@ index 5d23c05b..8daede8 100644 - while (gcwq->nr_workers != gcwq->nr_idle || - gcwq->flags & GCWQ_FREEZING || - gcwq->trustee_state == TRUSTEE_IN_CHARGE) { ++ if (wq->flags & WQ_NON_AFFINE) ++ list_move(&work->entry, &non_affine_works); ++ } ++ + while (!list_empty(&gcwq->worklist)) { int nr_works = 0; list_for_each_entry(work, &gcwq->worklist, entry) { -@@ -3387,200 +3267,55 @@ static int __cpuinit trustee_thread(void *__gcwq) +@@ -3383,200 +3263,55 @@ static int __cpuinit trustee_thread(void wake_up_process(worker->task); } @@ -606,9 +607,7 @@ index 5d23c05b..8daede8 100644 - for_each_busy_worker(worker, i, pos, gcwq) { - struct work_struct *rebind_work = &worker->rebind_work; -+ spin_lock_irq(&gcwq->lock); -+ } - +- - /* - * Rebind_work may race with future cpu hotplug - * operations. Use a separate flag to mark that @@ -616,25 +615,27 @@ index 5d23c05b..8daede8 100644 - */ - worker->flags |= WORKER_REBIND; - worker->flags &= ~WORKER_ROGUE; -+ WARN_ON(gcwq->nr_workers != gcwq->nr_idle); ++ spin_lock_irq(&gcwq->lock); ++ } - /* queue rebind_work, wq doesn't matter, use the default one */ - if (test_and_set_bit(WORK_STRUCT_PENDING_BIT, - work_data_bits(rebind_work))) - continue; -+ list_for_each_entry_safe(worker, n, &gcwq->idle_list, entry) -+ destroy_worker(worker); ++ WARN_ON(gcwq->nr_workers != gcwq->nr_idle); - debug_work_activate(rebind_work); - insert_work(get_cwq(gcwq->cpu, system_wq), rebind_work, - worker->scheduled.next, - work_color_to_flags(WORK_NO_COLOR)); - } -+ WARN_ON(gcwq->nr_workers || gcwq->nr_idle); ++ list_for_each_entry_safe(worker, n, &gcwq->idle_list, entry) ++ destroy_worker(worker); - /* relinquish manager role */ - gcwq->flags &= ~GCWQ_MANAGING_WORKERS; -- ++ WARN_ON(gcwq->nr_workers || gcwq->nr_idle); + - /* notify completion */ - gcwq->trustee = NULL; - gcwq->trustee_state = TRUSTEE_DONE; @@ -784,7 +785,7 @@ index 5d23c05b..8daede8 100644 return notifier_from_errno(0); } -@@ -3777,7 +3512,8 @@ static int __init init_workqueues(void) +@@ -3773,7 +3508,8 @@ static int __init init_workqueues(void) unsigned int cpu; int i; @@ -794,7 +795,7 @@ index 5d23c05b..8daede8 100644 /* initialize gcwqs */ for_each_gcwq_cpu(cpu) { -@@ -3800,9 +3536,7 @@ static int __init init_workqueues(void) +@@ -3796,9 +3532,7 @@ static int __init init_workqueues(void) (unsigned long)gcwq); ida_init(&gcwq->worker_ida); @@ -805,6 +806,3 @@ index 5d23c05b..8daede8 100644 } /* create the initial worker */ --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0223-workqueue-use-get-cpu-light.patch.patch b/debian/patches/features/all/rt/workqueue-use-get-cpu-light.patch similarity index 50% rename from debian/patches/features/all/rt/0223-workqueue-use-get-cpu-light.patch.patch rename to debian/patches/features/all/rt/workqueue-use-get-cpu-light.patch index e0722c20f..99d9f3221 100644 --- a/debian/patches/features/all/rt/0223-workqueue-use-get-cpu-light.patch.patch +++ b/debian/patches/features/all/rt/workqueue-use-get-cpu-light.patch @@ -1,18 +1,17 @@ -From bcf0a865cfa7154f046323f68362fbe03f53df9b Mon Sep 17 00:00:00 2001 +Subject: workqueue-use-get-cpu-light.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:42:26 +0200 -Subject: [PATCH 223/267] workqueue-use-get-cpu-light.patch Signed-off-by: Thomas Gleixner --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/kernel/workqueue.c b/kernel/workqueue.c -index 8bdc220..5d23c05b 100644 ---- a/kernel/workqueue.c -+++ b/kernel/workqueue.c -@@ -1063,8 +1063,8 @@ int queue_work(struct workqueue_struct *wq, struct work_struct *work) +Index: linux-3.4/kernel/workqueue.c +=================================================================== +--- linux-3.4.orig/kernel/workqueue.c ++++ linux-3.4/kernel/workqueue.c +@@ -1058,8 +1058,8 @@ int queue_work(struct workqueue_struct * { int ret; @@ -23,6 +22,3 @@ index 8bdc220..5d23c05b 100644 return ret; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0250-x86-crypto-Reduce-preempt-disabled-regions.patch b/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch similarity index 80% rename from debian/patches/features/all/rt/0250-x86-crypto-Reduce-preempt-disabled-regions.patch rename to debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch index c486a2297..545736d9f 100644 --- a/debian/patches/features/all/rt/0250-x86-crypto-Reduce-preempt-disabled-regions.patch +++ b/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch @@ -1,7 +1,6 @@ -From 0dbae7f8fb5a34f08bbce689af3cdec8bc8f4250 Mon Sep 17 00:00:00 2001 +Subject: x86: crypto: Reduce preempt disabled regions From: Peter Zijlstra Date: Mon, 14 Nov 2011 18:19:27 +0100 -Subject: [PATCH 250/267] x86: crypto: Reduce preempt disabled regions Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. @@ -17,11 +16,11 @@ Signed-off-by: Thomas Gleixner 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 545d0ce..0c9eaf1 100644 ---- a/arch/x86/crypto/aesni-intel_glue.c -+++ b/arch/x86/crypto/aesni-intel_glue.c -@@ -289,14 +289,14 @@ static int ecb_encrypt(struct blkcipher_desc *desc, +Index: linux-3.4/arch/x86/crypto/aesni-intel_glue.c +=================================================================== +--- linux-3.4.orig/arch/x86/crypto/aesni-intel_glue.c ++++ linux-3.4/arch/x86/crypto/aesni-intel_glue.c +@@ -290,14 +290,14 @@ static int ecb_encrypt(struct blkcipher_ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -39,7 +38,7 @@ index 545d0ce..0c9eaf1 100644 return err; } -@@ -313,14 +313,14 @@ static int ecb_decrypt(struct blkcipher_desc *desc, +@@ -314,14 +314,14 @@ static int ecb_decrypt(struct blkcipher_ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -56,7 +55,7 @@ index 545d0ce..0c9eaf1 100644 return err; } -@@ -359,14 +359,14 @@ static int cbc_encrypt(struct blkcipher_desc *desc, +@@ -360,14 +360,14 @@ static int cbc_encrypt(struct blkcipher_ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -73,7 +72,7 @@ index 545d0ce..0c9eaf1 100644 return err; } -@@ -383,14 +383,14 @@ static int cbc_decrypt(struct blkcipher_desc *desc, +@@ -384,14 +384,14 @@ static int cbc_decrypt(struct blkcipher_ err = blkcipher_walk_virt(desc, &walk); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -90,7 +89,7 @@ index 545d0ce..0c9eaf1 100644 return err; } -@@ -445,18 +445,20 @@ static int ctr_crypt(struct blkcipher_desc *desc, +@@ -446,18 +446,20 @@ static int ctr_crypt(struct blkcipher_de err = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE); desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; @@ -113,6 +112,3 @@ index 545d0ce..0c9eaf1 100644 return err; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0222-x86-Disable-IST-stacks-for-debug-int-3-stack-fault-f.patch b/debian/patches/features/all/rt/x86-disable-debug-stack.patch similarity index 79% rename from debian/patches/features/all/rt/0222-x86-Disable-IST-stacks-for-debug-int-3-stack-fault-f.patch rename to debian/patches/features/all/rt/x86-disable-debug-stack.patch index 227b0754f..365e55042 100644 --- a/debian/patches/features/all/rt/0222-x86-Disable-IST-stacks-for-debug-int-3-stack-fault-f.patch +++ b/debian/patches/features/all/rt/x86-disable-debug-stack.patch @@ -1,8 +1,6 @@ -From 4ae54337b19a7fbc398ceeca6df1c8cd79bff26a Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Fri, 3 Jul 2009 08:44:10 -0500 -Subject: [PATCH 222/267] x86: Disable IST stacks for debug/int 3/stack fault - for PREEMPT_RT +Subject: x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT Normally the x86-64 trap handlers for debug/int 3/stack fault run on a special interrupt stack to make them more robust @@ -43,10 +41,10 @@ Signed-off-by: Thomas Gleixner arch/x86/kernel/dumpstack_64.c | 4 ++++ 3 files changed, 21 insertions(+), 6 deletions(-) -diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h -index 7639dbf..0883ecd 100644 ---- a/arch/x86/include/asm/page_64_types.h -+++ b/arch/x86/include/asm/page_64_types.h +Index: linux-3.4/arch/x86/include/asm/page_64_types.h +=================================================================== +--- linux-3.4.orig/arch/x86/include/asm/page_64_types.h ++++ linux-3.4/arch/x86/include/asm/page_64_types.h @@ -14,12 +14,21 @@ #define IRQ_STACK_ORDER 2 #define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER) @@ -75,11 +73,11 @@ index 7639dbf..0883ecd 100644 #define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT) #define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1)) -diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c -index aa003b1..d39b525 100644 ---- a/arch/x86/kernel/cpu/common.c -+++ b/arch/x86/kernel/cpu/common.c -@@ -1055,7 +1055,9 @@ DEFINE_PER_CPU(unsigned int, irq_count) = -1; +Index: linux-3.4/arch/x86/kernel/cpu/common.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/cpu/common.c ++++ linux-3.4/arch/x86/kernel/cpu/common.c +@@ -1056,7 +1056,9 @@ DEFINE_PER_CPU(struct task_struct *, fpu */ static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = { [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ, @@ -89,10 +87,10 @@ index aa003b1..d39b525 100644 }; static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks -diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c -index 6d728d9..352beb7 100644 ---- a/arch/x86/kernel/dumpstack_64.c -+++ b/arch/x86/kernel/dumpstack_64.c +Index: linux-3.4/arch/x86/kernel/dumpstack_64.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/dumpstack_64.c ++++ linux-3.4/arch/x86/kernel/dumpstack_64.c @@ -21,10 +21,14 @@ (N_EXCEPTION_STACKS + DEBUG_STKSZ/EXCEPTION_STKSZ - 2) @@ -108,6 +106,3 @@ index 6d728d9..352beb7 100644 [ MCE_STACK-1 ] = "#MC", #if DEBUG_STKSZ > EXCEPTION_STKSZ [ N_EXCEPTION_STACKS ... --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0051-x86-highmem-Replace-BUG_ON-by-WARN_ON.patch b/debian/patches/features/all/rt/x86-highmem-warn.patch similarity index 63% rename from debian/patches/features/all/rt/0051-x86-highmem-Replace-BUG_ON-by-WARN_ON.patch rename to debian/patches/features/all/rt/x86-highmem-warn.patch index 69db08b41..b02c61bec 100644 --- a/debian/patches/features/all/rt/0051-x86-highmem-Replace-BUG_ON-by-WARN_ON.patch +++ b/debian/patches/features/all/rt/x86-highmem-warn.patch @@ -1,22 +1,22 @@ -From 7aa88c0924519e9f412b40d1b5fe72bd7d9afff0 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:25 -0500 -Subject: [PATCH 051/267] x86: highmem: Replace BUG_ON by WARN_ON +Subject: x86: highmem: Replace BUG_ON by WARN_ON The machine might survive that problem and be at least in a state which allows us to get more information about the problem. Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner + --- arch/x86/mm/highmem_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c -index f4f29b1..71bd7d6 100644 ---- a/arch/x86/mm/highmem_32.c -+++ b/arch/x86/mm/highmem_32.c -@@ -43,7 +43,7 @@ void *kmap_atomic_prot(struct page *page, pgprot_t prot) +Index: linux-3.4/arch/x86/mm/highmem_32.c +=================================================================== +--- linux-3.4.orig/arch/x86/mm/highmem_32.c ++++ linux-3.4/arch/x86/mm/highmem_32.c +@@ -43,7 +43,7 @@ void *kmap_atomic_prot(struct page *page type = kmap_atomic_idx_push(); idx = type + KM_TYPE_NR*smp_processor_id(); vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); @@ -25,6 +25,3 @@ index f4f29b1..71bd7d6 100644 set_pte(kmap_pte-idx, mk_pte(page, prot)); arch_flush_lazy_mmu_mode(); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0004-x86-hpet-Disable-MSI-on-Lenovo-W510.patch b/debian/patches/features/all/rt/x86-hpet-disable-msi-on-lenovo-w510.patch similarity index 76% rename from debian/patches/features/all/rt/0004-x86-hpet-Disable-MSI-on-Lenovo-W510.patch rename to debian/patches/features/all/rt/x86-hpet-disable-msi-on-lenovo-w510.patch index 8f83df9d4..9f5d28ca0 100644 --- a/debian/patches/features/all/rt/0004-x86-hpet-Disable-MSI-on-Lenovo-W510.patch +++ b/debian/patches/features/all/rt/x86-hpet-disable-msi-on-lenovo-w510.patch @@ -1,7 +1,6 @@ -From e13909c551bb27d491ac83994ca27ec691f070b5 Mon Sep 17 00:00:00 2001 +Subject: x86: hpet: Disable MSI on Lenovo W510 From: Thomas Gleixner Date: Fri, 30 Sep 2011 20:03:37 +0200 -Subject: [PATCH 004/267] x86: hpet: Disable MSI on Lenovo W510 MSI based per cpu timers lose interrupts when intel_idle() is enabled - independent of the c-state. With idle=poll the problem cannot be @@ -13,11 +12,11 @@ Signed-off-by: Thomas Gleixner arch/x86/kernel/hpet.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c -index 1bb0bf4..d86b821 100644 ---- a/arch/x86/kernel/hpet.c -+++ b/arch/x86/kernel/hpet.c -@@ -9,6 +9,7 @@ +Index: linux-3.4/arch/x86/kernel/hpet.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/hpet.c ++++ linux-3.4/arch/x86/kernel/hpet.c +@@ -8,6 +8,7 @@ #include #include #include @@ -25,7 +24,7 @@ index 1bb0bf4..d86b821 100644 #include #include #include -@@ -568,6 +569,30 @@ static void init_one_hpet_msi_clockevent(struct hpet_dev *hdev, int cpu) +@@ -570,6 +571,30 @@ static void init_one_hpet_msi_clockevent #define RESERVE_TIMERS 0 #endif @@ -56,7 +55,7 @@ index 1bb0bf4..d86b821 100644 static void hpet_msi_capability_lookup(unsigned int start_timer) { unsigned int id; -@@ -575,6 +600,8 @@ static void hpet_msi_capability_lookup(unsigned int start_timer) +@@ -577,6 +602,8 @@ static void hpet_msi_capability_lookup(u unsigned int num_timers_used = 0; int i; @@ -65,6 +64,3 @@ index 1bb0bf4..d86b821 100644 if (hpet_msi_disable) return; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0063-x86-Do-not-unmask-io_apic-when-interrupt-is-in-progr.patch b/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch similarity index 54% rename from debian/patches/features/all/rt/0063-x86-Do-not-unmask-io_apic-when-interrupt-is-in-progr.patch rename to debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch index 70e2b52ff..81be43ac0 100644 --- a/debian/patches/features/all/rt/0063-x86-Do-not-unmask-io_apic-when-interrupt-is-in-progr.patch +++ b/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch @@ -1,32 +1,28 @@ -From f6adc04c439c56acd6163820b2ac6251a138755f Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:27 -0500 -Subject: [PATCH 063/267] x86: Do not unmask io_apic when interrupt is in - progress +Subject: x86: Do not unmask io_apic when interrupt is in progress 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 Signed-off-by: Thomas Gleixner + --- 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 8980555..91527bc 100644 ---- a/arch/x86/kernel/apic/io_apic.c -+++ b/arch/x86/kernel/apic/io_apic.c -@@ -2521,7 +2521,8 @@ static void ack_apic_level(struct irq_data *data) - irq_complete_move(cfg); - #ifdef CONFIG_GENERIC_PENDING_IRQ +Index: linux-3.4/arch/x86/kernel/apic/io_apic.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/apic/io_apic.c ++++ linux-3.4/arch/x86/kernel/apic/io_apic.c +@@ -2555,7 +2555,8 @@ atomic_t irq_mis_count; + static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg) + { /* If we are moving the irq we need to mask it */ - if (unlikely(irqd_is_setaffinity_pending(data))) { + if (unlikely(irqd_is_setaffinity_pending(data) && + !irqd_irq_inprogress(data))) { - do_unmask_irq = 1; mask_ioapic(cfg); + return true; } --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0003-x86-kprobes-Remove-remove-bogus-preempt_enable.patch b/debian/patches/features/all/rt/x86-kprobes-remove-bogus-preempt-enable.patch similarity index 58% rename from debian/patches/features/all/rt/0003-x86-kprobes-Remove-remove-bogus-preempt_enable.patch rename to debian/patches/features/all/rt/x86-kprobes-remove-bogus-preempt-enable.patch index 95543ac71..bf2a08076 100644 --- a/debian/patches/features/all/rt/0003-x86-kprobes-Remove-remove-bogus-preempt_enable.patch +++ b/debian/patches/features/all/rt/x86-kprobes-remove-bogus-preempt-enable.patch @@ -1,7 +1,6 @@ -From 2c5f1cf75561b0a3137ec2bc5eb77c29d00af512 Mon Sep 17 00:00:00 2001 +Subject: x86: kprobes: Remove remove bogus preempt_enable From: Thomas Gleixner Date: Thu, 17 Mar 2011 11:02:15 +0100 -Subject: [PATCH 003/267] x86: kprobes: Remove remove bogus preempt_enable The CONFIG_PREEMPT=n section of setup_singlestep() contains: @@ -16,11 +15,11 @@ Signed-off-by: Thomas Gleixner arch/x86/kernel/kprobes.c | 1 - 1 file changed, 1 deletion(-) -diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c -index 7da647d..5604455 100644 ---- a/arch/x86/kernel/kprobes.c -+++ b/arch/x86/kernel/kprobes.c -@@ -478,7 +478,6 @@ static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs, +Index: linux-3.4/arch/x86/kernel/kprobes.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/kprobes.c ++++ linux-3.4/arch/x86/kernel/kprobes.c +@@ -486,7 +486,6 @@ setup_singlestep(struct kprobe *p, struc * stepping. */ regs->ip = (unsigned long)p->ainsn.insn; @@ -28,6 +27,3 @@ index 7da647d..5604455 100644 return; } #endif --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0248-x86-kvm-require-const-tsc-for-rt.patch.patch b/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch similarity index 52% rename from debian/patches/features/all/rt/0248-x86-kvm-require-const-tsc-for-rt.patch.patch rename to debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch index 78d7de0b9..b30770e5b 100644 --- a/debian/patches/features/all/rt/0248-x86-kvm-require-const-tsc-for-rt.patch.patch +++ b/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch @@ -1,18 +1,17 @@ -From 1249880f851c9cb6f7bbae1f635f216aa0f98da3 Mon Sep 17 00:00:00 2001 +Subject: x86-kvm-require-const-tsc-for-rt.patch From: Thomas Gleixner -Date: Sun, 6 Nov 2011 12:26:18 +0100 -Subject: [PATCH 248/267] x86-kvm-require-const-tsc-for-rt.patch +Date: Sun, 06 Nov 2011 12:26:18 +0100 Signed-off-by: Thomas Gleixner --- 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 e04cae1..66d2844 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -5207,6 +5207,13 @@ int kvm_arch_init(void *opaque) +Index: linux-3.4/arch/x86/kvm/x86.c +=================================================================== +--- linux-3.4.orig/arch/x86/kvm/x86.c ++++ linux-3.4/arch/x86/kvm/x86.c +@@ -4882,6 +4882,13 @@ int kvm_arch_init(void *opaque) goto out; } @@ -26,6 +25,3 @@ index e04cae1..66d2844 100644 r = kvm_mmu_module_init(); if (r) goto out; --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0219-x86-Convert-mce-timer-to-hrtimer.patch b/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch similarity index 81% rename from debian/patches/features/all/rt/0219-x86-Convert-mce-timer-to-hrtimer.patch rename to debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch index 027710b48..9bc04d8fc 100644 --- a/debian/patches/features/all/rt/0219-x86-Convert-mce-timer-to-hrtimer.patch +++ b/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch @@ -1,21 +1,21 @@ -From 837ae04a2a8c4ed94b58b795ecca50e6abaaf920 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 13 Dec 2010 16:33:39 +0100 -Subject: [PATCH 219/267] x86: Convert mce timer to hrtimer +Subject: x86: Convert mce timer to hrtimer 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 avoid this. Signed-off-by: Thomas Gleixner + --- - arch/x86/kernel/cpu/mcheck/mce.c | 49 ++++++++++++++++++-------------------- + arch/x86/kernel/cpu/mcheck/mce.c | 49 ++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 26 deletions(-) -diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c -index 2af127d..f1f1cb1 100644 ---- a/arch/x86/kernel/cpu/mcheck/mce.c -+++ b/arch/x86/kernel/cpu/mcheck/mce.c +Index: linux-3.4/arch/x86/kernel/cpu/mcheck/mce.c +=================================================================== +--- linux-3.4.orig/arch/x86/kernel/cpu/mcheck/mce.c ++++ linux-3.4/arch/x86/kernel/cpu/mcheck/mce.c @@ -38,6 +38,7 @@ #include #include @@ -24,7 +24,7 @@ index 2af127d..f1f1cb1 100644 #include #include -@@ -1106,17 +1107,14 @@ void mce_log_therm_throt_event(__u64 status) +@@ -1229,17 +1230,14 @@ void mce_log_therm_throt_event(__u64 sta * poller finds an MCE, poll 2x faster. When the poller finds no more * errors, poll 2x slower (up to check_interval seconds). */ @@ -47,7 +47,7 @@ index 2af127d..f1f1cb1 100644 if (mce_available(__this_cpu_ptr(&cpu_info))) { machine_check_poll(MCP_TIMESTAMP, -@@ -1129,21 +1127,22 @@ static void mce_start_timer(unsigned long data) +@@ -1252,21 +1250,22 @@ static void mce_start_timer(unsigned lon */ n = &__get_cpu_var(mce_next_interval); if (mce_notify_irq()) @@ -76,7 +76,7 @@ index 2af127d..f1f1cb1 100644 } static void mce_do_trigger(struct work_struct *work) -@@ -1375,10 +1374,11 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c) +@@ -1496,10 +1495,11 @@ static void __mcheck_cpu_init_vendor(str static void __mcheck_cpu_init_timer(void) { @@ -91,7 +91,7 @@ index 2af127d..f1f1cb1 100644 if (mce_ignore_ce) return; -@@ -1386,8 +1386,9 @@ static void __mcheck_cpu_init_timer(void) +@@ -1507,8 +1507,9 @@ static void __mcheck_cpu_init_timer(void *n = check_interval * HZ; if (!*n) return; @@ -103,7 +103,7 @@ index 2af127d..f1f1cb1 100644 } /* Handle unconfigured int18 (should never happen) */ -@@ -2023,6 +2024,8 @@ static void __cpuinit mce_disable_cpu(void *h) +@@ -2160,6 +2161,8 @@ static void __cpuinit mce_disable_cpu(vo if (!mce_available(__this_cpu_ptr(&cpu_info))) return; @@ -112,7 +112,7 @@ index 2af127d..f1f1cb1 100644 if (!(action & CPU_TASKS_FROZEN)) cmci_clear(); for (i = 0; i < banks; i++) { -@@ -2049,6 +2052,7 @@ static void __cpuinit mce_reenable_cpu(void *h) +@@ -2186,6 +2189,7 @@ static void __cpuinit mce_reenable_cpu(v if (b->init) wrmsrl(MSR_IA32_MCx_CTL(i), b->ctl); } @@ -120,7 +120,7 @@ index 2af127d..f1f1cb1 100644 } /* Get notified when a cpu comes on/off. Be hotplug friendly. */ -@@ -2056,7 +2060,6 @@ static int __cpuinit +@@ -2193,7 +2197,6 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -128,7 +128,7 @@ index 2af127d..f1f1cb1 100644 switch (action) { case CPU_ONLINE: -@@ -2073,16 +2076,10 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) +@@ -2210,16 +2213,10 @@ mce_cpu_callback(struct notifier_block * break; case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE_FROZEN: @@ -145,6 +145,3 @@ index 2af127d..f1f1cb1 100644 smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); break; case CPU_POST_DEAD: --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0220-x86-stackprotector-Avoid-random-pool-on-rt.patch b/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch similarity index 76% rename from debian/patches/features/all/rt/0220-x86-stackprotector-Avoid-random-pool-on-rt.patch rename to debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch index 4b1d52437..e57cc94ca 100644 --- a/debian/patches/features/all/rt/0220-x86-stackprotector-Avoid-random-pool-on-rt.patch +++ b/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch @@ -1,7 +1,6 @@ -From 633e50151dbfbf9582969693e31afa2b9f3b1536 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 16 Dec 2010 14:25:18 +0100 -Subject: [PATCH 220/267] x86: stackprotector: Avoid random pool on rt +Subject: x86: stackprotector: Avoid random pool on rt 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,15 +12,16 @@ entropy and we rely on the TSC randomnness. Reported-by: Carsten Emde Signed-off-by: Thomas Gleixner + --- arch/x86/include/asm/stackprotector.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h -index 1575177..ac0703b 100644 ---- a/arch/x86/include/asm/stackprotector.h -+++ b/arch/x86/include/asm/stackprotector.h -@@ -58,7 +58,7 @@ +Index: linux-3.4/arch/x86/include/asm/stackprotector.h +=================================================================== +--- linux-3.4.orig/arch/x86/include/asm/stackprotector.h ++++ linux-3.4/arch/x86/include/asm/stackprotector.h +@@ -57,7 +57,7 @@ */ static __always_inline void boot_init_stack_canary(void) { @@ -30,7 +30,7 @@ index 1575177..ac0703b 100644 u64 tsc; #ifdef CONFIG_X86_64 -@@ -69,8 +69,16 @@ static __always_inline void boot_init_stack_canary(void) +@@ -68,8 +68,16 @@ static __always_inline void boot_init_st * 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. @@ -47,6 +47,3 @@ index 1575177..ac0703b 100644 tsc = __native_read_tsc(); canary += tsc + (tsc << 32UL); --- -1.7.10 - diff --git a/debian/patches/features/all/rt/0221-x86-Use-generic-rwsem_spinlocks-on-rt.patch b/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch similarity index 64% rename from debian/patches/features/all/rt/0221-x86-Use-generic-rwsem_spinlocks-on-rt.patch rename to debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch index 170ca58c0..b40e59d91 100644 --- a/debian/patches/features/all/rt/0221-x86-Use-generic-rwsem_spinlocks-on-rt.patch +++ b/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch @@ -1,21 +1,21 @@ -From 2b1041543f3283dfa53caa33a8606eeaf4f68210 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 26 Jul 2009 02:21:32 +0200 -Subject: [PATCH 221/267] x86: Use generic rwsem_spinlocks on -rt +Subject: x86: Use generic rwsem_spinlocks on -rt Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt. Signed-off-by: Thomas Gleixner + --- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index efb4294..e084a73 100644 ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -161,10 +161,10 @@ config ARCH_MAY_HAVE_PC_FDC +Index: linux-3.4/arch/x86/Kconfig +=================================================================== +--- linux-3.4.orig/arch/x86/Kconfig ++++ linux-3.4/arch/x86/Kconfig +@@ -155,10 +155,10 @@ config ARCH_MAY_HAVE_PC_FDC def_bool ISA_DMA_API config RWSEM_GENERIC_SPINLOCK @@ -28,6 +28,3 @@ index efb4294..e084a73 100644 config ARCH_HAS_CPU_IDLE_WAIT def_bool y --- -1.7.10 - diff --git a/debian/patches/series/base-extra b/debian/patches/series/base-extra index 490c4dd57..a516d7130 100644 --- a/debian/patches/series/base-extra +++ b/debian/patches/series/base-extra @@ -1,265 +1,253 @@ -+ features/all/rt/0001-x86-Call-idle-notifier-after-irq_enter.patch featureset=rt -+ features/all/rt/0002-slab-lockdep-Annotate-all-slab-caches.patch featureset=rt -+ features/all/rt/0003-x86-kprobes-Remove-remove-bogus-preempt_enable.patch featureset=rt -+ features/all/rt/0004-x86-hpet-Disable-MSI-on-Lenovo-W510.patch featureset=rt -+ features/all/rt/0005-block-Shorten-interrupt-disabled-regions.patch featureset=rt -+ features/all/rt/0006-sched-Distangle-worker-accounting-from-rq-3Elock.patch featureset=rt -+ features/all/rt/0007-mips-enable-interrupts-in-signal.patch.patch featureset=rt -+ features/all/rt/0008-arm-enable-interrupts-in-signal-code.patch.patch featureset=rt -+ features/all/rt/0009-powerpc-85xx-Mark-cascade-irq-IRQF_NO_THREAD.patch featureset=rt -+ features/all/rt/0010-powerpc-wsp-Mark-opb-cascade-handler-IRQF_NO_THREAD.patch featureset=rt -+ features/all/rt/0011-powerpc-Mark-IPI-interrupts-IRQF_NO_THREAD.patch featureset=rt -+ features/all/rt/0012-powerpc-Allow-irq-threading.patch featureset=rt -+ features/all/rt/0013-sched-Keep-period-timer-ticking-when-throttling-acti.patch featureset=rt -+ features/all/rt/0014-sched-Do-not-throttle-due-to-PI-boosting.patch featureset=rt -+ features/all/rt/0015-time-Remove-bogus-comments.patch featureset=rt -+ features/all/rt/0016-x86-vdso-Remove-bogus-locking-in-update_vsyscall_tz.patch featureset=rt -+ features/all/rt/0017-x86-vdso-Use-seqcount-instead-of-seqlock.patch featureset=rt -+ features/all/rt/0018-ia64-vsyscall-Use-seqcount-instead-of-seqlock.patch featureset=rt -+ features/all/rt/0019-seqlock-Remove-unused-functions.patch featureset=rt -+ features/all/rt/0020-seqlock-Use-seqcount.patch featureset=rt -+ features/all/rt/0021-vfs-fs_struct-Move-code-out-of-seqcount-write-sectio.patch featureset=rt -+ features/all/rt/0022-timekeeping-Split-xtime_lock.patch featureset=rt -+ features/all/rt/0023-intel_idle-Convert-i7300_idle_lock-to-raw-spinlock.patch featureset=rt -+ features/all/rt/0024-mm-memcg-shorten-preempt-disabled-section-around-eve.patch featureset=rt -+ features/all/rt/0025-tracing-Account-for-preempt-off-in-preempt_schedule.patch featureset=rt -+ features/all/rt/0026-signal-revert-ptrace-preempt-magic.patch.patch featureset=rt -+ features/all/rt/0027-arm-Mark-pmu-interupt-IRQF_NO_THREAD.patch featureset=rt -+ features/all/rt/0028-arm-Allow-forced-irq-threading.patch featureset=rt -+ features/all/rt/0029-preempt-rt-Convert-arm-boot_lock-to-raw.patch featureset=rt -+ features/all/rt/0030-sched-Create-schedule_preempt_disabled.patch featureset=rt -+ features/all/rt/0031-sched-Use-schedule_preempt_disabled.patch featureset=rt -+ features/all/rt/0032-signals-Do-not-wakeup-self.patch featureset=rt -+ features/all/rt/0033-posix-timers-Prevent-broadcast-signals.patch featureset=rt -+ features/all/rt/0034-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch featureset=rt -+ features/all/rt/0035-signal-x86-Delay-calling-signals-in-atomic.patch featureset=rt -+ features/all/rt/0036-generic-Use-raw-local-irq-variant-for-generic-cmpxch.patch featureset=rt -+ features/all/rt/0037-drivers-random-Reduce-preempt-disabled-region.patch featureset=rt -+ features/all/rt/0038-ARM-AT91-PIT-Remove-irq-handler-when-clock-event-is-.patch featureset=rt -+ features/all/rt/0039-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch featureset=rt -+ features/all/rt/0040-drivers-net-tulip_remove_one-needs-to-call-pci_disab.patch featureset=rt -+ features/all/rt/0041-drivers-net-Use-disable_irq_nosync-in-8139too.patch featureset=rt -+ features/all/rt/0042-drivers-net-ehea-Make-rx-irq-handler-non-threaded-IR.patch featureset=rt -+ features/all/rt/0043-drivers-net-at91_ether-Make-mdio-protection-rt-safe.patch featureset=rt -+ features/all/rt/0044-preempt-mark-legitimated-no-resched-sites.patch.patch featureset=rt -+ features/all/rt/0045-mm-Prepare-decoupling-the-page-fault-disabling-logic.patch featureset=rt -+ features/all/rt/0046-mm-Fixup-all-fault-handlers-to-check-current-pagefau.patch featureset=rt -+ features/all/rt/0047-mm-pagefault_disabled.patch featureset=rt -+ features/all/rt/0048-mm-raw_pagefault_disable.patch featureset=rt -+ features/all/rt/0049-filemap-fix-up.patch.patch featureset=rt -+ features/all/rt/0050-mm-Remove-preempt-count-from-pagefault-disable-enabl.patch featureset=rt -+ features/all/rt/0051-x86-highmem-Replace-BUG_ON-by-WARN_ON.patch featureset=rt -+ features/all/rt/0052-suspend-Prevent-might-sleep-splats.patch featureset=rt -+ features/all/rt/0053-OF-Fixup-resursive-locking-code-paths.patch featureset=rt -+ features/all/rt/0054-of-convert-devtree-lock.patch.patch featureset=rt -+ features/all/rt/0055-list-add-list-last-entry.patch.patch featureset=rt -+ features/all/rt/0056-mm-page-alloc-use-list-last-entry.patch.patch featureset=rt -+ features/all/rt/0057-mm-slab-move-debug-out.patch.patch featureset=rt -+ features/all/rt/0058-rwsem-inlcude-fix.patch.patch featureset=rt -+ features/all/rt/0059-sysctl-include-fix.patch.patch featureset=rt -+ features/all/rt/0060-net-flip-lock-dep-thingy.patch.patch featureset=rt -+ features/all/rt/0061-softirq-thread-do-softirq.patch.patch featureset=rt -+ features/all/rt/0062-softirq-split-out-code.patch.patch featureset=rt -+ features/all/rt/0063-x86-Do-not-unmask-io_apic-when-interrupt-is-in-progr.patch featureset=rt -+ features/all/rt/0064-x86-32-fix-signal-crap.patch.patch featureset=rt -+ features/all/rt/0065-x86-Do-not-disable-preemption-in-int3-on-32bit.patch featureset=rt -+ features/all/rt/0066-rcu-Reduce-lock-section.patch featureset=rt -+ features/all/rt/0067-locking-various-init-fixes.patch.patch featureset=rt -+ features/all/rt/0068-wait-Provide-__wake_up_all_locked.patch featureset=rt -+ features/all/rt/0069-pci-Use-__wake_up_all_locked-pci_unblock_user_cfg_ac.patch featureset=rt -+ features/all/rt/0070-latency-hist.patch.patch featureset=rt -+ features/all/rt/0071-hwlatdetect.patch.patch featureset=rt -+ features/all/rt/0073-early-printk-consolidate.patch.patch featureset=rt -+ features/all/rt/0074-printk-kill.patch.patch featureset=rt -+ features/all/rt/0075-printk-force_early_printk-boot-param-to-help-with-de.patch featureset=rt -+ features/all/rt/0076-rt-preempt-base-config.patch.patch featureset=rt -+ features/all/rt/0077-bug-BUG_ON-WARN_ON-variants-dependend-on-RT-RT.patch featureset=rt -+ features/all/rt/0078-rt-local_irq_-variants-depending-on-RT-RT.patch featureset=rt -+ features/all/rt/0079-preempt-Provide-preempt_-_-no-rt-variants.patch featureset=rt -+ features/all/rt/0080-ata-Do-not-disable-interrupts-in-ide-code-for-preemp.patch featureset=rt -+ features/all/rt/0081-ide-Do-not-disable-interrupts-for-PREEMPT-RT.patch featureset=rt -+ features/all/rt/0082-infiniband-Mellanox-IB-driver-patch-use-_nort-primit.patch featureset=rt -+ features/all/rt/0083-input-gameport-Do-not-disable-interrupts-on-PREEMPT_.patch featureset=rt -+ features/all/rt/0084-acpi-Do-not-disable-interrupts-on-PREEMPT_RT.patch featureset=rt -+ features/all/rt/0085-core-Do-not-disable-interrupts-on-RT-in-kernel-users.patch featureset=rt -+ features/all/rt/0086-core-Do-not-disable-interrupts-on-RT-in-res_counter..patch featureset=rt -+ features/all/rt/0087-usb-Use-local_irq_-_nort-variants.patch featureset=rt -+ features/all/rt/0088-tty-Do-not-disable-interrupts-in-put_ldisc-on-rt.patch featureset=rt -+ features/all/rt/0089-mm-scatterlist-dont-disable-irqs-on-RT.patch featureset=rt -+ features/all/rt/0090-signal-fix-up-rcu-wreckage.patch.patch featureset=rt -+ features/all/rt/0091-net-wireless-warn-nort.patch.patch featureset=rt -+ features/all/rt/0092-mm-Replace-cgroup_page-bit-spinlock.patch featureset=rt -+ features/all/rt/0093-buffer_head-Replace-bh_uptodate_lock-for-rt.patch featureset=rt -+ features/all/rt/0094-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch featureset=rt -+ features/all/rt/0095-genirq-Disable-DEBUG_SHIRQ-for-rt.patch featureset=rt -+ features/all/rt/0096-genirq-Disable-random-call-on-preempt-rt.patch featureset=rt -+ features/all/rt/0097-genirq-disable-irqpoll-on-rt.patch featureset=rt -+ features/all/rt/0098-genirq-force-threading.patch.patch featureset=rt -+ features/all/rt/0099-drivers-net-fix-livelock-issues.patch featureset=rt -+ features/all/rt/0100-drivers-net-vortex-fix-locking-issues.patch featureset=rt -+ features/all/rt/0101-drivers-net-gianfar-Make-RT-aware.patch featureset=rt -+ features/all/rt/0102-USB-Fix-the-mouse-problem-when-copying-large-amounts.patch featureset=rt -+ features/all/rt/0103-local-var.patch.patch featureset=rt -+ features/all/rt/0104-rt-local-irq-lock.patch.patch featureset=rt -+ features/all/rt/0105-cpu-rt-variants.patch.patch featureset=rt -+ features/all/rt/0106-mm-slab-wrap-functions.patch.patch featureset=rt -+ features/all/rt/0107-slab-Fix-__do_drain-to-use-the-right-array-cache.patch featureset=rt -+ features/all/rt/0108-mm-More-lock-breaks-in-slab.c.patch featureset=rt -+ features/all/rt/0109-mm-page_alloc-rt-friendly-per-cpu-pages.patch featureset=rt -+ features/all/rt/0110-mm-page_alloc-reduce-lock-sections-further.patch featureset=rt -+ features/all/rt/0111-mm-page-alloc-fix.patch.patch featureset=rt -+ features/all/rt/0112-mm-convert-swap-to-percpu-locked.patch featureset=rt -+ features/all/rt/0113-mm-vmstat-fix-the-irq-lock-asymetry.patch.patch featureset=rt -+ features/all/rt/0114-mm-make-vmstat-rt-aware.patch featureset=rt -+ features/all/rt/0115-mm-shrink-the-page-frame-to-rt-size.patch featureset=rt -+ features/all/rt/0116-ARM-Initialize-ptl-lock-for-vector-page.patch featureset=rt -+ features/all/rt/0117-mm-Allow-only-slab-on-RT.patch featureset=rt -+ features/all/rt/0118-radix-tree-rt-aware.patch.patch featureset=rt -+ features/all/rt/0119-panic-disable-random-on-rt.patch featureset=rt -+ features/all/rt/0120-ipc-Make-the-ipc-code-rt-aware.patch featureset=rt -+ features/all/rt/0121-ipc-mqueue-Add-a-critical-section-to-avoid-a-deadloc.patch featureset=rt -+ features/all/rt/0122-relay-fix-timer-madness.patch featureset=rt -+ features/all/rt/0123-net-ipv4-route-use-locks-on-up-rt.patch.patch featureset=rt -+ features/all/rt/0124-workqueue-avoid-the-lock-in-cpu-dying.patch.patch featureset=rt -+ features/all/rt/0125-timers-prepare-for-full-preemption.patch featureset=rt -+ features/all/rt/0126-timers-preempt-rt-support.patch featureset=rt -+ features/all/rt/0127-timers-fix-timer-hotplug-on-rt.patch featureset=rt -+ features/all/rt/0128-timers-mov-printk_tick-to-soft-interrupt.patch featureset=rt -+ features/all/rt/0129-timer-delay-waking-softirqs-from-the-jiffy-tick.patch featureset=rt -+ features/all/rt/0130-timers-Avoid-the-switch-timers-base-set-to-NULL-tric.patch featureset=rt -+ features/all/rt/0131-printk-Don-t-call-printk_tick-in-printk_needs_cpu-on.patch featureset=rt -+ features/all/rt/0132-hrtimers-prepare-full-preemption.patch featureset=rt -+ features/all/rt/0133-hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch featureset=rt -+ features/all/rt/0134-hrtimer-Don-t-call-the-timer-handler-from-hrtimer_st.patch featureset=rt -+ features/all/rt/0135-hrtimer-Add-missing-debug_activate-aid-Was-Re-ANNOUN.patch featureset=rt -+ features/all/rt/0136-hrtimer-fix-reprogram-madness.patch.patch featureset=rt -+ features/all/rt/0137-timer-fd-Prevent-live-lock.patch featureset=rt -+ features/all/rt/0138-posix-timers-thread-posix-cpu-timers-on-rt.patch featureset=rt -+ features/all/rt/0139-posix-timers-Shorten-posix_cpu_timers-CPU-kernel-thr.patch featureset=rt -+ features/all/rt/0140-posix-timers-Avoid-wakeups-when-no-timers-are-active.patch featureset=rt -+ features/all/rt/0141-sched-delay-put-task.patch.patch featureset=rt -+ features/all/rt/0142-sched-limit-nr-migrate.patch.patch featureset=rt -+ features/all/rt/0143-sched-mmdrop-delayed.patch.patch featureset=rt -+ features/all/rt/0144-sched-rt-mutex-wakeup.patch.patch featureset=rt -+ features/all/rt/0145-sched-prevent-idle-boost.patch.patch featureset=rt -+ features/all/rt/0146-sched-might-sleep-do-not-account-rcu-depth.patch.patch featureset=rt -+ features/all/rt/0147-sched-Break-out-from-load_balancing-on-rq_lock-conte.patch featureset=rt -+ features/all/rt/0148-sched-cond-resched.patch.patch featureset=rt -+ features/all/rt/0149-cond-resched-softirq-fix.patch.patch featureset=rt -+ features/all/rt/0150-sched-no-work-when-pi-blocked.patch.patch featureset=rt -+ features/all/rt/0151-cond-resched-lock-rt-tweak.patch.patch featureset=rt -+ features/all/rt/0152-sched-disable-ttwu-queue.patch.patch featureset=rt -+ features/all/rt/0153-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch featureset=rt -+ features/all/rt/0154-sched-ttwu-Return-success-when-only-changing-the-sav.patch featureset=rt -+ features/all/rt/0155-stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch featureset=rt -+ features/all/rt/0156-stomp-machine-mark-stomper-thread.patch.patch featureset=rt -+ features/all/rt/0157-stomp-machine-raw-lock.patch.patch featureset=rt -+ features/all/rt/0158-hotplug-Lightweight-get-online-cpus.patch featureset=rt -+ features/all/rt/0159-hotplug-sync_unplug-No.patch featureset=rt -+ features/all/rt/0160-hotplug-Reread-hotplug_pcp-on-pin_current_cpu-retry.patch featureset=rt -+ features/all/rt/0161-sched-migrate-disable.patch.patch featureset=rt -+ features/all/rt/0162-hotplug-use-migrate-disable.patch.patch featureset=rt -+ features/all/rt/0163-hotplug-Call-cpu_unplug_begin-before-DOWN_PREPARE.patch featureset=rt -+ features/all/rt/0164-ftrace-migrate-disable-tracing.patch.patch featureset=rt -+ features/all/rt/0165-tracing-Show-padding-as-unsigned-short.patch featureset=rt -+ features/all/rt/0166-migrate-disable-rt-variant.patch.patch featureset=rt -+ features/all/rt/0167-sched-Optimize-migrate_disable.patch featureset=rt -+ features/all/rt/0168-sched-Generic-migrate_disable.patch featureset=rt -+ features/all/rt/0169-sched-rt-Fix-migrate_enable-thinko.patch featureset=rt -+ features/all/rt/0170-sched-teach-migrate_disable-about-atomic-contexts.patch featureset=rt -+ features/all/rt/0171-sched-Postpone-actual-migration-disalbe-to-schedule.patch featureset=rt -+ features/all/rt/0172-sched-Do-not-compare-cpu-masks-in-scheduler.patch featureset=rt -+ features/all/rt/0173-sched-Have-migrate_disable-ignore-bounded-threads.patch featureset=rt -+ features/all/rt/0174-sched-clear-pf-thread-bound-on-fallback-rq.patch.patch featureset=rt -+ features/all/rt/0175-ftrace-crap.patch.patch featureset=rt -+ features/all/rt/0176-ring-buffer-Convert-reader_lock-from-raw_spin_lock-i.patch featureset=rt -+ features/all/rt/0177-net-netif_rx_ni-migrate-disable.patch.patch featureset=rt -+ features/all/rt/0178-softirq-Sanitize-softirq-pending-for-NOHZ-RT.patch featureset=rt -+ features/all/rt/0179-lockdep-rt.patch.patch featureset=rt -+ features/all/rt/0180-mutex-no-spin-on-rt.patch.patch featureset=rt -+ features/all/rt/0181-softirq-local-lock.patch.patch featureset=rt -+ features/all/rt/0182-softirq-Export-in_serving_softirq.patch featureset=rt -+ features/all/rt/0183-hardirq.h-Define-softirq_count-as-OUL-to-kill-build-.patch featureset=rt -+ features/all/rt/0184-softirq-Fix-unplug-deadlock.patch featureset=rt -+ features/all/rt/0185-softirq-disable-softirq-stacks-for-rt.patch.patch featureset=rt -+ features/all/rt/0186-softirq-make-fifo.patch.patch featureset=rt -+ features/all/rt/0187-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch featureset=rt -+ features/all/rt/0188-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch featureset=rt -+ features/all/rt/0189-local-vars-migrate-disable.patch.patch featureset=rt -+ features/all/rt/0190-md-raid5-Make-raid5_percpu-handling-RT-aware.patch featureset=rt -+ features/all/rt/0191-rtmutex-lock-killable.patch.patch featureset=rt -+ features/all/rt/0192-rtmutex-futex-prepare-rt.patch.patch featureset=rt -+ features/all/rt/0193-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch featureset=rt -+ features/all/rt/0194-rt-mutex-add-sleeping-spinlocks-support.patch.patch featureset=rt -+ features/all/rt/0195-spinlock-types-separate-raw.patch.patch featureset=rt -+ features/all/rt/0196-rtmutex-avoid-include-hell.patch.patch featureset=rt -+ features/all/rt/0197-rt-add-rt-spinlocks.patch.patch featureset=rt -+ features/all/rt/0198-rt-add-rt-to-mutex-headers.patch.patch featureset=rt -+ features/all/rt/0199-rwsem-add-rt-variant.patch.patch featureset=rt -+ features/all/rt/0200-rt-Add-the-preempt-rt-lock-replacement-APIs.patch featureset=rt -+ features/all/rt/0201-rwlocks-Fix-section-mismatch.patch featureset=rt -+ features/all/rt/0202-timer-handle-idle-trylock-in-get-next-timer-irq.patc.patch featureset=rt -+ features/all/rt/0203-RCU-Force-PREEMPT_RCU-for-PREEMPT-RT.patch featureset=rt -+ features/all/rt/0204-rcu-Frob-softirq-test.patch featureset=rt -+ features/all/rt/0205-rcu-Merge-RCU-bh-into-RCU-preempt.patch featureset=rt -+ features/all/rt/0206-rcu-Fix-macro-substitution-for-synchronize_rcu_bh-on.patch featureset=rt -+ features/all/rt/0207-rcu-more-fallout.patch.patch featureset=rt -+ features/all/rt/0208-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch featureset=rt -+ features/all/rt/0209-rt-rcutree-Move-misplaced-prototype.patch featureset=rt -+ features/all/rt/0210-lglocks-rt.patch.patch featureset=rt -+ features/all/rt/0211-serial-8250-Clean-up-the-locking-for-rt.patch featureset=rt -+ features/all/rt/0212-serial-8250-Call-flush_to_ldisc-when-the-irq-is-thre.patch featureset=rt -+ features/all/rt/0213-drivers-tty-fix-omap-lock-crap.patch.patch featureset=rt -+ features/all/rt/0214-rt-Improve-the-serial-console-PASS_LIMIT.patch featureset=rt -+ features/all/rt/0215-fs-namespace-preemption-fix.patch featureset=rt -+ features/all/rt/0216-mm-protect-activate-switch-mm.patch.patch featureset=rt -+ features/all/rt/0217-fs-block-rt-support.patch.patch featureset=rt -+ features/all/rt/0218-fs-ntfs-disable-interrupt-only-on-RT.patch featureset=rt -+ features/all/rt/0219-x86-Convert-mce-timer-to-hrtimer.patch featureset=rt -+ features/all/rt/0220-x86-stackprotector-Avoid-random-pool-on-rt.patch featureset=rt -+ features/all/rt/0221-x86-Use-generic-rwsem_spinlocks-on-rt.patch featureset=rt -+ features/all/rt/0222-x86-Disable-IST-stacks-for-debug-int-3-stack-fault-f.patch featureset=rt -+ features/all/rt/0223-workqueue-use-get-cpu-light.patch.patch featureset=rt -+ features/all/rt/0224-epoll.patch.patch featureset=rt -+ features/all/rt/0225-mm-vmalloc.patch.patch featureset=rt -+ features/all/rt/0226-workqueue-Fix-cpuhotplug-trainwreck.patch featureset=rt -+ features/all/rt/0227-workqueue-Fix-PF_THREAD_BOUND-abuse.patch featureset=rt -+ features/all/rt/0228-workqueue-Use-get_cpu_light-in-flush_gcwq.patch featureset=rt -+ features/all/rt/0229-hotplug-stuff.patch.patch featureset=rt -+ features/all/rt/0230-debugobjects-rt.patch.patch featureset=rt -+ features/all/rt/0231-jump-label-rt.patch.patch featureset=rt -+ features/all/rt/0232-skbufhead-raw-lock.patch.patch featureset=rt -+ features/all/rt/0233-x86-no-perf-irq-work-rt.patch.patch featureset=rt -+ features/all/rt/0234-console-make-rt-friendly.patch.patch featureset=rt -+ features/all/rt/0235-printk-Disable-migration-instead-of-preemption.patch featureset=rt -+ features/all/rt/0236-power-use-generic-rwsem-on-rt.patch featureset=rt -+ features/all/rt/0237-power-disable-highmem-on-rt.patch.patch featureset=rt -+ features/all/rt/0238-arm-disable-highmem-on-rt.patch.patch featureset=rt -+ features/all/rt/0239-ARM-at91-tclib-Default-to-tclib-timer-for-RT.patch featureset=rt -+ features/all/rt/0240-mips-disable-highmem-on-rt.patch.patch featureset=rt -+ features/all/rt/0241-net-Avoid-livelock-in-net_tx_action-on-RT.patch featureset=rt -+ features/all/rt/0242-ping-sysrq.patch.patch featureset=rt -+ features/all/rt/0243-kgdb-serial-Short-term-workaround.patch featureset=rt -+ features/all/rt/0244-add-sys-kernel-realtime-entry.patch featureset=rt -+ features/all/rt/0245-mm-rt-kmap_atomic-scheduling.patch featureset=rt -+ features/all/rt/0246-ipc-sem-Rework-semaphore-wakeups.patch featureset=rt -+ features/all/rt/0247-sysrq-Allow-immediate-Magic-SysRq-output-for-PREEMPT.patch featureset=rt -+ features/all/rt/0248-x86-kvm-require-const-tsc-for-rt.patch.patch featureset=rt -+ features/all/rt/0249-scsi-fcoe-rt-aware.patch.patch featureset=rt -+ features/all/rt/0250-x86-crypto-Reduce-preempt-disabled-regions.patch featureset=rt -+ features/all/rt/0251-dm-Make-rt-aware.patch featureset=rt -+ features/all/rt/0252-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch featureset=rt -+ features/all/rt/0253-seqlock-Prevent-rt-starvation.patch featureset=rt -+ features/all/rt/0254-timer-Fix-hotplug-for-rt.patch featureset=rt -+ features/all/rt/0255-futex-rt-Fix-possible-lockup-when-taking-pi_lock-in-.patch featureset=rt -+ features/all/rt/0256-ring-buffer-rt-Check-for-irqs-disabled-before-grabbi.patch featureset=rt -+ features/all/rt/0257-sched-rt-Fix-wait_task_interactive-to-test-rt_spin_l.patch featureset=rt -+ features/all/rt/0258-lglock-rt-Use-non-rt-for_each_cpu-in-rt-code.patch featureset=rt -+ features/all/rt/0259-cpu-Make-hotplug.lock-a-sleeping-spinlock-on-RT.patch featureset=rt -+ features/all/rt/0260-softirq-Check-preemption-after-reenabling-interrupts.patch featureset=rt -+ features/all/rt/0261-rt-Introduce-cpu_chill.patch featureset=rt -+ features/all/rt/0262-fs-dcache-Use-cpu_chill-in-trylock-loops.patch featureset=rt -+ features/all/rt/0263-net-Use-cpu_chill-instead-of-cpu_relax.patch featureset=rt -+ features/all/rt/0264-kconfig-disable-a-few-options-rt.patch.patch featureset=rt -+ features/all/rt/0265-kconfig-preempt-rt-full.patch.patch featureset=rt -+ features/all/rt/0266-rt-Make-migrate_disable-enable-and-__rt_mutex_init-n.patch featureset=rt ++ features/all/rt/re-possible-slab-deadlock-while-doing-ifenslave-1.patch featureset=rt ++ features/all/rt/x86-kprobes-remove-bogus-preempt-enable.patch featureset=rt ++ features/all/rt/tick-skew.patch featureset=rt ++ features/all/rt/x86-hpet-disable-msi-on-lenovo-w510.patch featureset=rt ++ features/all/rt/block-shorten-interrupt-disabled-regions.patch featureset=rt ++ features/all/rt/sched-distangle-worker-accounting-from-rq-3elock.patch featureset=rt ++ features/all/rt/mips-enable-interrupts-in-signal.patch featureset=rt ++ features/all/rt/arm-enable-interrupts-in-signal-code.patch featureset=rt ++ features/all/rt/seqlock-remove-unused-functions.patch featureset=rt ++ features/all/rt/seqlock-use-seqcount.patch featureset=rt ++ features/all/rt/timekeeping-split-xtime-lock.patch featureset=rt ++ features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch featureset=rt ++ features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch featureset=rt ++ features/all/rt/signal-revert-ptrace-preempt-magic.patch featureset=rt ++ features/all/rt/arm-mark-pmu-interupt-no-thread.patch featureset=rt ++ features/all/rt/arm-allow-irq-threading.patch featureset=rt ++ features/all/rt/arm-convert-boot-lock-to-raw.patch featureset=rt ++ features/all/rt/arm-omap-make-wakeupgen_lock-raw.patch featureset=rt ++ features/all/rt/signals-do-not-wake-self.patch featureset=rt ++ features/all/rt/posix-timers-no-broadcast.patch featureset=rt ++ features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch featureset=rt ++ features/all/rt/oleg-signal-rt-fix.patch featureset=rt ++ features/all/rt/generic-cmpxchg-use-raw-local-irq.patch featureset=rt ++ features/all/rt/drivers-random-reduce-preempt-disabled-region.patch featureset=rt ++ features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch featureset=rt ++ features/all/rt/clocksource-tclib-allow-higher-clockrates.patch featureset=rt ++ features/all/rt/drivers-net-tulip-add-missing-pci-disable.patch featureset=rt ++ features/all/rt/drivers-net-8139-disable-irq-nosync.patch featureset=rt ++ features/all/rt/drivers-net-ehea-mark-rx-irq-no-thread.patch featureset=rt ++ features/all/rt/drivers-net-at91-make-mdio-protection-rt-safe.patch featureset=rt ++ features/all/rt/mm-prepare-pf-disable-discoupling.patch featureset=rt ++ features/all/rt/arch-use-pagefault-disabled.patch featureset=rt ++ features/all/rt/peter_zijlstra-frob-pagefault_disable.patch featureset=rt ++ features/all/rt/peterz-raw_pagefault_disable.patch featureset=rt ++ features/all/rt/filemap-fix-up.patch featureset=rt ++ features/all/rt/mm-remove-preempt-count-from-pf.patch featureset=rt ++ features/all/rt/x86-highmem-warn.patch featureset=rt ++ features/all/rt/suspend-prevernt-might-sleep-splats.patch featureset=rt ++ features/all/rt/of-fixup-recursive-locking.patch featureset=rt ++ features/all/rt/of-convert-devtree-lock.patch featureset=rt ++ features/all/rt/list-add-list-last-entry.patch featureset=rt ++ features/all/rt/mm-page-alloc-use-list-last-entry.patch featureset=rt ++ features/all/rt/mm-slab-move-debug-out.patch featureset=rt ++ features/all/rt/pid-h-include-atomic-h.patch featureset=rt ++ features/all/rt/sysctl-include-atomic-h.patch featureset=rt ++ features/all/rt/net-flip-lock-dep-thingy.patch featureset=rt ++ features/all/rt/softirq-thread-do-softirq.patch featureset=rt ++ features/all/rt/softirq-split-out-code.patch featureset=rt ++ features/all/rt/x86-io-apic-migra-no-unmask.patch featureset=rt ++ features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch featureset=rt ++ features/all/rt/locking-various-init-fixes.patch featureset=rt ++ features/all/rt/pci-access-use-__wake_up_all_locked.patch featureset=rt ++ features/all/rt/latency-hist.patch featureset=rt ++ features/all/rt/hwlatdetect.patch featureset=rt ++ features/all/rt/localversion.patch featureset=rt ++ features/all/rt/early-printk-consolidate.patch featureset=rt ++ features/all/rt/printk-kill.patch featureset=rt ++ features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch featureset=rt ++ features/all/rt/rt-preempt-base-config.patch featureset=rt ++ features/all/rt/bug-rt-dependend-variants.patch featureset=rt ++ features/all/rt/local-irq-rt-depending-variants.patch featureset=rt ++ features/all/rt/preempt-nort-rt-variants.patch featureset=rt ++ features/all/rt/ata-disable-interrupts-if-non-rt.patch featureset=rt ++ features/all/rt/ide-use-nort-local-irq-variants.patch featureset=rt ++ features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch featureset=rt ++ features/all/rt/inpt-gameport-use-local-irq-nort.patch featureset=rt ++ features/all/rt/acpi-use-local-irq-nort.patch featureset=rt ++ features/all/rt/user-use-local-irq-nort.patch featureset=rt ++ features/all/rt/resource-counters-use-localirq-nort.patch featureset=rt ++ features/all/rt/usb-hcd-use-local-irq-nort.patch featureset=rt ++ features/all/rt/tty-use-local-irq-nort.patch featureset=rt ++ features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch featureset=rt ++ features/all/rt/signal-fix-up-rcu-wreckage.patch featureset=rt ++ features/all/rt/net-wireless-warn-nort.patch featureset=rt ++ features/all/rt/mm-cgroup-page-bit-spinlock.patch featureset=rt ++ features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch featureset=rt ++ features/all/rt/fs-jbd-replace-bh_state-lock.patch featureset=rt ++ features/all/rt/genirq-nodebug-shirq.patch featureset=rt ++ features/all/rt/genirq-disable-random-call-on-preempt-rt.patch featureset=rt ++ features/all/rt/genirq-disable-irqpoll-on-rt.patch featureset=rt ++ features/all/rt/genirq-force-threading.patch featureset=rt ++ features/all/rt/drivers-net-fix-livelock-issues.patch featureset=rt ++ features/all/rt/drivers-net-vortex-fix-locking-issues.patch featureset=rt ++ features/all/rt/drivers-net-gianfar-make-rt-aware.patch featureset=rt ++ features/all/rt/usb-fix-mouse-problem-copying-large-data.patch featureset=rt ++ features/all/rt/local-var.patch featureset=rt ++ features/all/rt/rt-local-irq-lock.patch featureset=rt ++ features/all/rt/cpu-rt-variants.patch featureset=rt ++ features/all/rt/mm-slab-wrap-functions.patch featureset=rt ++ features/all/rt/rt-slab-fix-__do_drain-to-use-the-right-array-cache.patch featureset=rt ++ features/all/rt/mm-slab-more-lock-breaks.patch featureset=rt ++ features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch featureset=rt ++ features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch featureset=rt ++ features/all/rt/mm-page-alloc-fix.patch featureset=rt ++ features/all/rt/mm-convert-swap-to-percpu-locked.patch featureset=rt ++ features/all/rt/mm-make-vmstat-rt-aware.patch featureset=rt ++ features/all/rt/mm-shrink-the-page-frame-to-rt-size.patch featureset=rt ++ features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch featureset=rt ++ features/all/rt/mm-allow-slab-rt.patch featureset=rt ++ features/all/rt/radix-tree-rt-aware.patch featureset=rt ++ features/all/rt/panic-disable-random-on-rt.patch featureset=rt ++ features/all/rt/ipc-make-rt-aware.patch featureset=rt ++ features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch featureset=rt ++ features/all/rt/relay-fix-timer-madness.patch featureset=rt ++ features/all/rt/net-ipv4-route-use-locks-on-up-rt.patch featureset=rt ++ features/all/rt/workqueue-avoid-the-lock-in-cpu-dying.patch featureset=rt ++ features/all/rt/timers-prepare-for-full-preemption.patch featureset=rt ++ features/all/rt/timers-preempt-rt-support.patch featureset=rt ++ features/all/rt/timers-fix-timer-hotplug-on-rt.patch featureset=rt ++ features/all/rt/timers-mov-printk_tick-to-soft-interrupt.patch featureset=rt ++ features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch featureset=rt ++ features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch featureset=rt ++ features/all/rt/rfc-printk-don-27t-call-printk_tick-in-printk_needs_cpu.patch featureset=rt ++ features/all/rt/hrtimers-prepare-full-preemption.patch featureset=rt ++ features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch featureset=rt ++ features/all/rt/peter_zijlstra-frob-hrtimer.patch featureset=rt ++ features/all/rt/hrtimer-add-missing-debug_activate-aid-was-re-announce-3-0-6-rt17.patch featureset=rt ++ features/all/rt/hrtimer-fix-reprogram-madness.patch featureset=rt ++ features/all/rt/timer-fd-avoid-live-lock.patch featureset=rt ++ features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch featureset=rt ++ features/all/rt/posix-timers-shorten-cpu-timers-thread.patch featureset=rt ++ features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch featureset=rt ++ features/all/rt/sched-delay-put-task.patch featureset=rt ++ features/all/rt/sched-limit-nr-migrate.patch featureset=rt ++ features/all/rt/sched-mmdrop-delayed.patch featureset=rt ++ features/all/rt/sched-rt-mutex-wakeup.patch featureset=rt ++ features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch featureset=rt ++ features/all/rt/sched-cond-resched.patch featureset=rt ++ features/all/rt/cond-resched-softirq-rt.patch featureset=rt ++ features/all/rt/cond-resched-lock-rt-tweak.patch featureset=rt ++ features/all/rt/sched-disable-ttwu-queue.patch featureset=rt ++ features/all/rt/sched-disable-rt-group-sched-on-rt.patch featureset=rt ++ features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch featureset=rt ++ features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch featureset=rt ++ features/all/rt/stomp-machine-mark-stomper-thread.patch featureset=rt ++ features/all/rt/stomp-machine-raw-lock.patch featureset=rt ++ features/all/rt/hotplug-light-get-online-cpus.patch featureset=rt ++ features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch featureset=rt ++ features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch featureset=rt ++ features/all/rt/sched-migrate-disable.patch featureset=rt ++ features/all/rt/hotplug-use-migrate-disable.patch featureset=rt ++ features/all/rt/hotplug-call-cpu_unplug_begin-a-little-early.patch featureset=rt ++ features/all/rt/ftrace-migrate-disable-tracing.patch featureset=rt ++ features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch featureset=rt ++ features/all/rt/migrate-disable-rt-variant.patch featureset=rt ++ features/all/rt/peter_zijlstra-frob-migrate_disable.patch featureset=rt ++ features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch featureset=rt ++ features/all/rt/sched-rt-fix-migrate_enable-thinko.patch featureset=rt ++ features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch featureset=rt ++ features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch featureset=rt ++ features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch featureset=rt ++ features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch featureset=rt ++ features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch featureset=rt ++ features/all/rt/ftrace-crap.patch featureset=rt ++ features/all/rt/rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch featureset=rt ++ features/all/rt/net-netif_rx_ni-migrate-disable.patch featureset=rt ++ features/all/rt/softirq-sanitize-softirq-pending.patch featureset=rt ++ features/all/rt/lockdep-no-softirq-accounting-on-rt.patch featureset=rt ++ features/all/rt/mutex-no-spin-on-rt.patch featureset=rt ++ features/all/rt/softirq-local-lock.patch featureset=rt ++ features/all/rt/softirq-export-in-serving-softirq.patch featureset=rt ++ features/all/rt/harirq-h-define-softirq_count-as-oul-to-kill-build-warning.patch featureset=rt ++ features/all/rt/softirq-fix-unplug-deadlock.patch featureset=rt ++ features/all/rt/softirq-disable-softirq-stacks-for-rt.patch featureset=rt ++ features/all/rt/softirq-make-fifo.patch featureset=rt ++ features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch featureset=rt ++ features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch featureset=rt ++ features/all/rt/local-vars-migrate-disable.patch featureset=rt ++ features/all/rt/md-raid5-percpu-handling-rt-aware.patch featureset=rt ++ features/all/rt/rtmutex-lock-killable.patch featureset=rt ++ features/all/rt/rtmutex-futex-prepare-rt.patch featureset=rt ++ features/all/rt/futex-requeue-pi-fix.patch featureset=rt ++ features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch featureset=rt ++ features/all/rt/spinlock-types-separate-raw.patch featureset=rt ++ features/all/rt/rtmutex-avoid-include-hell.patch featureset=rt ++ features/all/rt/rt-add-rt-spinlock-to-headers.patch featureset=rt ++ features/all/rt/rt-add-rt-to-mutex-headers.patch featureset=rt ++ features/all/rt/rwsem-add-rt-variant.patch featureset=rt ++ features/all/rt/rt-add-rt-locks.patch featureset=rt ++ features/all/rt/tasklist-lock-fix-section-conflict.patch featureset=rt ++ features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch featureset=rt ++ features/all/rt/rcu-force-preempt-rcu-for-rt.patch featureset=rt ++ features/all/rt/peter_zijlstra-frob-rcu.patch featureset=rt ++ features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch featureset=rt ++ features/all/rt/rcu-fix-macro-substitution.patch featureset=rt ++ features/all/rt/rcu-tiny-merge-bh.patch featureset=rt ++ features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch featureset=rt ++ features/all/rt/rcu-fix-build-break.patch featureset=rt ++ features/all/rt/rt-rcutree-warn-fix.patch featureset=rt ++ features/all/rt/lglocks-rt.patch featureset=rt ++ features/all/rt/drivers-serial-cleanup-locking-for-rt.patch featureset=rt ++ features/all/rt/drivers-serial-call-flush_to_ldisc-when-the-irq-is-t.patch featureset=rt ++ features/all/rt/drivers-tty-fix-omap-lock-crap.patch featureset=rt ++ features/all/rt/rt-serial-warn-fix.patch featureset=rt ++ features/all/rt/fs-namespace-preemption-fix.patch featureset=rt ++ features/all/rt/mm-protect-activate-switch-mm.patch featureset=rt ++ features/all/rt/mm-protect-activate_mm-by-preempt_-disable-7cenable-_rt.patch featureset=rt ++ features/all/rt/fs-block-rt-support.patch featureset=rt ++ features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch featureset=rt ++ features/all/rt/x86-mce-timer-hrtimer.patch featureset=rt ++ features/all/rt/x86-stackprot-no-random-on-rt.patch featureset=rt ++ features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch featureset=rt ++ features/all/rt/x86-disable-debug-stack.patch featureset=rt ++ features/all/rt/workqueue-use-get-cpu-light.patch featureset=rt ++ features/all/rt/epoll-use-get-cpu-light.patch featureset=rt ++ features/all/rt/mm-vmalloc-use-get-cpu-light.patch featureset=rt ++ features/all/rt/revert-workqueue-skip-nr_running-sanity-check-in-wor.patch featureset=rt ++ features/all/rt/workqueue-sanity.patch featureset=rt ++ features/all/rt/workqueue-fix-PF_THREAD_BOUND.patch featureset=rt ++ features/all/rt/workqueue-hotplug-fix.patch featureset=rt ++ features/all/rt/workqueue-more-hotplug-fallout.patch featureset=rt ++ features/all/rt/debugobjects-rt.patch featureset=rt ++ features/all/rt/jump-label-rt.patch featureset=rt ++ features/all/rt/skbufhead-raw-lock.patch featureset=rt ++ features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch featureset=rt ++ features/all/rt/console-make-rt-friendly.patch featureset=rt ++ features/all/rt/fix-printk-flush-of-messages-1.patch featureset=rt ++ features/all/rt/power-use-generic-rwsem-on-rt.patch featureset=rt ++ features/all/rt/power-disable-highmem-on-rt.patch featureset=rt ++ features/all/rt/arm-disable-highmem-on-rt.patch featureset=rt ++ features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch featureset=rt ++ features/all/rt/mips-disable-highmem-on-rt.patch featureset=rt ++ features/all/rt/net-tx-action-avoid-livelock-on-rt.patch featureset=rt ++ features/all/rt/ping-sysrq.patch featureset=rt ++ features/all/rt/kgb-serial-hackaround.patch featureset=rt ++ features/all/rt/sysfs-realtime-entry.patch featureset=rt ++ features/all/rt/peter_zijlstra-re-_3_0-rt4.patch featureset=rt ++ features/all/rt/ipc-sem-rework-semaphore-wakeups.patch featureset=rt ++ features/all/rt/x86-kvm-require-const-tsc-for-rt.patch featureset=rt ++ features/all/rt/scsi-fcoe-rt-aware.patch featureset=rt ++ features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch featureset=rt ++ features/all/rt/dm-make-rt-aware.patch featureset=rt ++ features/all/rt/cpumask-disable-offstack-on-rt.patch featureset=rt ++ features/all/rt/seqlock-prevent-rt-starvation.patch featureset=rt ++ features/all/rt/rfc-timer-fix-hotplug-for-rt.patch featureset=rt ++ features/all/rt/rfc-futex-rt-fix-possible-lockup-when-taking-pi_lock-in-proxy-handler.patch featureset=rt ++ features/all/rt/rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch featureset=rt ++ features/all/rt/rfc-sched-rt-fix-wait_task_interactive-to-test-rt_spin_lock-state.patch featureset=rt ++ features/all/rt/rfc-lglock-rt-use-non-rt-for_each_cpu-in-rt-code.patch featureset=rt ++ features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch featureset=rt ++ features/all/rt/softirq-preempt-fix-3-re.txt featureset=rt ++ features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch featureset=rt ++ features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch featureset=rt ++ features/all/rt/rt-introduce-cpu-chill.patch featureset=rt ++ features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch featureset=rt ++ features/all/rt/net-use-cpu-chill.patch featureset=rt ++ features/all/rt/ntp-make-ntp-lock-raw-sigh.patch featureset=rt ++ features/all/rt/mips-remove-smp-reserve-lock.patch featureset=rt ++ features/all/rt/lockdep-selftest-convert-spinlock-to-raw-spinlock.patch featureset=rt ++ features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch featureset=rt ++ features/all/rt/genirq-add-default-mask-cmdline-option.patch featureset=rt ++ features/all/rt/kconfig-disable-a-few-options-rt.patch featureset=rt ++ features/all/rt/kconfig-preempt-rt-full.patch featureset=rt