hw/riscv: sifive_u: Use SIFIVE_U_CPU for mc->default_cpu_type
Subsystems (2)
PATCH 1/1 hw/riscv: sifive_u: Use SIFIVE_U_CPU for mc->default_cpu_type
From: Bin Meng <[email protected]>
SIFIVE_U_CPU is conditionally set to SIFIVE_U34 or SIFIVE_U54, hence there is no need to use #idef to set the mc->default_cpu_type.
---
hw/riscv/sifive_u.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
hw/riscv/sifive_u.c +1 -5
@@ -628,11 +628,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data) mc->init = sifive_u_machine_init; mc->max_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +SIFIVE_U_COMPUTE_CPU_COUNT ; mc->min_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +1 ; -#if defined(TARGET_RISCV32 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U34 ; -#elif defined(TARGET_RISCV64 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U54 ; -#endif + mc->default_cpu_type =SIFIVE_U_CPU ; mc->default_cpus = mc->min_cpus; object_class_property_add_bool(oc, "start-in-flash",
Signature · 1 line
2.25.1
Quoted 10 lines · Bin Meng
From: Bin Meng <[email protected]>
SIFIVE_U_CPUis conditionally set toSIFIVE_U34orSIFIVE_U54, hence there is no need to use #idef to set themc->default_cpu_type.Signed-off-by Bin Meng <[email protected]>---
hw/riscv/sifive_u.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
Quoted 7 lines · Bin Meng
From: Bin Meng <[email protected]>
SIFIVE_U_CPUis conditionally set toSIFIVE_U34orSIFIVE_U54, hence there is no need to use #idef to set themc->default_cpu_type.Signed-off-by Bin Meng <[email protected]>
Alistair
Quoted 26 lines
---
hw/riscv/sifive_u.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)hw/riscv/sifive_u.c +1
-6@@ -628,11 +628,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data) mc->init = sifive_u_machine_init; mc->max_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +SIFIVE_U_COMPUTE_CPU_COUNT ; mc->min_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +1 ; -#if defined(TARGET_RISCV32 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U34 ; -#elif defined(TARGET_RISCV64 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U54 ; -#endif + mc->default_cpu_type =SIFIVE_U_CPU ; mc->default_cpus = mc->min_cpus; object_class_property_add_bool(oc, "start-in-flash", --2.25.1
Alistair Francis
AppliedQuoted 7 lines · Bin Meng
From: Bin Meng <[email protected]>
SIFIVE_U_CPUis conditionally set toSIFIVE_U34orSIFIVE_U54, hence there is no need to use #idef to set themc->default_cpu_type.Signed-off-by Bin Meng <[email protected]>
Thanks!
Applied to riscv-to-apply.next
Alistair
Quoted 26 lines
---
hw/riscv/sifive_u.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)hw/riscv/sifive_u.c +1
-6@@ -628,11 +628,7 @@ static void sifive_u_machine_class_init(ObjectClass *oc, void *data) mc->init = sifive_u_machine_init; mc->max_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +SIFIVE_U_COMPUTE_CPU_COUNT ; mc->min_cpus =SIFIVE_U_MANAGEMENT_CPU_COUNT +1 ; -#if defined(TARGET_RISCV32 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U34 ; -#elif defined(TARGET_RISCV64 ) - mc->default_cpu_type =TYPE_RISCV_CPU_SIFIVE_U54 ; -#endif + mc->default_cpu_type =SIFIVE_U_CPU ; mc->default_cpus = mc->min_cpus; object_class_property_add_bool(oc, "start-in-flash", --2.25.1