target/riscv: remove capital 'Z' CPU properties
PATCH 1/1 target/riscv: remove capital 'Z' CPU properties
These properties were deprecated in QEMU 8.2, commit 8043effd9b.
Signed-off-by Daniel Henrique Barboza <[email protected]>
--- target/riscv/cpu.c | 17 ----------------- target/riscv/cpu.h | 1 - target/riscv/tcg/tcg-cpu.c | 31 +------------------------------ 3 files changed, 1 insertion(+), 48 deletions(-)
target/riscv/cpu.c +0 -17
@@ -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,Error **errp) {
target/riscv/cpu.h +0 -1
@@ -951,7 +951,6 @@ extern const RISCVCPUMultiExtConfig riscv_cpu_extensions[];extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[]; -extern const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[]; typedef struct isa_ext_data { const char *name;
target/riscv/tcg/tcg-cpu.c +1 -30
@@ -1416,25 +1416,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,void *opaque,Error **errp) {
@@ -1447,13 +1428,6 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,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); prev_val =isa_ext_is_enabled (cpu, multi_ext_cfg->offset);
@@ -1489,14 +1463,13 @@ static void cpu_add_multi_ext_prop(Object *cpu_obj, const RISCVCPUMultiExtConfig *multi_cfg) {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" , cpu_get_multi_ext_cfg, cpu_set_multi_ext_cfg,NULL , (void *)multi_cfg); -if (!generic_cpu || deprecated_ext) { +if (!generic_cpu) {return ; }
@@ -1539,8 +1512,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_experimental_exts); -riscv_cpu_add_multiext_prop_array (obj, riscv_cpu_deprecated_exts); -riscv_cpu_add_profiles (obj); }
Signature · 1 line
2.49.0
Quoted 4 lines · Daniel Henrique Barboza
These properties were deprecated in QEMU 8.2, commit
8043effd9b.Signed-off-by Daniel Henrique Barboza <[email protected]>
Reviewed-by Alistair Francis <[email protected]>
Alistair
Quoted 119 lines
--- target/riscv/cpu.c | 17 ----------------- target/riscv/cpu.h | 1 - target/riscv/tcg/tcg-cpu.c | 31 +------------------------------ 3 files changed, 1 insertion(+), 48 deletions(-)target/riscv/cpu.c +0
-17@@ -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,Error **errp) {target/riscv/cpu.h +0
-1@@ -951,7 +951,6 @@ extern const RISCVCPUMultiExtConfig riscv_cpu_extensions[];extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[]; -extern const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[]; typedef struct isa_ext_data { const char *name;target/riscv/tcg/tcg-cpu.c +1
-31@@ -1416,25 +1416,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,void *opaque,Error **errp) {@@ -1447,13 +1428,6 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,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); prev_val =isa_ext_is_enabled (cpu, multi_ext_cfg->offset);@@ -1489,14 +1463,13 @@ static void cpu_add_multi_ext_prop(Object *cpu_obj, const RISCVCPUMultiExtConfig *multi_cfg) {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" , cpu_get_multi_ext_cfg, cpu_set_multi_ext_cfg,NULL , (void *)multi_cfg); -if (!generic_cpu || deprecated_ext) { +if (!generic_cpu) {return ; }@@ -1539,8 +1512,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_experimental_exts); -riscv_cpu_add_multiext_prop_array (obj, riscv_cpu_deprecated_exts); -riscv_cpu_add_profiles (obj); } --2.49.0
Alistair Francis
AppliedQuoted 4 lines · Daniel Henrique Barboza
These properties were deprecated in QEMU 8.2, commit
8043effd9b.Signed-off-by Daniel Henrique Barboza <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 119 lines
--- target/riscv/cpu.c | 17 ----------------- target/riscv/cpu.h | 1 - target/riscv/tcg/tcg-cpu.c | 31 +------------------------------ 3 files changed, 1 insertion(+), 48 deletions(-)target/riscv/cpu.c +0
-17@@ -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,Error **errp) {target/riscv/cpu.h +0
-1@@ -951,7 +951,6 @@ extern const RISCVCPUMultiExtConfig riscv_cpu_extensions[];extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[]; -extern const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[]; typedef struct isa_ext_data { const char *name;target/riscv/tcg/tcg-cpu.c +1
-31@@ -1416,25 +1416,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,void *opaque,Error **errp) {@@ -1447,13 +1428,6 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,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); prev_val =isa_ext_is_enabled (cpu, multi_ext_cfg->offset);@@ -1489,14 +1463,13 @@ static void cpu_add_multi_ext_prop(Object *cpu_obj, const RISCVCPUMultiExtConfig *multi_cfg) {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" , cpu_get_multi_ext_cfg, cpu_set_multi_ext_cfg,NULL , (void *)multi_cfg); -if (!generic_cpu || deprecated_ext) { +if (!generic_cpu) {return ; }@@ -1539,8 +1512,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_experimental_exts); -riscv_cpu_add_multiext_prop_array (obj, riscv_cpu_deprecated_exts); -riscv_cpu_add_profiles (obj); } --2.49.0