summaryrefslogtreecommitdiff
path: root/cpu_features.h
diff options
context:
space:
mode:
authorVladislav Shchapov <vladislav@shchapov.ru>2023-02-18 21:25:55 +0500
committerHans Kristian Rosbach <hk-github@circlestorm.org>2023-03-06 13:26:09 +0100
commit20d8fa8af137e5efb4ec79b25caf2de0ed68b5c7 (patch)
tree29ab0304f6eee8c11deb6acc97eb5a1d5b5f7ecb /cpu_features.h
parentc5b4aa34fe4c8e6690f7935ad27dacbdd5cc821d (diff)
downloadProject-Tick-20d8fa8af137e5efb4ec79b25caf2de0ed68b5c7.tar.gz
Project-Tick-20d8fa8af137e5efb4ec79b25caf2de0ed68b5c7.zip
Replace global CPU feature flag variables with local variable in init_functable
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Diffstat (limited to 'cpu_features.h')
-rw-r--r--cpu_features.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/cpu_features.h b/cpu_features.h
index 22d70da3d9..14eb19a751 100644
--- a/cpu_features.h
+++ b/cpu_features.h
@@ -20,7 +20,19 @@
# include "arch/s390/s390_features.h"
#endif
-extern void cpu_check_features(void);
+struct cpu_features {
+#if defined(X86_FEATURES)
+ struct x86_cpu_features x86;
+#elif defined(ARM_FEATURES)
+ struct arm_cpu_features arm;
+#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
+ struct power_cpu_features power;
+#elif defined(S390_FEATURES)
+ struct s390_cpu_features s390;
+#endif
+};
+
+extern void cpu_check_features(struct cpu_features *features);
/* adler32 */
typedef uint32_t (*adler32_func)(uint32_t adler, const uint8_t *buf, size_t len);
@@ -134,7 +146,7 @@ extern uint32_t crc32_acle(uint32_t crc, const uint8_t *buf, size_t len);
#elif defined(POWER8_VSX)
extern uint32_t crc32_power8(uint32_t crc, const uint8_t *buf, size_t len);
#elif defined(S390_CRC32_VX)
-extern uint32_t PREFIX(s390_crc32_vx)(uint32_t crc, const uint8_t *buf, size_t len);
+extern uint32_t crc32_s390_vx(uint32_t crc, const uint8_t *buf, size_t len);
#endif
/* compare256 */