[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v16 72/99] target/arm: cpu-sve: rename functions according to mod
From: |
Alex Bennée |
Subject: |
[PATCH v16 72/99] target/arm: cpu-sve: rename functions according to module prefix |
Date: |
Fri, 4 Jun 2021 16:52:45 +0100 |
From: Claudio Fontana <cfontana@suse.de>
external functions have the cpu_sve prefix,
while for static functions it can be omitted.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/arm/cpu-sve.h | 6 +++---
target/arm/cpu-sve.c | 32 ++++++++++++++++----------------
target/arm/cpu.c | 2 +-
target/arm/cpu64.c | 4 ++--
target/arm/kvm/kvm-cpu.c | 2 +-
5 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/target/arm/cpu-sve.h b/target/arm/cpu-sve.h
index 692509d419..ece36d2a0c 100644
--- a/target/arm/cpu-sve.h
+++ b/target/arm/cpu-sve.h
@@ -26,12 +26,12 @@
#include "cpu.h"
/* called by arm_cpu_finalize_features in realizefn */
-void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp);
+void cpu_sve_finalize_features(ARMCPU *cpu, Error **errp);
/* add the CPU SVE properties */
-void aarch64_add_sve_properties(Object *obj);
+void cpu_sve_add_props(Object *obj);
/* add the CPU SVE properties specific to the "MAX" CPU */
-void aarch64_add_sve_properties_max(Object *obj);
+void cpu_sve_add_props_max(Object *obj);
#endif /* CPU_SVE_H */
diff --git a/target/arm/cpu-sve.c b/target/arm/cpu-sve.c
index 129fb9586e..da60330cc2 100644
--- a/target/arm/cpu-sve.c
+++ b/target/arm/cpu-sve.c
@@ -27,7 +27,7 @@
#include "qapi/visitor.h"
#include "cpu-sve.h"
-void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
+void cpu_sve_finalize_features(ARMCPU *cpu, Error **errp)
{
/*
* If any vector lengths are explicitly enabled with sve<N> properties,
@@ -229,8 +229,8 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
cpu->sve_max_vq = max_vq;
}
-static void cpu_max_get_sve_max_vq(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
+static void get_prop_max_vq(Object *obj, Visitor *v, const char *name,
+ void *opaque, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
uint32_t value;
@@ -244,8 +244,8 @@ static void cpu_max_get_sve_max_vq(Object *obj, Visitor *v,
const char *name,
visit_type_uint32(v, name, &value, errp);
}
-static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
+static void set_prop_max_vq(Object *obj, Visitor *v, const char *name,
+ void *opaque, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
uint32_t max_vq;
@@ -276,8 +276,8 @@ static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v,
const char *name,
* of the contents of "name" to determine which bit on which
* to operate.
*/
-static void cpu_arm_get_sve_vq(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
+static void get_prop_vq(Object *obj, Visitor *v, const char *name,
+ void *opaque, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
uint32_t vq = atoi(&name[3]) / 128;
@@ -292,8 +292,8 @@ static void cpu_arm_get_sve_vq(Object *obj, Visitor *v,
const char *name,
visit_type_bool(v, name, &value, errp);
}
-static void cpu_arm_set_sve_vq(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
+static void set_prop_vq(Object *obj, Visitor *v, const char *name,
+ void *opaque, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
uint32_t vq = atoi(&name[3]) / 128;
@@ -317,13 +317,13 @@ static void cpu_arm_set_sve_vq(Object *obj, Visitor *v,
const char *name,
set_bit(vq - 1, cpu->sve_vq_init);
}
-static bool cpu_arm_get_sve(Object *obj, Error **errp)
+static bool get_prop_sve(Object *obj, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
return cpu_isar_feature(aa64_sve, cpu);
}
-static void cpu_arm_set_sve(Object *obj, bool value, Error **errp)
+static void set_prop_sve(Object *obj, bool value, Error **errp)
{
ARMCPU *cpu = ARM_CPU(obj);
uint64_t t;
@@ -338,21 +338,21 @@ static void cpu_arm_set_sve(Object *obj, bool value,
Error **errp)
cpu->isar.id_aa64pfr0 = t;
}
-void aarch64_add_sve_properties(Object *obj)
+void cpu_sve_add_props(Object *obj)
{
uint32_t vq;
- object_property_add_bool(obj, "sve", cpu_arm_get_sve, cpu_arm_set_sve);
+ object_property_add_bool(obj, "sve", get_prop_sve, set_prop_sve);
for (vq = 1; vq <= ARM_MAX_VQ; ++vq) {
char name[8];
sprintf(name, "sve%d", vq * 128);
- object_property_add(obj, name, "bool", cpu_arm_get_sve_vq,
cpu_arm_set_sve_vq, NULL, NULL);
+ object_property_add(obj, name, "bool", get_prop_vq, set_prop_vq, NULL,
NULL);
}
}
/* properties added for MAX CPU */
-void aarch64_add_sve_properties_max(Object *obj)
+void cpu_sve_add_props_max(Object *obj)
{
- object_property_add(obj, "sve-max-vq", "uint32", cpu_max_get_sve_max_vq,
cpu_max_set_sve_max_vq, NULL, NULL);
+ object_property_add(obj, "sve-max-vq", "uint32", get_prop_max_vq,
set_prop_max_vq, NULL, NULL);
}
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 6db37b42d1..e4ad92ffec 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -821,7 +821,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp)
#ifdef TARGET_AARCH64
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
- arm_cpu_sve_finalize(cpu, &local_err);
+ cpu_sve_finalize_features(cpu, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
return;
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 3a6b7cf5d1..03ed637bdb 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -452,8 +452,8 @@ static void aarch64_max_initfn(Object *obj)
qdev_property_add_static(DEVICE(obj), &arm_cpu_pauth_impdef_property);
}
- aarch64_add_sve_properties(obj);
- aarch64_add_sve_properties_max(obj);
+ cpu_sve_add_props(obj);
+ cpu_sve_add_props_max(obj);
}
static const ARMCPUInfo aarch64_cpus[] = {
diff --git a/target/arm/kvm/kvm-cpu.c b/target/arm/kvm/kvm-cpu.c
index a23831e3c6..09aede9319 100644
--- a/target/arm/kvm/kvm-cpu.c
+++ b/target/arm/kvm/kvm-cpu.c
@@ -89,7 +89,7 @@ static void host_cpu_instance_init(Object *obj)
kvm_arm_set_cpu_features_from_host(cpu);
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
- aarch64_add_sve_properties(obj);
+ cpu_sve_add_props(obj);
}
arm_cpu_post_init(obj);
}
--
2.20.1
- [PATCH v16 15/99] target/arm: move translate modules to tcg/, (continued)
- [PATCH v16 15/99] target/arm: move translate modules to tcg/, Alex Bennée, 2021/06/04
- [PATCH v16 50/99] target/arm: fix style of arm_cpu_do_interrupt functions before move, Alex Bennée, 2021/06/04
- [PATCH v16 54/99] target/arm: move TCGCPUOps to tcg/tcg-cpu.c, Alex Bennée, 2021/06/04
- [PATCH v16 63/99] tests/qtest: skip bios-tables-test test_acpi_oem_fields_virt for KVM, Alex Bennée, 2021/06/04
- [PATCH v16 95/99] hw/arm: add dependency on OR_IRQ for XLNX_VERSAL, Alex Bennée, 2021/06/04
- [PATCH v16 45/99] target/arm: move sve_exception_el out of TCG helpers, Alex Bennée, 2021/06/04
- [PATCH v16 72/99] target/arm: cpu-sve: rename functions according to module prefix,
Alex Bennée <=
- [PATCH v16 55/99] target/arm: move cpu_tcg to tcg/tcg-cpu-models.c, Alex Bennée, 2021/06/04
- [PATCH v16 20/99] target/arm: tcg: move sysemu-only parts of debug_helper, Alex Bennée, 2021/06/04
- [PATCH v16 46/99] target/arm: fix comments style of fp_exception_el before moving it, Alex Bennée, 2021/06/04
- [PATCH v16 37/99] target/arm: move sve_zcr_len_for_el to common_cpu, Alex Bennée, 2021/06/04
- [PATCH v16 34/99] target/arm: move arm_hcr_el2_eff from tcg/ to common_cpu, Alex Bennée, 2021/06/04
- [PATCH v16 17/99] arm: tcg: only build under CONFIG_TCG, Alex Bennée, 2021/06/04
- [PATCH v16 42/99] target/arm: split 32bit and 64bit arm dump state, Alex Bennée, 2021/06/04