From eafce015471a6ba9d8e9a04b424439ebf4ceb920 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 11 May 2010 17:49:54 -0700 Subject: [PATCH] --- yaml --- r: 191510 b: refs/heads/master c: c9775b4cc522e5f1b40b1366a993f0f05f600f39 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/i387.h | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index bf9bc4a7083d..af48b3b22149 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3c8acd04376d604370dcb6cd2143c9c14078a50 +refs/heads/master: c9775b4cc522e5f1b40b1366a993f0f05f600f39 diff --git a/trunk/arch/x86/include/asm/i387.h b/trunk/arch/x86/include/asm/i387.h index 8002e9ce25fc..c991b3a7b904 100644 --- a/trunk/arch/x86/include/asm/i387.h +++ b/trunk/arch/x86/include/asm/i387.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -57,16 +58,9 @@ extern int restore_i387_xstate_ia32(void __user *buf); #define X87_FSW_ES (1 << 7) /* Exception Summary */ -static inline bool use_xsave(void) +static __always_inline __pure bool use_xsave(void) { - u8 has_xsave; - - alternative_io("mov $0, %0", - "mov $1, %0", - X86_FEATURE_XSAVE, - "=qm" (has_xsave)); - - return has_xsave; + return static_cpu_has(X86_FEATURE_XSAVE); } #ifdef CONFIG_X86_64