[kernel] r18389 - in dists/trunk/linux-2.6/debian: . patches/features/all/rt patches/series

Uwe Kleine-König ukleinek-guest at alioth.debian.org
Thu Dec 15 14:24:35 UTC 2011


Author: ukleinek-guest
Date: Thu Dec 15 14:24:33 2011
New Revision: 18389

Log:
[amd64] bump rt feature set to 3.2-rc5-rt8

Added:
   dists/trunk/linux-2.6/debian/patches/features/all/rt/acpi-gpe-use-wait-simple.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/printk-disable-migration-instead-of-preemption.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-rcutree-warn-fix.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-serial-warn-fix.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/wait-simple-version.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/features/all/rt/localversion.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
   dists/trunk/linux-2.6/debian/patches/features/all/rt/series
   dists/trunk/linux-2.6/debian/patches/features/all/rt/x86-highmem-warn.patch
   dists/trunk/linux-2.6/debian/patches/series/base-extra

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/changelog	Thu Dec 15 14:24:33 2011	(r18389)
@@ -10,7 +10,7 @@
   * [x86] et131x: Include driver in installer (Closes: #651440)
 
   [ Uwe Kleine-König ]
-  * [amd64] Update rt featureset to 3.2-rc4-rt6
+  * [amd64] Update rt featureset to 3.2-rc5-rt8
 
   [ Arnaud Patard ]
   * [arm] setup: initialize arm_dma_zone_size earlier (Closes: #651215)

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/acpi-gpe-use-wait-simple.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/acpi-gpe-use-wait-simple.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,72 @@
+Subject: acpi-gpe-use-wait-simple.patch
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Tue, 13 Dec 2011 17:14:35 +0100
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ drivers/acpi/ec.c       |    8 ++++----
+ drivers/acpi/internal.h |    4 +++-
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+Index: linux-3.2/drivers/acpi/ec.c
+===================================================================
+--- linux-3.2.orig/drivers/acpi/ec.c
++++ linux-3.2/drivers/acpi/ec.c
+@@ -222,7 +222,7 @@ static int ec_poll(struct acpi_ec *ec)
+ 				if (ec_transaction_done(ec))
+ 					return 0;
+ 			} else {
+-				if (wait_event_timeout(ec->wait,
++				if (swait_event_timeout(ec->wait,
+ 						ec_transaction_done(ec),
+ 						msecs_to_jiffies(1)))
+ 					return 0;
+@@ -272,7 +272,7 @@ static int ec_wait_ibf0(struct acpi_ec *
+ 	unsigned long delay = jiffies + msecs_to_jiffies(ec_delay);
+ 	/* interrupt wait manually if GPE mode is not active */
+ 	while (time_before(jiffies, delay))
+-		if (wait_event_timeout(ec->wait, ec_check_ibf0(ec),
++		if (swait_event_timeout(ec->wait, ec_check_ibf0(ec),
+ 					msecs_to_jiffies(1)))
+ 			return 0;
+ 	return -ETIME;
+@@ -612,7 +612,7 @@ static u32 acpi_ec_gpe_handler(acpi_hand
+ 	advance_transaction(ec, acpi_ec_read_status(ec));
+ 	if (ec_transaction_done(ec) &&
+ 	    (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) == 0) {
+-		wake_up(&ec->wait);
++		swait_wake(&ec->wait);
+ 		ec_check_sci(ec, acpi_ec_read_status(ec));
+ 	}
+ 	return ACPI_INTERRUPT_HANDLED | ACPI_REENABLE_GPE;
+@@ -676,7 +676,7 @@ static struct acpi_ec *make_acpi_ec(void
+ 		return NULL;
+ 	ec->flags = 1 << EC_FLAGS_QUERY_PENDING;
+ 	mutex_init(&ec->lock);
+-	init_waitqueue_head(&ec->wait);
++	init_swait_head(&ec->wait);
+ 	INIT_LIST_HEAD(&ec->list);
+ 	raw_spin_lock_init(&ec->curr_lock);
+ 	return ec;
+Index: linux-3.2/drivers/acpi/internal.h
+===================================================================
+--- linux-3.2.orig/drivers/acpi/internal.h
++++ linux-3.2/drivers/acpi/internal.h
+@@ -23,6 +23,8 @@
+ 
+ #define PREFIX "ACPI: "
+ 
++#include <linux/wait-simple.h>
++
+ int init_acpi_device_notify(void);
+ int acpi_scan_init(void);
+ int acpi_sysfs_init(void);
+@@ -59,7 +61,7 @@ struct acpi_ec {
+ 	unsigned long global_lock;
+ 	unsigned long flags;
+ 	struct mutex lock;
+-	wait_queue_head_t wait;
++	struct swait_head wait;
+ 	struct list_head list;
+ 	struct transaction *curr;
+ 	raw_spinlock_t curr_lock;

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,38 @@
+Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Wed, 14 Dec 2011 01:03:49 +0100
+
+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.
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ arch/x86/Kconfig |    2 +-
+ lib/Kconfig      |    1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+Index: linux-3.2/arch/x86/Kconfig
+===================================================================
+--- linux-3.2.orig/arch/x86/Kconfig
++++ linux-3.2/arch/x86/Kconfig
+@@ -730,7 +730,7 @@ config IOMMU_HELPER
+ config MAXSMP
+ 	bool "Enable Maximum number of SMP Processors and NUMA Nodes"
+ 	depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL
+-	select CPUMASK_OFFSTACK
++	select CPUMASK_OFFSTACK if !PREEMPT_RT_FULL
+ 	---help---
+ 	  Enable maximum number of CPUS and NUMA Nodes for this architecture.
+ 	  If unsure, say N.
+Index: linux-3.2/lib/Kconfig
+===================================================================
+--- linux-3.2.orig/lib/Kconfig
++++ linux-3.2/lib/Kconfig
+@@ -231,6 +231,7 @@ config CHECK_SIGNATURE
+ 
+ config CPUMASK_OFFSTACK
+ 	bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
++	depends on !PREEMPT_RT_FULL
+ 	help
+ 	  Use dynamic allocation for cpumask_var_t, instead of putting
+ 	  them on the stack.  This is a bit more expensive, but avoids

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,69 @@
+Subject: intel_idle: Convert i7300_idle_lock to raw spinlock
+From: Mike Galbraith <efault at gmx.de>
+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.
+
+[   27.104159] i7300_idle: loaded v1.55
+[   27.104192] BUG: scheduling while atomic: swapper/2/0/0x00000002
+[   27.104309] Pid: 0, comm: swapper/2 Tainted: G           N  3.0.12-rt30-rc3-rt #1
+[   27.104317] Call Trace:
+[   27.104338]  [<ffffffff810046a5>] dump_trace+0x85/0x2e0
+[   27.104372]  [<ffffffff8144eb00>] thread_return+0x12b/0x30b
+[   27.104381]  [<ffffffff8144f1b9>] schedule+0x29/0xb0
+[   27.104389]  [<ffffffff814506e5>] rt_spin_lock_slowlock+0xc5/0x240
+[   27.104401]  [<ffffffffa01f818f>] i7300_idle_notifier+0x3f/0x360 [i7300_idle]
+[   27.104415]  [<ffffffff814546c7>] notifier_call_chain+0x37/0x70
+[   27.104426]  [<ffffffff81454748>] __atomic_notifier_call_chain+0x48/0x70
+[   27.104439]  [<ffffffff81001a39>] cpu_idle+0x89/0xb0
+[   27.104449] bad: scheduling from the idle thread!
+
+Signed-off-by: Mike Galbraith <efault at gmx.de>
+Cc: Steven Rostedt <rostedt at goodmis.org>
+Link: http://lkml.kernel.org/r/1323258522.5057.73.camel@marge.simson.net
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+
+---
+ drivers/idle/i7300_idle.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: linux-3.2/drivers/idle/i7300_idle.c
+===================================================================
+--- linux-3.2.orig/drivers/idle/i7300_idle.c
++++ linux-3.2/drivers/idle/i7300_idle.c
+@@ -75,7 +75,7 @@ static unsigned long past_skip;
+ 
+ static struct pci_dev *fbd_dev;
+ 
+-static spinlock_t i7300_idle_lock;
++static raw_spinlock_t i7300_idle_lock;
+ static int i7300_idle_active;
+ 
+ static u8 i7300_idle_thrtctl_saved;
+@@ -457,7 +457,7 @@ static int i7300_idle_notifier(struct no
+ 		idle_begin_time = ktime_get();
+ 	}
+ 
+-	spin_lock_irqsave(&i7300_idle_lock, flags);
++	raw_spin_lock_irqsave(&i7300_idle_lock, flags);
+ 	if (val == IDLE_START) {
+ 
+ 		cpumask_set_cpu(smp_processor_id(), idle_cpumask);
+@@ -506,7 +506,7 @@ static int i7300_idle_notifier(struct no
+ 		}
+ 	}
+ end:
+-	spin_unlock_irqrestore(&i7300_idle_lock, flags);
++	raw_spin_unlock_irqrestore(&i7300_idle_lock, flags);
+ 	return 0;
+ }
+ 
+@@ -554,7 +554,7 @@ struct debugfs_file_info {
+ 
+ static int __init i7300_idle_init(void)
+ {
+-	spin_lock_init(&i7300_idle_lock);
++	raw_spin_lock_init(&i7300_idle_lock);
+ 	total_us = 0;
+ 
+ 	if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload))

Modified: dists/trunk/linux-2.6/debian/patches/features/all/rt/localversion.patch
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/features/all/rt/localversion.patch	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/localversion.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -14,4 +14,4 @@
 --- /dev/null
 +++ linux-3.2/localversion-rt
 @@ -0,0 +1 @@
-+-rt6
++-rt8

Modified: dists/trunk/linux-2.6/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -95,7 +95,7 @@
 ===================================================================
 --- linux-3.2.orig/kernel/softirq.c
 +++ linux-3.2/kernel/softirq.c
-@@ -138,7 +138,7 @@ static void wakeup_softirqd(void)
+@@ -139,7 +139,7 @@ static void wakeup_softirqd(void)
  		wake_up_process(tsk);
  }
  
@@ -104,7 +104,7 @@
  {
  	struct softirq_action *h = softirq_vec;
  	unsigned int prev_count = preempt_count();
-@@ -161,7 +161,8 @@ static void handle_pending_softirqs(u32 
+@@ -162,7 +162,8 @@ static void handle_pending_softirqs(u32 
  			       prev_count, (unsigned int) preempt_count());
  			preempt_count() = prev_count;
  		}
@@ -114,7 +114,7 @@
  	}
  	local_irq_disable();
  }
-@@ -313,7 +314,7 @@ restart:
+@@ -314,7 +315,7 @@ restart:
  	/* Reset the pending bitmask before enabling irqs */
  	set_softirq_pending(0);
  
@@ -123,7 +123,7 @@
  
  	pending = local_softirq_pending();
  	if (pending && --max_restart)
-@@ -383,7 +384,12 @@ static inline void ksoftirqd_clr_sched_p
+@@ -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);
  
@@ -137,7 +137,7 @@
  
  void __init softirq_early_init(void)
  {
-@@ -446,7 +452,7 @@ int in_serving_softirq(void)
+@@ -448,7 +454,7 @@ EXPORT_SYMBOL(in_serving_softirq);
   * Called with bh and local interrupts disabled. For full RT cpu must
   * be pinned.
   */
@@ -146,7 +146,7 @@
  {
  	u32 pending = local_softirq_pending();
  	int cpu = smp_processor_id();
-@@ -460,7 +466,7 @@ static void __do_softirq(void)
+@@ -462,7 +468,7 @@ static void __do_softirq(void)
  
  	lockdep_softirq_enter();
  
@@ -155,7 +155,7 @@
  
  	pending = local_softirq_pending();
  	if (pending)
-@@ -499,7 +505,7 @@ static int __thread_do_softirq(int cpu)
+@@ -501,7 +507,7 @@ static int __thread_do_softirq(int cpu)
  	 * schedule!
  	 */
  	if (local_softirq_pending())

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/printk-disable-migration-instead-of-preemption.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/printk-disable-migration-instead-of-preemption.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,60 @@
+Subject: printk: Disable migration instead of preemption
+From: Richard Weinberger <rw at linutronix.de>
+Date: Mon, 12 Dec 2011 14:35:56 +0100
+
+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]  [<ffffffff8106fade>] __might_sleep+0xeb/0xf0
+[   14.759318]  [<ffffffff810ad784>] rt_spin_lock_fastlock.constprop.9+0x21/0x43
+[   14.759336]  [<ffffffff8161fef0>] rt_spin_lock+0xe/0x10
+[   14.759354]  [<ffffffff81347ad1>] serial8250_console_write+0x81/0x121
+[   14.759366]  [<ffffffff8107ecd3>] __call_console_drivers+0x7c/0x93
+[   14.759369]  [<ffffffff8107ef31>] _call_console_drivers+0x5c/0x60
+[   14.759372]  [<ffffffff8107f7e5>] console_unlock+0x147/0x1a2
+[   14.759374]  [<ffffffff8107fd33>] vprintk+0x3ea/0x462
+[   14.759383]  [<ffffffff816160e0>] printk+0x51/0x53
+[   14.759399]  [<ffffffff811974e4>] ? proc_reg_poll+0x9a/0x9a
+[   14.759403]  [<ffffffff81335b42>] __handle_sysrq+0x50/0x14d
+[   14.759406]  [<ffffffff81335c8a>] write_sysrq_trigger+0x4b/0x53
+[   14.759408]  [<ffffffff81335c3f>] ? __handle_sysrq+0x14d/0x14d
+[   14.759410]  [<ffffffff81197583>] proc_reg_write+0x9f/0xbe
+[   14.759426]  [<ffffffff811497ec>] vfs_write+0xac/0xf3
+[   14.759429]  [<ffffffff8114a9b3>] ? fget_light+0x3a/0x9b
+[   14.759431]  [<ffffffff811499db>] sys_write+0x4a/0x6e
+[   14.759438]  [<ffffffff81625d52>] system_call_fastpath+0x16/0x1b
+
+Signed-off-by: Richard Weinberger <rw at linutronix.de>
+Link: http://lkml.kernel.org/r/1323696956-11445-1-git-send-email-rw@linutronix.de
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ kernel/printk.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: linux-3.2/kernel/printk.c
+===================================================================
+--- linux-3.2.orig/kernel/printk.c
++++ linux-3.2/kernel/printk.c
+@@ -902,7 +902,7 @@ asmlinkage int vprintk(const char *fmt, 
+ 	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();
+@@ -1033,7 +1033,7 @@ asmlinkage int vprintk(const char *fmt, 
+ out_restore_irqs:
+ 	raw_local_irq_restore(flags);
+ 
+-	preempt_enable();
++	migrate_enable();
+ 	return printed_len;
+ }
+ EXPORT_SYMBOL(printk);

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-rcutree-warn-fix.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-rcutree-warn-fix.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,44 @@
+Subject: rt/rcutree: Move misplaced prototype
+From: Ingo Molnar <mingo at elte.hu>
+Date: Wed Dec 14 12:51:28 CET 2011
+
+Fix this warning on x86 defconfig:
+
+  kernel/rcutree.h:433:13: warning: ‘rcu_preempt_qs’ declared ‘static’ but never defined [-Wunused-function]
+
+The #ifdefs and prototypes here are a maze, move it closer to the
+usage site that needs it.
+
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+---
+ kernel/rcutree.c |    2 ++
+ kernel/rcutree.h |    1 -
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+Index: tip/kernel/rcutree.c
+===================================================================
+--- tip.orig/kernel/rcutree.c
++++ tip/kernel/rcutree.c
+@@ -171,6 +171,8 @@ void rcu_sched_qs(int cpu)
+ }
+ 
+ #ifdef CONFIG_PREEMPT_RT_FULL
++static void rcu_preempt_qs(int cpu);
++
+ void rcu_bh_qs(int cpu)
+ {
+ 	rcu_preempt_qs(cpu);
+Index: tip/kernel/rcutree.h
+===================================================================
+--- tip.orig/kernel/rcutree.h
++++ tip/kernel/rcutree.h
+@@ -430,7 +430,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);
+-static void rcu_preempt_qs(int cpu);
+ static void rcu_preempt_note_context_switch(int cpu);
+ static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp);
+ #ifdef CONFIG_HOTPLUG_CPU

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-serial-warn-fix.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/rt-serial-warn-fix.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,54 @@
+Subject: rt: Improve the serial console PASS_LIMIT
+From: Ingo Molnar <mingo at elte.hu>
+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]
+
+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.
+
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ drivers/tty/serial/8250.c |   13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+Index: tip/drivers/tty/serial/8250.c
+===================================================================
+--- tip.orig/drivers/tty/serial/8250.c
++++ tip/drivers/tty/serial/8250.c
+@@ -82,7 +82,16 @@ static unsigned int skip_txen_test; /* f
+ #define DEBUG_INTR(fmt...)	do { } while (0)
+ #endif
+ 
+-#define PASS_LIMIT	512
++/*
++ * On -rt we can have a more delays, and legitimately
++ * so - so don't drop work spuriously and spam the
++ * syslog:
++ */
++#ifdef CONFIG_PREEMPT_RT_FULL
++# define PASS_LIMIT	1000000
++#else
++# define PASS_LIMIT	512
++#endif
+ 
+ #define BOTH_EMPTY 	(UART_LSR_TEMT | UART_LSR_THRE)
+ 
+@@ -1632,14 +1641,12 @@ static irqreturn_t serial8250_interrupt(
+ 
+ 		l = l->next;
+ 
+-#ifndef CONFIG_PREEMPT_RT_FULL
+ 		if (l == i->head && pass_counter++ > PASS_LIMIT) {
+ 			/* If we hit this, we're dead. */
+ 			printk_ratelimited(KERN_ERR
+ 				"serial8250: too much work for irq%d\n", irq);
+ 			break;
+ 		}
+-#endif
+ 	} while (l != end);
+ 
+ 	spin_unlock(&i->lock);

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,36 @@
+Subject: sched: ttwu: Return success when only changing the saved_state value
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Tue, 13 Dec 2011 21:42:19 +0100
+
+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
+original state.
+
+When a real wakeup happens, while the task is running due to a lock
+wakeup already, we update p->saved_state to TASK_RUNNING, but we do
+not return success, which might cause another wakeup in the waitqueue
+code and the task remains in the waitqueue list. Return success in
+that case as well.
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+Cc: stable-rt at vger.kernel.org
+---
+ kernel/sched.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+Index: linux-3.2/kernel/sched.c
+===================================================================
+--- linux-3.2.orig/kernel/sched.c
++++ linux-3.2/kernel/sched.c
+@@ -2839,8 +2839,10 @@ try_to_wake_up(struct task_struct *p, un
+ 		 * if the wakeup condition is true.
+ 		 */
+ 		if (!(wake_flags & WF_LOCK_SLEEPER)) {
+-			if (p->saved_state & state)
++			if (p->saved_state & state) {
+ 				p->saved_state = TASK_RUNNING;
++				success = 1;
++			}
+ 		}
+ 		goto out;
+ 	}

Modified: dists/trunk/linux-2.6/debian/patches/features/all/rt/series
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/features/all/rt/series	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/series	Thu Dec 15 14:24:33 2011	(r18389)
@@ -6,7 +6,6 @@
 # UPSTREAM changes queued for 3.2 or in 3.1
 ############################################################
 x86_64-patch-for-idle-notifiers.patch
-re-possible-slab-deadlock-while-doing-ifenslave.patch
 re-possible-slab-deadlock-while-doing-ifenslave-1.patch
 
 # Should go to stable 3.0.x!
@@ -98,7 +97,8 @@
 # Stuff which should go upstream ASAP
 ############################################################
 
-set-the-command-name-of-the-idle-tasks-in-smp-kernels-v3.patch
+# RAW SPINLOCKS
+intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch
 
 # MM memcg
 mm-memcg-shorten-preempt-disabled-section-around-event-checks.patch
@@ -124,7 +124,6 @@
 signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch
 
 # SCHED
-sched_rt_runtime_share.patch
 
 # GENERIC CMPXCHG
 generic-cmpxchg-use-raw-local-irq.patch
@@ -374,6 +373,7 @@
 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
@@ -459,6 +459,7 @@
 rcu-fix-macro-substitution.patch
 rcu-tiny-merge-bh.patch
 patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch
+rt-rcutree-warn-fix.patch
 
 # LGLOCKS - lovely
 lglocks-rt.patch
@@ -467,6 +468,7 @@
 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
@@ -506,6 +508,7 @@
 
 # CONSOLE. NEEDS more thought !!!
 console-make-rt-friendly.patch
+printk-disable-migration-instead-of-preemption.patch
 
 # POWERC
 power-use-generic-rwsem-on-rt.patch
@@ -551,6 +554,13 @@
 # Device mapper
 dm-make-rt-aware.patch
 
+# Simple raw spinlock based waitqueue
+wait-simple-version.patch
+acpi-gpe-use-wait-simple.patch
+
+# CPUMASK OFFSTACK
+cpumask-disable-offstack-on-rt.patch
+
 # Enable full RT
 kconfig-disable-a-few-options-rt.patch
 kconfig-preempt-rt-full.patch

Added: dists/trunk/linux-2.6/debian/patches/features/all/rt/wait-simple-version.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/wait-simple-version.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -0,0 +1,258 @@
+Subject: wait-simple: Simple waitqueue implementation
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Mon, 12 Dec 2011 12:29:04 +0100
+
+wait_queue is a swiss army knife and in most of the cases the
+complexity is not needed. For RT waitqueues are a constant source of
+trouble as we can't convert the head lock to a raw spinlock due to
+fancy and long lasting callbacks.
+
+Provide a slim version, which allows RT to replace wait queues. This
+should go mainline as well, as it lowers memory consumption and
+runtime overhead.
+
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ include/linux/wait-simple.h |  152 ++++++++++++++++++++++++++++++++++++++++++++
+ kernel/Makefile             |    2 
+ kernel/wait-simple.c        |   63 ++++++++++++++++++
+ 3 files changed, 216 insertions(+), 1 deletion(-)
+
+Index: linux-3.2/include/linux/wait-simple.h
+===================================================================
+--- /dev/null
++++ linux-3.2/include/linux/wait-simple.h
+@@ -0,0 +1,152 @@
++#ifndef _LINUX_WAIT_SIMPLE_H
++#define _LINUX_WAIT_SIMPLE_H
++
++#include <linux/spinlock.h>
++#include <linux/list.h>
++
++#include <asm/current.h>
++
++struct swaiter {
++	struct task_struct	*task;
++	struct list_head	node;
++};
++
++#define DEFINE_SWAITER(name)					\
++	struct swaiter name = {					\
++		.task	= current,				\
++		.node	= LIST_HEAD_INIT((name).node),		\
++	}
++
++struct swait_head {
++	raw_spinlock_t		lock;
++	struct list_head	list;
++};
++
++#define DEFINE_SWAIT_HEAD(name)					\
++	struct swait_head name = {				\
++		.lock	= __RAW_SPIN_LOCK_UNLOCKED(name.lock),	\
++		.list	= LIST_HEAD_INIT((name).list),		\
++	}
++
++extern void __init_swait_head(struct swait_head *h, struct lock_class_key *key);
++
++#define init_swait_head(swh)					\
++	do {							\
++		static struct lock_class_key __key;		\
++								\
++		__init_swait_head((swh), &__key);		\
++	} while (0)
++
++/*
++ * Waiter functions
++ */
++static inline bool swaiter_enqueued(struct swaiter *w)
++{
++	return w->task != NULL;
++}
++
++extern void swait_prepare(struct swait_head *head, struct swaiter *w, int state);
++extern void swait_finish(struct swait_head *head, struct swaiter *w);
++
++/*
++ * Adds w to head->list. Must be called with head->lock locked.
++ */
++static inline void __swait_enqueue(struct swait_head *head, struct swaiter *w)
++{
++	list_add(&w->node, &head->list);
++}
++
++/*
++ * Removes w from head->list. Must be called with head->lock locked.
++ */
++static inline void __swait_dequeue(struct swaiter *w)
++{
++	list_del_init(&w->node);
++}
++
++/*
++ * Wakeup functions
++ */
++extern void __swait_wake(struct swait_head *head, unsigned int state);
++
++static inline void swait_wake(struct swait_head *head)
++{
++	__swait_wake(head, TASK_NORMAL);
++}
++
++/*
++ * Event API
++ */
++
++#define __swait_event(wq, condition)					\
++do {									\
++	DEFINE_SWAITER(__wait);						\
++									\
++	for (;;) {							\
++		swait_prepare(&wq, &__wait, TASK_UNINTERRUPTIBLE);	\
++		if (condition)						\
++			break;						\
++		schedule();						\
++	}								\
++	swait_finish(&wq, &__wait);					\
++} while (0)
++
++/**
++ * swait_event - sleep until a condition gets true
++ * @wq: the waitqueue to wait on
++ * @condition: a C expression for the event to wait for
++ *
++ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
++ * @condition evaluates to true. The @condition is checked each time
++ * the waitqueue @wq is woken up.
++ *
++ * wake_up() has to be called after changing any variable that could
++ * change the result of the wait condition.
++ */
++#define swait_event(wq, condition)					\
++do {									\
++	if (condition)							\
++		break;							\
++	__swait_event(wq, condition);					\
++} while (0)
++
++#define __swait_event_timeout(wq, condition, ret)			\
++do {									\
++	DEFINE_SWAITER(__wait);						\
++									\
++	for (;;) {							\
++		swait_prepare(&wq, &__wait, TASK_UNINTERRUPTIBLE);	\
++		if (condition)						\
++			break;						\
++		ret = schedule_timeout(ret);				\
++		if (!ret)						\
++			break;						\
++	}								\
++	swait_finish(&wq, &__wait);					\
++} while (0)
++
++/**
++ * swait_event_timeout - sleep until a condition gets true or a timeout elapses
++ * @wq: the waitqueue to wait on
++ * @condition: a C expression for the event to wait for
++ * @timeout: timeout, in jiffies
++ *
++ * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
++ * @condition evaluates to true. The @condition is checked each time
++ * the waitqueue @wq is woken up.
++ *
++ * wake_up() has to be called after changing any variable that could
++ * change the result of the wait condition.
++ *
++ * The function returns 0 if the @timeout elapsed, and the remaining
++ * jiffies if the condition evaluated to true before the timeout elapsed.
++ */
++#define swait_event_timeout(wq, condition, timeout)			\
++({									\
++	long __ret = timeout;						\
++	if (!(condition))						\
++		__swait_event_timeout(wq, condition, __ret);		\
++	__ret;								\
++})
++
++#endif
+Index: linux-3.2/kernel/Makefile
+===================================================================
+--- linux-3.2.orig/kernel/Makefile
++++ linux-3.2/kernel/Makefile
+@@ -10,7 +10,7 @@ obj-y     = sched.o fork.o exec_domain.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
++	    async.o range.o wait-simple.o
+ obj-y += groups.o
+ 
+ ifdef CONFIG_FUNCTION_TRACER
+Index: linux-3.2/kernel/wait-simple.c
+===================================================================
+--- /dev/null
++++ linux-3.2/kernel/wait-simple.c
+@@ -0,0 +1,63 @@
++/*
++ * Simple waitqueues without fancy flags and callbacks
++ *
++ * (C) 2011 Thomas Gleixner <tglx at linutronix.de>
++ *
++ * Based on kernel/wait.c
++ *
++ * For licencing details see kernel-base/COPYING
++ */
++#include <linux/init.h>
++#include <linux/export.h>
++#include <linux/sched.h>
++#include <linux/wait-simple.h>
++
++void __init_swait_head(struct swait_head *head, struct lock_class_key *key)
++{
++	raw_spin_lock_init(&head->lock);
++	lockdep_set_class(&head->lock, key);
++	INIT_LIST_HEAD(&head->list);
++}
++EXPORT_SYMBOL_GPL(__init_swait_head);
++
++void swait_prepare(struct swait_head *head, struct swaiter *w, int state)
++{
++	unsigned long flags;
++
++	raw_spin_lock_irqsave(&head->lock, flags);
++	w->task = current;
++	__swait_enqueue(head, w);
++	set_current_state(state);
++	raw_spin_unlock_irqrestore(&head->lock, flags);
++}
++EXPORT_SYMBOL_GPL(swait_prepare);
++
++void swait_finish(struct swait_head *head, struct swaiter *w)
++{
++	unsigned long flags;
++
++	__set_current_state(TASK_RUNNING);
++	if (w->task) {
++		raw_spin_lock_irqsave(&head->lock, flags);
++		__swait_dequeue(w);
++		raw_spin_unlock_irqrestore(&head->lock, flags);
++	}
++}
++EXPORT_SYMBOL_GPL(swait_finish);
++
++void __swait_wake(struct swait_head *head, unsigned int state)
++{
++	struct swaiter *curr, *next;
++	unsigned long flags;
++
++	raw_spin_lock_irqsave(&head->lock, flags);
++
++	list_for_each_entry_safe(curr, next, &head->list, node) {
++		if (wake_up_state(curr->task, state)) {
++			__swait_dequeue(curr);
++			curr->task = NULL;
++		}
++	}
++
++	raw_spin_unlock_irqrestore(&head->lock, flags);
++}

Modified: dists/trunk/linux-2.6/debian/patches/features/all/rt/x86-highmem-warn.patch
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/features/all/rt/x86-highmem-warn.patch	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/patches/features/all/rt/x86-highmem-warn.patch	Thu Dec 15 14:24:33 2011	(r18389)
@@ -7,7 +7,7 @@
 
 Signed-off-by: Ingo Molnar <mingo at elte.hu>
 Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
-[bwh: Adjust context for 3.2-rc5]
+
 ---
  arch/x86/mm/highmem_32.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Modified: dists/trunk/linux-2.6/debian/patches/series/base-extra
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base-extra	Wed Dec 14 06:54:52 2011	(r18388)
+++ dists/trunk/linux-2.6/debian/patches/series/base-extra	Thu Dec 15 14:24:33 2011	(r18389)
@@ -12,6 +12,7 @@
 + features/all/rt/power-allow-irq-threading.patch featureset=rt
 + features/all/rt/sched-keep-period-timer-alive-when-throttled.patch featureset=rt
 + features/all/rt/sched-prevent-boosting-from-throttling.patch featureset=rt
++ features/all/rt/intel_idle-convert-i7300_idle_lock-to-raw-spinlock.patch featureset=rt
 + features/all/rt/mm-memcg-shorten-preempt-disabled-section-around-event-checks.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
@@ -144,6 +145,7 @@
 + 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
@@ -196,10 +198,12 @@
 + 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/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/fs-block-rt-support.patch featureset=rt
@@ -220,6 +224,7 @@
 + 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/printk-disable-migration-instead-of-preemption.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
@@ -236,5 +241,8 @@
 + 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/wait-simple-version.patch featureset=rt
++ features/all/rt/acpi-gpe-use-wait-simple.patch featureset=rt
++ features/all/rt/cpumask-disable-offstack-on-rt.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



More information about the Kernel-svn-changes mailing list