From: tip-bot for Frederic Weisbecker <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: fengguang.wu@intel.com, torvalds@linux-foundation.org,
mingo@kernel.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, rostedt@goodmis.org,
tglx@linutronix.de, hpa@zytor.com, fweisbec@gmail.com,
peterz@infradead.org
Subject: [tip:sched/core] preempt: Reorganize the notrace definitions a bit
Date: Sun, 7 Jun 2015 10:47:03 -0700 [thread overview]
Message-ID: <tip-9a92e3dc6ad02208a014d0d8404ebbd697e3d5ef@git.kernel.org> (raw)
In-Reply-To: <1433432349-1021-4-git-send-email-fweisbec@gmail.com>
Commit-ID: 9a92e3dc6ad02208a014d0d8404ebbd697e3d5ef
Gitweb: http://git.kernel.org/tip/9a92e3dc6ad02208a014d0d8404ebbd697e3d5ef
Author: Frederic Weisbecker <fweisbec@gmail.com>
AuthorDate: Thu, 4 Jun 2015 17:39:09 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 7 Jun 2015 15:57:43 +0200
preempt: Reorganize the notrace definitions a bit
preempt.h has two seperate "#ifdef CONFIG_PREEMPT" sections: one to
define preempt_enable() and another to define preempt_enable_notrace().
Lets gather both.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1433432349-1021-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/preempt.h | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 7686dd6..0f1534a 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -175,48 +175,46 @@ do { \
__preempt_schedule(); \
} while (0)
+#define preempt_enable_notrace() \
+do { \
+ barrier(); \
+ if (unlikely(__preempt_count_dec_and_test())) \
+ __preempt_schedule_notrace(); \
+} while (0)
+
#define preempt_check_resched() \
do { \
if (should_resched()) \
__preempt_schedule(); \
} while (0)
-#else
+#else /* !CONFIG_PREEMPT */
#define preempt_enable() \
do { \
barrier(); \
preempt_count_dec(); \
} while (0)
-#define preempt_check_resched() do { } while (0)
-#endif
-
-#define preempt_disable_notrace() \
-do { \
- __preempt_count_inc(); \
- barrier(); \
-} while (0)
-#define preempt_enable_no_resched_notrace() \
+#define preempt_enable_notrace() \
do { \
barrier(); \
__preempt_count_dec(); \
} while (0)
-#ifdef CONFIG_PREEMPT
+#define preempt_check_resched() do { } while (0)
+#endif /* CONFIG_PREEMPT */
-#define preempt_enable_notrace() \
+#define preempt_disable_notrace() \
do { \
+ __preempt_count_inc(); \
barrier(); \
- if (unlikely(__preempt_count_dec_and_test())) \
- __preempt_schedule_notrace(); \
} while (0)
-#else
-#define preempt_enable_notrace() \
+
+#define preempt_enable_no_resched_notrace() \
do { \
barrier(); \
__preempt_count_dec(); \
} while (0)
-#endif
#else /* !CONFIG_PREEMPT_COUNT */
next prev parent reply other threads:[~2015-06-07 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 15:39 [PATCH 0/3] preempt: Fix tracing crash Frederic Weisbecker
2015-06-04 15:39 ` [PATCH 1/3] sched: Make preempt_schedule_context() function-tracing safe Frederic Weisbecker
2015-06-07 17:46 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2015-06-04 15:39 ` [PATCH 2/3] preempt: Use preempt_schedule_context() as the official tracing preemption point Frederic Weisbecker
2015-06-07 17:46 ` [tip:sched/core] " tip-bot for Frederic Weisbecker
2015-06-04 15:39 ` [PATCH 3/3] preempt: Reorganize a bit the notrace declensions Frederic Weisbecker
2015-06-07 17:47 ` tip-bot for Frederic Weisbecker [this message]
2015-06-04 19:20 ` [PATCH 0/3] preempt: Fix tracing crash Peter Zijlstra
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-9a92e3dc6ad02208a014d0d8404ebbd697e3d5ef@git.kernel.org \
--to=tipbot@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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