diff mbox

[for-2.10,2/3] target/mips: Drop redundant gen_io_start/stop()

Message ID de6d5c5610c6b5887e72e60a999963c9d414742b.1501667615.git-series.james.hogan@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Hogan Aug. 2, 2017, 9:59 a.m. UTC
DMTC0 CP0_Cause does a redundant gen_io_start() and gen_io_end() pair,
even though this is done for all DMTC0 operations outside of the switch
statement. Remove these redundant calls.

Fixes: 5dc5d9f055c5 ("mips: more fixes to the MIPS interrupt glue logic")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Yongbok Kim <yongbok.kim@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
---
 target/mips/translate.c | 8 --------
 1 file changed, 0 insertions(+), 8 deletions(-)

Comments

Richard Henderson Aug. 2, 2017, 3 p.m. UTC | #1
On 08/02/2017 02:59 AM, James Hogan wrote:
> DMTC0 CP0_Cause does a redundant gen_io_start() and gen_io_end() pair,
> even though this is done for all DMTC0 operations outside of the switch
> statement. Remove these redundant calls.
> 
> Fixes: 5dc5d9f055c5 ("mips: more fixes to the MIPS interrupt glue logic")
> Signed-off-by: James Hogan<james.hogan@imgtec.com>
> Cc: Yongbok Kim<yongbok.kim@imgtec.com>
> Cc: Aurelien Jarno<aurelien@aurel32.net>
> ---
>   target/mips/translate.c | 8 --------
>   1 file changed, 0 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~
Philippe Mathieu-Daudé Aug. 2, 2017, 9:42 p.m. UTC | #2
On 08/02/2017 06:59 AM, James Hogan wrote:
> DMTC0 CP0_Cause does a redundant gen_io_start() and gen_io_end() pair,
> even though this is done for all DMTC0 operations outside of the switch
> statement. Remove these redundant calls.
> 
> Fixes: 5dc5d9f055c5 ("mips: more fixes to the MIPS interrupt glue logic")
> Signed-off-by: James Hogan <james.hogan@imgtec.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Cc: Yongbok Kim <yongbok.kim@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> ---
>   target/mips/translate.c | 8 --------
>   1 file changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index 6b41f7b65e00..6e724ac71dcd 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -7403,15 +7403,7 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
>           switch (sel) {
>           case 0:
>               save_cpu_state(ctx, 1);
> -            /* Mark as an IO operation because we may trigger a software
> -               interrupt.  */
> -            if (ctx->tb->cflags & CF_USE_ICOUNT) {
> -                gen_io_start();
> -            }
>               gen_helper_mtc0_cause(cpu_env, arg);
> -            if (ctx->tb->cflags & CF_USE_ICOUNT) {
> -                gen_io_end();
> -            }
>               /* Stop translation as we may have triggered an intetrupt. BS_STOP
>                * isn't sufficient, we need to ensure we break out of translated
>                * code to check for pending interrupts.  */
>
diff mbox

Patch

diff --git a/target/mips/translate.c b/target/mips/translate.c
index 6b41f7b65e00..6e724ac71dcd 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -7403,15 +7403,7 @@  static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
         switch (sel) {
         case 0:
             save_cpu_state(ctx, 1);
-            /* Mark as an IO operation because we may trigger a software
-               interrupt.  */
-            if (ctx->tb->cflags & CF_USE_ICOUNT) {
-                gen_io_start();
-            }
             gen_helper_mtc0_cause(cpu_env, arg);
-            if (ctx->tb->cflags & CF_USE_ICOUNT) {
-                gen_io_end();
-            }
             /* Stop translation as we may have triggered an intetrupt. BS_STOP
              * isn't sufficient, we need to ensure we break out of translated
              * code to check for pending interrupts.  */