diff options
Diffstat (limited to 'arch/x86/kernel/ftrace.c')
-rw-r--r-- | arch/x86/kernel/ftrace.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 1b43086b097a..4d33224c055f 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -133,15 +133,14 @@ void ftrace_nmi_exit(void) | |||
133 | 133 | ||
134 | static void wait_for_nmi(void) | 134 | static void wait_for_nmi(void) |
135 | { | 135 | { |
136 | int waited = 0; | 136 | if (!atomic_read(&in_nmi)) |
137 | return; | ||
137 | 138 | ||
138 | while (atomic_read(&in_nmi)) { | 139 | do { |
139 | waited = 1; | ||
140 | cpu_relax(); | 140 | cpu_relax(); |
141 | } | 141 | } while(atomic_read(&in_nmi)); |
142 | 142 | ||
143 | if (waited) | 143 | nmi_wait_count++; |
144 | nmi_wait_count++; | ||
145 | } | 144 | } |
146 | 145 | ||
147 | static int | 146 | static int |