mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-07 15:07:42 -07:00
accel/tcg: Remove mttcg_enabled
In qemu_tcg_mttcg_enabled, read the value from TCGState and eliminate the separate global variable. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
60b2c2e66b
commit
61fc4c2bfa
1 changed files with 2 additions and 6 deletions
|
|
@ -60,14 +60,11 @@ DECLARE_INSTANCE_CHECKER(TCGState, TCG_STATE,
|
|||
TYPE_TCG_ACCEL)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
static bool mttcg_enabled;
|
||||
|
||||
bool qemu_tcg_mttcg_enabled(void)
|
||||
{
|
||||
return mttcg_enabled;
|
||||
TCGState *s = TCG_STATE(current_accel());
|
||||
return s->mttcg_enabled;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
/*
|
||||
|
|
@ -124,7 +121,6 @@ static int tcg_init_machine(MachineState *ms)
|
|||
#ifndef CONFIG_USER_ONLY
|
||||
if (s->mttcg_enabled) {
|
||||
max_threads = ms->smp.max_cpus;
|
||||
mttcg_enabled = true;
|
||||
}
|
||||
#endif
|
||||
tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue