diff options
-rw-r--r-- | include/linux/compiler.h | 2 | ||||
-rw-r--r-- | include/linux/tracepoint.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 00b042c49ccd..48f5aab117ae 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -144,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
144 | */ | 144 | */ |
145 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) | 145 | #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) |
146 | #define __trace_if(cond) \ | 146 | #define __trace_if(cond) \ |
147 | if (__builtin_constant_p((cond)) ? !!(cond) : \ | 147 | if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ |
148 | ({ \ | 148 | ({ \ |
149 | int ______r; \ | 149 | int ______r; \ |
150 | static struct ftrace_branch_data \ | 150 | static struct ftrace_branch_data \ |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index acd522a91539..acfdbf353a0b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -14,8 +14,10 @@ | |||
14 | * See the file COPYING for more details. | 14 | * See the file COPYING for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/smp.h> | ||
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/cpumask.h> | ||
19 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
20 | #include <linux/tracepoint-defs.h> | 22 | #include <linux/tracepoint-defs.h> |
21 | 23 | ||
@@ -132,6 +134,9 @@ extern void syscall_unregfunc(void); | |||
132 | void *it_func; \ | 134 | void *it_func; \ |
133 | void *__data; \ | 135 | void *__data; \ |
134 | \ | 136 | \ |
137 | if (!cpu_online(raw_smp_processor_id())) \ | ||
138 | return; \ | ||
139 | \ | ||
135 | if (!(cond)) \ | 140 | if (!(cond)) \ |
136 | return; \ | 141 | return; \ |
137 | prercu; \ | 142 | prercu; \ |