diff mbox series

[v5,2/6] target/unicore32: remove tlb_flush from uc32_init_fn

Message ID 20181009174557.16125-3-cota@braap.org
State New
Headers show
Series per-TLB lock | expand

Commit Message

Emilio Cota Oct. 9, 2018, 5:45 p.m. UTC
As far as I can tell tlb_flush does not need to be called
this early. tlb_flush is eventually called after the CPU
has been realized.

This change paves the way to the introduction of tlb_init,
which will be called from cpu_exec_realizefn.

Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 target/unicore32/cpu.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Alex Bennée Oct. 9, 2018, 6:14 p.m. UTC | #1
Emilio G. Cota <cota@braap.org> writes:

> As far as I can tell tlb_flush does not need to be called
> this early. tlb_flush is eventually called after the CPU
> has been realized.
>
> This change paves the way to the introduction of tlb_init,
> which will be called from cpu_exec_realizefn.
>
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  target/unicore32/cpu.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c
> index 68f978d80b..2b49d1ca40 100644
> --- a/target/unicore32/cpu.c
> +++ b/target/unicore32/cpu.c
> @@ -116,8 +116,6 @@ static void uc32_cpu_initfn(Object *obj)
>      env->uncached_asr = ASR_MODE_PRIV;
>      env->regs[31] = 0x03000000;
>  #endif
> -
> -    tlb_flush(cs);
>  }
>
>  static const VMStateDescription vmstate_uc32_cpu = {

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

--
Alex Bennée
Richard Henderson Oct. 9, 2018, 8:49 p.m. UTC | #2
On 10/9/18 10:45 AM, Emilio G. Cota wrote:
> As far as I can tell tlb_flush does not need to be called
> this early. tlb_flush is eventually called after the CPU
> has been realized.
> 
> This change paves the way to the introduction of tlb_init,
> which will be called from cpu_exec_realizefn.
> 
> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  target/unicore32/cpu.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c
index 68f978d80b..2b49d1ca40 100644
--- a/target/unicore32/cpu.c
+++ b/target/unicore32/cpu.c
@@ -116,8 +116,6 @@  static void uc32_cpu_initfn(Object *obj)
     env->uncached_asr = ASR_MODE_PRIV;
     env->regs[31] = 0x03000000;
 #endif
-
-    tlb_flush(cs);
 }
 
 static const VMStateDescription vmstate_uc32_cpu = {