mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
tcg: Remove needless CPUState::current_tb
This field was used for telling cpu_interrupt() to unlink a chain of TBs being executed when it worked that way. Now, cpu_interrupt() don't do this anymore. So we don't need this field anymore. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org> Message-Id: <1462273462-14036-1-git-send-email-sergey.fedorov@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
a0522c7a55
commit
3213525f8a
7 changed files with 2 additions and 41 deletions
|
@ -305,7 +305,6 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
|
|||
cpu_restore_state_from_tb(cpu, tb, retaddr);
|
||||
if (tb->cflags & CF_NOCACHE) {
|
||||
/* one-shot translation, invalidate it immediately */
|
||||
cpu->current_tb = NULL;
|
||||
tb_phys_invalidate(tb, -1);
|
||||
tb_free(tb);
|
||||
}
|
||||
|
@ -1309,9 +1308,9 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end)
|
|||
void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
|
||||
int is_cpu_write_access)
|
||||
{
|
||||
TranslationBlock *tb, *tb_next, *saved_tb;
|
||||
CPUState *cpu = current_cpu;
|
||||
TranslationBlock *tb, *tb_next;
|
||||
#if defined(TARGET_HAS_PRECISE_SMC)
|
||||
CPUState *cpu = current_cpu;
|
||||
CPUArchState *env = NULL;
|
||||
#endif
|
||||
tb_page_addr_t tb_start, tb_end;
|
||||
|
@ -1378,20 +1377,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
|
|||
¤t_flags);
|
||||
}
|
||||
#endif /* TARGET_HAS_PRECISE_SMC */
|
||||
/* we need to do that to handle the case where a signal
|
||||
occurs while doing tb_phys_invalidate() */
|
||||
saved_tb = NULL;
|
||||
if (cpu != NULL) {
|
||||
saved_tb = cpu->current_tb;
|
||||
cpu->current_tb = NULL;
|
||||
}
|
||||
tb_phys_invalidate(tb, -1);
|
||||
if (cpu != NULL) {
|
||||
cpu->current_tb = saved_tb;
|
||||
if (cpu->interrupt_request && cpu->current_tb) {
|
||||
cpu_interrupt(cpu, cpu->interrupt_request);
|
||||
}
|
||||
}
|
||||
}
|
||||
tb = tb_next;
|
||||
}
|
||||
|
@ -1407,7 +1393,6 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
|
|||
/* we generate a block containing just the instruction
|
||||
modifying the memory. It will ensure that it cannot modify
|
||||
itself */
|
||||
cpu->current_tb = NULL;
|
||||
tb_gen_code(cpu, current_pc, current_cs_base, current_flags, 1);
|
||||
cpu_resume_from_signal(cpu, NULL);
|
||||
}
|
||||
|
@ -1512,7 +1497,6 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,
|
|||
/* we generate a block containing just the instruction
|
||||
modifying the memory. It will ensure that it cannot modify
|
||||
itself */
|
||||
cpu->current_tb = NULL;
|
||||
tb_gen_code(cpu, current_pc, current_cs_base, current_flags, 1);
|
||||
if (locked) {
|
||||
mmap_unlock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue