summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-09-05 12:29:35 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2016-09-05 12:29:35 -0400
commitea845202b7b50fcc331a29b3dafedc4a9c340f4b (patch)
treeb5c43a2662303b11c3ebfa3cd7903259aa0d3431
parentfe41ea21f4a112a8b915980b2bdef3df9c69de9b (diff)
download4.8-rt-patches-ea845202b7b50fcc331a29b3dafedc4a9c340f4b.tar.gz
hrtimer: refresh for added "return 0"
-rw-r--r--patches/hrtimers-prepare-full-preemption.patch47
1 files changed, 26 insertions, 21 deletions
diff --git a/patches/hrtimers-prepare-full-preemption.patch b/patches/hrtimers-prepare-full-preemption.patch
index 4fd28e70b5a4f..a480afd32f2aa 100644
--- a/patches/hrtimers-prepare-full-preemption.patch
+++ b/patches/hrtimers-prepare-full-preemption.patch
@@ -1,6 +1,7 @@
+From e1d60f4e027cd2fb68c69bab17fdf5d9e709fc8a Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:29:34 -0500
-Subject: hrtimers: Prepare full preemption
+Subject: [PATCH] hrtimers: Prepare full preemption
Make cancellation of a running callback in softirq context safe
against preemption.
@@ -8,13 +9,8 @@ against preemption.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
----
- include/linux/hrtimer.h | 12 +++++++++++-
- kernel/time/hrtimer.c | 33 ++++++++++++++++++++++++++++++++-
- kernel/time/itimer.c | 1 +
- kernel/time/posix-timers.c | 33 +++++++++++++++++++++++++++++++++
- 4 files changed, 77 insertions(+), 2 deletions(-)
-
+diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
+index 3bddb7c8cc93..b71f4b720a03 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -207,6 +207,9 @@ struct hrtimer_cpu_base {
@@ -27,7 +23,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
} ____cacheline_aligned;
-@@ -416,6 +419,13 @@ static inline void hrtimer_restart(struc
+@@ -416,6 +419,13 @@ static inline void hrtimer_restart(struct hrtimer *timer)
hrtimer_start_expires(timer, HRTIMER_MODE_ABS);
}
@@ -41,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* Query timers: */
extern ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust);
-@@ -440,7 +450,7 @@ static inline int hrtimer_is_queued(stru
+@@ -440,7 +450,7 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
* Helper function to check, whether the timer is running the callback
* function
*/
@@ -50,9 +46,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
{
return timer->base->cpu_base->running == timer;
}
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index cf76a9a4cf6c..fd9d5c3416f2 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
-@@ -860,6 +860,32 @@ u64 hrtimer_forward(struct hrtimer *time
+@@ -856,6 +856,32 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
}
EXPORT_SYMBOL_GPL(hrtimer_forward);
@@ -85,7 +83,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/*
* enqueue_hrtimer - internal function to (re)start a timer
*
-@@ -1077,7 +1103,7 @@ int hrtimer_cancel(struct hrtimer *timer
+@@ -1073,7 +1099,7 @@ int hrtimer_cancel(struct hrtimer *timer)
if (ret >= 0)
return ret;
@@ -94,7 +92,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
}
EXPORT_SYMBOL_GPL(hrtimer_cancel);
-@@ -1468,6 +1494,8 @@ void hrtimer_run_queues(void)
+@@ -1464,6 +1490,8 @@ void hrtimer_run_queues(void)
now = hrtimer_update_base(cpu_base);
__hrtimer_run_queues(cpu_base, now);
raw_spin_unlock(&cpu_base->lock);
@@ -103,19 +101,21 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}
/*
-@@ -1627,6 +1655,9 @@ static void init_hrtimers_cpu(int cpu)
+@@ -1623,6 +1651,9 @@ int hrtimers_prepare_cpu(unsigned int cpu)
cpu_base->cpu = cpu;
hrtimer_init_hres(cpu_base);
+#ifdef CONFIG_PREEMPT_RT_BASE
+ init_waitqueue_head(&cpu_base->wait);
+#endif
+ return 0;
}
- #ifdef CONFIG_HOTPLUG_CPU
+diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c
+index 1d5c7204ddc9..184de6751180 100644
--- a/kernel/time/itimer.c
+++ b/kernel/time/itimer.c
-@@ -213,6 +213,7 @@ int do_setitimer(int which, struct itime
+@@ -213,6 +213,7 @@ again:
/* We are sharing ->siglock with it_real_fn() */
if (hrtimer_try_to_cancel(timer) < 0) {
spin_unlock_irq(&tsk->sighand->siglock);
@@ -123,9 +123,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
goto again;
}
expires = timeval_to_ktime(value->it_value);
+diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
+index 81aec84e65e7..464a98155a0e 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
-@@ -828,6 +828,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_
+@@ -828,6 +828,20 @@ SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id)
return overrun;
}
@@ -146,7 +148,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* Set a POSIX.1b interval timer. */
/* timr->it_lock is taken. */
static int
-@@ -905,6 +919,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t,
+@@ -905,6 +919,7 @@ retry:
if (!timr)
return -EINVAL;
@@ -154,7 +156,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kc = clockid_to_kclock(timr->it_clock);
if (WARN_ON_ONCE(!kc || !kc->timer_set))
error = -EINVAL;
-@@ -913,9 +928,12 @@ SYSCALL_DEFINE4(timer_settime, timer_t,
+@@ -913,9 +928,12 @@ retry:
unlock_timer(timr, flag);
if (error == TIMER_RETRY) {
@@ -167,7 +169,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (old_setting && !error &&
copy_to_user(old_setting, &old_spec, sizeof (old_spec)))
-@@ -953,10 +971,15 @@ SYSCALL_DEFINE1(timer_delete, timer_t, t
+@@ -953,10 +971,15 @@ retry_delete:
if (!timer)
return -EINVAL;
@@ -183,7 +185,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
spin_lock(&current->sighand->siglock);
list_del(&timer->list);
-@@ -982,8 +1005,18 @@ static void itimer_delete(struct k_itime
+@@ -982,8 +1005,18 @@ static void itimer_delete(struct k_itimer *timer)
retry_delete:
spin_lock_irqsave(&timer->it_lock, flags);
@@ -202,3 +204,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
goto retry_delete;
}
list_del(&timer->list);
+--
+2.5.0
+