aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ftrace.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-01-26 10:28:02 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-27 08:31:17 -0500
commit890252823766e562301e61340f3187a14033d045 (patch)
tree01cb4853ed1c76c61eed4cc631bf38b3768060aa /arch/x86/kernel/ftrace.c
parent4a66a82be78e1b6f9f83074423bf42a52251414c (diff)
x86: ftrace - simplify wait_for_nmi
Get rid of 'waited' stack variable. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/ftrace.c')
-rw-r--r--arch/x86/kernel/ftrace.c11
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
134static void wait_for_nmi(void) 134static 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
147static int 146static int