#ifndef LINUX_RAID_RAID6X86_H
#define LINUX_RAID_RAID6X86_H
#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
#ifdef __KERNEL__
#include <asm/fpu/api.h>
#else
static inline void kernel_fpu_begin(void)
{
}
static inline void kernel_fpu_end(void)
{
}
#define __aligned …
#define X86_FEATURE_MMX …
#define X86_FEATURE_FXSR …
#define X86_FEATURE_XMM …
#define X86_FEATURE_XMM2 …
#define X86_FEATURE_XMM3 …
#define X86_FEATURE_SSSE3 …
#define X86_FEATURE_AVX …
#define X86_FEATURE_AVX2 …
#define X86_FEATURE_AVX512F …
#define X86_FEATURE_AVX512DQ …
#define X86_FEATURE_AVX512BW …
#define X86_FEATURE_AVX512VL …
#define X86_FEATURE_MMXEXT …
static inline int boot_cpu_has(int flag)
{
u32 eax, ebx, ecx, edx;
eax = (flag & 0x100) ? 7 :
(flag & 0x20) ? 0x80000001 : 1;
ecx = 0;
asm volatile("cpuid"
: "+a" (eax), "=b" (ebx), "=d" (edx), "+c" (ecx));
return ((flag & 0x100 ? ebx :
(flag & 0x80) ? ecx : edx) >> (flag & 31)) & 1;
}
#endif
#endif
#endif