summaryrefslogtreecommitdiff
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-04-13 08:57:03 +0200
committerIngo Molnar <mingo@kernel.org>2016-04-13 08:57:03 +0200
commit889fac6d67d46a5e781c08fb26fec9016db1c307 (patch)
tree7e01d04928f7ce343afff5b77ba13c2f3d083326 /kernel/time/timer.c
parentdad38ca64a252144b4ccdfe9730a3fe2b7c61957 (diff)
parentbf16200689118d19de1b8d2a3c314fc21f5dc7bb (diff)
downloadlinux-889fac6d67d46a5e781c08fb26fec9016db1c307.tar.gz
linux-889fac6d67d46a5e781c08fb26fec9016db1c307.tar.bz2
linux-889fac6d67d46a5e781c08fb26fec9016db1c307.zip
Merge tag 'v4.6-rc3' into perf/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index bbc5d1114583..73164c3aa56b 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1566,6 +1566,17 @@ signed long __sched schedule_timeout_uninterruptible(signed long timeout)
}
EXPORT_SYMBOL(schedule_timeout_uninterruptible);
+/*
+ * Like schedule_timeout_uninterruptible(), except this task will not contribute
+ * to load average.
+ */
+signed long __sched schedule_timeout_idle(signed long timeout)
+{
+ __set_current_state(TASK_IDLE);
+ return schedule_timeout(timeout);
+}
+EXPORT_SYMBOL(schedule_timeout_idle);
+
#ifdef CONFIG_HOTPLUG_CPU
static void migrate_timer_list(struct tvec_base *new_base, struct hlist_head *head)
{
@@ -1698,10 +1709,10 @@ EXPORT_SYMBOL(msleep_interruptible);
static void __sched do_usleep_range(unsigned long min, unsigned long max)
{
ktime_t kmin;
- unsigned long delta;
+ u64 delta;
kmin = ktime_set(0, min * NSEC_PER_USEC);
- delta = (max - min) * NSEC_PER_USEC;
+ delta = (u64)(max - min) * NSEC_PER_USEC;
schedule_hrtimeout_range(&kmin, delta, HRTIMER_MODE_REL);
}