Make XtensaConfigList::config not const. Only modify
XtensaConfig within xtensa_register_core(), when the
class is registered, not when it is initialized.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <
20250210133134.90879-4-philmd@linaro.org>
} XtensaConfig;
typedef struct XtensaConfigList {
- const XtensaConfig *config;
+ XtensaConfig *config;
struct XtensaConfigList *next;
} XtensaConfigList;
{
CPUClass *cc = CPU_CLASS(oc);
XtensaCPUClass *xcc = XTENSA_CPU_CLASS(oc);
- XtensaConfig *config = data;
+ const XtensaConfig *config = data;
- xtensa_finalize_config(config);
xcc->config = config;
/*
.class_data = (void *)node->config,
};
+ xtensa_finalize_config(node->config);
+
node->next = xtensa_cores;
xtensa_cores = node;
type.name = g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), node->config->name);