summaryrefslogtreecommitdiff
path: root/tcg/region.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-03-09 23:06:32 -0600
committerRichard Henderson <richard.henderson@linaro.org>2021-06-11 09:27:08 -0700
commit0e2d61cf29833f8984e7421a74eb0a4f921f92b5 (patch)
tree34e51645c3f4f6f92d2159d00fe7a8971d975221 /tcg/region.c
parent43b972b7ebe9b8e84aa535031de7e605f6bf2cb2 (diff)
downloadqemu-0e2d61cf29833f8984e7421a74eb0a4f921f92b5.zip
tcg: Introduce tcg_max_ctxs
Finish the divorce of tcg/ from hw/, and do not take the max cpu value from MachineState; just remember what we were passed in tcg_init. Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/region.c')
-rw-r--r--tcg/region.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcg/region.c b/tcg/region.c
index 877baf16f5..57069a38ff 100644
--- a/tcg/region.c
+++ b/tcg/region.c
@@ -347,7 +347,7 @@ void tcg_region_initial_alloc(TCGContext *s)
/* Call from a safe-work context */
void tcg_region_reset_all(void)
{
- unsigned int n_ctxs = qatomic_read(&n_tcg_ctxs);
+ unsigned int n_ctxs = qatomic_read(&tcg_cur_ctxs);
unsigned int i;
qemu_mutex_lock(&region.lock);
@@ -934,7 +934,7 @@ void tcg_region_prologue_set(TCGContext *s)
*/
size_t tcg_code_size(void)
{
- unsigned int n_ctxs = qatomic_read(&n_tcg_ctxs);
+ unsigned int n_ctxs = qatomic_read(&tcg_cur_ctxs);
unsigned int i;
size_t total;
@@ -970,7 +970,7 @@ size_t tcg_code_capacity(void)
size_t tcg_tb_phys_invalidate_count(void)
{
- unsigned int n_ctxs = qatomic_read(&n_tcg_ctxs);
+ unsigned int n_ctxs = qatomic_read(&tcg_cur_ctxs);
unsigned int i;
size_t total = 0;