From: tip-bot for Juri Lelli <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, torvalds@linux-foundation.org,
luca.abeni@unitn.it, efault@gmx.de, linux-kernel@vger.kernel.org,
juri.lelli@arm.com, peterz@infradead.org, tglx@linutronix.de,
mingo@kernel.org
Subject: [tip:sched/core] sched/deadline: Unify dl_time_before() usage
Date: Wed, 23 Sep 2015 01:46:56 -0700 [thread overview]
Message-ID: <tip-2726d6ce389788c7fe724961a6e1bfe569560088@git.kernel.org> (raw)
In-Reply-To: <1441188096-23021-3-git-send-email-juri.lelli@arm.com>
Commit-ID: 2726d6ce389788c7fe724961a6e1bfe569560088
Gitweb: http://git.kernel.org/tip/2726d6ce389788c7fe724961a6e1bfe569560088
Author: Juri Lelli <juri.lelli@arm.com>
AuthorDate: Wed, 2 Sep 2015 11:01:34 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 23 Sep 2015 09:51:25 +0200
sched/deadline: Unify dl_time_before() usage
Move dl_time_before() static definition in include/linux/sched/deadline.h
so that it can be used by different parties without being re-defined.
Reported-by: Luca Abeni <luca.abeni@unitn.it>
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1441188096-23021-3-git-send-email-juri.lelli@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/sched/deadline.h | 5 +++++
kernel/sched/cpudeadline.c | 5 -----
kernel/sched/cpudeadline.h | 1 +
kernel/sched/sched.h | 5 -----
4 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h
index 9d303b8..9089a2a 100644
--- a/include/linux/sched/deadline.h
+++ b/include/linux/sched/deadline.h
@@ -21,4 +21,9 @@ static inline int dl_task(struct task_struct *p)
return dl_prio(p->prio);
}
+static inline bool dl_time_before(u64 a, u64 b)
+{
+ return (s64)(a - b) < 0;
+}
+
#endif /* _SCHED_DEADLINE_H */
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index c6acb07..5a75b08 100644
--- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c
@@ -31,11 +31,6 @@ static inline int right_child(int i)
return (i << 1) + 2;
}
-static inline int dl_time_before(u64 a, u64 b)
-{
- return (s64)(a - b) < 0;
-}
-
static void cpudl_exchange(struct cpudl *cp, int a, int b)
{
int cpu_a = cp->elements[a].cpu, cpu_b = cp->elements[b].cpu;
diff --git a/kernel/sched/cpudeadline.h b/kernel/sched/cpudeadline.h
index 1a0a6ef..fcbdf83 100644
--- a/kernel/sched/cpudeadline.h
+++ b/kernel/sched/cpudeadline.h
@@ -2,6 +2,7 @@
#define _LINUX_CPUDL_H
#include <linux/sched.h>
+#include <linux/sched/deadline.h>
#define IDX_INVALID -1
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 3845a71..af6f252 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -118,11 +118,6 @@ static inline int task_has_dl_policy(struct task_struct *p)
return dl_policy(p->policy);
}
-static inline bool dl_time_before(u64 a, u64 b)
-{
- return (s64)(a - b) < 0;
-}
-
/*
* Tells if entity @a should preempt entity @b.
*/
next prev parent reply other threads:[~2015-09-23 8:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 10:01 [PATCH 0/4] sched fixes and clean-ups Juri Lelli
2015-09-02 10:01 ` [PATCH 1/4] sched/{cpuset,core}: restore complete root_domain status across hotplug Juri Lelli
2015-09-09 15:11 ` Peter Zijlstra
2015-09-10 9:03 ` Juri Lelli
2015-09-02 10:01 ` [PATCH 2/4] sched/deadline: unify dl_time_before usage Juri Lelli
2015-09-23 8:46 ` tip-bot for Juri Lelli [this message]
2015-09-02 10:01 ` [PATCH 3/4] locking/rtmutex: fix open coded check in rt_mutex_waiter_less() Juri Lelli
2015-09-23 8:47 ` [tip:sched/core] sched/deadline, locking/rtmutex: Fix " tip-bot for Juri Lelli
2015-09-02 10:01 ` [PATCH 4/4] sched/rt: make (do_)balance_runtime() return void Juri Lelli
2015-09-23 8:47 ` [tip:sched/core] sched/rt: Make " tip-bot for Juri Lelli
2015-09-18 9:02 ` [PATCH 0/4] sched fixes and clean-ups Juri Lelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-2726d6ce389788c7fe724961a6e1bfe569560088@git.kernel.org \
--to=tipbot@zytor.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luca.abeni@unitn.it \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®