The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] x86: Clean up mwait_play_dead
@ 2011-04-13 16:11 Frank Arnold
  2011-04-13 16:52 ` H. Peter Anvin
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Arnold @ 2011-04-13 16:11 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner; +Cc: linux-kernel

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-14 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 16:11 [PATCH] x86: Clean up mwait_play_dead Frank Arnold
2011-04-13 16:52 ` H. Peter Anvin
2011-04-13 17:36   ` Borislav Petkov
2011-04-13 17:38     ` H. Peter Anvin
2011-04-13 17:49     ` Ingo Molnar
2011-04-14 11:44       ` Frank Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox