[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v16 71/99] target/arm: cpu-sve: new module
From: |
Richard Henderson |
Subject: |
Re: [PATCH v16 71/99] target/arm: cpu-sve: new module |
Date: |
Sat, 5 Jun 2021 11:13:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 6/4/21 8:52 AM, Alex Bennée wrote:
+#ifndef CPU_SVE_H
+#define CPU_SVE_H
+
+/* note: SVE is an AARCH64-only option, only include this for TARGET_AARCH64 */
This seems unnecessary.
@@ -201,13 +202,9 @@ typedef struct {
#ifdef TARGET_AARCH64
# define ARM_MAX_VQ 16
-void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp);
-void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
#else
# define ARM_MAX_VQ 1
-static inline void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) { }
-static inline void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { }
-#endif
+#endif /* TARGET_AARCH64 */
Hmm. I'm not sure about removing the stubs, but see below.
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 2fef8ca471..6db37b42d1 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -23,6 +23,7 @@
#include "target/arm/idau.h"
#include "qapi/error.h"
#include "cpu.h"
+#include "cpu-sve.h"
Not following the advice given above, which I agree with.
+#ifdef TARGET_AARCH64
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
arm_cpu_sve_finalize(cpu, &local_err);
if (local_err != NULL) {
@@ -838,6 +840,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp)
}
}
}
+#endif /* TARGET_AARCH64 */
New ifdefs, which isn't great. But I also see that it's more or less a 1-1
swap. One ifdef here, or one ifdef in the header to create the stub. So I
guess it's a draw.
So, modulo the comment at the top,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- Re: [PATCH v16 43/99] target/arm: move a15 cpu model away from the TCG-only models, (continued)
[PATCH v16 58/99] target/arm: move kvm-const.h, kvm.c, kvm64.c, kvm_arm.h to kvm/, Alex Bennée, 2021/06/04
[PATCH v16 85/99] target/arm: cpu-pauth: new module for ARMv8.3 Pointer Authentication, Alex Bennée, 2021/06/04
[PATCH v16 60/99] target/arm: cleanup cpu includes, Alex Bennée, 2021/06/04
[PATCH v16 84/99] target/arm: cpu-common: wrap a64-only check with is_a64, Alex Bennée, 2021/06/04
[PATCH v16 25/99] target/arm: tcg: fix comment style before move to cpu-mmu, Alex Bennée, 2021/06/04
[PATCH v16 71/99] target/arm: cpu-sve: new module, Alex Bennée, 2021/06/04
- Re: [PATCH v16 71/99] target/arm: cpu-sve: new module,
Richard Henderson <=
[PATCH v16 59/99] MAINTAINERS: update arm kvm maintained files to all in target/arm/kvm/, Alex Bennée, 2021/06/04
[PATCH v16 24/99] target/arm: split off cpu-sysemu.c, Alex Bennée, 2021/06/04
[PATCH v16 69/99] target/arm: add tcg cpu accel class, Alex Bennée, 2021/06/04
[PATCH v16 83/99] cpu-sve: rename sve_zcr_len_for_el to cpu_sve_get_zcr_len_for_el, Alex Bennée, 2021/06/04
[PATCH v16 16/99] target/arm: move helpers to tcg/, Alex Bennée, 2021/06/04
[PATCH v16 76/99] target/arm: restrict rebuild_hflags_a64 to TARGET_AARCH64, Alex Bennée, 2021/06/04