[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 21/24] accel/tcg: Remove NULL check in tcg_flush_jmp_cache()
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH 21/24] accel/tcg: Remove NULL check in tcg_flush_jmp_cache() |
|
Date: |
Mon, 29 Apr 2024 00:14:47 +0200 |
I /think/ this check added in commit 4e4fa6c12d ("accel/tcg:
Complete cpu initialization before registration") is now
unnecessary, but I don't have the WASM reproducer mentioned
in:
https://lore.kernel.org/qemu-devel/20221027141856.w5umjgklawgu7pqv@heavy/
to confirm. Ilya, do you mind testing? If so, we could
squash this with the previous patch.
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/tcg/translate-all.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index ca1e193633..9b02f21b23 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -652,14 +652,8 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
*/
void tcg_flush_jmp_cache(CPUState *cpu)
{
- CPUJumpCache *jc;
+ CPUJumpCache *jc = &cpu->accel->tb_jmp_cache;
- /* During early initialization, the cache may not yet be allocated. */
- if (unlikely(cpu->accel == NULL)) {
- return;
- }
-
- jc = &cpu->accel->tb_jmp_cache;
for (int i = 0; i < TB_JMP_CACHE_SIZE; i++) {
qatomic_set(&jc->array[i].tb, NULL);
}
--
2.41.0
- Re: [PATCH 15/24] accel/tcg: Restrict IcountDecr and CPUTLB to TCG, (continued)
- [PATCH 16/24] accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 17/24] accel/tcg: Move @mem_io_pc from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 18/24] accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 20/24] accel/tcg: Move @tb_jmp_cache from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 21/24] accel/tcg: Remove NULL check in tcg_flush_jmp_cache(),
Philippe Mathieu-Daudé <=
- [PATCH 19/24] accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 24/24] accel/tcg: Move icount fields from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 23/24] accel/tcg: Restrict icount to system emulation, Philippe Mathieu-Daudé, 2024/04/28
- [PATCH 22/24] accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/28
- Re: [PATCH 00/24] exec: Rework around CPUState user fields (part 2), Philippe Mathieu-Daudé, 2024/04/28
- Re: [PATCH 00/24] exec: Rework around CPUState user fields (part 2), Philippe Mathieu-Daudé, 2024/04/29