+ static bool cpu_globals_initialized;
+
+ /* TODO: all callers of ->parse_features() need to be changed to
+ * call it only once, so we can remove this check (or change it
+ * to assert(!cpu_globals_initialized).
+ * Current callers of ->parse_features() are:
+ * - cpu_generic_init()
+ */
+ if (cpu_globals_initialized) {
+ return;
+ }
+ cpu_globals_initialized = true;