diff mbox series

[2/4] accel/tcg: Remove unused tcg_flush_jmp_cache() stub

Message ID 20230914195229.78244-3-philmd@linaro.org
State New
Headers show
Series accel/tcg: Stubs cleanups | expand

Commit Message

Philippe Mathieu-Daudé Sept. 14, 2023, 7:52 p.m. UTC
Since commit ba7d3d1858 ("cpu_common_reset: wrap TCG
specific code in tcg_enabled()") we protect the single call
to tcg_flush_jmp_cache() with a check on tcg_enabled(). The
stub isn't needed anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/stubs/tcg-stub.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Harsh Prateek Bora Sept. 15, 2023, 3:12 p.m. UTC | #1
On 9/15/23 01:22, Philippe Mathieu-Daudé wrote:
> Since commit ba7d3d1858 ("cpu_common_reset: wrap TCG
> specific code in tcg_enabled()") we protect the single call
> to tcg_flush_jmp_cache() with a check on tcg_enabled(). The
> stub isn't needed anymore.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Commit log might need rephrase as I see multiple instance of call,
with one without check for tcg_enabled() in plugin_cpu_update__async but 
seems to be building only with tcg enabled so no build breaks.

Thanks
Harsh
> ---
>   accel/stubs/tcg-stub.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
> index f088054f34..dd890d6cf6 100644
> --- a/accel/stubs/tcg-stub.c
> +++ b/accel/stubs/tcg-stub.c
> @@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu)
>   {
>   }
>   
> -void tcg_flush_jmp_cache(CPUState *cpu)
> -{
> -}
> -
>   int probe_access_flags(CPUArchState *env, vaddr addr, int size,
>                          MMUAccessType access_type, int mmu_idx,
>                          bool nonfault, void **phost, uintptr_t retaddr)
Philippe Mathieu-Daudé Sept. 15, 2023, 3:41 p.m. UTC | #2
On 15/9/23 17:12, Harsh Prateek Bora wrote:
> 
> 
> On 9/15/23 01:22, Philippe Mathieu-Daudé wrote:
>> Since commit ba7d3d1858 ("cpu_common_reset: wrap TCG
>> specific code in tcg_enabled()") we protect the single call
>> to tcg_flush_jmp_cache() with a check on tcg_enabled(). The
>> stub isn't needed anymore.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> Commit log might need rephrase as I see multiple instance of call,
> with one without check for tcg_enabled() in plugin_cpu_update__async but 
> seems to be building only with tcg enabled so no build breaks.

TCG Plugins are restricted to TCG, so we don't need to guard
there :) I'll update the description mentioning it.

Thanks for your review!

> Thanks
> Harsh
>> ---
>>   accel/stubs/tcg-stub.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
>> index f088054f34..dd890d6cf6 100644
>> --- a/accel/stubs/tcg-stub.c
>> +++ b/accel/stubs/tcg-stub.c
>> @@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu)
>>   {
>>   }
>> -void tcg_flush_jmp_cache(CPUState *cpu)
>> -{
>> -}
>> -
>>   int probe_access_flags(CPUArchState *env, vaddr addr, int size,
>>                          MMUAccessType access_type, int mmu_idx,
>>                          bool nonfault, void **phost, uintptr_t retaddr)
diff mbox series

Patch

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index f088054f34..dd890d6cf6 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -18,10 +18,6 @@  void tb_flush(CPUState *cpu)
 {
 }
 
-void tcg_flush_jmp_cache(CPUState *cpu)
-{
-}
-
 int probe_access_flags(CPUArchState *env, vaddr addr, int size,
                        MMUAccessType access_type, int mmu_idx,
                        bool nonfault, void **phost, uintptr_t retaddr)