Message ID | 20250403234914.9154-14-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | qemu: Introduce TargetInfo API (for single binary) | expand |
On 4/3/25 16:49, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > accel/accel-target.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/accel/accel-target.c b/accel/accel-target.c > index 33a539b4cbb..9e9e70be876 100644 > --- a/accel/accel-target.c > +++ b/accel/accel-target.c > @@ -25,6 +25,7 @@ > > #include "qemu/osdep.h" > #include "qemu/accel.h" > +#include "qemu/target_info.h" > > #include "cpu.h" > #include "accel/accel-cpu-target.h" > @@ -88,17 +89,18 @@ static void accel_init_cpu_interfaces(AccelClass *ac) > const char *ac_name; /* AccelClass name */ > char *acc_name; /* AccelCPUClass name */ > ObjectClass *acc; /* AccelCPUClass */ > + const char *cpu_resolving_type = target_cpu_type(); > > ac_name = object_class_get_name(OBJECT_CLASS(ac)); > g_assert(ac_name != NULL); > > - acc_name = g_strdup_printf("%s-%s", ac_name, CPU_RESOLVING_TYPE); > + acc_name = g_strdup_printf("%s-%s", ac_name, cpu_resolving_type); > acc = object_class_by_name(acc_name); > g_free(acc_name); > > if (acc) { > object_class_foreach(accel_init_cpu_int_aux, > - CPU_RESOLVING_TYPE, false, acc); > + cpu_resolving_type, false, acc); > } > } > Please squash with related commit. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff --git a/accel/accel-target.c b/accel/accel-target.c index 33a539b4cbb..9e9e70be876 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -25,6 +25,7 @@ #include "qemu/osdep.h" #include "qemu/accel.h" +#include "qemu/target_info.h" #include "cpu.h" #include "accel/accel-cpu-target.h" @@ -88,17 +89,18 @@ static void accel_init_cpu_interfaces(AccelClass *ac) const char *ac_name; /* AccelClass name */ char *acc_name; /* AccelCPUClass name */ ObjectClass *acc; /* AccelCPUClass */ + const char *cpu_resolving_type = target_cpu_type(); ac_name = object_class_get_name(OBJECT_CLASS(ac)); g_assert(ac_name != NULL); - acc_name = g_strdup_printf("%s-%s", ac_name, CPU_RESOLVING_TYPE); + acc_name = g_strdup_printf("%s-%s", ac_name, cpu_resolving_type); acc = object_class_by_name(acc_name); g_free(acc_name); if (acc) { object_class_foreach(accel_init_cpu_int_aux, - CPU_RESOLVING_TYPE, false, acc); + cpu_resolving_type, false, acc); } }
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/accel-target.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)