Skip to content

Commit

Permalink
accel: Rename AccelCPUClass::cpu_realizefn() -> cpu_target_realize()
Browse files Browse the repository at this point in the history
The AccelCPUClass::cpu_realizefn handler is meant for target
specific code, rename it using '_target_' to emphasis it.

Suggested-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231003123026.99229-3-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
philmd authored and rth7680 committed Oct 3, 2023
1 parent e5dc722 commit 6294e50
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions accel/accel-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ bool accel_cpu_realize(CPUState *cpu, Error **errp)
{
CPUClass *cc = CPU_GET_CLASS(cpu);

if (cc->accel_cpu && cc->accel_cpu->cpu_realizefn) {
return cc->accel_cpu->cpu_realizefn(cpu, errp);
if (cc->accel_cpu && cc->accel_cpu->cpu_target_realize) {
return cc->accel_cpu->cpu_target_realize(cpu, errp);
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion include/hw/core/accel-cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef struct AccelCPUClass {

void (*cpu_class_init)(CPUClass *cc);
void (*cpu_instance_init)(CPUState *cpu);
bool (*cpu_realizefn)(CPUState *cpu, Error **errp);
bool (*cpu_target_realize)(CPUState *cpu, Error **errp);
} AccelCPUClass;

#endif /* ACCEL_CPU_H */
2 changes: 1 addition & 1 deletion target/i386/hvf/hvf-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void hvf_cpu_accel_class_init(ObjectClass *oc, void *data)
{
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);

acc->cpu_realizefn = host_cpu_realizefn;
acc->cpu_target_realize = host_cpu_realizefn;
acc->cpu_instance_init = hvf_cpu_instance_init;
}

Expand Down
2 changes: 1 addition & 1 deletion target/i386/kvm/kvm-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static void kvm_cpu_accel_class_init(ObjectClass *oc, void *data)
{
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);

acc->cpu_realizefn = kvm_cpu_realizefn;
acc->cpu_target_realize = kvm_cpu_realizefn;
acc->cpu_instance_init = kvm_cpu_instance_init;
}
static const TypeInfo kvm_cpu_accel_type_info = {
Expand Down
2 changes: 1 addition & 1 deletion target/i386/tcg/tcg-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void tcg_cpu_accel_class_init(ObjectClass *oc, void *data)
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);

#ifndef CONFIG_USER_ONLY
acc->cpu_realizefn = tcg_cpu_realizefn;
acc->cpu_target_realize = tcg_cpu_realizefn;
#endif /* CONFIG_USER_ONLY */

acc->cpu_class_init = tcg_cpu_class_init;
Expand Down

0 comments on commit 6294e50

Please sign in to comment.