aboutsummaryrefslogtreecommitdiff
path: root/kernel/rcutiny_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutiny_plugin.h')
-rw-r--r--kernel/rcutiny_plugin.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h
index 8a233002faeb..859ff350097c 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 {
@@ -308,7 +309,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;
/*
@@ -609,7 +610,7 @@ void rcu_read_unlock_special(struct task_struct *t)
rcu_preempt_cpu_qs();
/* Hardware IRQ handlers cannot block. */
- if (in_irq() || in_serving_softirq()) {
+ if (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_OFFSET)) {
local_irq_restore(flags);
return;
}
@@ -762,7 +763,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);
@@ -784,7 +785,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);
}
/*
@@ -836,8 +837,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. */
@@ -907,7 +908,7 @@ static void invoke_rcu_callbacks(void)
{
have_rcu_kthread_work = 1;
if (rcu_kthread_task != NULL)
- wake_up(&rcu_kthread_wq);
+ swait_wake(&rcu_kthread_wq);
}
#ifdef CONFIG_RCU_TRACE
@@ -937,8 +938,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;