Skip to content

Commit

Permalink
accel: Rename accel_cpu_realize() -> accel_cpu_common_realize()
Browse files Browse the repository at this point in the history
accel_cpu_realize() is a generic function working with CPUs
from any target. Rename it using '_common_' to emphasis it is
not target specific.

Suggested-by: Claudio Fontana <cfontana@suse.de>

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231003123026.99229-4-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 6294e50 commit bd684b2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion accel/accel-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void accel_cpu_instance_init(CPUState *cpu)
}
}

bool accel_cpu_realize(CPUState *cpu, Error **errp)
bool accel_cpu_common_realize(CPUState *cpu, Error **errp)
{
CPUClass *cc = CPU_GET_CLASS(cpu);

Expand Down
2 changes: 1 addition & 1 deletion cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
/* cache the cpu class for the hotpath */
cpu->cc = CPU_GET_CLASS(cpu);

if (!accel_cpu_realize(cpu, errp)) {
if (!accel_cpu_common_realize(cpu, errp)) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions include/qemu/accel.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ void accel_setup_post(MachineState *ms);
void accel_cpu_instance_init(CPUState *cpu);

/**
* accel_cpu_realize:
* accel_cpu_common_realize:
* @cpu: The CPU that needs to call accel-specific cpu realization.
* @errp: currently unused.
*/
bool accel_cpu_realize(CPUState *cpu, Error **errp);
bool accel_cpu_common_realize(CPUState *cpu, Error **errp);

/**
* accel_supported_gdbstub_sstep_flags:
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 @@ -35,7 +35,7 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp)
* x86_cpu_realize():
* -> x86_cpu_expand_features()
* -> cpu_exec_realizefn():
* -> accel_cpu_realize()
* -> accel_cpu_common_realize()
* kvm_cpu_realizefn() -> host_cpu_realizefn()
* -> check/update ucode_rev, phys_bits, mwait
*/
Expand Down

0 comments on commit bd684b2

Please sign in to comment.