lkml.org 
[lkml]   [2011]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86: Clean up mwait_play_dead
Date
From: Frank Arnold <frank.arnold@amd.com>

Commit 93789b32dbf355e70f18b17a82e8661677a7f7fb introduced
cpuinfo_x86 *c for brevity. It is used to check for the
mwait feature flag. The same can be done with a subsequent
check for clflsh and save us a second per-cpu pointer
dereference.

Signed-off-by: Frank Arnold <frank.arnold@amd.com>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
---
arch/x86/kernel/smpboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index c2871d3..93a0066 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1334,7 +1334,7 @@ static inline void mwait_play_dead(void)

if (!(cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)))
return;
- if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLSH))
+ if (!cpu_has(c, X86_FEATURE_CLFLSH))
return;
if (__this_cpu_read(cpu_info.cpuid_level) < CPUID_MWAIT_LEAF)
return;
--
1.7.3.4


\
 
 \ /
  Last update: 2011-04-13 18:13    [W:0.049 / U:9.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site