diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
| commit | 42390cdec5f6e6e2ee54f308474a6ef7dd16aa5c (patch) | |
| tree | e9684c84f53272319a5acd4b9c86503f30274a51 /include/linux/ftrace.h | |
| parent | 11c231a962c740b3216eb6565149ae5a7944cba7 (diff) | |
| parent | d210baf53b699fc61aa891c177b71d7082d3b957 (diff) | |
Merge branch 'linus' into x86/x2apic
Conflicts:
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace.h')
| -rw-r--r-- | include/linux/ftrace.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index f368d041e02d..bb384068272e 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -98,6 +98,27 @@ static inline void tracer_disable(void) | |||
| 98 | #endif | 98 | #endif |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | /* Ftrace disable/restore without lock. Some synchronization mechanism | ||
| 102 | * must be used to prevent ftrace_enabled to be changed between | ||
| 103 | * disable/restore. */ | ||
| 104 | static inline int __ftrace_enabled_save(void) | ||
| 105 | { | ||
| 106 | #ifdef CONFIG_FTRACE | ||
| 107 | int saved_ftrace_enabled = ftrace_enabled; | ||
| 108 | ftrace_enabled = 0; | ||
| 109 | return saved_ftrace_enabled; | ||
| 110 | #else | ||
| 111 | return 0; | ||
| 112 | #endif | ||
| 113 | } | ||
| 114 | |||
| 115 | static inline void __ftrace_enabled_restore(int enabled) | ||
| 116 | { | ||
| 117 | #ifdef CONFIG_FTRACE | ||
| 118 | ftrace_enabled = enabled; | ||
| 119 | #endif | ||
| 120 | } | ||
| 121 | |||
| 101 | #ifdef CONFIG_FRAME_POINTER | 122 | #ifdef CONFIG_FRAME_POINTER |
| 102 | /* TODO: need to fix this for ARM */ | 123 | /* TODO: need to fix this for ARM */ |
| 103 | # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) | 124 | # define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) |
