mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
target/riscv: remove capital 'Z' CPU properties
These properties were deprecated in QEMU 8.2, commit 8043effd9b.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20250530134608.1806922-1-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
444cffd37b
commit
455c0fa9ee
3 changed files with 1 additions and 48 deletions
|
|
@ -1387,23 +1387,6 @@ const RISCVCPUMultiExtConfig riscv_cpu_named_features[] = {
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Deprecated entries marked for future removal */
|
|
||||||
const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[] = {
|
|
||||||
MULTI_EXT_CFG_BOOL("Zifencei", ext_zifencei, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zicsr", ext_zicsr, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zihintntl", ext_zihintntl, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zihintpause", ext_zihintpause, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zawrs", ext_zawrs, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zfa", ext_zfa, true),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zfh", ext_zfh, false),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zfhmin", ext_zfhmin, false),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zve32f", ext_zve32f, false),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zve64f", ext_zve64f, false),
|
|
||||||
MULTI_EXT_CFG_BOOL("Zve64d", ext_zve64d, false),
|
|
||||||
|
|
||||||
{ },
|
|
||||||
};
|
|
||||||
|
|
||||||
static void cpu_set_prop_err(RISCVCPU *cpu, const char *propname,
|
static void cpu_set_prop_err(RISCVCPU *cpu, const char *propname,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -951,7 +951,6 @@ extern const RISCVCPUMultiExtConfig riscv_cpu_extensions[];
|
||||||
extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];
|
extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];
|
||||||
extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];
|
extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];
|
||||||
extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[];
|
extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[];
|
||||||
extern const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[];
|
|
||||||
|
|
||||||
typedef struct isa_ext_data {
|
typedef struct isa_ext_data {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
||||||
|
|
@ -1442,25 +1442,6 @@ static void riscv_cpu_add_profiles(Object *cpu_obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cpu_ext_is_deprecated(const char *ext_name)
|
|
||||||
{
|
|
||||||
return isupper(ext_name[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* String will be allocated in the heap. Caller is responsible
|
|
||||||
* for freeing it.
|
|
||||||
*/
|
|
||||||
static char *cpu_ext_to_lower(const char *ext_name)
|
|
||||||
{
|
|
||||||
char *ret = g_malloc0(strlen(ext_name) + 1);
|
|
||||||
|
|
||||||
strcpy(ret, ext_name);
|
|
||||||
ret[0] = tolower(ret[0]);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,
|
static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,
|
||||||
void *opaque, Error **errp)
|
void *opaque, Error **errp)
|
||||||
{
|
{
|
||||||
|
|
@ -1473,13 +1454,6 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpu_ext_is_deprecated(multi_ext_cfg->name)) {
|
|
||||||
g_autofree char *lower = cpu_ext_to_lower(multi_ext_cfg->name);
|
|
||||||
|
|
||||||
warn_report("CPU property '%s' is deprecated. Please use '%s' instead",
|
|
||||||
multi_ext_cfg->name, lower);
|
|
||||||
}
|
|
||||||
|
|
||||||
cpu_cfg_ext_add_user_opt(multi_ext_cfg->offset, value);
|
cpu_cfg_ext_add_user_opt(multi_ext_cfg->offset, value);
|
||||||
|
|
||||||
prev_val = isa_ext_is_enabled(cpu, multi_ext_cfg->offset);
|
prev_val = isa_ext_is_enabled(cpu, multi_ext_cfg->offset);
|
||||||
|
|
@ -1515,14 +1489,13 @@ static void cpu_add_multi_ext_prop(Object *cpu_obj,
|
||||||
const RISCVCPUMultiExtConfig *multi_cfg)
|
const RISCVCPUMultiExtConfig *multi_cfg)
|
||||||
{
|
{
|
||||||
bool generic_cpu = riscv_cpu_is_generic(cpu_obj);
|
bool generic_cpu = riscv_cpu_is_generic(cpu_obj);
|
||||||
bool deprecated_ext = cpu_ext_is_deprecated(multi_cfg->name);
|
|
||||||
|
|
||||||
object_property_add(cpu_obj, multi_cfg->name, "bool",
|
object_property_add(cpu_obj, multi_cfg->name, "bool",
|
||||||
cpu_get_multi_ext_cfg,
|
cpu_get_multi_ext_cfg,
|
||||||
cpu_set_multi_ext_cfg,
|
cpu_set_multi_ext_cfg,
|
||||||
NULL, (void *)multi_cfg);
|
NULL, (void *)multi_cfg);
|
||||||
|
|
||||||
if (!generic_cpu || deprecated_ext) {
|
if (!generic_cpu) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1565,8 +1538,6 @@ static void riscv_cpu_add_user_properties(Object *obj)
|
||||||
riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_vendor_exts);
|
riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_vendor_exts);
|
||||||
riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_experimental_exts);
|
riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_experimental_exts);
|
||||||
|
|
||||||
riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_deprecated_exts);
|
|
||||||
|
|
||||||
riscv_cpu_add_profiles(obj);
|
riscv_cpu_add_profiles(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue