Skip to content

Commit

Permalink
x86: ftrace - simplify wait_for_nmi
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Jan 27, 2009
1 parent 4a66a82 commit 8902528
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8902528

Please sign in to comment.