[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/16] target/riscv: move 'pmu-mask' and 'pmu-num' to riscv_cpu_p
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 02/16] target/riscv: move 'pmu-mask' and 'pmu-num' to riscv_cpu_properties[] |
Date: |
Thu, 21 Dec 2023 14:51:23 -0300 |
Every property in riscv_cpu_options[] will be migrated to
riscv_cpu_properties[]. This will make their default values init
earlier, allowing cpu_init() functions to overwrite them. We'll also
implement common getters and setters that both accelerators will use,
allowing them to share validations that TCG is doing.
For pmu-mask and pmu-num it's just a matter of migrating the properties
from one array to the other.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
target/riscv/cpu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 70bf10aa7c..ba62792e30 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1464,9 +1464,6 @@ const PropertyInfo prop_pmu_num = {
};
Property riscv_cpu_options[] = {
- DEFINE_PROP_UINT32("pmu-mask", RISCVCPU, cfg.pmu_mask, MAKE_64BIT_MASK(3,
16)),
- {.name = "pmu-num", .info = &prop_pmu_num}, /* Deprecated */
-
DEFINE_PROP_BOOL("mmu", RISCVCPU, cfg.mmu, true),
DEFINE_PROP_BOOL("pmp", RISCVCPU, cfg.pmp, true),
@@ -1485,6 +1482,10 @@ Property riscv_cpu_options[] = {
static Property riscv_cpu_properties[] = {
DEFINE_PROP_BOOL("debug", RISCVCPU, cfg.debug, true),
+ DEFINE_PROP_UINT32("pmu-mask", RISCVCPU, cfg.pmu_mask,
+ MAKE_64BIT_MASK(3, 16)),
+ {.name = "pmu-num", .info = &prop_pmu_num}, /* Deprecated */
+
#ifndef CONFIG_USER_ONLY
DEFINE_PROP_UINT64("resetvec", RISCVCPU, env.resetvec, DEFAULT_RSTVEC),
#endif
--
2.43.0
- [PATCH 00/16] target/riscv: deprecate riscv_cpu_options[], Daniel Henrique Barboza, 2023/12/21
- [PATCH 01/16] target/riscv/cpu_cfg.h: remove user_spec and bext_spec, Daniel Henrique Barboza, 2023/12/21
- [PATCH 02/16] target/riscv: move 'pmu-mask' and 'pmu-num' to riscv_cpu_properties[],
Daniel Henrique Barboza <=
- [PATCH 04/16] target/riscv: move 'mmu' to riscv_cpu_properties[], Daniel Henrique Barboza, 2023/12/21
- [PATCH 03/16] target/riscv: make riscv_cpu_is_generic() public, Daniel Henrique Barboza, 2023/12/21
- [PATCH 05/16] target/riscv: move 'pmp' to riscv_cpu_properties[], Daniel Henrique Barboza, 2023/12/21
- [PATCH 06/16] target/riscv: rework 'priv_spec', Daniel Henrique Barboza, 2023/12/21
- [PATCH 08/16] target/riscv: move 'vlen' to riscv_cpu_properties[], Daniel Henrique Barboza, 2023/12/21
- [PATCH 07/16] target/riscv: rework 'vext_spec', Daniel Henrique Barboza, 2023/12/21
- [PATCH 09/16] target/riscv: move 'elen' to riscv_cpu_properties[], Daniel Henrique Barboza, 2023/12/21
- [PATCH 10/16] target/riscv: create finalize_features() for KVM, Daniel Henrique Barboza, 2023/12/21
- [PATCH 11/16] target/riscv: move 'cbom_blocksize' to riscv_cpu_properties[], Daniel Henrique Barboza, 2023/12/21