summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2017-10-02 11:05:28 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2017-10-02 11:05:28 -0400
commit3db0de20ebd2c5e947882044c61f81a167d25cbe (patch)
tree72b3577fa1d2a0366733228f6ac79ffc06d6271e
parent1266352cf18a10626651bcc0937d02e4d9030c92 (diff)
download4.12-rt-patches-3db0de20ebd2c5e947882044c61f81a167d25cbe.tar.gz
refresh cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patchrt-v4.11-874-g174ddfd5dfbf
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--patches/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch30
1 files changed, 16 insertions, 14 deletions
diff --git a/patches/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch b/patches/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
index 0924cf5672fc8f..6b83dfac16e828 100644
--- a/patches/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
+++ b/patches/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch
@@ -1,6 +1,7 @@
+From e9ee3de94d483f0282db40464fe7d85ea9656307 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <rostedt@goodmis.org>
Date: Tue, 4 Mar 2014 12:28:32 -0500
-Subject: cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep
+Subject: [PATCH] cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep
We hit another bug that was caused by switching cpu_chill() from
msleep() to hrtimer_nanosleep().
@@ -23,17 +24,15 @@ the TASK_UNINTERRUPTIBLE state.
cpu_chill() only cares that the first sleep happens, and does not care
about the state of the restart schedule (in hrtimer_nanosleep_restart).
-
Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
----
- kernel/time/hrtimer.c | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
+diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
+index 2e6cadc9ec75..5b4c250993db 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
-@@ -1664,10 +1664,11 @@ EXPORT_SYMBOL_GPL(hrtimer_init_sleeper_o
+@@ -1664,10 +1664,11 @@ EXPORT_SYMBOL_GPL(hrtimer_init_sleeper_on_stack);
#endif
@@ -47,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
hrtimer_start_expires(&t->timer, mode);
if (likely(t->task))
-@@ -1709,7 +1710,8 @@ long __sched hrtimer_nanosleep_restart(s
+@@ -1709,7 +1710,8 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
HRTIMER_MODE_ABS, current);
hrtimer_set_expires_tv64(&t.timer, restart->nanosleep.expires);
@@ -57,29 +56,29 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out;
rmtp = restart->nanosleep.rmtp;
-@@ -1726,8 +1728,10 @@ long __sched hrtimer_nanosleep_restart(s
+@@ -1726,8 +1728,10 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
return ret;
}
--long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
+-long hrtimer_nanosleep(struct timespec64 *rqtp, struct timespec __user *rmtp,
- const enum hrtimer_mode mode, const clockid_t clockid)
+static long
-+__hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
++__hrtimer_nanosleep(struct timespec64 *rqtp, struct timespec __user *rmtp,
+ const enum hrtimer_mode mode, const clockid_t clockid,
+ unsigned long state)
{
struct restart_block *restart;
struct hrtimer_sleeper t;
-@@ -1741,7 +1745,7 @@ long hrtimer_nanosleep(struct timespec *
+@@ -1741,7 +1745,7 @@ long hrtimer_nanosleep(struct timespec64 *rqtp, struct timespec __user *rmtp,
hrtimer_init_sleeper_on_stack(&t, clockid, mode, current);
- hrtimer_set_expires_range_ns(&t.timer, timespec_to_ktime(*rqtp), slack);
+ hrtimer_set_expires_range_ns(&t.timer, timespec64_to_ktime(*rqtp), slack);
- if (do_nanosleep(&t, mode))
+ if (do_nanosleep(&t, mode, state))
goto out;
/* Absolute timers do not update the rmtp value and restart: */
-@@ -1768,6 +1772,12 @@ long hrtimer_nanosleep(struct timespec *
+@@ -1768,6 +1772,12 @@ long hrtimer_nanosleep(struct timespec64 *rqtp, struct timespec __user *rmtp,
return ret;
}
@@ -92,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp,
struct timespec __user *, rmtp)
{
-@@ -1794,7 +1804,8 @@ void cpu_chill(void)
+@@ -1796,7 +1806,8 @@ void cpu_chill(void)
unsigned int freeze_flag = current->flags & PF_NOFREEZE;
current->flags |= PF_NOFREEZE;
@@ -102,3 +101,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!freeze_flag)
current->flags &= ~PF_NOFREEZE;
}
+--
+2.1.4
+