diff options
author | 2009-01-29 14:27:58 +0100 | |
---|---|---|
committer | 2009-01-29 14:27:58 +0100 | |
commit | ce181ebeff398e7d1a9c6cb92eb035a6d2d07489 (patch) | |
tree | 01cb4853ed1c76c61eed4cc631bf38b3768060aa | |
parent | Merge branches 'tracing/blktrace', 'tracing/kmemtrace' and 'tracing/urgent' into tracing/core (diff) | |
parent | x86: ftrace - simplify wait_for_nmi (diff) | |
download | wireguard-linux-ce181ebeff398e7d1a9c6cb92eb035a6d2d07489.tar.xz wireguard-linux-ce181ebeff398e7d1a9c6cb92eb035a6d2d07489.zip |
Merge branch 'tracing/ftrace' into tracing/core
-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) 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 |