diff --git a/include/os/windows/spl/sys/processor.h b/include/os/windows/spl/sys/processor.h index c1710374bfed..600dadf17a69 100644 --- a/include/os/windows/spl/sys/processor.h +++ b/include/os/windows/spl/sys/processor.h @@ -8,22 +8,52 @@ extern uint32_t getcpuid(); typedef int processorid_t; -#define CPUID_FEATURE_PCLMULQDQ (1<<1) -#define CPUID_FEATURE_MOVBE (1<<22) -#define CPUID_FEATURE_AES (1<<25) -#define CPUID_FEATURE_XSAVE (1<<26) -#define CPUID_FEATURE_OSXSAVE (1<<27) -#define CPUID_FEATURE_AVX1_0 (1<<28) - -#define CPUID_FEATURE_SSE (1<<25) -#define CPUID_FEATURE_SSE2 (1<<26) -#define CPUID_FEATURE_SSE3 (1<<0) -#define CPUID_FEATURE_SSSE3 (1<<9) -#define CPUID_FEATURE_SSE4_2 (1<<20) -#define CPUID_FEATURE_SSE4_1 (1<<19) - -#define CPUID_LEAF7_FEATURE_AVX2 (1<<5) -#define CPUID_LEAF7_FEATURE_AVX512F (1<<16) -#define CPUID_LEAF7_FEATURE_SHA_NI (1<<29) +#if defined(__amd64__) || defined(__x86_64__) + +extern int __cpuid_count(unsigned int __level, unsigned int __sublevel, + unsigned int __eax, unsigned int __ebx, + unsigned int __ecx, unsigned int __edx); + +#define __cpuid_count(level, count, a, b, c, d) \ + __asm__("xchg{l}\t{%%}ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchg{l}\t{%%}ebx, %1\n\t" \ + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "0" (level), "2" (count)) + +#define __cpuid(level, a, b, c, d) \ + __asm__("xchg{l}\t{%%}ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchg{l}\t{%%}ebx, %1\n\t" \ + : "=a" (a), "=r" (b), "=c" (c), "=d" (d) \ + : "0" (level)) + +static inline unsigned int +__get_cpuid_max(unsigned int __ext, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; + __cpuid(__ext, __eax, __ebx, __ecx, __edx); + if (__sig) + *__sig = __ebx; + return (__eax); +} + +/* macOS does have do_cpuid() macro */ +static inline int +__get_cpuid(unsigned int __level, + unsigned int *__eax, unsigned int *__ebx, + unsigned int *__ecx, unsigned int *__edx) +{ + unsigned int __ext = __level & 0x80000000; + if (__get_cpuid_max(__ext, 0) < __level) + return (0); + __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx); + return (1); +} + +#endif // x86 + +typedef int processorid_t; +extern int spl_processor_init(void); #endif /* _SPL_PROCESSOR_H */ diff --git a/include/os/windows/spl/sys/simd.h b/include/os/windows/spl/sys/simd.h index cf13da1ceab0..5a607904df0f 100644 --- a/include/os/windows/spl/sys/simd.h +++ b/include/os/windows/spl/sys/simd.h @@ -81,7 +81,7 @@ #include #endif -#ifdef _WIN32 +#ifdef _WIN33 // XNU fpu.h static inline uint64_t xgetbv(uint32_t c) @@ -93,10 +93,9 @@ xgetbv(uint32_t c) #endif -extern uint64_t spl_cpuid_features(void); -extern uint64_t spl_cpuid_leaf7_features(void); - +#ifndef ZFS_ASM_BUG #define ZFS_ASM_BUG() { ASSERT(0); } break +#endif #define kfpu_allowed() 1 @@ -129,8 +128,11 @@ extern uint32_t kfpu_state; * CPU feature testing. */ #if !defined(_KERNEL) - +#include +#include +#else #include +#endif // KERNEL #define ZFS_ASM_BUG() { assert(0); } break @@ -170,7 +172,9 @@ typedef enum cpuid_inst_sets { AVX512ER, AVX512VL, AES, - PCLMULQDQ + PCLMULQDQ, + MOVBE, + SHANI, } cpuid_inst_sets_t; /* @@ -194,6 +198,8 @@ typedef struct cpuid_feature_desc { #define _AVX512VL_BIT (1U << 31) /* if used also check other levels */ #define _AES_BIT (1U << 25) #define _PCLMULQDQ_BIT (1U << 1) +#define _MOVBE_BIT (1U << 22) +#define _SHANI_BIT (1U << 29) /* * Descriptions of supported instruction sets @@ -221,6 +227,8 @@ static const cpuid_feature_desc_t spl_cpuid_features[] = { [AVX512VL] = {7U, 0U, _AVX512ER_BIT, EBX }, [AES] = {1U, 0U, _AES_BIT, ECX }, [PCLMULQDQ] = {1U, 0U, _PCLMULQDQ_BIT, ECX }, + [MOVBE] = {1U, 0U, _MOVBE_BIT, ECX }, + [SHANI] = {1U, 0U, _SHANI_BIT, EBX }, }; /* @@ -261,11 +269,11 @@ __cpuid_check_feature(const cpuid_feature_desc_t *desc) return (B_FALSE); } -#define CPUID_FEATURE_CHECK(name, id) \ -static inline boolean_t \ -__cpuid_has_ ## name(void) \ -{ \ - return (__cpuid_check_feature(&spl_cpuid_features[id])); \ +#define CPUID_FEATURE_CHECK(name, id) \ +static inline boolean_t \ +__cpuid_has_ ## name(void) \ +{ \ + return (__cpuid_check_feature(&spl_cpuid_features[id])); \ } /* @@ -293,8 +301,8 @@ CPUID_FEATURE_CHECK(avx512er, AVX512ER); CPUID_FEATURE_CHECK(avx512vl, AVX512VL); CPUID_FEATURE_CHECK(aes, AES); CPUID_FEATURE_CHECK(pclmulqdq, PCLMULQDQ); - -#endif /* !defined(_KERNEL) */ +CPUID_FEATURE_CHECK(shani, SHANI); +CPUID_FEATURE_CHECK(movbe, MOVBE); /* @@ -306,11 +314,8 @@ __simd_state_enabled(const uint64_t state) boolean_t has_osxsave; uint64_t xcr0; -#if defined(_KERNEL) - has_osxsave = !!(spl_cpuid_features() & CPUID_FEATURE_OSXSAVE); -#elif !defined(_KERNEL) has_osxsave = __cpuid_has_osxsave(); -#endif + if (!has_osxsave) return (B_FALSE); @@ -324,18 +329,13 @@ __simd_state_enabled(const uint64_t state) #define __ymm_enabled() __simd_state_enabled(_XSTATE_SSE_AVX) #define __zmm_enabled() __simd_state_enabled(_XSTATE_AVX512) - /* * Check if SSE instruction set is available */ static inline boolean_t zfs_sse_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSE)); -#elif !defined(_KERNEL) return (__cpuid_has_sse()); -#endif } /* @@ -344,11 +344,7 @@ zfs_sse_available(void) static inline boolean_t zfs_sse2_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSE2)); -#elif !defined(_KERNEL) return (__cpuid_has_sse2()); -#endif } /* @@ -357,11 +353,7 @@ zfs_sse2_available(void) static inline boolean_t zfs_sse3_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSE3)); -#elif !defined(_KERNEL) return (__cpuid_has_sse3()); -#endif } /* @@ -370,11 +362,7 @@ zfs_sse3_available(void) static inline boolean_t zfs_ssse3_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSSE3)); -#elif !defined(_KERNEL) return (__cpuid_has_ssse3()); -#endif } /* @@ -383,11 +371,7 @@ zfs_ssse3_available(void) static inline boolean_t zfs_sse4_1_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSE4_1)); -#elif !defined(_KERNEL) return (__cpuid_has_sse4_1()); -#endif } /* @@ -396,11 +380,16 @@ zfs_sse4_1_available(void) static inline boolean_t zfs_sse4_2_available(void) { -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_SSE4_2)); -#elif !defined(_KERNEL) return (__cpuid_has_sse4_2()); -#endif +} + +/* + * Check if SSE4.2 instruction set is available + */ +static inline boolean_t +zfs_osxsave_available(void) +{ + return (__cpuid_has_osxsave()); } /* @@ -410,11 +399,7 @@ static inline boolean_t zfs_avx_available(void) { boolean_t has_avx; -#if defined(_KERNEL) - return (!!(spl_cpuid_features() & CPUID_FEATURE_AVX1_0)); -#elif !defined(_KERNEL) has_avx = __cpuid_has_avx(); -#endif return (has_avx && __ymm_enabled()); } @@ -426,16 +411,7 @@ static inline boolean_t zfs_avx2_available(void) { boolean_t has_avx2; -#if defined(_KERNEL) -#if defined(HAVE_AVX2) - has_avx2 = (!!(spl_cpuid_leaf7_features() & CPUID_LEAF7_FEATURE_AVX2)); -#else - has_avx2 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx2 = __cpuid_has_avx2(); -#endif - return (has_avx2 && __ymm_enabled()); } @@ -445,15 +421,7 @@ zfs_avx2_available(void) static inline boolean_t zfs_bmi1_available(void) { -#if defined(_KERNEL) -#if defined(CPUID_LEAF7_FEATURE_BMI1) - return (!!(spl_cpuid_leaf7_features() & CPUID_LEAF7_FEATURE_BMI1)); -#else - return (B_FALSE); -#endif -#elif !defined(_KERNEL) return (__cpuid_has_bmi1()); -#endif } /* @@ -462,15 +430,7 @@ zfs_bmi1_available(void) static inline boolean_t zfs_bmi2_available(void) { -#if defined(_KERNEL) -#if defined(CPUID_LEAF7_FEATURE_BMI2) - return (!!(spl_cpuid_leaf7_features() & CPUID_LEAF7_FEATURE_BMI2)); -#else - return (B_FALSE); -#endif -#elif !defined(_KERNEL) return (__cpuid_has_bmi2()); -#endif } /* @@ -479,15 +439,7 @@ zfs_bmi2_available(void) static inline boolean_t zfs_aes_available(void) { -#if defined(_KERNEL) -#if defined(HAVE_AES) - return (!!(spl_cpuid_features() & CPUID_FEATURE_AES)); -#else - return (B_FALSE); -#endif -#elif !defined(_KERNEL) return (__cpuid_has_aes()); -#endif } /* @@ -496,15 +448,25 @@ zfs_aes_available(void) static inline boolean_t zfs_pclmulqdq_available(void) { -#if defined(_KERNEL) -#if defined(HAVE_PCLMULQDQ) - return (!!(spl_cpuid_features() & CPUID_FEATURE_PCLMULQDQ)); -#else - return (B_FALSE); -#endif -#elif !defined(_KERNEL) return (__cpuid_has_pclmulqdq()); -#endif +} + +/* + * Check if MOVBE instruction is available + */ +static inline boolean_t +zfs_movbe_available(void) +{ + return (__cpuid_has_movbe()); +} + +/* + * Check if SHA_NI instruction set is available + */ +static inline boolean_t +zfs_shani_available(void) +{ + return (__cpuid_has_shani()); } /* @@ -529,17 +491,7 @@ static inline boolean_t zfs_avx512f_available(void) { boolean_t has_avx512 = B_FALSE; - -#if defined(_KERNEL) -#if defined(HAVE_AVX512F) && defined(CPUID_LEAF7_FEATURE_AVX512F) - return (!!(spl_cpuid_leaf7_features() & CPUID_LEAF7_FEATURE_AVX512F)); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512f(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -549,20 +501,7 @@ zfs_avx512cd_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512F) && defined(HAVE_AVX512CD) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512CD) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512CD)) == - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512CD); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512cd(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -572,19 +511,7 @@ zfs_avx512er_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512F) && defined(HAVE_AVX512ER) && \ - defined(CPUID_LEAF7_FEATURE_AVX512ER) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512ER)) == - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512ER); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512er(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -594,19 +521,7 @@ zfs_avx512pf_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512PF) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512PF) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512PF)) == - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512PF); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512pf(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -616,20 +531,7 @@ zfs_avx512bw_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512BW) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512BW) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512BW)) == - (CPUID_LEAF7_FEATURE_AVX512F | CPUID_LEAF7_FEATURE_AVX512BW); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512bw(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -639,20 +541,7 @@ zfs_avx512dq_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512DQ) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512DQ) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512DQ)) == - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512DQ); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512dq(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -662,20 +551,7 @@ zfs_avx512vl_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512VL) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512VL) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512VL)) == - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512VL); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512vl(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -685,20 +561,7 @@ zfs_avx512ifma_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512IFMA) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512IFMA) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512IFMA)) == - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512IFMA); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512ifma(); -#endif - return (has_avx512 && __zmm_enabled()); } @@ -708,50 +571,11 @@ zfs_avx512vbmi_available(void) { boolean_t has_avx512 = B_FALSE; -#if defined(_KERNEL) -#if defined(HAVE_AVX512VBMI) && defined(HAVE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512F) && \ - defined(CPUID_LEAF7_FEATURE_AVX512VBMI) - has_avx512 = (spl_cpuid_leaf7_features() & - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512VBMI)) == - (CPUID_LEAF7_FEATURE_AVX512F|CPUID_LEAF7_FEATURE_AVX512VBMI); -#else - has_avx512 = B_FALSE; -#endif -#elif !defined(_KERNEL) has_avx512 = __cpuid_has_avx512f() && __cpuid_has_avx512vbmi(); -#endif - return (has_avx512 && __zmm_enabled()); } -static inline boolean_t -zfs_movbe_available(void) -{ -#if defined(_KERNEL) -#if defined(HAVE_MOVBE) - return (!!(spl_cpuid_features() & CPUID_FEATURE_MOVBE)); -#else - return (B_FALSE); -#endif - return (B_FALSE); -#endif -} - -/* - * Check if SHA_NI instruction set is available - */ -static inline boolean_t -zfs_shani_available(void) -{ -#if defined(HAVE_SHA_NI) - return (!!(spl_cpuid_leaf7_features() & CPUID_LEAF7_FEATURE_SHA_NI)); -#else - return (B_FALSE); -#endif -} - #endif /* defined(__x86) */ #endif /* _SIMD_X86_H */ diff --git a/lib/libspl/os/windows/weakpragma.c b/lib/libspl/os/windows/weakpragma.c index 43f631e0b98d..add75da0c1a7 100644 --- a/lib/libspl/os/windows/weakpragma.c +++ b/lib/libspl/os/windows/weakpragma.c @@ -27,7 +27,6 @@ #include #include - /* No #pragma weaks here! */ void dmu_buf_add_ref(dmu_buf_t *db, const void *tag) diff --git a/module/os/windows/spl/spl-processor.c b/module/os/windows/spl/spl-processor.c index e767c4e73044..f9c6e3c1c65a 100644 --- a/module/os/windows/spl/spl-processor.c +++ b/module/os/windows/spl/spl-processor.c @@ -26,34 +26,11 @@ */ #include +#include /* Holds the flags for KeSaveExtendedProcessorState() in simd.h */ uint32_t kfpu_state = 0; -#ifdef __x86_64__ - -/* Should probably use MS cpuid() call */ - -#define _spl_cpuid(func, a, b, c, d) \ - __asm__ __volatile__( \ - " pushq %%rbx \n" \ - " xorq %%rcx,%%rcx \n" \ - " cpuid \n" \ - " movq %%rbx, %%rsi \n" \ - " popq %%rbx \n" : \ - "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "a" (func)) - -#else /* Add ARM */ - -#define _spl_cpuid(func, a, b, c, d) \ - a = b = c = d = 0 - -#endif - -static uint64_t _spl_cpuid_features = 0ULL; -static uint64_t _spl_cpuid_features_leaf7 = 0ULL; -static boolean_t _spl_cpuid_has_xgetbv = B_FALSE; - uint32_t cpu_number(void) { @@ -70,58 +47,27 @@ getcpuid() return (cpuid % max_ncpus); } -uint64_t -spl_cpuid_features(void) +int +spl_processor_init(void) { - -#if defined(__aarch64__) - - // Find arm64 solution. - _spl_cpuid_has_xgetbv = B_FALSE; /* Silence unused */ - -#else /* X64 */ - - static int first_time = 1; - uint64_t a, b, c, d; - - if (first_time == 1) { - first_time = 0; - - _spl_cpuid(0, a, b, c, d); - if (a >= 1) { - _spl_cpuid(1, a, b, c, d); - _spl_cpuid_features = d | (c << 32); - - // GETBV is bit 26 in ECX. Apple defines it as: - // CPUID_FEATURE_XSAVE _HBit(26) - // ( ECX & (1 << 26) - // or, (feature & 400000000000000) - _spl_cpuid_has_xgetbv = - _spl_cpuid_features & CPUID_FEATURE_XSAVE; - } - if (a >= 7) { - c = 0; - _spl_cpuid(7, a, b, c, d); - _spl_cpuid_features_leaf7 = b | (c << 32); - } - xprintf("SPL: CPUID 0x%08llx and leaf7 0x%08llx\n", - _spl_cpuid_features, _spl_cpuid_features_leaf7); - - if (_spl_cpuid_features & CPUID_FEATURE_AVX1_0) - kfpu_state |= XSTATE_MASK_AVX; - if (_spl_cpuid_features_leaf7 & CPUID_LEAF7_FEATURE_AVX2) - kfpu_state |= XSTATE_MASK_AVX; - if (_spl_cpuid_features_leaf7 & CPUID_LEAF7_FEATURE_AVX512F) - kfpu_state |= XSTATE_MASK_AVX512; - - } +#if defined(__x86_64__) + dprintf("CPUID: %s%s%s%s%s%s%s\n", + zfs_osxsave_available() ? "osxsave " : "", + zfs_sse_available() ? "sse " : "", + zfs_sse2_available() ? "sse2 " : "", + zfs_sse3_available() ? "sse3 " : "", + zfs_ssse3_available() ? "ssse3 " : "", + zfs_sse4_1_available() ? "sse4.1 " : "", + zfs_sse4_2_available() ? "sse4.2 " : ""); + dprintf("CPUID: %s%s%s%s%s%s%s\n", + zfs_avx_available() ? "avx " : "", + zfs_avx2_available() ? "avx2 " : "", + zfs_aes_available() ? "aes " : "", + zfs_pclmulqdq_available() ? "pclmulqdq " : "", + zfs_avx512f_available() ? "avx512f " : "", + zfs_movbe_available() ? "movbe " : "", + zfs_shani_available() ? "sha-ni " : ""); #endif - return (_spl_cpuid_features); -} - -uint64_t -spl_cpuid_leaf7_features(void) -{ - return (_spl_cpuid_features_leaf7); + return (0); } diff --git a/module/os/windows/spl/spl-windows.c b/module/os/windows/spl/spl-windows.c index 0218fbc12e77..b5641d711ef3 100644 --- a/module/os/windows/spl/spl-windows.c +++ b/module/os/windows/spl/spl-windows.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #define DEBUG 1 // for backtrace debugging info @@ -549,6 +550,8 @@ spl_start(PUNICODE_STRING RegistryPath) kstat_init(); + spl_processor_init(); + IOLog("SPL: Loaded module v%s-%s%s, " "(ncpu %d, memsize %llu, pages %llu)\n", SPL_META_VERSION, SPL_META_RELEASE, SPL_DEBUG_STR,