All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -v2 7/8] kexec jump: ftrace_enabled_save/restore
@ 2008-08-08  6:52 ` Huang Ying
  0 siblings, 0 replies; 14+ messages in thread
From: Huang Ying @ 2008-08-08  6:52 UTC (permalink / raw)
  To: Eric W. Biederman, Pavel Machek, nigel, Rafael J. Wysocki,
	Andrew Morton, Vivek Goyal, mingo, Linus Torvalds
  Cc: Kexec Mailing List, linux-kernel

Add ftrace_enabled_save/restore, used to disable ftrace for a
while. This is used by kexec jump.

Signed-off-by: Huang Ying <ying.huang@intel.com>

---
 include/linux/ftrace.h |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -98,6 +98,24 @@ static inline void tracer_disable(void)
 #endif
 }
 
+static inline int ftrace_enabled_save(void)
+{
+#ifdef CONFIG_FTRACE
+	int saved_ftrace_enabled = ftrace_enabled;
+	ftrace_enabled = 0;
+	return saved_ftrace_enabled;
+#else
+	return 0;
+#endif
+}
+
+static inline void ftrace_enabled_restore(int enabled)
+{
+#ifdef CONFIG_FTRACE
+	ftrace_enabled = enabled;
+#endif
+}
+
 #ifdef CONFIG_FRAME_POINTER
 /* TODO: need to fix this for ARM */
 # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-08-12  1:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08  6:52 [PATCH -v2 7/8] kexec jump: ftrace_enabled_save/restore Huang Ying
2008-08-08  6:52 ` Huang Ying
2008-08-08 14:17 ` Vivek Goyal
2008-08-08 14:17   ` Vivek Goyal
2008-08-08 14:30   ` Steven Rostedt
2008-08-08 14:30     ` Steven Rostedt
2008-08-11  1:22     ` Huang Ying
2008-08-11  1:22       ` Huang Ying
2008-08-11 12:29       ` Steven Rostedt
2008-08-11 12:29         ` Steven Rostedt
2008-08-11 13:51       ` Vivek Goyal
2008-08-11 13:51         ` Vivek Goyal
2008-08-12  1:22         ` Huang Ying
2008-08-12  1:22           ` Huang Ying

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.