aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-12-03 16:25:21 +0100
committerSteven Rostedt <rostedt@goodmis.org>2013-02-18 18:26:15 -0500
commit124c5782d037276b3713bc3da74d193b6184e060 (patch)
tree2a0e0f43b84a5f7fcfb6bfe31e3ffad4522243ca
parent30a8898078e40473367562db0a092674abf134c0 (diff)
rcutiny: Use simple waitqueue
Simple waitqueues can be handled from interrupt disabled contexts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--kernel/rcutiny_plugin.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
index 2b0484a5dc28..f0a6606ec1e7 100644
--- a/kernel/rcutiny_plugin.h
+++ b/kernel/rcutiny_plugin.h
@@ -26,6 +26,7 @@
#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
+#include <linux/wait-simple.h>
/* Global control variables for rcupdate callback mechanism. */
struct rcu_ctrlblk {
@@ -250,7 +251,7 @@ static void show_tiny_preempt_stats(struct seq_file *m)
/* Controls for rcu_kthread() kthread. */
static struct task_struct *rcu_kthread_task;
-static DECLARE_WAIT_QUEUE_HEAD(rcu_kthread_wq);
+static DEFINE_SWAIT_HEAD(rcu_kthread_wq);
static unsigned long have_rcu_kthread_work;
/*
@@ -720,7 +721,7 @@ void synchronize_rcu(void)
}
EXPORT_SYMBOL_GPL(synchronize_rcu);
-static DECLARE_WAIT_QUEUE_HEAD(sync_rcu_preempt_exp_wq);
+static DEFINE_SWAIT_HEAD(sync_rcu_preempt_exp_wq);
static unsigned long sync_rcu_preempt_exp_count;
static DEFINE_MUTEX(sync_rcu_preempt_exp_mutex);
@@ -742,7 +743,7 @@ static int rcu_preempted_readers_exp(void)
*/
static void rcu_report_exp_done(void)
{
- wake_up(&sync_rcu_preempt_exp_wq);
+ swait_wake(&sync_rcu_preempt_exp_wq);
}
/*
@@ -794,8 +795,8 @@ void synchronize_rcu_expedited(void)
else {
rcu_initiate_boost();
local_irq_restore(flags);
- wait_event(sync_rcu_preempt_exp_wq,
- !rcu_preempted_readers_exp());
+ swait_event(sync_rcu_preempt_exp_wq,
+ !rcu_preempted_readers_exp());
}
/* Clean up and exit. */
@@ -882,7 +883,7 @@ static void rcu_preempt_process_callbacks(void)
static void invoke_rcu_callbacks(void)
{
have_rcu_kthread_work = 1;
- wake_up(&rcu_kthread_wq);
+ swake_up(&rcu_kthread_wq);
}
/*
@@ -899,8 +900,8 @@ static int rcu_kthread(void *arg)
unsigned long flags;
for (;;) {
- wait_event_interruptible(rcu_kthread_wq,
- have_rcu_kthread_work != 0);
+ swait_event_interruptible(rcu_kthread_wq,
+ have_rcu_kthread_work != 0);
morework = rcu_boost();
local_irq_save(flags);
work = have_rcu_kthread_work;