diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2009-01-26 18:28:02 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-27 14:31:17 +0100 |
commit | 890252823766e562301e61340f3187a14033d045 (patch) | |
tree | 01cb4853ed1c76c61eed4cc631bf38b3768060aa /arch/x86/kernel/ftrace.c | |
parent | 4a66a82be78e1b6f9f83074423bf42a52251414c (diff) | |
download | op-kernel-dev-890252823766e562301e61340f3187a14033d045.zip op-kernel-dev-890252823766e562301e61340f3187a14033d045.tar.gz |
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.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 1b43086..4d33224 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c @@ -133,15 +133,14 @@ void ftrace_nmi_exit(void) static void wait_for_nmi(void) { - int waited = 0; + if (!atomic_read(&in_nmi)) + return; - while (atomic_read(&in_nmi)) { - waited = 1; + do { cpu_relax(); - } + } while(atomic_read(&in_nmi)); - if (waited) - nmi_wait_count++; + nmi_wait_count++; } static int |