use_xsave() is now just a special case of static_cpu_has(), so use
static_cpu_has().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <
1273135546-29690-2-git-send-email-avi@redhat.com>
#include <linux/hardirq.h>
#include <linux/slab.h>
#include <asm/asm.h>
+#include <asm/cpufeature.h>
#include <asm/processor.h>
#include <asm/sigcontext.h>
#include <asm/user.h>
#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